OSDN Git Service

2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2
3         * buffer.c: Remove unnecessary casts.
4         * check-init.c: Likewise.
5         * class.c: Likewise.
6         * constants.c: Likewise.
7         * decl.c: Likewise.
8         * except.c: Likewise.
9         * gjavah.c: Likewise.
10         * jcf-io.c: Likewise.
11         * jcf-parse.c: Likewise.
12         * jcf-path.c: Likewise.
13         * jvspec.c: Likewise.
14         * lang.c: Likewise.
15         * lex.c: Likewise.
16         * verify.c: Likewise.
17
18 2002-11-06  Tom Tromey  <tromey@redhat.com>
19
20         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
21         a JNI header.
22
23 2002-11-05  Tom Tromey  <tromey@redhat.com>
24
25         Fix for PR java/6388.
26         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
27         * java-tree.h (enum java_tree_index): New values
28         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
29         (decimal_int_max, decimal_long_max): New defines.
30         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
31         (error_if_numeric_overflow): Rewrote range checking.
32         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
33         decimal_long_max.
34
35 2002-11-02  Tom Tromey  <tromey@redhat.com>
36
37         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
38
39         * class.c (make_method_value): Put class name, not signature, into
40         `throws' field.  For PR java/8415.
41
42 2002-10-24  Tom Tromey  <tromey@redhat.com>
43
44         * gcj.texi (Invoking gij): Document --showversion.
45         (Standard Properties): java.library.path now set.
46
47 2002-10-23  Tom Tromey  <tromey@redhat.com>
48
49         * gjavah.c (decode_signature_piece): In JNI mode, print
50         `jobjectArray' when array depth is nonzero.
51         Fixes PR java/8296.
52
53 2002-10-15  Andrew Haley  <aph@redhat.com>
54
55         * parse.y (patch_invoke): Call force_evaluation_order on a static
56         arg list.
57         (resolve_qualified_expression_name): Call force_evaluation_order
58         on a arg list that is part of a Qualified Expression Name.
59
60         * lang.c (dump_compound_expr): New.
61         (java_dump_tree): New.
62
63 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
64
65         * gcj.texi: Added item describing the GCJ runtime property
66         "gnu.gcj.progname".
67
68 2002-10-15  Richard Henderson  <rth@redhat.com>
69
70         * jcf-parse.c (get_constant): Fix type warning.
71
72 2002-10-15  Andrew Haley  <aph@redhat.com>
73
74         * java-tree.h (java_inlining_merge_static_initializers): Declare.
75         (java_inlining_map_static_initializers): Declare.
76
77 2002-10-14  Andrew Haley  <aph@redhat.com>
78
79         * tree-inline.c (remap_block): All local class initialization
80         flags go in the outermost scope.
81         (expand_call_inline): Call java_inlining_map_static_initializers.
82         (expand_call_inline): Call java_inlining_merge_static_initializers.
83         * java/lang.c (merge_init_test_initialization): New.
84         (java_inlining_merge_static_initializers): New.
85         (inline_init_test_initialization): New.
86         (java_inlining_map_static_initializers): New.
87
88 2002-10-11  Mark Wielaard  <mark@klomp.org>
89
90         * gcj.texi (Compatibility): Add Limitations and Extensions section.
91
92 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
93
94         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
95
96 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
97
98         * parse.y (merge_string_cste): Add parentheses around & within |.
99
100 2002-10-08  Tom Tromey  <tromey@redhat.com>
101
102         * parse.y (variable_declarator_id): Simplify error path for
103         array declarator error.  For PR java/8003.
104
105 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
106
107         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
108         bug_report_url.
109
110 2002-10-08  Andrew Haley  <aph@redhat.com>
111
112         * parse.y (attach_init_test_initialization_flags): Check for
113         error_mark_node.
114
115 2002-10-07  Anthony Green  <green@redhat.com>
116
117         * parse.y (merge_string_cste): Fix bug in string concatenation.
118
119 2002-10-03  Michael Koch  <konqueror@gmx.de>
120
121         * gcj.texi (Standard properties):
122         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
123
124 2002-10-02  Roger Sayle  <roger@eyesopen.com>
125
126         PR optimization/6627
127         * lang.c (java_init): If storing the vbit in function
128         pointers, ensure that force_align_functions_log is atleast
129         one to aid compatability with g++ vtables.
130
131 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
132
133         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
134         foul of type-based aliasing.
135
136 2002-09-30  Anthony Green  <green@redhat.com>
137
138         * gcj.texi (Invoking jv-scan): Fix texinfo.
139
140 2002-09-28  Anthony Green  <green@redhat.com>
141
142         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
143         (Code Generation): Add -fno-assert documentation.
144         * jv-scan.c (flag_assert): New global.
145         (options): Add assert option.
146         (help): Add --no-assert documentation.
147         * parse-scan.y (flag_assert): New global.
148         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
149         (flag_assert): New global.
150         * java-tree.h (flag_assert): New global.
151         * lex.c (java_lex): Obey flag_assert.
152         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
153         calling cc1.
154
155 2002-09-26  Andrew Haley  <aph@redhat.com>
156
157         * expr.c (build_java_array_length_access): Check for null pointer.
158         * expr.c (expand_java_arrayload): Likewise.
159
160 2002-09-21  Richard Henderson  <rth@redhat.com>
161
162         * jcf-parse.c (get_constant): Decode from IEEE no matter
163         what the target format.
164
165 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
166
167         * ChangeLog: Follow spelling conventions.
168         * class.c: Likewise.
169         * decl.c: Likewise.
170         * expr.c: Likewise.
171         * gjavah.c: Likewise.
172         * java-tree.h: Likewise.
173         * jcf-dump.c: Likewise.
174         * jcf-parse.c: Likewise.
175         * jvspec.c: Likewise.
176         * lang.c: Likewise.
177         * mangle.c: Likewise.
178         * parse.y: Likewise.
179
180 2002-09-17  Tom Tromey  <tromey@redhat.com>
181
182         * lex.c (java_read_unicode_collapsing_terminators): Handle case
183         where \r appears at EOF.  Fixes PR java/7950.
184
185 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
186
187         * java-tree.h (union lang_tree_node): Add chain_next option.
188
189 2002-09-16  Richard Henderson  <rth@redhat.com>
190
191         * jcf-parse.c (get_constant): Runtime check for IEEE format;
192         use new real.h interface.
193         * jcf-write.c (find_constant_index): Use new real.h interface.
194         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
195
196 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
197
198         * lang.c: Follow spelling conventions.
199
200 2002-09-11  Per Bothner  <per@bothner.com>
201
202         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
203         constant to the type of the field.
204         (java_complete_tree):  Remove now-redundant code.
205
206         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
207
208 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
209
210         For PR java/5794:
211         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
212         return label if a ret instruction for the jsr has been reached.
213
214 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
215
216         * parse.y (DIR_SEPARATOR): Don't define.
217         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
218
219 2002-08-28  Andrew Haley  <aph@redhat.com>
220
221         * verify.c (verify_jvm_instructions): Allow exception handler
222         inside code that is being protected, but generate a warning.
223         * except.c (link_handler): Initialize `expanded' in new eh_range.
224         (binding_depth, is_class_level, current_pc): Declare extern.
225
226 2002-09-01  Mark Wielaard <mark@klomp.org>
227
228         * gcj.texi: Add chapter about system properties.
229         Fixed some typos.
230
231 2002-08-26  Tom Tromey  <tromey@redhat.com>
232
233         * parse.y (try_builtin_assignconv): Allow narrowing primitive
234         conversion if RHS_TYPE is byte, short, or char.
235
236 2002-08-22  Tom Tromey  <tromey@redhat.com>
237
238         * gcj.texi (Invoking gij): Document -cp and -classpath.
239
240 2002-08-21  Tom Tromey  <tromey@redhat.com>
241
242         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
243         $(prefix)/share.  For PR libgcj/7633.
244
245         For PR java/6005 and PR java/7611:
246         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
247         (java_can_use_bit_fields_p): New function.
248
249 2002-08-16  Tom Tromey  <tromey@redhat.com>
250
251         * gcj.texi (Class Initialization): Mention class initialization of
252         arrays.
253
254 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
255
256         * Make-lang.in (java-tree-inline.o): New.
257         (JAVA_OBJS): Add java-tree-inline.o.
258         * parse.y (source_end_java_method): Call java_optimize_inline.
259         (java_expand_method_bodies): Save method's tree in
260         DECL_SAVED_TREE.
261         (add_stmt_to_compound): Keep track of the number of statments.
262         * lang.c (java_init): Enable flag_inline_trees.
263         (java_post_options): If flag_inline_functions is on, enable
264         flag_inline_trees instread.
265         (decl_constant_value): New.
266         (java_tree_inlining_walk_subtrees): New.
267         * java-tree.h (DECL_NUM_STMTS): New macro.
268         (java_optimize_inline): Declare.
269         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
270         Handle a LABEL_EXPR.
271         * decl.c (build_result_decl): If we already have a DECL_RESULT
272         don't make another.
273         (dump_function): New.
274         (java_optimize_inline): New.
275         (dump_function): New.
276
277 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
278
279         For PR java/7483:
280         * parse.y (build_assertion): Invert return from
281         desiredAssertionStatus.
282
283 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
284
285         * jcf-write.c (get_access_flags): Return correct access flags for
286         private and protected inner classes.
287
288 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
289
290         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
291
292 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
293
294         * mangle_name.c: Don't include obstack.h twice.
295         * xref.c: Don't include obstack.h.
296
297 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
298
299         * class.c: (permanent_obstack): Delete declaration.
300         * constants.c: (permanent_obstack): Delete declaration.
301         * except.c: (permanent_obstack): Delete declaration.
302         * expr.c: (permanent_obstack): Delete declaration.
303         * jcf-parse.c: (permanent_obstack): Delete declaration.
304         (saveable_obstack): Delete declaration.
305         * parse.h: (permanent_obstack): Delete declaration.
306         * typeck.c: (permanent_obstack): Delete declaration.
307
308 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
309
310         * gcj.texi (version-gcc): Increase to 3.3.
311
312 2002-07-22  Tom Tromey  <tromey@redhat.com>
313
314         * lex.c (java_lex): Check for `e' or `E' after 0.
315
316 2002-07-21  Richard Henderson  <rth@redhat.com>
317
318         * lang.c (java_unsafe_for_reeval): New.
319         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
320
321 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
322
323         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
324         (jcf_path_init): Use GET_ENVIRONMENT.
325
326 2002-07-10  Roger Sayle  <roger@eyesopen.com>
327             Zack Weinberg <zack@codesourcery.com>
328
329         * builtins.c (initialize_builtins): Remove defines that
330         handled C/C++ specific junk hereby removed from builtins.def.
331
332 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
333
334         * lang.c (java_post_options): Update prototype.
335
336 2002-07-05  Roger Sayle  <roger@eyesopen.com>
337
338         * builtins.c (initialize_builtins): Ignore the additional
339         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
340         the builtins.def file.
341
342 2002-07-01  Tom Tromey  <tromey@redhat.com>
343
344         For PR libgcj/7073:
345         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
346         specially.
347
348 2002-07-01  Roger Sayle  <roger@eyesopen.com>
349
350         * java/decl.c (builtin_function): Accept additional parameter.
351         (java_init_decl_processing): Pass an additional NULL_TREE
352         argument to builtin_function.
353
354 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
355
356         * gcj.texi: Fixed gcj invocation example so that it compiles.
357
358 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
359
360         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
361         * parse.y (mark_parser_ctxt): Likewise.
362         (check_modifiers, declare_local_variables): Avoid incorrect
363         hardcoded constant 10.
364
365         * lex.c (java_read_char): Avoid "comparison is always true"
366         warning.
367
368 2002-06-25  Andreas Schwab  <schwab@suse.de>
369
370         * expr.c (JSR): Avoid undefined operation on PC.
371
372 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
373
374         * decl.c (clear_binding_level): Const-ify.
375
376 2002-06-13  Akim Demaille  <akim@epita.fr>
377
378         * parse.y (class_declaration, interface_declaration): Make sure
379         all their rules have an action, in order to avoid meaningless `$$
380         = $1' and their type clashes.
381
382 2002-06-11  Tom Tromey  <tromey@redhat.com>
383
384         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
385         * parse-scan.y (statement_without_trailing_substatement): Added
386         assert_statement.
387         (assert_statement): New rule.
388         * java-tree.h (struct lang_type) [assertions]: New field.
389         (TYPE_USES_ASSERTIONS): New macro.
390         (CLASS_USES_ASSERTIONS): Likewise.
391         (FIELD_SYNTHETIC): New define.
392         * lex.c (java_lval;): Added ASSERT_TK.
393         * parse.y (ASSERT_TK): Added.
394         (statement_without_trailing_substatement): Added assert_statement.
395         (assert_statement): New rule.
396         (build_assertion): New function.
397         (maybe_generate_pre_expand_clinit): Create and initialize
398         $assertionsDisabled.
399         (lookup_package_type): Removed decl.
400         * keyword.h: Rebuilt.
401         * keyword.gperf (assert): New token.
402
403 2002-06-10  Akim Demaille  <akim@epita.fr>
404
405         * parse.y (interface_type_list, class_member_declaration)
406         (unary_expression_not_plus_minus): Remove duplicate %type.
407         Whitespace changes.
408
409 2002-06-09  Tom Tromey  <tromey@redhat.com>
410
411         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
412
413         * parse.y (method_header): Give error message in all cases.
414         Fixes PR java/6865.
415
416 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
417
418         Don't use RTL inlining. Fix for PR java/6820.
419         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
420         (flag_really_inline): New.
421         (java_decode_option): Set flag_really_inline if -finline-functions
422         is seen.
423         (java_post_options): New function. Turn off inlining unless
424         flag_really_inline is set.
425
426 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
427
428         * gjavah.c (throwable_p): Accept argument as either a classname or
429         signature fragment. Create null-terminated classname string for super
430         when calling itself recursively.
431         (decode_signature_piece): Skip first character from class name
432         signature when calling throwable_p.
433
434 2002-06-08  H.J. Lu  (hjl@gnu.org)
435
436         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
437
438 2002-06-04  Tom Tromey  <tromey@redhat.com>
439
440         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
441
442 2002-06-04  Michael Koch  <konqueror@gmx.de>
443
444         * gcj.texi (Input Options): Fixed typo.
445
446 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
447
448         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
449         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
450         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
451         and all now-pointless local variables.  Rename other local
452         variables to reflect their not being handles.
453
454         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
455         #if JCF_USE_STDIO blocks.
456
457         * parse.y: Add missing semicolon at end of rule.
458
459 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
460
461         * check-init.c (attach_initialized_static_class): Delete, unused.
462         * parse.y: Use htab_t instead of struct hashtable, update
463         all uses.
464         * java-tree.h: Include hashtab.h instead of hash.h.
465         (struct lang_decl_func): Use htab_t, set up for gengtype.
466         (struct init_test_hash_entry): Delete.
467         (struct treetreehash_entry): New.
468         (java_treetreehash_find): New
469         (java_treetreehash_new): New prototype.
470         (java_treetreehash_create): New prototype.
471         (java_mark_tree): Delete prototype.
472         (java_hash_hash_tree_node): Delete prototype.
473         (java_hash_compare_tree_node): Delete prototype.
474         (attach_initialized_static_class): Delete prototype.
475         * expr.c (build_class_init): Update to use java_treetreehash
476         functions.
477         (java_expand_expr): Update to use htab_t.
478         (emit_init_test_initialization): Likewise.
479         * decl.c (java_mark_tree): Delete.
480         * class.c (init_test_hash_newfunc): Delete.
481         (java_hash_hash_tree_node): Delete.
482         (java_hash_compare_tree_node): Delete.
483         (add_method_1): Update to use java_treetreehash functions.
484         (JAVA_TREEHASHHASH_H): New macro.
485         (java_treetreehash_hash): New function.
486         (java_treetreehash_compare): New function.
487         (java_treetreehash_find): New function.
488         (java_treetreehash_new): New function.
489         (java_treetreehash_create): New function.
490         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
491
492         * Make-lang.in (java/parse.o): Depend on debug.h.
493         * java-tree.h (struct lang_identifier): Use gengtype.
494         (union lang_tree_node): New.
495         (struct lang_decl_func): Use gengtype.
496         (struct lang_decl_var): Likewise.
497         (struct lang_decl): Likewise.
498         * parse.y: Include debug.h.
499         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
500
501         * lang.c (struct language_function): New dummy structure.
502
503         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
504         descriminator for DECL_LANG_SPECIFIC.
505         (struct lang_decl_func): Rename from struct lang_decl.
506         (enum lang_decl_desc): New.
507         (struct lang_decl): Make it a union.  Update all the accessor macros.
508         (struct lang_type): Use gengtype.
509         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
510         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
511         are now the same size.
512         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
513         use discriminator to mark DECL_LANG_SPECIFIC.
514
515         * Make-lang.in (gt-java-builtins.h): New rule.
516         (java/builtins.o): Add dependency on gt-<filename>.h.
517         * builtins.c: Use gengtype for roots.
518         (union string_or_tree): Use gengtype.
519         (struct builtin_record): Use gengtype.
520         * config-lang.in (gtfiles): Add builtins.c.
521
522         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
523         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
524         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
525         gt-java-parse.h, gtype-java.h): Add rules to generate.
526         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
527         (class.o): Add dependency on gt-*.h.
528         (constants.o): Likewise.
529         (decl.o): Likewise.
530         (expr.o): Likewise.
531         (jcf-parse.o): Likewise.
532         (jcf-write.o): Likewise.
533         (lang.o): Likewise.
534         * config-lang.in (gtfiles): New.
535         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
536         * constants.c: Replace uses of ggc_add_* with GTY markers.
537         Include gt-*.h.
538         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
539         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
540         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
541         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
542         Include gt-*.h.
543         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
544         Include gt-*.h.
545         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
546         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
547         gt-*.h.
548         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
549         Include gtype-java.h.
550
551 2002-06-02  Tom Tromey  <tromey@redhat.com>
552
553         Fix for PR java/5913:
554         * parse.y (patch_binop): Call patch_string on op1.
555
556 2002-06-02  Tom Tromey  <tromey@redhat.com>
557
558         Fix for PR java/1343, PR java/6336:
559         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
560         formatting.  Changed return type.
561         (anonymous_class_counter): Moved to top of file.
562         (maybe_make_nested_class_name): Append number to class name for
563         function-local classes.
564
565 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
566
567         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
568         * Make-lang.in: Update dependency lists.
569
570 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
571
572         * gjavah.c (throwable_p): Do not free the name of the class after
573         passing it to find_class.
574         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
575         * jcf-io.c (dirent.h): Include it.
576         (fnmatch.h): Likewise.
577         (compare_path): New function.
578         (java_or_class_file): Likewise.
579         (memoized_dirlist_entry): New type.
580         (memoized_dirlist_lookup_eq): New function.
581         (memoized_dirlists): New variable.
582         (caching_stat): New function.
583         (memoized_class_lookup_eq): New function.
584         (memoized_class_lookups): Likewise.
585         (find_class): Use memoized_class_lookups and caching_stat.
586         * jcf.h (JCF_USE_SCANDIR): Define.
587         * parse.y (java_expand_classes): Write the class files in reverse
588         order.
589
590 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
591
592         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
593
594 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
595
596         * jcf-write.c (write_classfile): Unlink the temporary file if it
597         cannot be renamed.  Use concat to build up the name of the
598         temporary file.
599
600 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
601
602         * jcf-write.c (write_classfile): Write the file to a
603         temporary file and then rename it.
604
605 2002-05-07  Tom Tromey  <tromey@redhat.com>
606
607         * gjavah.c (throwable_p): Use xstrdup, not strdup.
608
609         Fix for PR java/1200:
610         * gjavah.c (throwable_p): New function.
611         (decode_signature_piece): Use it.  A `WeakReference' isn't the
612         same as a `jweak'.
613         Include hashtab.h.
614         (gcjh_streq): New function.
615
616 2002-05-07  Andreas Jaeger  <aj@suse.de>
617
618         * parse.y (finish_for_loop): Fix if statement.
619
620 2002-05-06  Tom Tromey  <tromey@redhat.com>
621
622         Fix for PR java/5941:
623         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
624         loop update expression.
625         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
626         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
627
628 2002-05-04  Mark Wielaard  <mark@klomp.org>
629
630         For PR java/6519:
631         * parse.y (build_string_concatenation): Return just op1 only when op2
632         is null and op1 is a STRING_CST, otherwise always construct a
633         StringBuffer.
634
635 2002-04-27  Tom Tromey  <tromey@redhat.com>
636
637         For PR java/6382:
638         * parse.y (string_convert_int_cst): New function.
639         (merge_string_cste): Use it.
640
641 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
642
643         * java-tree.h (java_parse_file): Update.
644         (java_set_yydebug): Remove.
645         * jcf-parse.c (yydebug): Remove.
646         (java_set_yydebug): Die.
647         (java_parse_file): Update.
648         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
649
650 2002-04-24  Tom Tromey  <tromey@redhat.com>
651
652         For PR java/6425:
653         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
654         EXPR_WFL_QUALIFICATION of qual_wfl.
655
656 2002-04-23  Per Bothner  <per@bothner.com>
657
658         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
659         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
660         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
661
662 2002-04-23  Tom Tromey  <tromey@redhat.com>
663
664         For PR java/6314:
665         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
666         recognize `-fcompile-resource='.
667         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
668         a bit.
669
670 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
671
672         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
673         paths. Fixes PR java/2791.
674
675 2002-04-19  Andrew Haley  <aph@redhat.com>
676
677         * jcf-write.c (push_long_const): lo, hi: New variables.
678         Use rshift_double to extract the high part of a 64-bit long.
679         Use WORD_TO_INT to extract the low part.
680
681         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
682         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
683         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
684
685 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
686
687         * typeck.c (incomplete_type_error): Remove.
688
689 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
690
691         * class.c (make_class_data): Set DECL_ALIGN on static class data,
692         for hash synchronization.
693         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
694         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
695         class_type_node.
696
697 2002-04-16  Mark Wielaard  <mark@klomp.org>
698
699         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
700         negative zero.
701
702 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
703
704         Fix for PR java/6294:
705         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
706         interfaces.
707
708 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
709
710         Fix for PR java/6085:
711         * parse.y (patch_method_invocation): Always use build_access_to_thisn
712         to get enclosing "this" argument for inner-class constructor
713         invocation. Pass correct arguments to build_access_to_thisn.
714
715 2002-04-10  Andreas Jaeger  <aj@suse.de>
716
717         * gcj.texi (Input Options): Fix extdirs patch.
718
719 2002-04-10  Anthony Green  <green@redhat.com>
720
721         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
722
723 2002-04-09  Anthony Green  <green@redhat.com>
724
725         * gcj.texi (Input Options): Add --extdirs documentation.
726         * jcf-dump.c (OPT_extdirs): New macro.
727         (options): Add extdirs option.
728         (help): Describe --extdirs.
729         (main): Handle OPT_extdirs.
730         * gjavah.c (OPT_extdirs): New macro.
731         (options): Add extdirs option.
732         (help): Describe --extdirs.
733         (main): Handle OPT_extdirs.
734         * jcf-path.c (jcf_path_init): Add extdirs support.
735         (jcf_path_extdirs_arg): New function.
736         (extensions): New variable to hold extensions path entries.
737         * jvspec.c: Remove -fextdirs= when compiling main().
738         * lang.c (java_decode_option): Handle -fextdirs=.
739         * jcf.h (jcf_path_extdirs_arg): Declare new function.
740         * Make-lang.in: Compile jcf-path with version info for use in
741         identifying the appropriate libgcj.jar.
742
743 2002-04-08  Tom Tromey  <tromey@redhat.com>
744
745         For PR libgcj/5303:
746         * .cvsignore: Added rmic.1 and rmiregistry.1.
747         * gcj.texi (Top): Link to new nodes.
748         (Invoking rmic): New node.
749         (Invoking rmiregistry): Likewise.
750         * Make-lang.in (java.generated-manpages): Added rmic.1 and
751         rmiregistry.1.
752         (java.maintainer-clean): Likewise.
753         ($(srcdir)/java/rmic.1): New target.
754         ($(srcdir)/java/rmiregistry.1): Likewise.
755         (java.install-man): Handle rmic.1 and rmiregistry.1.
756
757 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
758
759         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
760         Add note about handling uncaught exceptions. Add an exception handler
761         to example.
762
763 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
764
765         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
766         after using it to patch CALL_EXPR.
767
768 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
769
770         * gcj.texi (Invocation): Document CNI invocation API.
771
772 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
773
774         * expr.c (truthvalue_conversion): Rename.  Update.
775         (expand_compare): Update.
776         * java-tree.h (java_truthvalue_conversion): New.
777         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
778
779 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
780
781         * java-tree.h (java_mark_addressable): New.
782         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
783         * typeck.c (mark_addressable): Rename, update.
784
785 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
786
787         * expr.c (build_java_binop): Update.
788         * java-tree.h (java_signed_type, java_unsigned_type,
789         java_signed_or_unsigned_type): Update.
790         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
791         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
792         * parse.y (patch_binop): Update.
793         * typeck.c (signed_or_unsigned_type, unsigned_type,
794         signed_type): Update.
795
796 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
797
798         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
799         (java_dummy_print): Remove.
800         (lang_print_error): Rename.  Exit early if inhibiting output.
801         (inhibit_error_printing_function): New.
802         (java_init): Don't set hook.
803         (lang_init_source): Use new boolean.
804
805 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
806
807         * parse.y (do_resolve_class): Fix infinite recursion.
808
809 2002-03-29  Tom Tromey  <tromey@redhat.com>
810
811         * parse.y (check_inner_circular_reference): Ignore incomplete
812         types.
813
814 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
815
816         * Make-lang.in (builtins.o): Update.
817         * boehm.c (get_boehm_type_descriptor): Update.
818         * builtins.c: Include langhooks.h.
819         * decl.c (java_init_decl_processing): Update.
820         * java-tree.h (java_type_for_mode, java_type_for_size): New.
821         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
822         Redefine.
823         * typeck.c (type_for_mode, type_for_size): Update.
824
825 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
826
827         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
828
829 2002-03-28  Tom Tromey  <tromey@redhat.com>
830
831         * except.c (expand_end_java_handler): If the handler type is NULL,
832         use java.lang.Throwable.  Fixes PR java/5986.
833
834 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
835
836         Fix for PR java/4715:
837         * jcf-parse.c (parse_source_file_3): New function.
838         (read_class): Call it.
839         (java_parse_file): Likewise.
840
841 Thu Mar 28 13:22:22 CET 2002  Jan Hubicka  <jh@suse.cz>
842
843         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
844
845 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
846
847         * parse.y (resolve_package): Initialize "decl".
848         (lookup_package_type): Remove unused function.
849
850 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
851
852         Fix for PR java/5993:
853         * parse.y (resolve_package): Return the decl if resolution was
854         successful. Don't special case "java.lang" and "java.lang.reflect"
855         packages. Set type_name to the merged identifier.
856         (resolved_qualified_expression_name): Print error using "name" if
857         resolve_package returns NULL_TREE.
858
859 2002-03-27  Tom Tromey  <tromey@redhat.com>
860
861         * expr.c (expand_invoke): Don't generate null pointer check if
862         we're calling <init>.
863
864 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
865
866         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
867         fix prototype.
868         * java-tree.h (java_lang_expand_expr): Similarly.
869         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
870         (java_init): Don't set hook.
871
872 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
873
874         Fix for PR java/5850:
875         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
876         context if field was not found in the current scope.
877         * expr.c (lookup_field): Don't look in enclosing contexts.
878
879 2002-03-26  Tom Tromey  <tromey@redhat.com>
880
881         Fix for PR java/5942:
882         * parse.y (init_src_parse): Added sanity check.
883         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
884         elements, not 11.
885
886 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
887
888         * decl.c (lang_mark_tree): Rename java_mark_tree.
889         * java-tree.h (java_mark_tree): New.
890         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
891
892 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
893
894         * lex.c: Change java_perform_atof to take normal parameters
895         instead of a pointer to a parameter block.  Call it directly
896         from java_lex.
897
898 2002-03-22  Mark Wielaard  <mark@klomp.org>
899
900         Fix for PR java/5368:
901         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
902         when printing error message.
903
904 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
905
906         * decl.c (maybe_build_cleanup): Remove.
907
908 2002-03-22  Tom Tromey  <tromey@redhat.com>
909
910         Andrew Haley  <aph@cambridge.redhat.com>
911
912         * expr.c (build_field_ref): Don't build a check if the field is a
913         member of `this'.
914
915 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
916
917         Fix for PR java/6026:
918         * lex.c (java_lex): Fix parsing of consecutive floats.
919
920 2002-03-21  Tom Tromey  <tromey@redhat.com>
921
922         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
923         class.
924
925 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
926
927         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
928         insert_block, getdecls, kept_level_p, global_bindings_p): New.
929
930 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
931
932         * gcj.texi: @code{gcj} becomes @command{gcj}.
933         @code{gcc} becomes @command{gcc}.
934         GcjRaw changed to gnu.gcc.RawData.
935
936 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
937
938         * decl.c (start_java_method): Use new hook.
939         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
940         (java_init): Remove old hook.
941
942 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
943
944         * builtins.c (define_builtin): Do nothing if `type' is null.
945         Fixes PR java/5876.
946
947 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
948
949         * parse.y (parser_check_super_interface): Fix error message
950         grammar/order.
951
952 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
953
954         * jcf-parse.c (get_constant): Delete unused variables.
955
956 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
957
958         * java-tree.h (java_parse_file): New.
959         * jcf-parse.c (yyparse): Rename java_parse_file.
960         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
961
962 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
963
964         * parse.y (craft_constructor): Return the constructor decl.
965         (java_expand_classes): Update comments.
966         (lookup_method_invoke): Call fix_constructors immediately for
967         anonymous class. Fixes PR java/5935.
968
969 2002-03-15  Anthony Green  <green@redhat.com>
970
971         * jcf-parse.c (yyparse): Don't emit class registration
972         constructor when compiling resource files.
973
974 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
975
976         * lang.c (java_tree_code_type, java_tree_code_length,
977         tree_code_name): Delete.
978         (tree_code_type, tree_code_length, tree_code_name): Define.
979         (java_init): Don't try to copy into the various tree_code
980         arrays.
981
982 2002-03-12  Tom Tromey  <tromey@redhat.com>
983
984         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
985         UTF-8, not UCS-2.  Fixes PR java/5923.
986
987         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
988         a call_expr wrapped in a convert.  Fixes PR java/5848.
989
990 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
991
992         * jcf-write.c (write_classfile): Improve error strings.
993
994 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
995
996         * lex.c: Adjust comments to GNU standards.
997
998 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
999
1000         Fix for PR java/5902:
1001         * lex.c (java_lex): Fix parsing of literals.
1002
1003 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1004
1005         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
1006         to prevent it getting evaluated twice in the store checking case.
1007         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
1008         examining OBJECT.
1009
1010 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1011
1012         * decl.c (java_init_decl_processing): Make sure class_type_node
1013         alignment is not less than 64 bits if hash synchronization is enabled.
1014
1015 2002-03-08  Per Bothner  <per@bothner.com>
1016
1017         * parse.y (java_complete_lhs):  Check if patch_assignment
1018         returned an error-mark.
1019
1020         * parse.y (try_builtin_assignconv):  Don't special-case zero.
1021
1022 2002-03-08  Per Bothner  <per@bothner.com>
1023
1024         Fix for PR java/5812.
1025         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
1026         here instead of in JSR macro.  Likewise with load_type_state call.
1027         Do the latter on if the return_pc has been verified (the jsr returns).
1028         (JSR):  Now just call build_java_jsr.
1029
1030 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
1031
1032         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
1033         (java.install-common): Link native driver to
1034         JAVA_TARGET_INSTALL_NAME.
1035
1036 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
1037
1038         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
1039         * builtins.c(sin_builtin): Likewise
1040         * builtins.c(sqrt_builtin): Likewise
1041
1042 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
1043
1044         * java/expr.c, java/jcf-parse.c, java/lex.c:
1045         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
1046         REAL_ARITHMETIC blocks unconditional.  Delete some further
1047         #ifdef blocks predicated on REAL_ARITHMETIC.
1048
1049 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1050
1051         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
1052         explicit sizeof/sizeof.
1053         * decl.c (java_init_decl_processing): Likewise.
1054         * jcf-parse.c (init_jcf_parse): Likewise.
1055         * parse.y (init_src_parse): Likewise.
1056
1057 2002-03-02  Per Bothner  <per@bothner.com>
1058
1059         Make --CLASSPATH by a synonym for --classpath and -classpath.
1060         Implement --bootclasspath.
1061         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
1062         (classpath_l):  Remove.
1063         (jcf_path_CLASSPATH_arg):  Remove.
1064         (jcf_path_bootclasspath_arg):  New function.
1065         (jcf_path_seal):  Simplify accordingly.
1066
1067         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
1068         (jcf_path_CLASSPATH):  Remove declaration.
1069         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
1070         (lang_specific_driver):  Translate -bootclasspath.
1071         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
1072         * lang.c (decode_lang_options):  Do jcf_path_init first.
1073         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
1074         * gjavah.c:  Also handle --bootclasspath.
1075         Handle --CLASSPATH as a synonum for --classpath.
1076         * jcf-dump.c: Likewise.
1077
1078         "." is not part of system path, but is the default for --classpath.
1079         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
1080         (jcf_path_seal):  Add "." if no CLASSPATH specified.
1081
1082         * gcj.texi:  Document changes.
1083
1084 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1085
1086         * expr.c (build_java_arraystore_check): Fix formatting.
1087
1088 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
1089
1090         Fix for PR java/5758, java/5632:
1091         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
1092         inner-class separator too.
1093         * parse.y (do_resolve_class): New local `decl_result.'
1094         Progressively build a name for what can have been loaded.
1095
1096 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1097
1098         * expr.c (java_array_data_offset): Removed function.
1099         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
1100         (build_java_array_length_access): Obtain "length" value using a
1101         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
1102         (build_java_arrayaccess): Correct comment. Access "data" using a
1103         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
1104         (build_java_arraystore_check): New function.
1105         (expand_java_arraystore): Use build_java_arraystore_check.
1106         * parse.y (patch_assignment): Simplify code to insert a store check
1107         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
1108         * check-init.c (check_init): Update to reflect that an array length
1109         access is now a COMPONENT_REF.
1110         * gcj.texi (Code Generation): Improve documentation of
1111         -fno-bounds-check. Add documentation for -fno-store-check.
1112         * java-tree.h (flag_store_check): Declare.
1113         (build_java_arraystore_check): Declare.
1114         * lang.c (flag_store_check): Initialize to 1.
1115         (lang_f_options): Add store-check option.
1116         * jvspec.c: Don't pass store-check option to jvgenmain.
1117         * lang-options.h: Add help string for -fno-store-check.
1118
1119 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
1120
1121         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
1122         * java-tree.h (java_dup_lang_specific_decl): New.
1123         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
1124
1125 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
1126
1127         * builtins.c, decl.c: Delete traditional-mode-related code
1128         copied from the C front end but not used, or used only to
1129         permit the compiler to link.
1130
1131 2002-02-22  Tom Tromey  <tromey@redhat.com>
1132
1133         Fix for PR java/2369:
1134         * jvspec.c (verify_class_name): New function.
1135         (lang_specific_driver): Call it.
1136         (JAVA_START_CHAR_P): New macro.
1137         (JAVA_PART_CHAR_P): Likewise.
1138
1139 2002-02-22  Per Bothner  <per@bothner.com>
1140
1141         * class.c:  Change vtable to be more compatible with g++ v3 abi.
1142         (get_dispatch_table):  Prepend offset-to-top (always 0) and
1143         type_info pointer (currently unimplemented hence NULL) to vtable.
1144         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
1145         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
1146         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
1147         (build_dtable_decl):  Add declarations for new fields.
1148
1149 2002-02-20  Per Bothner  <per@bothner.com>
1150
1151         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
1152         to finit$ (otherwise generate_bytecode_insns drops it). However, we
1153         don't need to set it on the COMPOUND_EXPR - the caller does that.
1154
1155 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1156
1157         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
1158         `--CLASSPATH' becomes `--classpath.'
1159         * gjavah.c: Likewise.
1160         * jcf-dump.c: Likewise.
1161         * lang-options.h: Likewise.
1162         * lang.c: Likewise.
1163         * jcf-path.c: Updated comment.
1164         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
1165         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
1166         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
1167         (jcf_path_CLASSPATH_arg): Ditto.
1168         (classpath_u): Updated leading comment.
1169
1170 2002-02-20  Per Bothner  <per@bothner.com>
1171
1172         * builtins.c (check_for_builtin):  New function.
1173         (build_call_or_builtin):  Remove.
1174         * java-tree.h:  Update accordingly.
1175         * expr.c (expand_invoke):  Use build + check_for_builtin instead
1176         of build_call_or_builtin.
1177         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
1178         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
1179         flag (which had caused jcf-write to incorrectly emit invokevirtual).
1180
1181 2002-02-17  Tom Tromey  <tromey@redhat.com>
1182
1183         * java-tree.h (TYPE_STRICTFP): New macro.
1184         (struct lang_type) [strictfp]: New field.
1185         (CLASS_STRICTFP): New macro.
1186         (METHOD_STRICTFP): New macro.
1187         (struct lang_decl) [strictfp]: New field.
1188         * parse.y (method_header): Disallow strictfp constructor or
1189         abstract method.
1190         (STRICT_TK): Move before MODIFIER_TK.
1191         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
1192         (METHOD_MODIFIERS): Likewise.
1193         (INTERFACE_MODIFIERS): Likewise.
1194         * jcf-write.c (get_access_flags): Likewise.
1195         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
1196         (add_method_1): Likewise.
1197         (get_access_flags_from_decl): Likewise.
1198         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
1199         recognize strictfp flag.
1200         * jcf.h (ACC_STRICT): New define.
1201
1202 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
1203
1204         * class.c(build_utf8_ref): Move declaration of decl_size
1205
1206 2002-02-07  Tom Tromey  <tromey@redhat.com>
1207
1208         * gcj.texi (Input Options): --CLASSPATH does not suppress system
1209         path.
1210
1211 2002-02-04  Anthony Green  <green@redhat.com>
1212
1213         * class.c (build_utf8_ref): Put UTF-8 constants into merged
1214         sections if available.
1215
1216 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1217
1218         * parse.y (java_expand_classes): Fix typo in static field loop.
1219
1220 2002-02-02  Richard Henderson  <rth@redhat.com>
1221
1222         * class.c (add_field): Mark static fields external.
1223         (build_class_ref): Remove redundant set.
1224         * parse.y (java_expand_classes): Mark static fields of classes
1225         to be compiled as local.
1226         * jcf-parse.c (parse_class_file): Likewise.
1227
1228 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1229
1230         * gcj.texi (About CNI): New node.
1231
1232 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1233
1234         PR java/5080
1235         * jcf-parse.c : Check for HAVE_LOCALE_H before using
1236         setlocale() with LC_CTYPE as a parameter.
1237         * jv-scan.c: Same.
1238
1239 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
1240
1241         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
1242         Follow GNU Coding Standards for --version.
1243
1244 2002-01-28  Tom Tromey  <tromey@redhat.com>
1245
1246         * expr.c (build_jni_stub): Ensure storage for `meth' is
1247         generated.
1248         * parse.y (java_complete_expand_methods): Set
1249         current_function_decl before building JNI stub.
1250
1251 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
1252
1253         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
1254         BUILT_IN_SQRTF.
1255
1256 2002-01-22  Tom Tromey  <tromey@redhat.com>
1257
1258         * decl.c (java_init_decl_processing): Use add_predefined_file.
1259         Predefine RawData.java.
1260         (predef_filenames): Removed.
1261         (java_init_decl_processing): Don't register predef_filenames.
1262         * jcf-parse.c (add_predefined_file): New function.
1263         (predefined_filename_p): Rewrote.
1264         (predefined_filename_p): No longer static.
1265         * decl.c (java_init_decl_processing): Call initialize_builtins.
1266         * Make-lang.in (JAVA_OBJS): Added builtins.o.
1267         (java/builtins.o): New target.
1268         * builtins.c: New file.
1269         * parse.y (patch_invoke): Use build_call_or_builtin.
1270         * java-tree.h (build_call_or_builtin): Declare.
1271         (initialize_builtins): Declare.
1272         (java_set_exception_lang_code): Removed unused declaration.
1273         (PREDEF_FILENAMES_SIZE): Removed.
1274         (java_tree_index): Added JTI_PREDEF_FILENAMES.
1275         (predef_filenames): New define.
1276         (add_predefined_file): Declare.
1277         (predefined_filename_p): Declare.
1278         * expr.c (expand_invoke): Use build_call_or_builtin.
1279
1280 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1281
1282         * parse.y (patch_switch_statement): Fix format specifier.
1283
1284 2002-01-16  Tom Tromey  <tromey@redhat.com>
1285
1286         More for PR java/5365:
1287         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
1288         default.
1289         (process_file): Generate include for
1290         java.lang.UnsupportedOperationExceptions.
1291
1292 2002-01-15  Andreas Jaeger  <aj@suse.de>
1293
1294         * .cvsignore: Add man pages.
1295
1296 2002-01-15  Tom Tromey  <tromey@redhat.com>
1297
1298         Fix for PR java/5365:
1299         * gjavah.c (process_file): Turn class name into a file name.
1300
1301 2002-01-14  Matthias Klose  <doko@debian.org>
1302
1303         * gcj.texi: Fix whitespace and formatting errors in the
1304         synopsis of the man pages. Update copyright.
1305
1306 2002-01-14  Tom Tromey  <tromey@redhat.com>
1307
1308         For PR libgcj/5303:
1309         * Make-lang.in (java.install-man): Handle jv-convert man page.
1310         (java.generated-manpages): Added jv-convert.1.
1311         (java.uninstall): Remove jv-convert.1.
1312         (java.maintainer-clean): Likewise.
1313         ($(srcdir)/java/jv-convert.1): New target.
1314         * gcj.texi (Top): Link to jv-convert node.
1315         (Individual utilities): Likewise.
1316         (Invoking jv-convert): New node.
1317
1318 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
1319             Martin Kahlert  <martin.kahlert@infineon.com>
1320
1321         * jcf-parse.c (get_constant): Don't swap lo/hi for big
1322         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
1323
1324 2002-01-03  Graham Stott  <grahams@redhat.com>
1325
1326         * class.c (compile_resource_file): Update copyright date.
1327         Constify filename parameter.
1328         (java-tree.h): Update copyright date.
1329         (compile_resource_file): Constify filename parameter.
1330
1331 2002-01-03  Graham Stott  <grahams@redhat.com>
1332
1333         * gcc/jcf-parse.c: Update copyright date.
1334         (yyparse): Constify resource_filename.
1335
1336 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1337
1338         * parse.y (src_parse_roots): Don't needlessly zero init.
1339
1340 2001-12-31  Tom Tromey  <tromey@redhat.com>
1341
1342         * parse.y (dump_java_tree): New function.
1343         (source_end_java_method): Call it.
1344         (end_class_declaration): Likewise.
1345         * lang.c (java_decode_option): Call dump_switch_p.
1346
1347 2001-12-28  Tom Tromey  <tromey@redhat.com>
1348
1349         * gen-table.pl: Don't process characters after \uffff.  Added
1350         comment pointing to input file.
1351
1352 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1353
1354         * gen-table.pl: Const-ify output.  Document the location of a
1355         suitable unicode input file.
1356
1357         * chartables.h: Regenerate.
1358
1359 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1360
1361         * chartables.h: Const-ify.
1362         * gjavah.c (options): Likewise.
1363         * jcf-dump.c (options): Likewise.
1364         * jv-scan.c (options): Likewise.
1365         * lex.c (java_start_char_p, java_part_char_p): Likewise.
1366         * parse.y (binop_lookup): Likewise.
1367
1368 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1369
1370         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
1371         the static arrays that are output.
1372         * jvspec.c (jvgenmain_spec): Make static.
1373         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
1374         * keyword.h: Regenerate.
1375         * lang.c (string_option, process_option_with_no, lang_f_options,
1376         lang_W_options): Const-ify.
1377         * lex.c (java_lex): Likewise.
1378
1379 2001-12-21  Richard Henderson  <rth@redhat.com>
1380
1381         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
1382         (get_boehm_type_descriptor): ... here.  Arrange for the
1383         TREE_TYPE to get set properly.
1384
1385 2001-12-21  Richard Henderson  <rth@redhat.com>
1386
1387         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
1388         only if the target requires collect2.
1389
1390         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
1391
1392 2001-12-20  Tom Tromey  <tromey@redhat.com>
1393
1394         For PR java/4509:
1395         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
1396         CAN_COMPLETE_NORMALLY for the node.
1397         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
1398         generate code for second branch if first branch can't complete
1399         normally.
1400         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
1401         the loop head if the loop body can't complete normally.
1402
1403 2001-12-20  Tom Tromey  <tromey@redhat.com>
1404
1405         For PR java/4766:
1406         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
1407         case where `finally' clause can't complete normally.
1408
1409 2001-12-20  Tom Tromey  <tromey@redhat.com>
1410
1411         Fixes PR java/5057:
1412         * parse.y (analyze_clinit_body): Added this_class parameter.
1413         Check for more cases where we must keep <clinit>.
1414         (maybe_yank_clinit): Cleaned up flow control.
1415
1416 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1417
1418         * decl.c (java_init_decl_processing): Don't initialize
1419         finit_leg_identifier_node.
1420         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
1421         (finit_leg_identifier_node): Remove.
1422         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
1423
1424 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1425
1426         * mangle.c (mangle_member_name): Don't special-case for
1427         NO_DOLLAR_IN_LABEL.
1428         * mangle_name.c (unicode_mangling_length): Likewise.
1429         (append_unicode_mangled_name): Likewise.
1430         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
1431         code.
1432
1433 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1434
1435         * expr.c (build_java_array_length_access): Don't force null pointer
1436         check unless flag_check_references is set.
1437
1438 2001-12-20  Tom Tromey  <tromey@redhat.com>
1439
1440         Fix for PR java/3417:
1441         * parse.y (patch_assignment): Added special processing for
1442         `return'.
1443         (patch_return): Don't convert booleans to integers, and don't
1444         special-case `null'.
1445
1446 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1447
1448         * config-lang.in (diff_excludes): Remove.
1449
1450 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1451
1452         * gcj.texi: Update link to GCC manual.
1453
1454 2001-12-17  Tom Tromey  <tromey@redhat.com>
1455
1456         * parse.y (link_nested_class_to_enclosing): Removed useless
1457         statement.
1458
1459 2001-12-16  Tom Tromey  <tromey@redhat.com>
1460
1461         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
1462         Fixes PR java/5088.
1463
1464 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1465
1466         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
1467         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
1468         spelling errors.
1469
1470 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1471
1472         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
1473
1474 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1475
1476         * decl.c (java_init_decl_processing): Build otable_type correctly.
1477         otable_decl is an otable_type.
1478
1479 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1480
1481         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
1482         otable_type, otable_ptr_type, method_symbol_type,
1483         method_symbols_array_type, method_symbols_array_ptr_type): New
1484         field/global tree definitions.
1485         (flag_indirect_dispatch): New flag.
1486         * decl.c (java_init_decl_processing): Initialize new otable and
1487         otable_syms type nodes and decls. Add new field "index" to
1488         method_type_node.
1489         * class.c (build_method_symbols_entry): New function.
1490         (make_method_value): Set "index" to to method's vtable index for
1491         virtual methods when indirect-dispatch is not used.
1492         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
1493         and set vtable_method_count to -1. Set otable and otable_syms field
1494         if indirect-dispatch is used and there was something to put in them.
1495         (build_method_symbols_entry): New function.
1496         (emit_offset_symbol_table): New function.
1497         * expr.c (get_offset_table_index): New function.
1498         (build_invokevirtual): Build array reference to otable at the index
1499         returned by get_offset_table_index, and use the result as the vtable
1500         offset.
1501         (build_invokeinterface): Similar.
1502         * jcf-parse.c (yyparse): If indirect-dispatch, call
1503         emit_offset_symbol_table at the end of compilation, after all classes
1504         have been generated.
1505         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
1506         * lang.c (flag_indirect_dispatch): Define.
1507         (lang_f_options): Add indirect-dispatch flag.
1508
1509 2001-12-14  Matthias Klose  <doko@debian.org>
1510
1511         * gcj.texi: Markup for man page generation. Document missing
1512         options printed by <tool> --help.
1513         Terminate description of gij's -ms option with a dot.
1514         * Make-lang.in ($(srcdir)/java/*.1): New targets.
1515         (java.generated-manpages java.install-man, java.uninstall,
1516         java-maintainer-clean) Updated.
1517
1518 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
1519
1520         * class.c (get_dispatch_table): Fix java vtable layout
1521         for TARGET_VTABLE_USES_DESCRIPTORS.
1522         * decl.c (java_init_decl_processing): Initialize
1523         alloc_no_finalizer_node, finalize_identifier_node.
1524         * expr.c (class_has_finalize_method): New function.
1525         (expand_java_NEW): Generate calls for finalizer-free allocation.
1526         (build_invokevirtual): Fix java vtable layout for
1527         TARGET_VTABLE_USES_DESCRIPTORS.
1528         * java-tree.h (enum java_tree_index): New entries:
1529         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
1530         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
1531         (class_has_finalize_method): declare.
1532         (HAS_FINALIZER_P): New macro.
1533         * parse.y (patch_invoke): Generate calls for finalizer-free
1534         allocation.
1535
1536 2001-12-12  Matthias Klose  <doko@debian.org>
1537
1538         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
1539         whitespace at end of line.
1540
1541 2001-12-11  Tom Tromey  <tromey@redhat.com>
1542
1543         * lex.c (java_init_lex): Define wfl_to_string as
1544         gnu.gcj.runtime.StringBuffer unless generating bytecode.
1545
1546 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
1547
1548         * class.c (make_method_value): Use null_pointer_node to
1549         represent empty exception table.
1550
1551 2001-12-10  Tom Tromey  <tromey@redhat.com>
1552
1553         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
1554
1555 Mon Dec 10 06:09:57 2001  Douglas B. Rupp  <rupp@gnat.com>
1556
1557         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
1558
1559 2001-12-09  Per Bothner  <per@bothner.com>
1560
1561         * check-init.c (current_switch_has_default):  New static field.
1562         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
1563         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
1564         DEFAULT_EXPR seen, simulate a default alternative that copies state.
1565
1566 2001-12-09  Tom Tromey  <tromey@redhat.com>
1567
1568         * check-init.c (check_init): Don't allow pre- or post- increment
1569         or decrement of final variable.
1570         (final_assign_error): Minor error message rewording.
1571
1572 2001-12-08  Tom Tromey  <tromey@redhat.com>
1573
1574         * java-tree.h: Fixed typo.
1575
1576         * gjavah.c (decompile_method): Don't decompile to `return this'
1577         for static methods.
1578
1579         * gjavah.c (cxx_keywords): Re-sorted.
1580         * lex.c (cxx_keywords): Re-sorted.
1581
1582         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
1583         else.
1584
1585         * gjavah.c (print_namelet): Clear subnamelets.
1586         (HANDLE_METHOD): Set `method_printed' earlier.
1587
1588 2001-12-07  Tom Tromey  <tromey@redhat.com>
1589
1590         * lang.c (lang_f_options): Added
1591         optimize-static-class-initialization.
1592         (java_decode_option): Removed special case.
1593
1594 2001-12-07  Per Bothner  <per@bothner.com>
1595
1596         * check-init.c (check_init):  Fix typo freeing memory twice.
1597
1598 2001-12-05  Per Bothner  <per@bothner.com>
1599
1600         Restore support for static class initialization optimization.
1601         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
1602         * check-init.c (check_int):  At end of BLOCK handle initialization
1603         blocks, which used to be done in java_complete_expand_method but did
1604         not handle the case where check_for_initialization might allocate
1605         more than a word of bits.
1606         * decl.c (lang_make_tree):  The smic field is now a tree.
1607         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
1608         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
1609
1610         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
1611
1612         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
1613         Change from a hash table to a list.
1614         (struct_lang_decl):  Change field 'smic' to match.
1615         * class.c (add_method_1):  Initialize
1616         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
1617         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
1618         (java_expand_method_bodies): -here, since 'smic' is now a list.
1619         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
1620
1621         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
1622
1623         * class.c (java_hash_compare_tree_node):  Fix casts.
1624
1625 2001-12-04  Per Bothner  <per@bothner.com>
1626
1627         * check-init.c:   Handle definite unassignment to finals in addition
1628         to definite assignment.
1629         (loop_current_locals):  New field.
1630         (num_current_locals, int start_current_locals, num_current_words):
1631         Make static.
1632         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
1633         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
1634         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
1635         (get_variable_decl, check_final_reassigned):  New functions.
1636         (check_init, check_bool_init):  Modify as needed for checking finals.
1637         (check_for_initialization):  Take extra parameter and return void.
1638         Do extra start-up logic to check final fields for assignment.
1639         * parse.y (check_static_final_variable_assignment_flag,
1640         reset_static_final_variable_assignment_flag, check_final_assignment,
1641         check_final_variable_local_assignment_flag,
1642         reset_final_variable_indirect_assignment_flag,
1643         reset_final_variable_global_assignment_flag):  Remove functions.
1644         (java_complete_expand_methods, outer_field_access_fix,
1645         patch_assignment): Remove no-longer used logic.
1646         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
1647         * parse.y (register_fields, java_complete_tree):  Update accordingly.
1648
1649         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
1650         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
1651         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
1652
1653         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
1654
1655         * java-tree.h (DECL FINAL):  New bit-field.
1656         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
1657         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
1658         (DECL_INIT_CALLS_THIS):  New macro.
1659         (struct lang_decl):  New bit-field init_calls_this.
1660         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
1661         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
1662         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
1663         use it for both local variables and final fields.
1664         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
1665         and local_final.
1666         (struct lang_type):  Remove hfv bit-field.
1667         (check_for_initialization):  Change to return void.
1668
1669         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
1670         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
1671         * check-init.c (final_assign_error):  New helper function.
1672         (check_final_reassigned, check_init):  Use it.
1673         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
1674
1675         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
1676         bit-fields to unsigned.
1677
1678 2001-12-03  Per Bothner  <per@bothner.com>
1679
1680         * parse.y (patch_binop):  Minor constant folding.
1681
1682         * parse.y (build_current_thisn):  Shorter 'buffer'.
1683
1684 2001-12-03  Per Bothner  <per@bothner.com>
1685
1686         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
1687         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
1688         * jcf-write.c (generate_bytecode_insns):  Remove support for
1689         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
1690         * check-init.c (check_init):  Likewise.
1691
1692 2001-12-03  Per Bothner  <per@bothner.com>
1693
1694         * verify.c (subroutine_nesting):  New function.
1695         (verify_jvm_instructions):  Use it to fix logic for checking that
1696         we're done with the current subroutine.
1697
1698         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
1699         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
1700
1701 2001-12-03  Per Bothner  <per@bothner.com>
1702
1703         * jcf.h:  Fix obvious typo in comment.
1704         * typeck.c (build_null_signature):  Add comment.
1705
1706 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1707
1708         * expr.c: Remove leading capital from diagnostic messages, as
1709         per GNU coding standards.
1710         * jcf-io.c: Similarly.
1711         * jcf-parse.c: Similarly.
1712         * jv-scan.c: Similarly.
1713         * jvspec.c: Similarly.
1714         * mangle.c: Similarly.
1715
1716 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
1717             Alexandre Petit-Bianco  <apbianco@redhat.com>
1718
1719         * expr.c (build_java_arrayaccess): Call save_expr on array for
1720         correct evaluation order, modified comment, fixed indentation.
1721         * parse.y: (patch_assignment): Correctly extract the array base
1722         from the tree generate by build_java_arrayaccess, added comments.
1723         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
1724         Fixes PR java/3096, PR java/3803, PR java/3965.
1725
1726 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1727
1728         * expr.c (expand_byte_code): Remove trailing periods from messages.
1729         * jcf-parse.c (load_class, jcf_parse): Similarly.
1730         * jcf-write.c (generate_classfile): Similarly.
1731         * lex.c (java_lex): Similarly.
1732
1733 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1734
1735         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
1736
1737 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1738
1739         * Make-lang.in (java.generated-manpages): New dummy target.
1740
1741 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1742
1743         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1744         ASM_FINAL_SPEC.
1745         (lang_specific_pre_link): Use set_input to set input_filename.
1746         Append `main' here.
1747         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1748         (main): Fix definition.
1749         Strip `main' from classname.
1750         Fixes PR java/227.
1751
1752 2001-11-18  Roger Sayle <roger@eyesopen.com>
1753
1754         * parse.h (java_expand_switch): Remove old prototype.
1755
1756 2001-11-18  Tom Tromey  <tromey@redhat.com>
1757
1758         Fix for PR java/1401:
1759         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
1760         arg0 is null.
1761         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
1762         correctly.
1763
1764 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1765
1766         * lang.c (finish_parse): Rename to java_finish.
1767         (LANG_HOOKS_FINISH, java_finish): New.
1768
1769 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
1770
1771         * decl.c (init_decl_processing): Rename java_init_decl_processing.
1772         * java-tree.h: New prototype.
1773         * lang.c (java_init): Update prototype.  Combine with old init_parse.
1774
1775 2001-11-13  Tom Tromey  <tromey@redhat.com>
1776
1777         * gjavah.c (method_signature): New global.
1778         (HANDLE_METHOD): Set it.
1779         (decompile_return_statement): New function.
1780         (decompile_method): Use it.
1781         (print_method_info): Removed `synth' argument.
1782
1783 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1784
1785         * java-tree.h (java_set_yydebug): New.
1786         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
1787         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
1788         (print_lang_decl, print_lang_type, print_lang_identifier,
1789         print_lang_statistics, lang_print_xnode): Remove.
1790
1791 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1792
1793         * jcf-parse.c (init_lex): Remove.
1794         * lang.c (language_string, lang_identify): Remove.
1795         (struct lang_hooks): Constify.
1796         (LANG_HOOKS_NAME): Override.
1797         (init_parse): Update.
1798
1799 2001-11-08  Andreas Franck  <afranck@gmx.de>
1800
1801         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
1802         program_transform_name the way suggested by autoconf.
1803         (java.install-common): Also transform auxiliary program names with
1804         program_transform_name.
1805
1806 2001-11-08  Tom Tromey  <tromey@cygnus.com>
1807
1808         * parse.y (trap_overflow_corner_case): New rule.
1809         (unary_expression): Use it.
1810         * lex.c (java_init_lex): Don't set minus_seen.
1811         (yylex): Don't use minus_seen.  Communicate overflow to parser for
1812         it to handle.
1813         (error_if_numeric_overflow): New function.
1814         * parse.h (minus_seen): Removed field.
1815         (JAVA_RADIX10_FLAG): New define.
1816
1817 2001-11-07  Tom Tromey  <tromey@redhat.com>
1818
1819         Patch for PR java/1414:
1820         * parse.y (case_label_list): New global.
1821         (goal): Register case_label_list with GC.
1822         (java_complete_lhs): Save new case on case_label_list.
1823         (patch_switch_statement): Check for duplicate case labels.
1824
1825 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
1826
1827         * parse.y (patch_assignment): Removed unused third argument.
1828         (java_complete_lhs): Removed unused third argument to patch_assignment.
1829
1830 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1831
1832         * lang.c: Include langhooks-def.h.
1833         * Make-lang.in: Update.
1834
1835 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
1836
1837         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1838
1839 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1840
1841         * mangle.c (find_compression_record_match): Don't match compression
1842         records for package name elements unless they occur at the start of
1843         the name. Fix for PR java/4717.
1844
1845 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1846
1847         * expr.c (expand_java_field_op): Don't special-case references to
1848         java.lang.PRIMTYPE.TYPE.
1849         (build_primtype_type_ref): Removed.
1850         * java-tree.h (build_primtype_type_ref): Remove prototype.
1851         * parse.y (maybe_build_primttype_type_ref): Removed.
1852         (complete_function_arguments): Don't special-case references to
1853         java.lang.PRIMTYPE.TYPE.
1854         (patch_assignment): Likewise.
1855         (array_constructor_check_entry): Likewise.
1856
1857 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
1858
1859         * mangle.c (static tree compression_table): Fixed leading comment.
1860         * parse.h (struct parser_ctxt): Fixed field comment.
1861         * parse.y (check_pkg_class_access): New prototype, fixed leading
1862         comment, new parameter used to emit error only if passed as true.
1863         (parse_check_super): Pass extra argument to check_pkg_class_access.
1864         (do_resolve_class): Likewise.
1865         (process_imports): Likewise.
1866         (read_import_dir): Fixed indentation.
1867         (find_in_imports_on_demand): New local class_type_name. Local
1868         node_to_use deleted. while loop changed into for loop. Report
1869         multiple definition only for accessible classes. Improved error
1870         message.
1871         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
1872         assigned to parameter list, fixed indentation. while loop changed
1873         into for loop, restore TREE_CHAIN on local `tem' before the next
1874         iteration.
1875
1876 Tue Oct 23 14:02:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1877
1878         * lang.c (lang_get_alias_set): Deleted.
1879
1880 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1881
1882         * gjavah.c (jni_print_char): Fix thinko in last change.
1883
1884         * gjavah.c (jni_print_char, decode_signature_piece): Use
1885         safe-ctype macros and/or fold extra calls into fewer ones.
1886         * lex.c (java_read_unicode, java_lex): Likewise.
1887         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
1888         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
1889         * mangle_name.c (append_unicode_mangled_name,
1890         unicode_mangling_length): Likewise.
1891
1892 2001-10-17  Richard Henderson  <rth@redhat.com>
1893
1894         * Make-lang.in (java/lang.o): Depend on langhooks.h.
1895
1896 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
1897
1898         * lang.c (langhooks.h): Included.
1899         (LANG_HOOKS_INIT): Redefined.
1900         (LANG_HOOKS_INIT_OPTIONS): Likewise.
1901         (LANG_HOOKS_DECODE_OPTION): Likewise.
1902         (struct lang_hooks lang_hooks): New initialization.
1903
1904 2001-10-11  Per Bothner  <per@bothner.com>
1905
1906         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
1907         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
1908         The former is simpler, and jcf-write.c handles it better.
1909         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
1910         or WITH_CLEANUP_EXPR.
1911         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
1912         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
1913
1914         * parse.y (patch_if_else_statement):  If the condition is constant,
1915         optimize away the test.
1916
1917 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
1918
1919         * parse.y (patch_cast): Call patch_string on the first operand of
1920         the incoming node, update it if necessary. Fixes PR java/4510.
1921
1922 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1923
1924         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
1925         when name qualifier matches a package name.
1926
1927 2001-10-08  Tom Tromey  <tromey@redhat.com>
1928
1929         Fix for PR java/4489:
1930         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
1931         force a new label when computing `body_block'.
1932
1933 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1934
1935         * jcf-io.c (format_uint): Const-ify.
1936         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
1937         * lex.c (java_get_line_col): Likewise.
1938         * parse.y (build_incdec): Likewise.
1939
1940 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
1941
1942         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
1943         a NULL enclosing context if appropriate. Fixes PR java/4466.
1944
1945 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
1946
1947         * parse.y (patch_assignment): Use lvalue's original TYPE when
1948         building the final COMPOUND_EXPR.
1949         (try_reference_assignconv): Fixed leading comment.
1950
1951 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
1952
1953         * parse.y (check_final_variable_indirect_assignment): For
1954         COMPOUND_EXPR, return only if finals were found initialized
1955         properly, if not, keep on checking.
1956         (check_final_variable_global_assignment_flag): New local
1957         error_found, set when appropriate and used to decide whether to
1958         report uninitialized finals. Fixed typo in comment.
1959
1960 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
1961
1962         * decl.c (init_decl_processing): Fixed typo in predef_filenames
1963         last three initializations. Fixes PR java/4360.
1964
1965 2001-09-21  Richard Henderson  <rth@redhat.com>
1966
1967         * class.c (get_dispatch_table): Handle function descriptors.
1968         (build_dtable_decl): Likewise.
1969         * expr.c (build_invokevirtual): Likewise.
1970
1971 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
1972
1973         * parse.y (patch_method_invocation): Build class initialization
1974         when static finals are used to qualify method invocation.
1975         Fixes PR java/4366.
1976
1977 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
1978
1979         * parse.h: (WFL_STRIP_BRACKET): Re-written using
1980         build_type_name_from_array_name.
1981         (STRING_STRIP_BRACKETS): New macro.
1982         * parse.y (build_type_name_from_array_name): New function.
1983         (array_creation_expression:): Accumulate []s instead of [s.
1984         (cast_expression:): Accumulate []s instead of [s after cast type
1985         name.
1986         (build_array_from_name): Local string deleted, use
1987         build_type_name_from_array_name.
1988         (build_unresolved_array_type): Accumulate []s instead of [s after
1989         type name.
1990         (register_fields): Fixed comment.
1991         (resolve_class): Local name, base deleted, new locals tname and
1992         array_dims. Use build_type_name_from_array_name. Use array_dims to
1993         build array type.
1994         (purify_type_name): Use STRING_STRIP_BRACKETS.
1995
1996 2001-09-18  Andreas Jaeger  <aj@suse.de>
1997
1998         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
1999         * jv-scan.c: Likewise.
2000
2001 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2002
2003         * parse.y (patch_method_invocation): Inner class creation context
2004         check not enforced within constructors. Fixes PR java/1873.
2005
2006 2001-09-16  Tom Tromey  <tromey@redhat.com>
2007
2008         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
2009         NOTE_PUSH for single-case push.  Fixes PR java/4189.
2010
2011 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2012
2013         * java-tree.h (TYPE_IMPORT_LIST): New macro.
2014         (TYPE_IMPORT_DEMAND_LIST): Likewise.
2015         (struct lang_type): New fields import_list and import_demand_list.
2016         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
2017         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
2018         (do_resolve_class): New local saved_enclosing_type, initialized,
2019         passed as parameter to find_in_imports and find_in_imports_on_demand.
2020         (find_in_imports): Added paramater enclosing_type, use its
2021         TYPE_IMPORT_LIST when applicable.
2022         (find_in_imports_on_demand): Added parameter enclosing_type, use
2023         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
2024         declaration and initialization.
2025         (fold_constant_for_init): Switch/restore current_class to the
2026         appropriate context.
2027
2028 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
2029
2030         * verify.c (verify_jvm_instructions): Fix typo.
2031
2032 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2033
2034         * expr.c (expand_invoke): Const-ification.
2035         * parse.y (patch_method_invocation): Likewise.
2036
2037 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2038
2039         * gjavah.c (cxx_keywords): Const-ification.
2040         * keyword.gperf (java_keyword): Likewise.
2041         * lang.c (java_tree_code_name): Likewise.
2042         * lex.c (cxx_keywords): Likewise.
2043         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
2044
2045 2001-09-11  Richard Henderson  <rth@redhat.com>
2046
2047         * parse.h (ctxp_for_generation): Mark extern.
2048
2049 2001-09-10  Richard Henderson  <rth@redhat.com>
2050
2051         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
2052
2053 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
2054
2055         * typeck.c (java_array_type_length, build_prim_array_type):
2056         Represent empty arrays by NULL index.
2057
2058 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
2059
2060         * java-tree.h (compile_resource_file): Grouped with other prototypes.
2061         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
2062
2063 2001-09-06  Anthony Green  <green@redhat.com>
2064
2065         * class.c (O_BINARY): Define if necessary.
2066         (registerResource_libfunc): Declare.
2067         (init_class_processing): Initilize registerResource_libfunc.
2068         (compile_resource_file): New function.
2069         * java-tree.h (resource_name): Declare.
2070         (compile_resource_file): Declare.
2071         * jcf-parse.c (yyparse): Handle compiling java resource files.
2072         * lang.c (java_decode_option): Handle -fcompile-resource option.
2073         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
2074         resource files.
2075         * gcj.texi (Code Generation): Add documentation for -R flag.
2076
2077 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
2078
2079         * jcf-write.c (generate_classfile): Issue an error in case of
2080         field/initial value mismatch.
2081         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
2082         being initialized and we're generating bytecode.
2083         (java_complete_lhs): In MODIFY_EXPR section: added comments,
2084         set DECL_INITIAL properly when appropriate.
2085         Fixes PR java/4230
2086         Fixes PR java/4204
2087
2088 2001-09-01  Per Bothner  <per@bothner.com>
2089
2090         * parse.y (maybe_yank_clinit):  A field without an initializer is not
2091         relevant.  All initializers except static final and constant require
2092         <clinit>, regardless of flag_emit_class_files.
2093
2094 2001-08-31  Per Bothner  <per@bothner.com>
2095
2096         * class.c (set_constant_value):  When not emiting class files, then a
2097         String ConstantValue is a utf8const_ptr_type.
2098
2099 2001-08-30  Per Bothner  <per@bothner.com>
2100
2101         * jcf-write.c (generate_classfile):  Check that field is primitive
2102         or string before emitting ConstantValue attribute.
2103
2104 2001-08-30  Per Bothner  <per@bothner.com>
2105
2106         * parse.y (resolve_qualified_expression_name):  If creating a
2107         COMPOUND_EXPR, set it's type correctly.
2108
2109 2001-08-30  Per Bothner  <per@bothner.com>
2110
2111         * jcf-io.c (open_class):  Set filename field.
2112
2113         * jcf-parse,c (parse_class_file):  Set current_function_decl
2114         for better error message when Code attribute is missing.
2115
2116         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
2117         better diagnostics, especially for constructors.
2118
2119 2001-08-30  Per Bothner  <per@bothner.com>
2120
2121         * jcf-write.c (generate_classfile):  Don't write ConstantValue
2122         attribute if field is not final, for compatibility with jdk.
2123
2124         * jcf-write.c (generate_classfile):  Convert ConstantValue values
2125         to correct type.  Work-around for front-end bug.
2126         * class.c (set_constant_value):  Error if constant has wrong type.
2127
2128 2001-08-30  Per Bothner  <per@bothner.com>
2129
2130         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
2131         "Double" are printed at verbosity 1.
2132
2133         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
2134
2135         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
2136
2137 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
2138
2139         * parse.y (patch_assignment): Don't verify final re-assignment here.
2140         (java_complete_lhs): Verify assignments to finals calling
2141         patch_assignment. Verify re-assignments to finals before calling
2142         patch_assignment.
2143
2144 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
2145
2146         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
2147         Fixes PR java/1413
2148
2149 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2150
2151         * lex.c (java_lex): new local found_hex_digits. Set and then used
2152         in test to reject invalid hexadecimal numbers.
2153         * parse.y (java_complete_tree): Prevent unwanted cast with
2154         initialized floating point finals.
2155         (patch_binop): Emit a warning when detecting a division by zero,
2156         mark result not constant, don't simplify non integer division.
2157
2158 2001-08-28  Per Bothner  <per@bothner.com>
2159
2160         * jcf-write.c  (generate_bytecode_insns):  For increments and
2161         decrements just recurse to push constant.  Improvement on Mark's patch.
2162
2163 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
2164
2165         * jcf-write.c (generate_bytecode_insns): Generate an integer to
2166         real conversion for increments and decrements of reals.
2167
2168 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2169
2170         * parse.y (resolve_qualified_expression_name): Handle unresolved
2171         qualified expressions, prevent numerical qualifiers, fixed typo.
2172         Fixes PR java/4141
2173
2174 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
2175
2176         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
2177         don't report anything but deprecated class when marked so. Handle
2178         VAR_DECL.
2179         (patch_method_invocation): Check deprecation on methods and types.
2180         (patch_binop): code becomes an enum tree_code, added default: to
2181         switch to handle that. Detect division by zero, try to fold and
2182         return before using a subroutine.
2183
2184 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
2185
2186         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
2187         file smaller than 4 bytes.
2188         * parse.y (check_inner_circular_reference): New function.
2189         (check_circular_reference): Likewise.
2190         (array_initializer:): Accept {,}.
2191         (java_check_circular_reference): Rewritten using
2192         check_circular_reference and check_inner_circular_reference.
2193         (java_complete_expand_method): Unconditionally save and restore
2194         the unpurged exception list.
2195         (build_dot_class_method_invocation): Unmangle signature parameter.
2196
2197 2001-08-21  Tom Tromey  <tromey@redhat.com>
2198
2199         * decl.c (init_decl_processing): Add `throws' field to method
2200         descriptor.
2201         * class.c (make_method_value): Compute `throws' field for method.
2202
2203 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2204
2205         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
2206         circularity is detected.
2207         (ctors_unchecked_throws_clause_p): Fixed leading comment.
2208
2209 2001-08-17  Richard Henderson  <rth@redhat.com>
2210
2211         * class.c (emit_register_classes): Add align parameter to
2212         call to assemble_integer.
2213
2214 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
2215
2216         * jcf-parse.c (load_class): New locals saved and class_loaded. If
2217         loading a class_or_name fails, try considering an innerclass name
2218         and load the enclosing context.
2219         * parse.y (resolve_inner_class): New function.
2220         (find_as_inner_class): Added leading comment.
2221         (register_incomplete_type): Keep the current context as enclosing
2222         context for JDEP_FIELD dependencies.
2223         (do_resolve_class): Locals new_class_decl and super initialized to
2224         NULL. Call resolve_inner_class, explore the enclosing context
2225         superclass if necessary.
2226         Fixes PR java/4007
2227
2228 2001-08-16  Tom Tromey  <tromey@redhat.com>
2229
2230         * jcf-dump.c (main): Updated for change to jcf_path_seal.
2231         * gjavah.c (main): Updated for change to jcf_path_seal.
2232         * lang.c (version_flag): New global.
2233         (java_decode_option): Recognize `-version'.
2234         (java_init): Update for change to jcf_path_seal.
2235         * jcf.h (jcf_path_seal): Added `print' argument.
2236         * jcf-path.c (jcf_path_seal): Added `print' argument.
2237
2238 2001-08-13  Zack Weinberg  <zackw@panix.com>
2239
2240         * Make-lang.in (java/decl.o): Update dependencies.
2241         * decl.c: Include libfuncs.h, don't include toplev.h.
2242
2243 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2244
2245         * decl.c (init_decl_processing): exception_type_node,
2246         class_not_found_type_node, and no_class_def_found_type_node
2247         initialized. predef_filenames augmented accordingly.
2248         instinit_identifier_node initialized.
2249         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
2250         * java-tree.h (enum java_tree_index): New entries
2251         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
2252         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
2253         (exception_type_node): New macro.
2254         (class_not_found_type_node): Likewise.
2255         (no_class_def_found_type_node): Likewise.
2256         (instinit_identifier_node): Likewise.
2257         (PREDEF_FILENAMES_SIZE): Adjusted.
2258         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
2259         (struct lang_type): Fixed typo in bitfield name.
2260         (DECL_INSTINIT_P): New macro.
2261         (ID_INSTINIT_P): Likewise.
2262         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
2263         attribute.
2264         * parse.y (encapsulate_with_try_catch): New function.
2265         (generate_instinit): Likewise.
2266         (build_instinit_invocation): Likewise.
2267         (ctors_unchecked_throws_clause_p): Likewise.
2268         (add_instance_initializer): Deleted.
2269         (build_instance_initializer): Likewise.
2270         (in_instance_initializer): Likewise.
2271         (check_method_redefinition): instinit$ not to be verified.
2272         (java_complete_expand_methods): Generate instinit$, simplified code.
2273         (build_dot_class_method): Eliminated unnecessary locals. Use
2274         encapsulate_with_try_catch, removed unnecessary code.
2275         (fix_constructors): New local iii. Use build_instinit_invocation.
2276         (patch_method_invocation): Added comment.
2277         (maybe_use_access_method): Don't consider instinit$.
2278         (find_applicable_accessible_methods_list): Shorten the search for
2279         instinit$ too.
2280         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
2281         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
2282         (patch_throw_statement): Likewise. Fixed typo.
2283
2284 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
2285
2286         Revert:
2287         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2288         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2289         ASM_FINAL_SPEC.
2290         (lang_specific_pre_link): Use set_input to set input_filename.
2291         Append `main' here.
2292         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2293         (main): Fix definition.
2294         Strip `main' from classname.
2295         Fixes PR java/227.
2296
2297 2001-08-11  Zack Weinberg  <zackw@panix.com>
2298
2299         * lex.h: Don't include setjmp.h.  Don't define
2300         SET_FLOAT_HANDLER or prototype set_float_handler.
2301
2302 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2303
2304         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
2305         `poplevel' in the right order.
2306
2307 2001-08-09  Richard Henderson  <rth@redhat.com>
2308
2309         * Make-lang.in (class.o): Depend on TARGET_H.
2310         * class.c (emit_register_classes): Use target hooks instead of
2311         assemble_constructor and assemble_destructor.
2312
2313 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
2314
2315         * check-init.c (flags.h): Include
2316         (check_init): Don't report uninitialized static class
2317         initialization flags, don't free bit index when doing static class
2318         initialization optimization.
2319         (check_for_initialization): Return type changed to `unsigned int.'
2320         (attach_initialized_static_class): New function.
2321         * class.c (add_method_1): Create the initialized static class
2322         table if necessary.
2323         (finish_class): Always emit deferred inline methods.
2324         * decl.c (emit_init_test_initialization): Moved to expr.c
2325         (complete_start_java_method): Don't traverse
2326         DECL_FUNCTION_INIT_TEST_TABLE.
2327         (lang_mark_tree): Mark hash tables in function decls.
2328         * expr.c (emit_init_test_initialization): Moved from decl.c.
2329         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
2330         initialization flag, set DECL_CONTEXT and
2331         LOCAL_CLASS_INITIALIZATION_FLAG.
2332         (java_lang_expand_expr): Emit initialization code for static class
2333         initialized flags when entering block, if necessary.
2334         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
2335         * java-tree.h (flag_optimize_sci): New global variable declaration.
2336         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
2337         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
2338         (LOCAL_FINAL_P): Fixed typo in comment.
2339         (FINAL_VARIABLE_P): Likewise.
2340         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
2341         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
2342         (struct lang_decl): New fields `ict', `smic' and `cif.'
2343         (check_for_initialization): New returned value for global.
2344         (attach_initialized_static_class): New global function.
2345         (STATIC_CLASS_INIT_OPT_P): New macro.
2346         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
2347         * lang.c (java_decode_option): Handle
2348         `-fno-optimize-static-class-initialization'
2349         * parse.y (start_complete_expand_method): New function.
2350         (java_expand_method_bodies): Likewise.
2351         (attach_init_test_initialization_flags): Likewise.
2352         (adjust_init_test_initialization): Likewise.
2353         (emit_test_initialization): Likewise.
2354         (java_complete_expand_methods): Nullify abstract and native method
2355         bodies.
2356         (java_complete_expand_method): New locals `fbody', `block_body'
2357         and `exception_copy.' Reorganized: directly return on empty method
2358         bodies, call `start_complete_expand_method', remember definitely
2359         initialized static class in function, don't expand method bodies.
2360         (java_expand_classes): Call `java_expand_method_bodies' before
2361         `finish_class' when compiling to native.
2362         (resolve_expression_name): Use `orig' after building outer class
2363         field access.
2364         (patch_invoke): Remember static method invokations.
2365
2366 2001-08-06  Richard Henderson  <rth@redhat.com>
2367
2368         * class.c (emit_register_classes): Pass a symbol_ref and priority
2369         to assemble_constructor.
2370
2371 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
2372
2373         * java-tree.h (all_class_filename): New macro.
2374         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
2375         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
2376         newly created IDENTIFIER_NODE to `all_class_filename.'
2377
2378 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
2379
2380         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
2381         Use ggc_add_tree_root to register roots.
2382
2383 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2384
2385         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
2386         second operand calling check_init.
2387         * decl.c (complete_start_java_method): Swaped second and third
2388         arguments while creating WITH_CLEANUP_EXPR node.
2389         * jcf-write.c (generate_bytecode_insns): Use second operand
2390         instead of third when handling WITH_CLEANUP_EXPR.
2391         * parse.y (java_complete_lhs): Expand second operand of
2392         WITH_CLEANUP_EXPR nodes.
2393         (patch_synchronized_statement): Swaped second and third arguments
2394         while creating WITH_CLEANUP_EXPR node.
2395
2396 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
2397
2398         * parse.y (create_interface): Avoid cyclic inheritance report when
2399         syntax error encountered during class definition.
2400         Fixes PR java/2956
2401
2402 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2403
2404         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2405         ASM_FINAL_SPEC.
2406         (lang_specific_pre_link): Use set_input to set input_filename.
2407         Append `main' here.
2408         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2409         (main): Fix definition.
2410         Strip `main' from classname.
2411         Fixes PR java/227.
2412
2413 2001-07-18  Tom Tromey  <tromey@redhat.com>
2414
2415         For PR java/2812:
2416         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
2417         * lex.c (java_new_lexer): Use ICONV_CONST.
2418         (java_read_char): Likewise.
2419         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
2420         (jv-scan$(exeext)): Likewise.
2421
2422 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2423
2424         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
2425         * parse.y (check_class_interface_creation): Allow `private' if the
2426         enclosing is not an interface.
2427         (create_interface): Interface tagged public if the enclosing
2428         context is an interface.
2429         (create_class): Class tagged public if the enclosing context
2430         is an interface.
2431         Fixes PR java/2959
2432
2433 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2434
2435         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
2436         Fixes PR java/2665
2437
2438 2001-07-14  Tim Josling  <tej@melbpc.org.au>
2439
2440         * check-init.c (check_init): Remove references to EXPON_EXPR.
2441
2442 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2443
2444         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
2445         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
2446         Fixes PR java/3602
2447
2448 2001-07-13  Tom Tromey  <tromey@redhat.com>
2449
2450         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
2451         invocation.
2452
2453 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2454
2455         * parse.y (patch_method_invocation): Don't override primary if one
2456         is already provided, but let this$<n> be built. Fixed comment.
2457
2458 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2459
2460         * parse.y (empty_statement:): Report empty statement error only
2461         when found at class declaration level.
2462         Fixes PR java/3635
2463
2464 2001-07-12  Tom Tromey  <tromey@redhat.com>
2465
2466         * expr.c (expand_load_internal): New function.
2467         (LOAD_INTERNAL): Use it.
2468
2469 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
2470
2471         * parse.y (verify_constructor_super): Compare anonymous class ctor
2472         args with `valid_method_invocation_conversion_p.'
2473         Fixes PR java/3285
2474
2475 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2476
2477         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
2478         `-fsyntax-only.' Fixes PR java/3248
2479
2480 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2481
2482         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2483
2484 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2485
2486         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
2487         current function is static. Fixes PR java/1970
2488
2489 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2490
2491         * parse.y (patch_method_invocation): Add enclosing context to ctor
2492         calls if necessary. Fixes PR java/2953
2493
2494 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2495
2496         * parse.y (resolve_package): Abort if qualified expression member
2497         isn't right.
2498         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
2499         Fixes PR java/1391
2500
2501 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
2502
2503         * verify.c: Don't use // comments.
2504
2505 2001-07-05  Tom Tromey  <tromey@redhat.com>
2506
2507         * lang.c (flag_assume_compiled): Removed.
2508         * java-tree.h (flag_assume_compiled): Removed.
2509         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
2510         -fhash-synchronization, -fuse-divide-subroutine,
2511         -fcheck-references, -femit-class-file, -femit-class-files,
2512         -fassume-compiled.  Updated --encoding information.  Changed
2513         -foutput-class-dir to `-d'.
2514
2515 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
2516
2517         * jcf-parse.c (parse_class_file): Add lineno parameter to
2518         debug_start_source_file call.
2519
2520 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2521
2522         * gcj.texi: Use gpl.texi.
2523         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
2524         dependencies and use doc/include in search path.
2525
2526 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
2527
2528         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
2529         `this'.  If so, don't build instance initializers.
2530
2531 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
2532
2533         * parse.y (resolve_expression_name): Improved error message for
2534         inner class cases. Fixes PR java/1958
2535
2536 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2537
2538         * lang.c: #include diagnostic.h
2539         (lang_print_error): Add a `diagnostic_context *' parameter.
2540         (java_dummy_print): Likewise.
2541         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
2542
2543 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2544
2545         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
2546         * jcf.h (typedef struct JCF): New bitfield `finished.'
2547         (JCF_FINISH): Set `finished.'
2548         (JCF_ZERO): Reset `finished.'
2549         Fixes PR java/2633
2550
2551 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2552
2553         * parse.y (class_body_declaration:): Don't install empty instance
2554         initializers.
2555         Fixes PR java/1314
2556
2557 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2558
2559         * class.c (set_super_info): Call `set_class_decl_access_flags.'
2560         (set_class_decl_access_flags): New function.
2561         * java-tree.h (set_class_decl_access_flags): New prototype.
2562         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
2563         (parse_class_file): New local `decl_max_locals.' Take wide types
2564         into account to compute DECL_MAX_LOCALS.
2565         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
2566         imports on demand.
2567
2568 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
2569
2570         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
2571
2572 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
2573
2574         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
2575         * parse.y (do_resolve_class): Moved comments out to leading comment
2576         section. Removed local `start', New local `_ht' and
2577         `circularity_hash.'  Record `enclosing' in hash table and search
2578         it to detect circularity.  Use `enclosing' as an argument to
2579         `lookup_cl.' Free the hash table when done.
2580
2581 2001-06-19  Tom Tromey  <tromey@redhat.com>
2582
2583         * lex.c (java_read_char): Disallow invalid and overlong
2584         sequences.  Fixes PR java/2319.
2585
2586 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
2587
2588         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
2589
2590 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2591
2592         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
2593         arguments accordingly.
2594
2595 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2596
2597         * gcj.texi: Move contents to just after title page.
2598
2599 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
2600
2601         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
2602         builtin type.
2603         (patch_incomplete_class_ref): Build the class ref, build the class
2604         init if necessary, complete the tree.
2605         Fixes PR java/2605
2606
2607 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2608
2609         * parse.y (lookup_field_wrapper): Test `name' code.
2610         (resolve_qualified_expression_name): Test `qual_wfl' code.
2611         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
2612         handle `qual_wfl' by code.
2613         (maybe_build_primttype_type_ref): Test `wfl' code.
2614
2615 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
2616
2617         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
2618         fdl.texi.
2619         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
2620         the dvi file in the java directory.
2621
2622 2001-05-25  Sam TH  <sam@uchicago.edu>
2623
2624         * gen-table.pl javaop.h jcf.h lex.h,
2625         parse.h: Fix header include guards.
2626
2627 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
2628
2629         * jv-scan.c (version): Update copyright year.
2630
2631 2001-05-21  Per Bothner  <per@bothner.com>
2632
2633         * jcf-parse.c (read_class):  If class is from .class or .zip file
2634         and it's already been read, don't push/pop parser context.
2635
2636 2001-05-18  Per Bothner  <per@bothner.com>
2637
2638         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
2639         command line so the jvgenmain-generated main program comes first.
2640
2641 2001-05-15  Tom Tromey  <tromey@redhat.com>
2642
2643         * class.c (build_utf8_ref): Don't generate identifier based on
2644         utf8const contents.
2645
2646 2001-05-12  Richard Henderson  <rth@redhat.com>
2647
2648         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
2649         * expr.c (java_lang_expand_expr): Expand it.
2650         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
2651         calling build_exception_object_ref.
2652         * parse.y (catch_clause_parameter): Likewise.
2653         (build_dot_class_method): Likewise.
2654         (try_reference_assignconv): Likewise.
2655         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
2656         * jcf-write.c (generate_bytecode_insns): Likewise.
2657
2658 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2659
2660         * parse.y (build_unresolved_array_type): Set
2661         EXPR_WFL_QUALIFICATION on the newly created wfl.
2662         Fixes PR java/2538. Fixes PR java/2535.
2663
2664 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2665
2666         * parse.y (fix_constructors): Removed unnecessary assignment to
2667         local. Moved assignment to `this$<n>', fixed comments and
2668         indentation.
2669         (build_wfl_wrap): Fixed indentation.
2670         Fixes PR java/2598, java/2579 and java/2658.
2671
2672 2001-05-03  Mo DeJong  <mdejong@redhat.com>
2673
2674         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
2675         check for byte swap.
2676
2677 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
2678
2679         * expr.c (build_class_init): Move MODIFY_EXPR
2680         outside of COND_EXPR.  Remove variable `call'.
2681
2682 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2683
2684         * decl.c: NULL_PTR -> NULL.
2685         * jcf-write.c: Likewise.
2686
2687 2001-05-01  Tom Tromey  <tromey@redhat.com>
2688
2689         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
2690         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
2691         * gcj.texi: Updated copyright text.  Include fdl.texi.
2692         (Top): Link to new node.
2693
2694 2001-05-01  Per Bothner  <per@bothner.com>
2695
2696         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
2697
2698 2001-05-01  Per Bothner  <per@bothner.com>
2699
2700         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
2701         import_list contains the name, not the TREE_PURPOSE.
2702
2703 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2704
2705         * jcf-io.c (read_zip_member): Cast to long in comparison with
2706         signed value.
2707
2708         * jvspec.c (lang_specific_driver): Initialize variables.
2709
2710         * mangle.c (find_compression_record_match): Likewise.
2711
2712         * typeck.c (build_null_signature): Provide static prototype.  Mark
2713         parameter with ATTRIBUTE_UNUSED.
2714
2715         * verify.c (verify_jvm_instructions): Initialize variable.
2716
2717 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2718
2719         * parse.y (do_resolve_class): Check for cyclic inheritance during
2720         inner class resolution.
2721
2722 2001-04-27  Per Bothner  <per@bothner.com>
2723
2724         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
2725         while iterating, since that could cause gc to lose stuff.
2726
2727 2001-04-26  Per Bothner  <per@bothner.com>
2728
2729         Fix method search wrt scope of inner classes to match JLS2.
2730         * typeck.c (build_null_signature):  New static function.
2731         (has_method):  New function.  Uses build_null_signature and lookup_do.
2732         * java-tree.h (has_method):  New declaration.
2733         * parse.y (find_applicable_accessible_methods_list):  Do not search
2734         context of inner classes here.
2735         (patch_method_invocation):  Search scope, ie. current and outer clases,
2736         for method matching simple name, to find class.
2737
2738 2001-04-26  Per Bothner  <per@bothner.com>
2739
2740         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
2741         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
2742
2743         * constants.c (find_methodref_with_class_index):  New function.
2744         (find_methodref_index):  Use find_methodref_with_class_index.
2745         * java-tree.h (find_methodref_with_class_index):  New declaration.
2746         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
2747         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
2748         If context changed from interface to class, don't use invokeinterface.
2749
2750 2001-04-25  Per Bothner  <per@bothner.com>
2751
2752         * verify.c (verify_jvm_instructions):  For field instructions,
2753         check that field index is valid.  For invoke instructions, check that
2754         method index is valid.
2755
2756 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
2757
2758         * config-lang.in (target_libs): Copy from $libgcj_saved.
2759
2760 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2761
2762         * decl.c (init_decl_processing): Add new class "protectionDomain"
2763         field.
2764         * class.c (make_class_data): Set initial value for "protectionDomain".
2765
2766 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2767
2768         * jvspec.c (lang_specific_driver): Fix memory allocation
2769         deficit, by using concat in lieu of xmalloc/sprintf.
2770
2771 2001-04-20  Per Bothner  <per@bothner.com>
2772
2773         Fixes to compile multiple .class files at once.
2774         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
2775         * java-tree.h (CLASS_PARSED_P):  New macro.
2776         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
2777         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
2778         (read_class):  Avoid some code duplication.
2779         Don't call JCF_FINISH for a .class file - might be needed later.
2780         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
2781         rather than CLASS_LOADED_P, since latter implies class laid out.
2782         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
2783         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
2784
2785 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2786
2787         * Make-lang.in (java/boehm.o): Depend on toplev.h.
2788
2789         * boehm.c: Include toplev.h.
2790
2791 2001-04-06  Tom Tromey  <tromey@redhat.com>
2792             Alexandre Petit-Bianco  <apbianco@redhat.com>
2793
2794         Fix for PR gcj/1404 and PR gcj/2332:
2795         * parse.y (build_array_from_name): If we use the type_wfl then
2796         accumulate dimensions from the original type as well.
2797         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
2798
2799 2001-04-06  Tom Tromey  <tromey@redhat.com>
2800
2801         * parse.y (analyze_clinit_body): Return true if the second operand
2802         of a METHOD_EXPR is nonzero.
2803
2804 2001-04-06  Tom Tromey  <tromey@redhat.com>
2805
2806         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
2807         directory.
2808         ($(srcdir)/java/parse.c): Likewise.
2809
2810 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
2811
2812         * gcj.texi: Use `which-gcj' instead of `which-g77.'
2813         (version-gcc): Initialized.
2814         (which-gcj): Likewise.
2815
2816 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2817
2818         * java-tree.h (struct lang_decl): New macro
2819         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
2820         * parse.y (build_instance_initializer): New function.
2821         (add_instance_initializer): Use it.
2822         (java_fix_constructors): Set `current_class' before fix pass.
2823         (fix_constructors): Just return if already fixed. Move `super()'
2824         invokation ahead. Use `build_instance_initializer.'
2825         Fixes PR java/1315.
2826
2827 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2828
2829         * parse.y (resolve_qualified_expression_name): Pass field's
2830         DECL_CONTEXT to `not_accessible_p.'
2831         (not_accessible_p): Changed parameters order in `inherits_from_p'
2832         invokation.
2833
2834 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
2835
2836         * lang-options.h: Add flag_check_references.
2837
2838 2001-04-04  Per Bothner  <per@bothner.com>
2839
2840         * java-tree.h (CONSTANT_VALUE_P):  New macro.
2841         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
2842         * parse.y (maybe_build_class_init_for_field):  New static function.
2843         (resolve_expression_name, resolve_field_access):  Use
2844         maybe_build_class_init_for_field instead of build_class_init
2845         This does not do the init if the field is compile-time-constant.
2846         (resolve_field_access):  Simplify.
2847
2848         * parse.y (fold_constant_for_init):  Merge test into switch.
2849
2850 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
2851
2852         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
2853         on gansidecl.h.
2854         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
2855
2856 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
2857
2858         * expr.c (pop_type_0): Save the result of the first
2859         lang_printable_name call in a scratch buffer, so it
2860         won't be clobbered by the second call.
2861
2862 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
2863
2864         * parse-scan.y (array_type:): Rewritten.
2865         (type_declaration:): `empty_statement' replaces `SC_TK.'
2866         (class_member_declaration:): `empty statement' added.
2867         (method_body:): Simplified.
2868         (static_initializer:): Likewise.
2869         (primary_no_new_array:): Use `type_literals.'
2870         (type_literals:): New rule.
2871         (dims:): Set and update `bracket_count.'
2872         Fixes PR java/1074. Fixes PR java/2412.
2873
2874 2001-03-28  Hans Boehm  <boehm@acm.org>
2875
2876         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
2877         (get_boehm_type_descriptor): Set type on returned value to be a
2878         pointer length integer.
2879
2880 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2881
2882         * expr.c (pop_type_0): Call `concat' rather than building the
2883         string manually.
2884         (pop_type): Add format specifier in call to `error'.
2885
2886         * parse.y (patch_method_invocation): Avoid casting away
2887         const-ness.
2888
2889 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
2890
2891         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
2892
2893 2001-03-28  Richard Henderson  <rth@redhat.com>
2894
2895         IA-64 ABI Exception Handling:
2896         * Make-lang.in (except.o): Don't depend on eh-common.h.
2897         * check-init.c (check_init): Handle EXC_PTR_EXPR.
2898         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
2899         [soft_exceptioninfo_call_node]: Remove.
2900         [eh_personality_libfunc, lang_eh_runtime_type]: New.
2901         (end_java_method): No emit_handlers.
2902         * except.c (java_set_exception_lang_code): Remove.
2903         (method_init_exceptions): Don't call it.
2904         (prepare_eh_table_type): No CATCH_ALL_TYPE.
2905         (build_exception_object_ref): New.
2906         (expand_end_java_handler): Update for except.h name changes.
2907         (emit_handlers, expand_resume_after_catch): Remove.
2908         * expr.c (java_lang_expand_expr): Update for except.h name changes.
2909         (process_jvm_instruction): Use build_exception_object_ref.
2910         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
2911         (soft_exceptioninfo_call_node): Remove.
2912         (build_exception_object_ref): Declare.
2913         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
2914         soft_exceptioninfo_call_node.  Move processing ...
2915         [EXC_PTR_EXPR]: ... here.
2916         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
2917         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
2918         (source_end_java_method): No java_set_exception_lang_code or
2919         emit_handlers.
2920         (build_dot_class_method): Use build_exception_object_ref.
2921         (try_reference_assignconv): Check EXC_PTR_EXPR not
2922         soft_exceptioninfo_call_node.
2923
2924 2001-03-28  Richard Henderson  <rth@redhat.com>
2925
2926         * java-tree.h (throw_node): Define as a single member of
2927         java_global_trees instead of a separate array.
2928         (JTI_THROW_NODE): New.
2929         * decl.c (throw_node): Don't declare.
2930         (init_decl_processing): Init a scalar throw_node.
2931         Don't register it for gc.
2932         * check-init.c (check_init): Reference scalar throw_node.
2933         * expr.c (build_java_athrow): Likewise.
2934         * jcf-write.c (generate_bytecode_insns): Likewise.
2935         * parse.h (BUILD_THROW): Likewise.
2936
2937 2001-03-28  Richard Henderson  <rth@redhat.com>
2938
2939         * decl.c (end_java_method): Do not save and restore
2940         flag_non_call_exceptions.
2941         * parse.y (source_end_java_method): Likewise.
2942         * lang.c (flag_exceptions): Don't declare.
2943         (java_init_options): Set flag_non_call_exceptions.  Set
2944         flag_exceptions here ...
2945         (java_init): ... not here.
2946
2947 2001-03-27  Richard Henderson  <rth@redhat.com>
2948
2949         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
2950         exceptions_via_longjmp.
2951
2952         * lang.c (flag_new_exceptions): Don't declare it.
2953         (java_init_options): Or set it.
2954
2955 2001-03-27  Richard Henderson  <rth@redhat.com>
2956
2957         * decl.c (end_java_method): Rename asynchronous_exceptions to
2958         flag_non_call_exceptions.
2959         * parse.y (source_end_java_method): Likewise.
2960
2961 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2962
2963         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2964
2965 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
2966
2967         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
2968
2969 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
2970
2971         * parse.y (find_as_inner_class): Follow current package
2972         indications not to mistakingly load an unrelated class.
2973
2974 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2975
2976         * constants.c (PUTN): Use memcpy, not bcopy.
2977
2978         * lex.c (java_read_char): Use memmove, not bcopy.
2979
2980         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
2981
2982 2001-03-23  Per Bothner  <per@bothner.com>
2983
2984         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
2985         macro for better error pin-pointing.
2986         * java-tree.h:  Fix typo in comment.
2987
2988         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
2989         Don't include jsr/goto in exception range.
2990         Check if start and end of exception range are the same (also TRY_EXPR).
2991         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
2992         However, do emit the following goto even if try_block is empty.
2993         Defer freeing exception_decl until after the finalizer, to make
2994         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
2995
2996         * parse.y (java_complete_lhs):  If the try-clause is empty, just
2997         return the finally-clause and vice versa.
2998
2999 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
3000
3001         * gcj.texi (Input Options): documented the check for attribute
3002         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
3003         * java-tree.h (flag_force_classes_archive_check): Declared extern.
3004         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
3005         (jcf_parse): Check for the right classes archive if necessary.
3006         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
3007         (jcf_parse_fields): Fixed indentation.
3008         * jcf-write.c (append_gcj_attribute): New function.
3009         (generate_classfile): Compute the attribute count, invoke
3010         `append_gcj_attribute'.
3011         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
3012         turned into bit-fields. New bit-field `right_zip.'
3013         (JCF_ZERO): Set `right_zip' to zero.
3014         * lang-options.h (-fforce-classes-archive-check): Added flag.
3015         * lang.c (flag_force_classes_archive_check): New flag.
3016         (lang_f_options): New entry `force-classes-archive-check.'
3017         Fixes PR java/1213.
3018
3019 2001-02-07  Andrew Haley  <aph@redhat.com>
3020
3021         * gcj.texi (Configure-time Options): Add -fcheck-references.
3022         * expr.c (build_java_indirect_ref): New function.
3023         (java_check_reference): New function.
3024         (build_java_array_length_access): Use build_java_indirect_ref to
3025         check for null references.
3026         (build_java_arrayaccess): Likewise.
3027         (build_get_class): Likewise.
3028         (build_field_ref): Likewise.
3029         (invoke_build_dtable): Likewise.
3030         (build_invokeinterface): Likewise.
3031         * lang.c (lang_f_options): Add flag_check_references.
3032         * jvspec.c (jvgenmain_spec): Add flag_check_references.
3033         * java-tree.h (flag_check_references): New variable.
3034         * lang.c (flag_check_references): Likewise.
3035         * parse.y (patch_invoke): Use java_check_reference.
3036         (patch_assignment): Allow for extra nesting in
3037         _Jv_CheckArrayStore.
3038
3039 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
3040
3041         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
3042         * lex.c (cxx_keywords): Likewise.
3043
3044 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
3045
3046         * parse.y (qualify_ambiguous_name): Broaden `length'
3047         recognition. Help MODIFY_EXPR be resolved as expression names.
3048         Fixes PR java/2066. Fixes PR java/2400.
3049
3050 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
3051
3052         * gjavah.c (process_file): Mark interface definitions with
3053         "__attribute__ ((java_interface))".
3054
3055 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
3056
3057         * class.c (layout_class): Fixed push_super_field's second
3058         argument. Fixes PR java/2333.
3059         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
3060         too early to lay innerclasses out.
3061
3062 2001-03-20  Tom Tromey  <tromey@redhat.com>
3063             Alexandre Petit-Bianco <apbianco@redhat.com>
3064
3065         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
3066         inside an array reference. Insertion of the array store check
3067         rewritten. Fixes PR java/2299.
3068
3069 2001-03-20  Tom Tromey  <tromey@redhat.com>
3070
3071         * lex.c (java_read_unicode): Only accept leading `u's.
3072
3073 2001-03-20  Tom Tromey  <tromey@redhat.com>
3074
3075         * jcf-parse.c (read_class): Initialize `class'.
3076
3077 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3078
3079         * jcf_parse.c (jcf_parse): Eliminate unused variable.
3080
3081 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
3082
3083         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
3084         (layout_class): Likewise.
3085         (layout_class_method): Likewise.
3086         (emit_register_classes): Likewise.
3087         * decl.c (builtin_function): Likewise.
3088         (give_name_to_locals): Likewise.
3089
3090 2001-03-19  Per Bothner  <per@bothner.com>
3091
3092         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
3093         before trying to load an inner class.
3094
3095         Fixes to process to command-line .class files in two passes.
3096         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
3097         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
3098         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
3099         * class.c (is_compiled_class):  Fix for renamed flag.
3100         * parse.y (maybe_create_class_interface_decl):  Likewise.
3101         * jcf-parse.c (yyparse):  Also set if compiling .class files.
3102         * jcf-parse.c (read_class);  Read current_class.
3103         (jcf_parse):  Make static.
3104         (load_inner_classes):  New function, with code moved from jcf_parse,
3105         because we need to inner classes after the command-line files are read.
3106         (yyparse):  Set finput to NULL when it doesn't need to be closed.
3107         Reduce use of main_jcf (basically only for archive) and
3108         use finput instead of main_jcf->read_state.
3109         Inline jcf_figure_file_type into yyparse.
3110         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
3111         Defer load_inner_classes and parse_class_file to a second pass,
3112         after we've correctly mapped command-line .clas fiels to classes.
3113         (jcf_figure_file_type):  Removed.
3114         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
3115         (JCF_ZERO):  Also clear zipd field.
3116         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
3117
3118 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3119
3120         * jcf-parse.c (yyparse): Change ch from char * to char.
3121
3122 2001-03-19  Per Bothner  <per@bothner.com>
3123
3124         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
3125         Add constructed filelist-file at end, following -xjava.  Thus any .o
3126         and library files are not affected by the -xjava.  Also wrap
3127         explicit @FILE with -xjava and -xnone.
3128
3129 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
3130
3131         * class.c (build_static_field_ref): Call make_decl_rtl() after
3132         setting the DECL_EXTERNAL flag.
3133
3134 2001-03-17  Per Bothner  <per@bothner.com>
3135
3136         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
3137
3138         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
3139         when result is is needed (target is STACK_TARGET).
3140
3141         * parse.h (JDEP_SOLV):  Removed.
3142         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
3143
3144         * parse.y (incomplete_class_list): Removed.
3145         (obtain_incomplete_type): Don't use or set incomplete_class_list.
3146         It doesn't work if resolve_class changes the name of an array type
3147         that is on the list and then someone else looks for the modified name.
3148         Also, seems liable to break when compiling multiple source files at
3149         once.  So the simplest is to just remove incomplete_class_list -
3150         it is only a minor space win and it is not even clear it saves time.
3151
3152         * parse.y (resolve_class):  Remove unneeded promote_type.
3153
3154 2001-03-15  Per Bothner  <per@bothner.com>
3155
3156         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
3157         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
3158         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
3159         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
3160
3161         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
3162         * parse.y (java_expand_classes):  Likewise.
3163
3164         * parse.y (expand_start_java_method):  Was only called once and had a
3165         misleading name, so inline in caller java_complete_expand_method.
3166         (enter_a_block):  Likewise inline in enter_block and remove.
3167
3168         Remove junk from when gcc/java was created (by copying from C/C++).
3169         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
3170         (struct binding_level):  Remove fields keep, keep_if_subblocks,
3171         more_cleanups_ok, have_cleanups (which have never been used).
3172         (pushlevel, poplevel):  Remove related useless code.
3173
3174         * class.c (make_class_data):  The class_dtable_decl (i.e. the
3175         vtable for Class) should be external, except when compiling Class.
3176
3177         * jvspec.c (lang_specific_driver):  Fix -C handling.
3178         Check -save-temps to see if temp @FILE should be deleted.
3179         Follow-up to/fix for February 16 patch.
3180
3181         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
3182         (type_stack_dup):  Remove no-longer neded error check.
3183
3184 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
3185
3186         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
3187         to 'for_pointer'. If this type is for a pointer (argument) mangling,
3188         don't surround the element with 'N..E' if the type name is
3189         unqualified.
3190
3191 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
3192
3193         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
3194         DECL_RTL_SET_P, etc.
3195         (make_method_value): Likewise.
3196         (get_dispatch_table): Likewise.
3197
3198         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3199
3200 2001-03-07  Tom Tromey  <tromey@redhat.com>
3201
3202         * config-lang.in (lang_requires): Define.
3203
3204 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
3205
3206         * typeck.c (convert): Check flag_unsafe_math_optimizations,
3207         not flag_fast_math.
3208
3209 2001-03-05  Per Bothner  <per@bothner.com>
3210
3211         Fix a problem where rest_of_decl_compilation applied to
3212         class_dtable_decl causes problems because it was done too early,
3213         before output file was opened.
3214         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
3215         * class.c (class_dtable_decl):  Add macro - element of class_roots.
3216         (make_class_data):  Define class_dtable_decl.
3217         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
3218
3219 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3220
3221         * java/class.c, java/decl.c, java/java-tree.h: Replace all
3222         uses of 'boolean' with 'bool'.
3223
3224 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3225
3226         * lang-specs.h: Add zero initializer for cpp_spec field to all
3227         array elements.
3228
3229 2001-02-16  Per Bothner  <per@bothner.com>
3230
3231         Handle compiling multiple input files at once, and @FILE syntax.
3232         * gcj.texi:  Updated documentation to match.
3233         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
3234         * jcf-parse.c (parse_source_file):  Split into ...
3235         (parse_source_file_1):  New function - and:
3236         (parse_source_file_2):  New function.
3237         (yyparse):  On -ffilelist-file, open and scan named file.
3238         On first pass over files, only do parse_source_file_1.
3239         A new second pass calls parse_source_file_2 for each file to compile.
3240         (init_jcf_parse):  Call init_src_parse.
3241         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
3242         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
3243         as multiple input file combined in one compilation.
3244         * lang-options.h:  Add -ffilelist-file
3245         * lang.c (flag_filelist_file):  New flag variable.
3246         (lang_f_options):  Handle -ffilelist-file.
3247         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
3248         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
3249         gclass_list - use global fields of src_parse_roots instead.
3250         * parse.y (src_parse_roots):  New array.
3251         (incomplete_class_list, gclass_list):  New macros.
3252         (push_parser_context, java_pop_parser_context,
3253         java_parser_context_resume):  Don't fiddle with deleted fields.
3254         (various):  Use incomplete_class gclass_list and global macros
3255         instead of parse_ctxt fields - the lists are global.
3256         (init_src_parse):  New function.
3257
3258 Fri Feb 23 15:28:39 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3259
3260         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
3261
3262 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
3263
3264         * parse.y (check_inner_class_access): Moved declaration of local
3265         `enclosing_decl_type' to the right location.
3266
3267 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
3268
3269         * parse.y (parser_check_super_interface): Don't call
3270         check_pkg_class_access for an inner interface.
3271         (parser_check_super): Don't call check_pkg_class_access for inner
3272         class.
3273         (do_resolve_class): Simplify enclosing type loop. Don't call
3274         check_pkg_class_access if CL and DECL are not set.
3275         (find_in_imports_on_demand): Set DECL if class_type needed to be
3276         loaded. Don't call check_pkg_class_access for an inner class.
3277         (check_inner_class_access): Rewritten to implement member access
3278         rules as per spec 6.6.1.
3279         (check_pkg_class_access): Handle the empty package correctly.
3280         (in_same_package): New function. Determine if two classes are in the
3281         same package.
3282
3283 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
3284
3285         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
3286         method into array types.
3287         * parse.y (patch_method_invocation): Bypass access check on clone call
3288         to array instance.
3289
3290 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
3291
3292         * expr.c (build_instanceof): Check for arrays when trying fold to
3293         false.
3294
3295 2001-02-15  Jim Meyering  <meyering@lucent.com>
3296
3297         * Make-lang.in (java.install-common): Depend on `installdirs'.
3298         (java.install-info): Likewise.
3299
3300 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
3301
3302         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
3303
3304 2001-02-14  Tom Tromey  <tromey@redhat.com>
3305             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3306
3307         Fix for PR java/1261.
3308         * typeck.c (build_java_array_type): Add public `clone' method to
3309         arrays.
3310         * parse.y (resolve_qualified_expression_name): Use current_class
3311         when checking for inaccessibility.
3312         (patch_method_invocation): Fixed error message when accessibility
3313         denied.  Added `from_super' argument.
3314
3315 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3316
3317         * parse.y (resolve_class): Don't build a fake decl. Use the one
3318         already built.
3319         * typeck.c (build_java_array_type): Build and assign decl to array
3320         type.
3321
3322 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3323
3324         * parse.y (not_accessible_p): Changed leading comment. Added extra
3325         `where' argument. Use it to enforce protected access rules.
3326         (resolve_qualified_expression_name): Added extra argument to
3327         not_accessible_p.
3328         (patch_method_invocation): Use argument `primary' to provide
3329         not_accessible_p with an extra argument.
3330         (lookup_method_invoke): Added extra argument to not_accessible_p.
3331         (search_applicable_method_list): Likewise.
3332
3333 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3334
3335         * parse.y (resolve_qualified_expression_name): Try to resolve as
3336         an inner class access only if `decl' is a TYPE_DECL.
3337
3338 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3339
3340         * decl.c (classdollar_identifier_node): Initialize.
3341         * java-tree.h (enum java_tree_index): New entry
3342         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
3343         (classdollar_identifier_node): New macro.
3344         (ID_CLASSDOLLAR_P): Likewise.
3345         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
3346         (build_dot_class_method_invocation): Likewise.
3347         (find_applicable_accessible_methods_list): `class$' can't be
3348         inherited.
3349
3350 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
3351
3352         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
3353
3354 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3355
3356         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
3357         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
3358         gone.
3359
3360 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3361
3362         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
3363         outside of the `__U' sequence too.
3364         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
3365         sequence too.
3366
3367 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3368
3369         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
3370
3371 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3372
3373         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
3374         (JVGENMAIN_OBJS): Likewise.
3375         * java-tree.h (append_gpp_mangled_name): New prototype.
3376         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
3377         Removed cast calling `gcc_add_root.'
3378         * jvgenmain.c (mangle_obstack): New global, initialized.
3379         (main): Use it.
3380         (do_mangle_class): Constify local `ptr.'
3381         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
3382         append_gpp_mangle_name and update `count' if necessary.
3383         Use `mangle_obstack.'
3384         * mangle.c (append_unicode_mangled_name): Removed.
3385         (append_gpp_mangled_name): Likewise.
3386         (unicode_mangling_length): Likewise.
3387         (mangle_member_name): Return type set to `void.'
3388         (mangle_field_decl): Don't append `U' in escaped names.
3389         (mangle_method_decl): Likewise.
3390         (mangle_member_name): Just use `append_gpp_mangled_name.'
3391         * mangle_name.c: New file.
3392
3393 2001-02-07  Per Bothner  <per@bothner.com>
3394
3395         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
3396
3397         * check-init.c (check_init):  Don't call done_alternative after
3398         processing loop code, as a LOOP_EXPR never terminates normally.
3399
3400 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3401
3402         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
3403
3404 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3405
3406         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
3407         DECLs.
3408
3409 2001-02-06  Tom Tromey  <tromey@redhat.com>
3410
3411         * lex.c (java_new_lexer): Longer error message.
3412
3413 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
3414             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3415
3416         * typeck.c (build_prim_array_type): Added leading comment.
3417         (build_java_array_type): Moved locals out of
3418         block. Always create the `data' field, fixed alignment to match
3419         C++.
3420
3421 2001-02-04  Tom Tromey  <tromey@redhat.com>
3422
3423         * expr.c (java_lang_expand_expr): Don't bother recomputing
3424         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
3425         Fixes PR java/1866.
3426
3427 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3428
3429         * parse.y (process_imports): Save the original name of the import
3430         for better error report.
3431
3432 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
3433
3434         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
3435         of macros used when compiling jvspec.c.
3436         * jvspec.c (lang_specific_driver): Link with the shared
3437         libgcc by default.
3438
3439 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3440
3441         * check-init.c (check_init): Call internal_error instead of fatal.
3442         * expr.c (java_lang_expand_expr): Likewise.
3443         * jcf-parse.c (get_constant): Likewise.
3444         * mangle.c (java_mangle_decl): Likewise.
3445         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
3446         (operator_string): Likewise.
3447         * check-init.c (check_init): Call abort instead of fatal.
3448         * class.c (build_class_ref): Likewise.
3449         * constants.c (write_constant_pool): Likewise.
3450         * decl.c (start_java_method): Likewise.
3451         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
3452         (java_stack_dup, encode_newarray_type): Likewise.
3453         (build_java_array_length_access): Likewise.
3454         (build_java_check_indexed_type, expand_java_pushc): Likewise.
3455         (build_java_soft_divmod, build_invokeinterface): Likewise.
3456         * java-tree.h (INNER_CLASS_P): Likewise.
3457         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
3458         (give_name_to_class, get_class_constant): Likewise.
3459         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
3460         (find_constant_index, generate_bytecode_conditional): Likewise.
3461         (generate_bytecode_insns, perform_relocations): Likewise.
3462         * lex.c (java_unget_unicode, java_lex): Likewise.
3463         * mangle.c (mangle_type, mangle_record_type): Likewise.
3464         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
3465         (finish_mangling): Likewise.
3466         * parse.h (MARK_FINAL_PARMS): Likewise.
3467         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
3468         (obtain_incomplete_type, java_complete_class): Likewise.
3469         (java_check_regular_methods, java_complete_expand_method): Likewise.
3470         (cut_identifier_in_qualified, check_deprecation): Likewise.
3471         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
3472         (java_complete_lhs, lookup_name_in_blocks): Likewise.
3473         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
3474         * typeck.c (set_local_type, parse_signature_type): Likewise.
3475         (parse_signature_string, build_java_signature): Likewise;
3476         (set_java_signature): Likewise.
3477         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
3478         * class.c (add_method): Call fatal_error instead of fatal.
3479         (build_static_field_ref): Likewise.
3480         * expr.c (build_known_method_ref, expand_invoke): Likewise.
3481         * jcf-parse.c (get_constant, jcf_parse): Likewise.
3482         * lex.c (java_new_new_lexer): Likewise.
3483         * jv-scan.c (main): Likewise.
3484         (fatal_error): Renamed from fatal.
3485         * jcf-parse.c (yyparse): Call fatal_io_error instead of
3486         pfatal_with_name.
3487         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
3488         (yyparse): Likewise.
3489         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
3490         * lex.c (java_get_line_col): Likewise.
3491         * jcf-parse.c (load_class): Make errors non-fatal.
3492         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
3493
3494 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
3495
3496         * jvgenmain.c (class_mangling_suffix): Remove unused string.
3497         (error): Remove unused function.
3498         (main): Don't use "__attribute__ alias" on generated class symbol.
3499
3500 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3501
3502         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
3503         argument.
3504         * parse.y (finish_method_declaration): Code accounting for WFLed
3505         method DECL_NAMEs deleted.
3506         (check_abstract_method_definitions): Likewise.
3507         (resolve_type_during_patch): Layout resolved type.
3508         * typeck.c (lookup_do): Removed unused local.
3509
3510 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
3511
3512         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
3513         * decl.c (init_decl_processing): Use integer_minus_one_node, not
3514         integer_negative_one_node.
3515         * expr.c (build_java_binop): Likewise.
3516
3517 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
3518
3519         * zextract.c (read_zip_archive): Read file_offset before writing
3520         zipd and consequently clobbering the header contents.
3521
3522 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3523
3524         * Make-lang.in: Remove all dependencies on defaults.h.
3525         * decl.c: Don't include defaults.h.
3526         * expr.c: Likewise.
3527         * parse.y: Likewise.
3528
3529 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3530
3531         * ChangeLog (2001-01-21): Fixed typo.
3532         * class.c (layout_class_method): Code accounting for WFLed
3533         method DECL_NAMEs deleted.
3534         * constant.c (find_methodref_index): Likewise.
3535         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
3536         * java-tree.h (DECL_FUNCTION_WFL): New macro.
3537         (struct lang_decl): New field `wfl'.
3538         (java_get_real_method_name): Prototype deleted.
3539         * mangle.c (mangle_method_decl): Code accounting for WFLed
3540         method DECL_NAMEs deleted.
3541         * parse.h (GET_METHOD_NAME): Macro deleted.
3542         * parse.y (reset_method_name): Deleted.
3543         (method_header): Set DECL_FUNCTION_WFL.
3544         (check_abstract_method_header): Code accounting for WFLed method
3545         DECL_NAMEs deleted.
3546         (java_get_real_method_name): Deleted.
3547         (check_method_redefinition): Code accounting for WFLed method
3548         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
3549         (java_check_regular_methods): Likewise.
3550         (java_check_abstract_methods): Likewise.
3551         (java_expand_classes): Don't call `reset_method_name.'
3552         (search_applicable_method_list): Use DECL_NAMEs instead of
3553         GET_METHOD_NAME.
3554         * typeck.c (lookup_do): Code accounting for WFLed method
3555         DECL_NAMEs deleted.
3556
3557 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
3558
3559         * lex.c (java_read_char): Check for EOF from getc first.
3560
3561 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3562
3563         * class.c (layout_class): Don't lay the superclass out if it's
3564         already being laid out.
3565         * jcf-parse.c (handle_innerclass_attribute): New function.
3566         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
3567         handle_innerclasses_attribute.
3568         (jcf_parse): Don't load an innerclasses if it's already being
3569         laid out.
3570         * jcf-write.c (append_innerclass_attribute_entry): Static
3571         `anonymous_name' and its initialization deleted. `ocii' and `ini'
3572         to be zero for anonymous classes.
3573
3574 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3575
3576         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
3577         necessary.
3578         * jcf-parse.c (set_source_filename): Use
3579         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
3580
3581 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3582
3583         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
3584         gets a unique asm name.
3585
3586 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3587
3588         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
3589         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3590         if necessary.
3591         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
3592         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
3593         * parse.y (lookup_package_type_and_set_next): Deleted.
3594         (resolve_package): Removed unnecessary code.
3595         (find_applicable_accessible_methods_list): `finit$' can't be
3596         inherited.
3597         * verify.c (pop_argument_types): Added missing prototype.
3598
3599 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
3600
3601         * config-lang.in: Disable java by default.
3602
3603 2001-01-23  Tom Tromey  <tromey@redhat.com>
3604
3605         * gcj.texi (Copying): New node.
3606         Added copyright information.
3607
3608 2001-01-21  Per Bothner  <per@bothner.com>
3609
3610         Various fixes to allow compiling a compressed .jar/.zip archive.
3611         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
3612         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
3613         (struct ZipDirectory):  New field zipf points to owning ZipFile.
3614         * jcf.h (struct ZipDirectory):  Add forward declaration.
3615         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
3616         Remove seen_in_zip and zip_offset fields.
3617         (JCF_SEEN_IN_ZIP):  New macro.
3618         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
3619         * jcf-io.c:  Change all ZipFileCache to ZipFile.
3620         (read_zip_member):  New function.
3621         (open_in_zip):  Call read_zip_member.
3622         * jcf-parse.c (find_in_current_zip):  Remove function.
3623         (read_class):  Merge in find_in_current_zip functionality.
3624         Call read_zip_member if needed.
3625         (parse_zip_file_entries):  Use read_zip_member.
3626         (process_zip_dir):  Update for removed and added JCF fields.
3627         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
3628
3629 2001-01-21  Per Bothner  <per@bothner.com>
3630
3631         Minor optimization of static ggc roots.
3632         * jcf-parse.c (parse_roots):  New static field.
3633         (current_field, current_method, current_file_list):  Replace by macros
3634         naming fields of parse_roots.
3635         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
3636         * class.c (class_roots):  New static field.
3637         (registered_class, fields_ident, info_ident, class_list):
3638         New macros naming fields of parse_roots.
3639         (build_static_field_ref):  Don't register roots here.
3640         (layout_class):  Static field list replaced by macro class_list.
3641         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
3642         Initialize fields_ident and info_ident here.
3643
3644 2001-01-21  Per Bothner  <per@bothner.com>
3645
3646         * jcf-parse.c (ggc_mark_jcf):  New function.
3647         (init_jcf_parse):  Register current_jcf as ggc root.
3648
3649 2001-01-21  Per Bothner  <per@bothner.com>
3650
3651         * lang.c (put_decl_node):  Print method's name.
3652
3653 2001-01-21  Per Bothner  <per@bothner.com>
3654
3655         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
3656         (verify_jvm_instructions):  Use it, for better error messages on loads.
3657
3658 2001-01-21  Per Bothner  <per@bothner.com>
3659
3660         * verify.c (merge_type_state):  Still may have to merge even if
3661         LABEL_VERIFIED (label).
3662
3663 2001-01-21  Per Bothner  <per@bothner.com>
3664
3665         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
3666         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
3667
3668 2001-01-19  Per Bothner  <per@bothner.com>
3669
3670         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
3671         if expeting an interface type.  Refines Tom's change of 2000-09-12.
3672
3673 2001-01-18  Per Bothner  <per@bothner.com>
3674
3675         * gcj.texi (Input Options): Mention .java files.
3676
3677 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3678
3679         * lang-options.h (-Wunsupported-jdk11): Removed.
3680         * lang.c (flag_not_overriding): Deleted.
3681         (flag_static_local_jdk1_1): Likewise.
3682         (lang_W_options): Removed "unsupported-jdk11" entry.
3683         * parse.y (java_check_methods): Removed dead code.
3684
3685 2001-01-17  Tom Tromey  <tromey@redhat.com>
3686
3687         Changes suggested by Per Bothner:
3688         * gcj.texi (Input Options): Don't mention input files.
3689         (Code Generation): Updated --main information.
3690         (Invoking jcf-dump): Mention that --javap is incomplete.
3691         From Alexandre Petit-Bianco:
3692         (Warnings): Don't mention -Wunsupported-jdk11.
3693         My stuff:
3694         (Compatibility): Mention JDK 1.2-ness of libraries.
3695         (Resources): Mention resources used when writing gcj.
3696
3697 2001-01-17  Tom Tromey  <tromey@redhat.com>
3698
3699         * gcj.texi: New file.
3700         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
3701         (java.info): Depend on gcj.info.
3702         (java/gcj.dvi): New target.
3703         (java.dvi): Depend on gcj.dvi.
3704         (java.install-info): Wrote.
3705
3706 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
3707
3708         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
3709         having called make_decl_rtl.
3710
3711 2001-01-14  Per Bothner  <per@bothner.com>
3712
3713         Various patches to emit better messages on verification errors.
3714         * expr.c (push_type_0):  Return error indication on stack overflow,
3715         instead of callinfg fatal.
3716         (push_type):  Now just call push_type_0 (nd fatal on overflow).
3717         (pop_type_0):  Return detailed error message (in a char** argument).
3718         (pop_type):  If pop_type_0 fails, print error message.
3719         (pop_argument_types):  Moved to verify.c.
3720         * verify.c (pop_argument_types):  Moved from expr.c.
3721         Return a (possible) error message, rather than void.
3722         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
3723         (verify_jvm_instruction):  Use new macros, improving error messages.
3724         For case OPCODE_astore use object_ptr_type_node.
3725         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
3726         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
3727
3728         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
3729         constant, return body without wrapper.  (Improves constant folding.)
3730         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
3731
3732 2001-01-13  Per Bothner  <per@bothner.com>
3733
3734         * expr.c (expand_java_field_op):  Assigning to a final field outside
3735         an initializer does not violate JVM spec, so should be warning, not
3736         error.  (Sun's verifier does not complain - though MicroSoft's does.)
3737
3738 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
3739
3740         * gjavah.c (version), jcf-dump.c (version): Update copyright year
3741         to 2001.
3742
3743 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
3744
3745         * parse.y (resolve_expression_name): Permit instance variables from
3746         enclosing context in super constructor call.
3747         (resolve_qualified_expression_name): Permit enclosing class's qualified
3748         "this" in super constructor call.
3749
3750 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3751
3752         * class.c (build_utf8_ref): Remove last argument in call to
3753         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3754         (build_class_ref): Likewise.
3755         (build_static_field_ref): Likewise.
3756         (get_dispatch_table): Likewise.
3757         (layout_class_method): Likewise.
3758         (emit_register_classes): Likewise.
3759         * constants.c (build_constant_data_ref): Likewise.
3760         * decl.c (builtin_function): Likewise.
3761         (create_primitive_vtable): Likewise.
3762         * expr.c (build_known_method_def): Likewise.
3763         (build_jni_stub): Likewise.
3764         (java_lang_expand_expr): Likewise.
3765
3766 2001-01-10  Tom Tromey  <tromey@redhat.com>
3767
3768         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
3769
3770 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3771
3772         * java-tree.h (lang_printable_name_wls): New prototype.
3773         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
3774         rather than `current_class' to print type name. Don't prepend type
3775         names when printing constructor names.
3776         (lang_printable_name_wls): New function.
3777         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
3778         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
3779         * parse.y (patch_method_invocation): Message tuned for constructors.
3780         (not_accessible_p): Grant `private' access from within
3781         enclosing contexts.
3782
3783 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3784
3785         All files with updated copyright when applicable.
3786         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
3787         * class.c (mangle_class_field): Function removed.
3788         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
3789         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
3790         (build_class_ref): Call `java_mangle_class_field' instead of
3791         `mangle_class_field.'
3792         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
3793         (layout_class): Call `java_mangle_decl' instead of
3794         `mangle_static_field.'
3795         (cxx_keywords): Initialized static array moved to `lex.c.'
3796         (layout_class_method): Changed leading comment. Simplified to
3797         call `java_mangle_decl.' Local `ptr' moved in for loop body.
3798         * decl.c (lang_mark_tree): Mark field `package_list.'
3799         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
3800         (struct lang_type): New field `package_list.'
3801         (unicode_mangling_length): Prototype removed.
3802         (append_gpp_mangled_name, append_gpp_mangled_classtype,
3803         emit_unicode_mangled_name): Likewise.
3804         (cxx_keyword_p): New prototype.
3805         (java_mangle_decl, java_mangle_class_field,
3806         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
3807         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
3808         `build_expr_wfl.'
3809         * jvgenmain.c (main_method_prefix): Global variable removed.
3810         (main_method_suffix): Likewise.
3811         (do_mangle_classname): New function.
3812         (main): Call it. Format changed to accommodate new mangling scheme.
3813         * lex.c: (utf8_cmp): Conditionally prototyped.
3814         (cxx_keywords): Moved from class.c, conditionally defined.
3815         (utf8_cmp, cxx_keyword_p): Likewise.
3816         * mangle.c (obstack.h, ggc.h): Included.
3817         (mangle_field_decl): New function.
3818         (mangle_method_decl, mangle_type, mangle_pointer_type,
3819         mangle_array_type, mangle_record_type,
3820         find_compression_pointer_match, find_compression_array_match,
3821         find_compression_record_match,
3822         find_compression_array_template_match, set_type_package_list,
3823         entry_match_pointer_p, emit_compression_string, init_mangling,
3824         finish_mangling, compression_table_add, mangle_member_name): Likewise.
3825         (mangle_obstack): New global.
3826         (MANGLE_RAW_STRING): New macro.
3827         (unicode_mangling_length): Turned static.
3828         (append_unicode_mangled_name): Renamed from
3829         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
3830         replaces `obstack', removed from the parameter list.
3831         (append_gpp_mangled_name): Turned static. `mangle_obstack'
3832         replaces parameter `obstack', removed from the parameter list. Call
3833         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
3834         (append_gpp_mangled_classtype): Removed.
3835         (compression_table, compression_next): New static variables.
3836         * parse.y (temporary_obstack): Extern declaration removed.
3837
3838 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3839
3840         * parse.y (patch_binop): Compute missing type in error situations.
3841
3842 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
3843
3844         * class.c (make_class_data): Push initial value for "arrayclass".
3845         * decl.c (init_decl_processing): Add new class field "arrayclass".
3846
3847 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
3848
3849         From patha@softlab.ericsson.se:
3850         * parse.y (switch_label): Use build, not build1, to construct
3851         DEFAULT_EXPR.
3852
3853 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3854
3855         * lang.c (lang_decode_option): Change -MA to -MP.
3856         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
3857         Update to new prototype; do quote targets.
3858         (jcf_dependency_write): Update.
3859
3860 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
3861
3862         Shorten primitive array allocation path:
3863         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
3864         to create new primitive arrays.
3865         * expr.c (build_newarray): If generating native code, call
3866         soft_newarray_node with a reference to the primitive TYPE identifier
3867         instead of type_value.
3868
3869 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
3870
3871         Fix for PRs gcj/312 and gcj/253:
3872         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
3873         dest if they arn't already.
3874         * class.c (layout_class): Call maybe_layout_super_class on
3875         superinterfaces also, but only if compiling from bytecode.
3876
3877         Fix for PR gcj/373:
3878         * parse.y (create_class): Set ACC_STATIC if class is declared in an
3879         interface.
3880
3881 2000-12-15  Tom Tromey  <tromey@redhat.com>
3882
3883         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
3884         set.
3885
3886 2000-12-14  Andrew Haley  <aph@redhat.com>
3887
3888         * boehm.c (mark_reference_fields): Change test to correctly detect
3889         bitmap overflow.
3890
3891 2000-12-15  Andreas Jaeger  <aj@suse.de>
3892
3893         * config-lang.in (lang_dirs): Added.
3894
3895 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3896
3897         * parse.y (end_artificial_method_body): Fixed undefined behavior.
3898         Credits go to rth for finding it.
3899
3900 2000-12-13  Mike Stump  <mrs@wrs.com>
3901
3902         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
3903
3904 2000-11-07  Tom Tromey  <tromey@cygnus.com>
3905
3906         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
3907         * lex.c (java_ignorable_control_p): Removed.
3908         (java_letter_or_digit_p): Removed.
3909         (java_start_char_p): New function.
3910         (java_read_char): Return `int', not `unicode_t'.  Changed
3911         callers.
3912         (java_read_unicode): Likewise.
3913         (java_read_unicode_collapsing_terminators): Likewise.
3914         (java_get_unicode): Likewise.
3915         (java_new_lexer): Initialize hit_eof.
3916         (java_parse_end_comment): Take `int' argument.
3917         (java_parse_doc_section): Likewise.
3918         (java_parse_escape_sequence): Don't allow backlash-newline.
3919         Return `int'.
3920         * lex.h (JAVA_DIGIT_P): Removed.
3921         (_JAVA_LETTER_OR_DIGIT_P): Removed.
3922         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
3923         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
3924         (JAVA_PART_CHAR_P): New macro.
3925         (UEOF): Now -1.
3926         (JAVA_CHAR_ERROR): Now -2.
3927         (java_lexer): New field `hit_eof'.
3928         * chartables.h: New file.
3929         * gen-table.pl: new file.
3930
3931 2000-11-20  Tom Tromey  <tromey@cygnus.com>
3932             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3933
3934         * parse.y (java_complete_lhs): Only allow compound assignment of
3935         reference type if type is String.
3936
3937 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3938
3939         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
3940         jcf-path.c: Likewise.
3941
3942 2000-12-09  Anthony Green  <green@redhat.com>
3943
3944         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
3945         filestart and filename_length as int values.
3946
3947 2000-12-07  Mo DeJong  <mdejong@redhat.com>
3948
3949         * jcf-io.c (find_class): Correct the logic that tests to see if a
3950         .java file is newer than its .class file. The compiler was
3951         incorrectly printing a warning when file mod times were equal.
3952
3953 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
3954
3955         * jvgenmain.c: Use ISPRINT not isascii.
3956
3957 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3958
3959         * parse.y (end_artificial_method_body): Fixed typo.
3960
3961 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3962
3963         * parse.y (patch_method_invocation): Pick the correct enclosing
3964         context when creating inner class instances.
3965         Fixes gcj/332.
3966
3967 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
3968
3969         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3970         Update copyright year to 2000.
3971
3972 2000-11-23  Anthony Green  <green@redhat.com>
3973
3974         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
3975         Move current_file_list out of yyparse and make it static.
3976
3977         * expr.c: Declare quick_stack and tree_list_free_list as static
3978         (init_expr_processing): Register quick_stack and
3979         tree_list_free_list roots.
3980
3981 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3982
3983         * parse.y (build_outer_field_access): New local `decl_ctx', use
3984         it. Check for field's context and current class immediate outer
3985         context inheritance.
3986         (outer_field_access_p): Consider fields inherited from the last
3987         enclosing context.
3988         (build_access_to_thisn): Stop at the last enclosing context if
3989         necessary.
3990         Fixes gcj/367.
3991
3992 Thu Nov 23 02:19:14 2000  J"orn Rennecke <amylaar@redhat.com>
3993
3994         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
3995
3996 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
3997
3998         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
3999         scratch buffer.
4000
4001 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4002
4003         * jv-scan.c (help): Document --complexity.
4004         (options): Added --complexity.
4005         (flag_complexity): New global.
4006         (main): Call `report'.
4007         * parse-scan.y (complexity): New global.
4008         (if_then_statement, if_then_else_statement,
4009         if_then_else_statement_nsi, switch_block_statement_group,
4010         while_expression, do_statement, for_begin, continue_statement,
4011         throw_statement, catch_clause, finally, method_invocation,
4012         conditional_and_expression, conditional_or_expression,
4013         conditional_expression): Update complexity.
4014         (reset_report): Reset complexity.
4015         (report): New function.
4016
4017 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4018
4019         * lex.c (yylex): Added STRICT_TK case.
4020         * parse.y (STRICT_TK): Added.
4021         * parse-scan.y (STRICT_TK): Added.
4022         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
4023         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
4024         file.
4025         * keyword.h: Rebuilt.
4026         * keyword.gperf (strictfp): Added.
4027
4028 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4029
4030         * lex.c (yylex): Recognize floating point constants with leading
4031         0.
4032
4033 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4034
4035         * java-tree.h (cyclic_inheritance_report): Constify.
4036         * parse.y (cyclic_inheritance_report): Likewise.
4037
4038 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
4039
4040         * parse.y (goal): Remove call to ggc_add_string_root.
4041
4042 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
4043
4044         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
4045         Create string in scratch buffer, then pass to build_string.
4046
4047 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4048
4049         * parse.y (issue_warning_error_from_context): Add
4050         ATTRIBUTE_PRINTF.
4051
4052 2000-11-11  Anthony Green  <green@redhat.com>
4053
4054         * jcf-parse.c (process_zip_dir): Add finput parameter.
4055         (jcf_figure_file_type): Call process_zip_dir with appropriate
4056         argument.
4057
4058 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4059
4060         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
4061         * jcf-parse.c (jcf_figure_file_type): Likewise.
4062
4063 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
4064
4065         * parse.y (create_new_parser_context): Use memset () instead of
4066         bzero ().
4067
4068 2000-11-08  Tom Tromey  <tromey@cygnus.com>
4069
4070         * gjavah.c (process_file): Only include gcj/cni.h when generating
4071         CNI stubs.
4072
4073 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4074
4075         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
4076         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
4077         instead of bzero ().
4078
4079 2000-11-05  Tom Tromey  <tromey@cygnus.com>
4080
4081         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
4082         * lex.c (IS_ZERO): New define.
4083         (java_perform_atof): Error on floating point underflow.
4084
4085 2000-11-04  Tom Tromey  <tromey@cygnus.com>
4086
4087         * lex.c (java_parse_escape_sequence): Only read two octal
4088         characters if the first one is greater than 3.  Don't allow
4089         "octal" numbers to include the digits 8 or 9.
4090
4091 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
4092
4093         * Make-lang.in (java.distdir): Remove.
4094
4095 2000-11-03  Tom Tromey  <tromey@cygnus.com>
4096
4097         * Make-lang.in (java.dvi): New target.
4098         Partial fix for PR other/567.
4099
4100         * lang-options.h: Mention -Wout-of-date.
4101         * jcf-dump.c (flag_newer): New global.
4102         * gjavah.c (flag_newer): New global.
4103         * jcf-io.c (find_class): Only warn when flag_newer set.
4104         * lang.c (flag_newer): New global.
4105         (struct string_option): New declaration.
4106         (lang_W_options): New global.
4107         (process_option_with_no): New function.
4108         (lang_decode_option): Use it.
4109
4110         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
4111         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
4112         `$'.
4113
4114         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
4115         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
4116         * lex.c (java_read_unicode): Removed `term_context' argument.
4117         Recognize any number of `u' in `\u'.
4118         (java_read_unicode_collapsing_terminators): New function.
4119         (java_get_unicode): Use it.
4120         (java_lineterminator): Removed.
4121         (yylex): Produce error if character literal is newline or single
4122         quote.  Return if eof found in middle of `//' comment.  EOF in
4123         `//' comment is only an error if pedantic.
4124         (java_ignorable_control_p): New function.
4125         (java_parse_end_comment): Return if eof found in middle of
4126         comment.
4127         Include flags.h.
4128         * jv-scan.c (pedantic): New global.
4129
4130 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4131
4132         * parse.y (outer_field_access_p): Inherited fields aren't
4133         consider outer fields.
4134         (maybe_build_thisn_access_method): Use
4135         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
4136         (resolve_expression_name): Trigger an error if a static field
4137         is being accessed as an outer field.
4138
4139 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4140
4141         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
4142         Fixes gcj/365.
4143
4144 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
4145
4146         * Make-lang.in: Move all build rules here from Makefile.in,
4147         adapt to new context.  Wrap all rules that change the current
4148         directory in parentheses.  Expunge all references to $(P).
4149         When one command depends on another and they're run all at
4150         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
4151         all object-file generation rules.  Delete obsolete variables.
4152
4153         * Makefile.in: Delete.
4154         * config-lang.in: Delete outputs= line.
4155
4156 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4157
4158         * parse.y (patch_method_invocation): NULLify this_arg when already
4159         inserted.
4160         (maybe_use_access_method): Handle call to methods unrelated to the
4161         current class. Fixed comment.
4162         Fixes gcj/361.
4163
4164 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4165
4166        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
4167        scope.
4168
4169 2000-10-24  Tom Tromey  <tromey@cygnus.com>
4170
4171         * lex.c (java_new_lexer): Initialize new fields.  Work around
4172         broken iconv() implementations.
4173         (java_read_char): Swap bytes if required.  Use fallback decoder if
4174         required.
4175         (byteswap_init, need_byteswap): New globals.
4176         (java_destroy_lexer): Only close iconv handle if it is in use.
4177         * lex.h (java_lexer): New fields read_anything, byte_swap,
4178         use_fallback.
4179         Made out_buffer unsigned.
4180
4181 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4182
4183         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
4184         where an enclosing context can be set on the jdep.
4185         (do_resolve_class): Fixed identation.
4186
4187 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4188
4189         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
4190
4191         * jcf-reader.c (peek_attribute, skip_attribute): Only define
4192         when requested.
4193
4194         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
4195
4196         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
4197
4198 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4199
4200         * jcf-write.c (OP1): Update `last_bc'.
4201         (struct jcf_block): Fixed indentation and typo in comments.  New
4202         field `last_bc'.
4203         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
4204         follows `monitorenter'.
4205         * parse.y (patch_synchronized_statement): New local `tmp'. Call
4206         `patch_string'.
4207         Fixes gcj/232.
4208
4209 2000-10-16  Tom Tromey  <tromey@cygnus.com>
4210
4211         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
4212         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
4213         * lang-options.h: Added -MA, -MT, -MF..
4214         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
4215         (DEPEND_TARGET_SET): New macro.
4216         (DEPEND_FILE_ALREADY_SET): Likewise.
4217         (init_parse): Handle new flags.
4218         * jcf.h (jcf_dependency_print_dummies): Declare.
4219         * Make-lang.in (s-java): Added mkdeps.o.
4220         * Makefile.in (BACKEND): Added mkdeps.o.
4221         (../gcjh$(exeext)): Added mkdeps.o.
4222         (../jcf-dump$(exeext)): Added mkdeps.o.
4223         * jcf-depend.c: Include mkdeps.h.
4224         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
4225         add_entry): Removed.
4226         (jcf_dependency_reset): Rewrote.
4227         (dependencies): New global.
4228         (jcf_dependency_set_target): Rewrote.
4229         (jcf_dependency_add_target): Likewise.
4230         (jcf_dependency_add_file): Likewise.
4231         (munge): Removed.
4232         (print_ents): Removed.
4233         (jcf_dependency_write): Rewrote.
4234         (print_dummies): New global.
4235         (jcf_dependency_print_dummies): New function
4236         (jcf_dependency_write): Call deps_dummy_targets if required.
4237
4238 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4239
4240         * gjavah.c (add_class_decl): Removed unused variables `tname',
4241         `tlen' and `name_index'.
4242         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
4243         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
4244         in `wfl_operator' with value.
4245         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
4246         (jcf_figure_file_type): Fixed identation.
4247         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
4248         * parse.y (analyze_clinit_body): New function.
4249         (static_initializer:): Reset `current_static_block'.
4250         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
4251         `wfl_operator' with new value.
4252         (lookup_cl): Use EXPR_WFL_FILENAME.
4253         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
4254         analyze_clinit_body.
4255         (build_outer_field_access): Access to this$<n> built from
4256         current_class, not its outer context.
4257         (build_access_to_thisn): Fixed leading comment. Tidied things up.
4258         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
4259         (patch_method_invocation): Use `is_static_flag' when already
4260         initialized.
4261         (patch_newarray): Removed assignment in ternary operator.
4262
4263 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4264
4265         * except.c (free_eh_ranges): Don't free `whole_range'.
4266
4267 2000-10-15  Anthony Green  <green@redhat.com>
4268
4269         * decl.c (init_decl_processing): Call init_class_processing before
4270         anything else.
4271
4272 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4273
4274         * check-init.c (check_init): Fixed leading comment. Use
4275         LOCAL_FINAL_P.
4276         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4277         (give_name_to_locals): Likewise.
4278         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
4279         fields in lang_decl_var.
4280         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
4281         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
4282         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
4283         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
4284         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
4285         (LOCAL_FINAL): Rewritten.
4286         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
4287         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
4288         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
4289         `init_final' fields.
4290         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
4291         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
4292         (TYPE_HAS_FINAL_VARIABLE): New macro.
4293         (struct lang_type): Added `afv' field.
4294         * parse.y (check_static_final_variable_assignment_flag): New function.
4295         (reset_static_final_variable_assignment_flag): Likewise.
4296         (check_final_variable_local_assignment_flag): Likewise.
4297         (reset_final_variable_local_assignment_flag): Likewise.
4298         (check_final_variable_indirect_assignment): Likewise.
4299         (check_final_variable_global_assignment_flag): Likewise.
4300         (add_inner_class_fields): Use LOCAL_FINAL_P.
4301         (register_fields): Handle local finals and final variables.
4302         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
4303         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4304         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
4305         on local finals.
4306         (java_complete_expand_methods): Loop to set
4307         TYPE_HAS_FINAL_VARIABLE. Call
4308         `reset_final_variable_local_assignment_flag' and
4309         `check_final_variable_local_assignment_flag' accordingly before
4310         and after constructor expansion. Call
4311         `reset_static_final_variable_assignment_flag'
4312         before expanding <clinit> and after call
4313         `check_static_final_variable_assignment_flag' if the
4314         current_class isn't an interface. After all methods have been
4315         expanded, call `check_final_variable_global_assignment_flag' and
4316         `check_static_final_variable_assignment_flag' if the current class
4317         is an interface.
4318         (maybe_yank_clinit): Fixed typo in comment.
4319         (build_outer_field_access_methods): Removed old sanity check. Use
4320         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4321         Don't create access methods for finals.
4322         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
4323         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
4324         existing DECL_INIT has been processed.
4325         (java_complete_lhs): Likewise.
4326         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
4327         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
4328         logic.
4329         (patch_assignment): Use LOCAL_FINAL_P.
4330         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
4331         DECL_INITIAL is nullified.
4332         Fixes gcj/163.
4333
4334 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4335
4336         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
4337
4338         * Makefile.in (parse.c, parse-scan.c): Likewise.
4339
4340 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
4341
4342         * class.c (temporary_obstack): Remove.
4343         (make_class): Don't mess with obstascks.
4344         (push_class): Likewise.
4345         (set_super_info): Likewise.
4346         (add_method_1): Likewise.
4347         (add_method): Likewise.
4348         (add_field): Likewise.
4349         (build_utf8_ref): Likewise.
4350         (build_class_ref): Likewise.
4351         (build_static_field_ref): Likewise.
4352         (finish_class): Likewise.
4353         (push_super_field): Likewise.
4354         (layout_class): Likewise.
4355         (layout_class_methods): Likewise.
4356         (init_class_processing): Likewise.
4357         * constants.c (get_tag_node): Likewise.
4358         (build_constant_data_ref): Likewise.
4359         * decl.c (ggc_p): Remove.
4360         (copy_lang_decl): Use ggc_alloc.
4361         (complete_start_java_method): Don't mess with obstacks.
4362         (start_java_method): Likewise.
4363         (end_java_method): Likewise.
4364         * except.c (link_handler): Use xmalloc.
4365         (free_eh_ranges): New function.
4366         (method_init_exceptions): Use it.
4367         (add_handler): Use xmalloc.
4368         (expand_start_java_handler): Don't mess with obstacks.
4369         (prepare_eh_table_type): Likewise.
4370         (expand_end_java_handler): Likewise.
4371         * expr.c (push_value): Likewise.
4372         (create_label_decl): Likewise.
4373         (build_jni_stub): Likewise.
4374         (java_lang_expand_expr): Likewise.
4375         (note_instructions): Use xrealloc.
4376         (java_push_constant_from_pool): Don't mess with obstacks.
4377         (process_jvm_instruction): Likewise.
4378         * java-tree.h (cyclic_inheritance_report): Remove duplicate
4379         declaration.
4380         * jcf-parse.c (get_constant): Don't mess with obstacks.
4381         (read_class): Likewise.
4382         (jcf_parse): Likewise.
4383         * lex.c (expression_obstack): Remove.
4384         (java_lex): Don't use obstack_free.
4385         * parse.h (exit_java_complete_class): Don't mess with obstacks.
4386         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
4387         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
4388         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
4389         * parse.y (gaol): Add more GC roots.
4390         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
4391         (lookup_field_wrapper): Likewise.
4392         (obtain_incomplete_type): Don't mess with obstacks.
4393         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
4394         macros.
4395         (craft_constructor): Don't mess with obstacks.
4396         (safe_layout_class): Likewise.
4397         (java_complete_class): Likewise.
4398         (source_end_java_method): Likewise.
4399         (build_outer_field_access_methods): Likewise.
4400         (build_outer_method_access_method): Likewise.
4401         (maybe_build_thisn_access_method): Likewise.
4402         (build_dot_class_method_invocation): Likewise.
4403         (java_complete_tree): Likewise.
4404         (java_complete_lhs): Likewise.
4405         (do_merge_string_cste): Likewise.
4406         (patch_string_cst): Likewise.
4407         (array_constructor_check_entry): Likewise.
4408         * typeck.c (build_java_array_type): Likewise.
4409         (parse_signature_string): Likewise.
4410         (build_java_signature): Likewise.
4411
4412 2000-10-12  Tom Tromey  <tromey@cygnus.com>
4413
4414         Fix for PR gcj/356:
4415         * gjavah.c (add_class_decl): Don't special-case inner classes.
4416         (add_namelet): Likewise.
4417
4418 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
4419
4420         * java-tree.h: Constify current_encoding.
4421         * lang.c: Constify current_encoding.
4422
4423 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
4424
4425         * jvgenmain.c (class_mangling_suffix): Omit `.'.
4426         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
4427
4428 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4429
4430         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
4431         patch. Fixes gcj/340.
4432
4433 2000-10-10  Tom Tromey  <tromey@cygnus.com>
4434
4435         * lex.c (java_new_lexer): Initialize out_first and out_last
4436         fields.
4437         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
4438
4439 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4440
4441         * parse.y (pop_current_osb): New function.
4442         (array_type:): Use `dims:', changed actions
4443         accordingly. Suggested by Anthony Green.
4444         (array_creation_expression:): Used pop_current_osb.
4445         (cast_expression:): Likewise.
4446         (search_applicable_method_list): Fixed indentation.
4447
4448 2000-10-08  Anthony Green  <green@redhat.com>
4449
4450         * parse.y (array_type_literal): Remove production.
4451         (type_literals): Refer to array_type, not array_type_literal.
4452
4453 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4454
4455         Patch contributed by Corey Minyard.
4456         * decl.c (check_local_named_variable): New function.
4457         (tree check_local_unnamed_variable): Likewise.
4458         (find_local_variable): Splitted. Call check_local_{un}named_variable.
4459
4460 2000-10-07  Anthony Green  <green@redhat.com>
4461
4462         * class.c (layout_class): Handle case where superclass can't be
4463         layed out yet.
4464
4465 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4466
4467         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
4468         gperf.
4469
4470 2000-10-05  Tom Tromey  <tromey@cygnus.com>
4471
4472         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
4473         * jvgenmain.c (class_mangling_prefix): Removed.
4474         (class_mangling_suffix): New global.
4475         (main): Use it.
4476         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
4477         `$'.
4478         (print_method_info): Handle overrides for static and final
4479         methods.
4480         (process_file): Generate declaration for class object field.
4481         * class.c (cxx_keywords): New array.
4482         (utf8_cmp): New function.
4483         (cxx_keyword_p): New function.
4484         (layout_class_method): Mangle C++ keywords by appending `$'.
4485         (mangle_field): New function.
4486         (mangle_class_field): Use mangle_field.  Mangle class name as
4487         `class$'.
4488         (mangle_static_field): Use mangle_field.
4489
4490 Tue Oct  3 13:44:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4491
4492         * decl.c (find_local_variable): Removed uncessary type check and
4493         fixed range check typo. From Corey Minyard.
4494
4495 Wed Sep 13 16:06:52 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4496
4497         * decl.c (give_name_to_locals): New local `code_offset'. Call
4498         `maybe_adjust_start_pc'.
4499         * expr.c (note_instructions): New function.
4500         (expand_byte_code): Don't collect insn starts here.
4501         (peek_opcode_at_pc): New function.
4502         (maybe_adjust_start_pc): Likewise.
4503         * java-tree.h (maybe_adjust_start_pc): Declare.
4504         (note_instructions): Likewise.
4505         * jcf-parse.c (parse_class_file): Call `note_instructions'.
4506
4507 Wed Sep 13 11:50:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4508
4509         * parse.y (field_access:): Fixed indentation.
4510         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
4511
4512 2000-09-07  Tom Tromey  <tromey@cygnus.com>
4513
4514         Fix for PR gcj/307:
4515         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
4516         JPRIMITIVE_TYPE_P, for arithmetic operators.
4517         (patch_method_invocation): Indentation fix.
4518         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
4519         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
4520         (do_unary_numeric_promotion): Cleaned up code.
4521         (valid_cast_to_p): Handle boolean correctly.
4522
4523 2000-09-27  Tom Tromey  <tromey@cygnus.com>
4524
4525         * lex.c (java_read_unicode): Reset bs_count when finished with
4526         `\u' sequence.
4527
4528 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
4529
4530         Convert to GC.
4531         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
4532         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
4533         (typeck.o): Depend on ggc.h.
4534         * class.c (add_method_1): Use GC functions for allocation.
4535         (init_class_processing): Register roots.
4536         * decl.c (ggc_p): Set to 1.
4537         (pending_local_decls): Make it static.
4538         (push_jvm_slot): Use GC functions for allocation.
4539         (init_decl_processing): Register roots.
4540         (give_name_to_locals): Use GC functions for allocation.
4541         (lang_mark_tree): New function.
4542         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
4543         functions for allocation.
4544         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
4545         * lex.c (java_lex): Use build_string, rather than replicating it
4546         inline.
4547         * parse.y (goal): Add more roots.
4548         (mark_parser_ctxt): New function.
4549         * typeck.c: Include ggc.h.
4550
4551 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4552
4553         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
4554         contains something else than MODIFY_EXPR.
4555
4556 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
4557
4558         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
4559         * Makefile.in (parse.o): Depend on ggc.h.
4560         (class.o): Likewise.
4561         (constants.o): Likewise.
4562         (decl.o): Likewise.
4563         (expr.o): Likewise.
4564         (jcf-parse.o): Likewise.
4565         (jcf-write.o): Likewise.
4566         (mangle.o): Likewise.
4567         * class.c: Include ggc.h.
4568         (build_static_field_ref): Register GC roots.
4569         (layout_class): Likewise.
4570         (init_class_processing): Likewise.
4571         * constants.c: Include ggc.h.
4572         (current_constant_pool_data_ref): Remove.
4573         (tag_nodes): Move it to ...
4574         (get_tag_node): ... here.  Register GC roots.
4575         * decl.c: Include ggc.h.  Remove many global tree definitions.
4576         (throw_node): Define.
4577         (java_global_trees): Likewise.
4578         (predef_filenames): Make the size a constant.
4579         (init_decl_processing): Adjust accordingly.
4580         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
4581         * expr.c: Include ggc.h.
4582         (init_expr_processing): Register GC roots.
4583         (build_invokeinterface): Likewise.
4584         * java-tree.h: Replace extern tree declarations with macros.
4585         (java_global_trees): New variable.
4586         (java_tree_index): New enumeration.
4587         (init_jcf_parse): Declare.
4588         * jcf-parse.c: Include ggc.h.
4589         (current_class): Remove declaration.
4590         (main_class): Likewise.
4591         (all_class_list): Likewise.
4592         (predefined_filename_p): Adjust for constant size of
4593         predef_filenames.
4594         (init_jcf_parse): New function.
4595         * jcf-write.c: Include ggc.h.
4596         (generate_classfile): Register GC roots.
4597         (append_synthetic_attribute): Likewise.
4598         (append_innerclass_attribute_entry): Likewise.
4599         * lang.c: Include ggc.h.
4600         (lang_print_error): Register GC roots.
4601         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
4602         with macros.
4603         * parse.y: Include ggc.h.
4604         (wfl_operator): Remove.
4605         (goal): Register GC roots.
4606         (java_pop_parser_context): Adjust for new field names.
4607         (java_parser_context_save_global): Likewse.
4608         (java_parser_context_restore_global): Likewise.
4609         (java_parser_context_suspend): Likewise.
4610         (java_parser_context_resume): Likewise.
4611         (verify_constructor_circularity): Register GC roots.
4612         (lookup_cl): Likewise.
4613         (java_reorder_fields): Likewise.
4614         (build_current_this): Likewise.
4615         (class_in_current_package): Likewise.
4616         (argument_types_convertible): Likewise.
4617         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
4618
4619 2000-09-14  Tom Tromey  <tromey@cygnus.com>
4620
4621         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
4622
4623 2000-09-13  Tom Tromey  <tromey@cygnus.com>
4624
4625         * jcf-parse.c: Include <locale.h>.
4626         * jv-scan.c: Include <locale.h>.
4627
4628 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4629
4630         * expr.c (pop_type_0): Return `Object' if trying to merge two
4631         interface types.
4632         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
4633         interface types; `Object' is always a valid supertype.
4634
4635 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4636
4637         Fix for PR gcj/33:
4638         * jv-scan.c (help): Document --encoding.
4639         (options): Added `encoding' entry.
4640         (OPT_ENCODING): New define.
4641         (main): Handle --encoding.
4642         Include <langinfo.h> if nl_langinfo exists.
4643         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
4644         --encoding.
4645         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
4646         (parse_source_file): Correctly call java_init_lex.  Added `finput'
4647         argument.  Use nl_langinfo to determine default encoding.
4648         * java-tree.h (current_encoding): Declare.
4649         * parse.y (java_parser_context_restore_global): Don't restore
4650         `finput'.
4651         (java_parser_context_save_global): Don't set `finput' field.
4652         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
4653         if required.
4654         * lang.c (current_encoding): New global.
4655         (lang_decode_option): Recognize `-fencoding='.
4656         (finish_parse): Don't close finput.
4657         * parse.h (struct parser_ctxt): Removed `finput' and
4658         `unget_utf8_value' fields.  Added `lexer' field.
4659         (java_init_lex): Fixed declaration.
4660         * lex.c (java_new_lexer): New function.
4661         (java_destroy_lexer): Likewise.
4662         (java_read_char): Added `lex' argument.  Handle iconv case.
4663         (java_read_unicode): Added `lex' argument.  Count backslashes in
4664         lexer structure.
4665         (java_init_lex): Added `finput' and `encoding' arguments.  Set
4666         `lexer' field in ctxp.
4667         (BAD_UTF8_VALUE): Removed.
4668         (java_lex): Handle seeing UEOF in the middle of a string literal.
4669         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
4670         (java_lexer): New structure.
4671         (UNGETC): Removed.
4672         (GETC): Removed.
4673         (DEFAULT_ENCODING): New define.
4674         (java_destroy_lexer): Declare.
4675
4676 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4677
4678         Fix for PR gcj/343:
4679         * lex.c (java_init_lex): Initialize java_io_serializable.
4680         * parse.y (java_io_serializable): New global.
4681         (valid_ref_assignconv_cast_p): An array can be cast to
4682         serializable.
4683
4684 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
4685
4686         * decl.c, expr.c: Include defaults.h if not already included.
4687         Don't define the *_TYPE_SIZE macros.
4688
4689 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
4690
4691         * typeck.c (build_java_array_type): Correct first parameter
4692         in ADJUST_FIELD_ALIGN invocation.
4693
4694 2000-09-06  Tom Tromey  <tromey@cygnus.com>
4695
4696         * lang-specs.h: Also recognize `-femit-class-files'.
4697
4698 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4699
4700         * verify.c (merge_types): Load the types to merge if necessary.
4701
4702 2000-09-02  Anthony Green  <green@redhat.com>
4703
4704         * jcf-io.c: Include zlib.h.
4705         (open_in_zip): Read compressed class file archives.
4706         * zipfile.h (ZipDirectory): Add uncompressed_size and
4707         compression_method fields.
4708         * zextract.c (read_zip_archive): Collect file compression info.
4709
4710 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
4711
4712         * parse.y (do_resolve_class): Also explore superclasses of
4713         intermediate enclosing contexts when searching for inner classes.
4714
4715 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4716
4717         * parse.y (variable_declarator_id:): Better error message.
4718         (expression_statement:): Use YYNOT_TWICE.
4719         (cast_expression:): Likewise.
4720         (assignment:): Likewise.
4721
4722 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4723
4724         * parse.y (do_merge_string_cste): New locals. Create new
4725         STRING_CSTs each time, use memcpy. Fixes gcj/311.
4726
4727 2000-08-07  Hans Boehm  <boehm@acm.org>
4728
4729         * boehm.c (mark_reference_fields): Set marking bits for all words in
4730         a multiple-word record.
4731         (get_boehm_type_descriptor): Use the procedure marking descriptor for
4732         java.lang.Class.
4733
4734 2000-08-31  Mike Stump  <mrs@wrs.com>
4735
4736         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
4737         jcf-dump$(exeext)): Make parallel safe.
4738
4739 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4740
4741         * jcf-parse.c (set_source_filename): Constify a char *.
4742         * jcf-write.c (append_innerclasses_attribute,
4743         make_class_file_name): Constify a char *.  Don't recycle a
4744         variable for an unrelated purpose.
4745         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
4746         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
4747
4748 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4749
4750         * expr.c (can_widen_reference_to): Fixed indentation.
4751         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
4752         * parse.y: `finit$' replaces `$finit$' in comments.
4753         (try_builtin_assignconv): Fixed leading comment.
4754
4755 2000-08-25  Greg McGary  <greg@mcgary.org>
4756
4757         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
4758
4759 2000-08-24  Greg McGary  <greg@mcgary.org>
4760
4761         * lang.c (lang_decode_option): Use ARRAY_SIZE.
4762         * parse.y (BINOP_LOOKUP): Likewise.
4763
4764 2000-08-22  Andrew Haley  <aph@cygnus.com>
4765
4766         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
4767         sign extending. Fixes gcj/321.
4768         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
4769         combining to make a jlong. Fixes gcj/321.
4770
4771 2000-08-21  Nix  <nix@esperi.demon.co.uk>
4772
4773         * lang-specs.h: Do not process -o or run the assembler if
4774         -fsyntax-only.
4775
4776 2000-08-16  Andrew Haley  <aph@cygnus.com>
4777
4778         * typeck.c (build_java_array_type): Rewrite code to do array
4779         alignment.  Take into account back-end macros when aligning array
4780         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
4781         user to set alignment. Fixes gcj/252 and 160.
4782
4783 2000-08-09  Tom Tromey  <tromey@cygnus.com>
4784
4785         * parse.y (check_abstract_method_definitions): Now return `int'.
4786         Check implemented interfaces.  Fixes PR gcj/305.
4787
4788         * parse.y (patch_switch_statement): Disallow `long' in switch
4789         expressions.  Fixes PR gcj/310.
4790
4791 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4792
4793         * decl.c (finit_leg_identifier_node): New global.
4794         (init_decl_processing): Use `finit$' to initialize
4795         finit_identifier_node. Use `$finit$' to initialize
4796         finit_leg_identifier_node.
4797         * expr.c (expand_java_field_op): Use ID_FINIT_P.
4798         * java-tree.h (finit_identifier_node): Changed attached comment.
4799         (finit_leg_identifier_node): New declaration.
4800         (ID_FINIT_P): Take finit_identifier_node and
4801         finit_leg_identifier_node into account. This is a backward
4802         compatibility hack.
4803
4804 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4805
4806         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
4807         Jan 6 2000 patch.
4808         (generate_bytecode_insns): Check `nargs' before emitting it.
4809         * verify.c (merge_type_state): Fixed typo.
4810         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
4811         generate_bytecode_{conditional,insns}.
4812
4813 Sun Aug 13 09:41:49 2000  Anthony Green  <green@redhat.com>
4814
4815         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
4816         for -pg builds).
4817
4818 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4819
4820         * class.c (maybe_layout_super_class): Fixed indentation.
4821         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
4822         (java_check_methods): New function declaration.
4823         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
4824         instead of `str_ptr'.
4825         * jcf-write.c (generate_bytecode_insns): Emit number the of args
4826         of a `invokeinterface' at the right time.
4827         * parse.h (WFL_STRIP_BRACKET): New macro.
4828         (SET_TYPE_FOR_RESOLUTION): Use it.
4829         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
4830         (check_class_interface_creation): Don't check for cross package
4831         innerclass name clashes.
4832         (method_header): Behave properly if MDECL is `error_mark_node'.
4833         (method_declarator): Return `error_mark_node' if bogus current
4834         class.
4835         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
4836         (resolve_and_layout): New local `decl_type', set and used. Call
4837         java_check_methods.
4838         (java_check_methods): New method.
4839         (java_layout_classes): Use it.
4840         (resolve_qualified_expression_name): No EH check necessary in
4841         access$<n>.
4842         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
4843         `case' statement.
4844         (patch_assignment): Set DECL_INITIAL on integral final local.
4845
4846 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4847
4848         * java-tree.h (flag_extraneous_semicolon): New extern.
4849         * lang-options.h: (-Wextraneous-semicolon): New option.
4850         * lang.c (flag_redundant): Fixed typo in leading comment.
4851         (flag_extraneous_semicolon): New global.
4852         (lang_decode_option): Set `flag_extraneous_semicolon' when
4853         -Wall. Decode `-Wextraneous-semicolon'.
4854         * parse.y (type_declaration:): Removed `SC_TK' hack, added
4855         `empty_statement' rule.
4856         (class_body_declaration): Likewise.
4857         (method_body:): Accept `;' as a method body.
4858         (static_initializer:): Removed `SC_TK' hack.
4859         (constructor_block_end:): Likewise.
4860         (empty_statement:): Report deprecated empty declaration. Fixes
4861         gcj/295
4862
4863 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4864
4865         * parse.y (build_dot_class_method_invocation): Changed parameter
4866         name to `type'. Build signature from `type' and convert it to a
4867         STRING_CST if it's an array.
4868         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
4869         to use `ref_type' directly.
4870
4871 Sun Aug  6 00:47:24 2000  Ovidiu Predescu  <ovidiu@cup.hp.com>
4872
4873         * lang-options.h: Added a comma after the last element to avoid
4874         syntax errors when other languages define additional options.
4875
4876 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
4877
4878         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
4879         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
4880         (jc1): Link with $(BACKEND).
4881         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
4882
4883 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
4884
4885         * jvspec.c: Adjust type of second argument to
4886         lang_specific_driver, and update code as necessary.
4887
4888         * class.c (build_dtable_decl): Initialize dummy.
4889
4890 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4891
4892         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
4893         method bodies not to rule out discarding `<clinit>'; don't use
4894         <clinit> to initialize static fields with constant initializers.
4895
4896 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4897
4898         * gjavah.c (print_method_info): Added `synth' parameter. Skip
4899         synthetic methods.
4900         (method_synthetic): New global.
4901         (HANDLE_METHOD): Recognize synthetic method and tell
4902         `print_method_info' about it.
4903         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
4904         processing a synthetic method.
4905         * jcf-reader.c (skip_attribute): New function.
4906         ( skip_attribute): Likewise.
4907
4908 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4909
4910         * parse.y (build_outer_field_access): Fixed comments.
4911         (fix_constructors): Emit the initialization of this$<n> before
4912         calling $finit$.
4913         (resolve_qualified_expression_name): Build an access to `decl' if
4914         necessary.
4915
4916 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4917
4918         * parse-scan.y (curent_class): Non longer const.
4919         (inner_qualifier, inner_qualifier_length): Deleted.
4920         (current_class_length): New global.
4921         (bracket_count): Fixed typo in leading comment.
4922         (anonymous_count): New global.
4923         (class_instance_creation_expression:): Handle anonymous classes.
4924         (anonymous_class_creation:): New rule.
4925         (push_class_context): Rewritten.
4926         (pop_class_context): Likewise.
4927         (INNER_QUALIFIER): Macro deleted.
4928         (report_class_declaration): call `push_class_context' when
4929         entering the function. `fprintf' format modified not to use
4930         INNER_QUALIFIER.
4931         (report_class_declaration): Assign `package_name' and
4932         `current_class' to NULL separately.
4933
4934 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4935
4936         * expr.c (build_invokeinterface): Call layout_class_methods on
4937         target interface.
4938
4939 2000-07-27  Tom Tromey  <tromey@cygnus.com>
4940             Anthony Green  <green@cygnus.com>
4941             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4942
4943         * class.c (make_class_data): Create vtable for abstract classes.
4944         (get_dispatch_table): Changed to cope with abstract classes.
4945
4946 2000-07-27  Tom Tromey  <tromey@cygnus.com>
4947
4948         * parse.y (patch_method_invocation): Don't reverse the argument
4949         list when dealing with anonymous class constructors. Fixed typo in
4950         comment.
4951
4952 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4953
4954         * parse.y (build_alias_initializer_parameter_list): Reverse
4955         crafted list when building aliases for anonymous class
4956         constructors.
4957
4958 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4959
4960         * parse.y (jdep_resolve_class): Don't bother checking potential
4961         innerclass access if `decl' is NULL.
4962         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
4963         WFL.
4964
4965 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4966
4967         * parse.c: Remove (again.)
4968
4969 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4970
4971         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
4972         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
4973         outside the `if' statement, alias to innerclass removed, `decl'
4974         used to mark the class complete.
4975
4976 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4977
4978         * parse.y (simple_name:): Fixed typo in error message.
4979
4980 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4981
4982         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
4983         or its first operand can be error marks.
4984
4985 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4986
4987         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
4988         * parse.y (method_header): Likewise.
4989
4990 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4991
4992         * parse.y (process_imports): Consider that one might be trying to
4993         import an innerclass. Fixes gcj/254
4994
4995 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4996
4997         * parse.y (find_as_inner_class): Handle the case where the
4998         enclosing context of an innerclass has been loaded as bytecode.
4999
5000 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5001
5002         * parse.y (simple_name:): Reject `$' in type names.
5003         (resolve_type_during_patch): Use `type' as a second
5004         argument to resolve_no_layout. Fixes gcj/257.
5005
5006 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
5007
5008         * parse.y (find_most_specific_methods_list): Select the only
5009         non-abstract method even if max has been set.
5010         Fixes gcj/285, gcj/298.
5011
5012 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
5013
5014         * lang-specs.h: Added %(jc1) to java compiler options.
5015
5016 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
5017
5018         * .cvsignore: New file.
5019
5020 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5021
5022         * parse.y (not_accessible_p): Access granted to innerclasses
5023         (indirectly) extending the reference type. Fixes gcj/249.
5024
5025 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5026
5027         * parse.y (patch_method_invocation): Fixed comment.
5028         (maybe_use_access_method): Build this$<n>s to the context of the
5029         target method, or a type that extends it. Fixes gcj/242.
5030
5031 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
5032
5033         * parse.c: Remove.
5034
5035 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5036
5037         * parse.y (fold_constant_for_init): Avoid bullish conversion.
5038
5039 2000-07-13  Tom Tromey  <tromey@cygnus.com>
5040
5041         * lang-specs.h: Added %{I*}.
5042
5043 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
5044
5045         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
5046
5047 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
5048
5049         * parse-scan.c: Remove.
5050
5051 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5052
5053         * class.c (set_super_info): Handled protected inner classes.
5054         (common_enclosing_context_p): Bail early if arguments aren't both
5055         inner classes.
5056         (get_access_flags_from_decl): Handle private and protected inner
5057         classes.
5058         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
5059         (CLASS_PROTECTED): Likewise.
5060         (struct lang_type): New bitfield `poic'.
5061         * parse.y (jdep_resolve_class): Call check_inner_class_access on
5062         inner classes only.
5063         (check_inner_class_access): Renamed arguments, added
5064         comments. Handles protected inner classes (fixes gcj/225)
5065         (not_accessible_p): Fixed comments. Avoid handling inner classes.
5066
5067 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5068
5069         * parse.y (resolve_qualified_expression_name): Verify qualified
5070         access to `this'. Fixes gcj/239.
5071
5072 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5073
5074         * jcf-write.c (generate_classfile): Don't install ConstantValue
5075         for null pointers.
5076
5077 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5078
5079         * parse.y (resolve_qualified_expression_name): Handle inner class
5080         access. Fixes gcj/256.
5081
5082 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5083
5084         * jcf-write.c (generate_classfile): Properly install the
5085         ConstantValue attribute and the initial value constant pool index
5086         on string constants.
5087         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
5088         class files.
5089
5090 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5091
5092         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
5093         construct.
5094         * parse.y (find_as_inner_class): Fixed typo.
5095         (do_resolve_class): Explore enclosing contexts when searching for
5096         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
5097         (check_inner_class_access): Check `decl' which can be null in case
5098         of previous errors.
5099
5100 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5101
5102         * java-tree.h (java_debug_context): Declared `extern'.
5103         (safe_layout_class): Likewise.
5104         * parse.y (resolve_field_access): Field must be `static' in order
5105         to be replaced by its initial value. Added comments.
5106         (find_applicable_accessible_methods_list): Fixed typo.
5107         (find_most_specific_methods_list): Methods found in innerclasses
5108         take over methods founds in the enclosing contexts.
5109         (java_complete_tree): Loosen restrictions on the type of DECLs
5110         that can be replaced by their initialization values.
5111         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
5112
5113 2000-07-05  Tom Tromey  <tromey@cygnus.com>
5114
5115         * Make-lang.in (PARSE_DIR): New macro.
5116         (PARSE_RELDIR): Likewise.
5117         (PARSE_C): Likewise.
5118         (PARSE_SCAN_C): Likewise.
5119         ($(PARSE_C)): New target.
5120         ($(PARSE_SCAN_C)): Likewise.
5121         (SET_BISON): New macro.
5122         (BISONFLAGS): Likewise.
5123         (JAVABISONFLAGS): Likewise.
5124
5125 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
5126
5127         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
5128         argument on the first pass for CNI as well as JNI.
5129         (print_method_info): Set up method name on the first pass only.
5130
5131 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5132
5133         * parse.y (parser_qualified_classname): Removed parameter
5134         `is_static'.
5135         (create_interface): Removed first passed parameter to
5136         parser_qualified_classname.
5137         (create_class): Likewise. Don't install alias on static
5138         innerclasses. Fixes gcj/275.
5139
5140 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5141
5142         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
5143         debugable statement with empty_stmt_node. Fixes gcj/272
5144
5145 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5146
5147         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
5148         gcj/271.
5149
5150 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5151
5152         * jcf-write.c (push_long_const): Appropriately cast short negative
5153         constant to jword.
5154
5155 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5156
5157         * parse.y (verify_constructor_super): Use loop variable
5158         `m_arg_type' initialized with `mdecl_arg_type'.
5159
5160 2000-06-29  Tom Tromey  <tromey@cygnus.com>
5161
5162         * parse.y (resolve_field_access): Handle case where `type_found'
5163         is NULL.
5164
5165 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5166
5167         * expr.c (lookup_field): The same field can be found through two
5168         different interface. Don't declare it ambiguous in that case.
5169
5170 2000-06-27  Tom Tromey  <tromey@cygnus.com>
5171
5172         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
5173         follows \r, then unget it at a lower level.
5174
5175 2000-06-26  Tom Tromey  <tromey@cygnus.com>
5176
5177         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
5178         java_complete_tree.
5179
5180 2000-06-25  Tom Tromey  <tromey@cygnus.com>
5181
5182         * parse.y (for_statement): Wrap expression in a WFL if it is a
5183         constant.  For PR gcj/268.
5184
5185 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5186
5187         * parse.y (do_resolve_class): Minor optimiztion in the package
5188         list search. Removed unnecessary test and return statement.
5189         (valid_ref_assignconv_cast_p): Order of arguments to
5190         enclosing_context_p fixed.
5191
5192 2000-06-24  Tom Tromey  <tromey@cygnus.com>
5193
5194         * expr.c (lookup_field): Print error and return error_mark_node if
5195         field reference is ambiguous.
5196
5197         * parse.y (check_abstract_method_definitions): Also check if
5198         `other_method' is abstract.
5199
5200 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5201
5202         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
5203         classes.
5204         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
5205         (struct lang_type): New field `pic'.
5206         (CLASS_PRIVATE): New macro.
5207         * parse.y (check_inner_class_access): New function.
5208         (jdep_resolve_class): Call it.
5209
5210 2000-06-23  Tom Tromey  <tromey@cygnus.com>
5211
5212         * parse.y (patch_incomplete_class_ref): Initialize the returned
5213         class.  For PR gcj/260.
5214
5215 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5216
5217         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
5218
5219 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5220
5221         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5222         Java specific checks.
5223         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
5224         screened by DECL_P.
5225         * java-tree.def (CASE_EXPR): Marked 'e'.
5226         (DEFAULT_EXPR): Likewise.
5227         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
5228         screened by DECL_P.
5229         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5230         Java specific checks.
5231         (generate_bytecode_insns): Test try_block for BLOCK before using
5232         BLOCK_EXPR_BODY.
5233         * parse.y (build_wfl_wrap): Added `location' argument. Set
5234         EXPR_WFL_LINECOL accordingly.
5235         (dim_expr:): Wrap constants with WFLs.
5236         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
5237         (resolve_package): Check for `stmt' not being a BLOCK before
5238         building a debuggable statement with it.
5239         (make_qualified_primary): Added extra parameter to build_wfl_wrap
5240         invocation.
5241         (resolve_field_access): Make sure `decl' is a DECL before treating
5242         it as such.
5243         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
5244         IDENTIFIER_NODE before treating it as such.
5245         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
5246         treating it as such.
5247         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
5248         to be applied only on non array types.
5249
5250 2000-06-16  Per Bothner  <per@bothner.com>
5251
5252         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
5253         define in terms of DECL_RESULT, as that fails when --enable-checking.
5254
5255 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5256
5257         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
5258         types the same in comparison.
5259         (CHECK_OP): Add static prototype.
5260
5261 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
5262
5263         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
5264         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
5265         * parse.c: Rebuilt.
5266
5267 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5268
5269         * decl.c (create_primitive_vtable): Prototype.
5270
5271         * jcf-write.c (generate_bytecode_insns): Initialize variable
5272         `saved_context'.
5273
5274         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
5275
5276 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5277
5278         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
5279         to track searched classes, and do not search the same class more than
5280         once. Call find_applicable_accessible_methods_list on immediate
5281         superclass, instead of search_applicable_method_list on all ancestors.
5282         Fix for PR gcj/238.
5283
5284 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5285
5286         * parse.y (register_fields): Permit static fields in inner classes
5287         if they are final. Fix for PR gcj/255.
5288
5289 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5290
5291         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
5292         * parse.y (find_in_imports): Returned type changed to void,
5293         leading comment fixed.
5294         (register_package): New function.
5295         (qualify_and_find): Likewise.
5296         (package_declaration:): Use `register_package'.
5297         (single_type_import_declaration:): Removed local variable
5298         `node'. Added missing `;' for consistency.
5299         (type_import_on_demand_declaration:): Use `chainon' to link new
5300         entries.
5301         (lookup_field_wrapper): Lookup local variables defined in outer
5302         contexts first.
5303         (java_complete_class): Don't reverse the list of imported on demand.
5304         (do_resolve_class): Reorganized. Removed local variable
5305         `original_name'. Call `qualify_and_find' with the current package
5306         name, invoke `find_in_imports_on_demand' right after. Call
5307         `qualify_and_find' with the packages we've seen so far. Fixed
5308         operations numbering in comments.
5309         (java_expand_class): Don't reverse `package_list'.
5310         (find_most_specific_methods_list): New local variables `abstract'
5311         and `candidates'. Use them to pick the right method.
5312
5313 Tue Jun  6 11:39:05 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
5314
5315         * parse.y (check_modifiers_consistency): Don't subtract out
5316         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
5317
5318 2000-06-04  Philipp Thomas  <pthomas@suse.de>
5319
5320         * Makefile.in (INTLLIBS): New.
5321         (LIBS): Add above.
5322         (DEPLIBS): Ditto.
5323
5324 Fri Jun  2 16:48:55 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5325
5326         * class.c (get_dispatch_table): Build the vtable dummy entry list
5327         element with a null purpose. Fixed leading comment.
5328         (build_dtable_decl): Build an accurate dtable type when appropriate
5329         and use it.
5330
5331 2000-06-02  Richard Henderson  <rth@cygnus.com>
5332
5333         * lang.c (lang_get_alias_set): New.
5334
5335 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5336
5337         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
5338         before using it as the accessed field.
5339
5340 2000-05-31  Tom Tromey  <tromey@cygnus.com>
5341
5342         * java-tree.h (boolean_array_vtable, byte_array_vtable,
5343         char_array_vtable, short_array_vtable, int_array_vtable,
5344         long_array_vtable, float_array_vtable, double_array_vtable):
5345         Declare.
5346         * expr.c (get_primitive_array_vtable): New function.
5347         (create_primitive_vtable): New function.
5348         (java_lang_expand_expr): Enable code to statically generate
5349         arrays.
5350         * decl.c (init_decl_processing): Create primitive vtables.
5351         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
5352         short_array_vtable, int_array_vtable, long_array_vtable,
5353         float_array_vtable, double_array_vtable): Define.
5354
5355 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
5356
5357         * java/parse.y (find_applicable_accessible_methods_list):
5358         Don't add an uninitialized value to the list.
5359
5360 2000-05-25  Tom Tromey  <tromey@cygnus.com>
5361
5362         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
5363         when trying to see if field's class should be initialized.  Always
5364         initialize field's declaring class, not qualified class.
5365         For PR gcj/162.
5366
5367         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
5368         `wfl_operator', to maybe_build_primttype_type_ref.
5369         Fixes PR gcj/235.
5370
5371 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
5372
5373        * parse.y (patch_method_invocation): Don't try to lookup methods
5374        in primitive types.
5375
5376 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5377
5378         * parse.y (resolve_field_access): Call the appropriate <clinit>
5379         before accessing the length of a static array. Craft a decl for
5380         the field while its time. Fixes PR gcj/129.
5381
5382 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5383
5384         * parse.y (resolve_package): Correctly set `*next' (was off by
5385         one.)
5386         (resolve_qualified_expression_name): Fixed comment.
5387
5388 Thu Apr 27 17:47:34 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5389
5390         * jcf-parse.c (jcf_parse_source): Reset current_class and
5391         current_function_decl to NULL before parsing a new file.
5392
5393 Thu Apr 27 17:25:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5394
5395         * parse.y (block_end:): If the collected block doesn't feature a
5396         statement, insert an empty statement.
5397
5398 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5399
5400         * parse.y (maybe_yank_clinit): New function.
5401         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
5402         end of the list of methods belonging to a class.
5403         (java_complete_expand_method): Check whether <clinit> is really
5404         necessary and expand it accordingly.
5405
5406 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5407
5408         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
5409         processed by the method's switch statement.
5410
5411 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5412
5413         * java-tree.h: Added init state enum.
5414         * decl.c (emit_init_test_initialization): Initialize class
5415         initialization check variable by looking at class' state.
5416
5417 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5418
5419         * java-tree.h (build_instanceof): Declare.
5420         (build_get_class): Declare.
5421         * parse.y (patch_binop): Use build_instanceof.
5422         * expr.c (build_instanceof): New function.  If class is final,
5423         don't make a function call.
5424         (expand_java_INSTANCEOF): Use it.
5425         (build_get_class): New function.
5426
5427 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5428
5429         * jcf-write.c (generate_classfile): Scan the source_file for
5430         slashes with the right pointer variable.
5431
5432 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5433
5434         * lang.c (lang_decode_option): Update -Wunused flags by calling
5435         set_Wunused.
5436         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
5437
5438 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
5439
5440         * check_init.c (check_init): Constify local char *.
5441         * class.c (push_class): Constify local char *.
5442         * java_tree.h: Update prototypes.
5443         * jcf-io.c (open_class): Constify filename parameter and
5444         return value.
5445         (find_class): Remove redundant string copy.  Cast return from
5446         open_class.
5447         * jcf-parse.c (read_class, parse_class_file, yyparse):
5448         Constify local char *.
5449         * jcf-write.c (generate_bytecode_insns, generate_classfile):
5450         Constify local char *.
5451         * jcf.h (JCF): Constify filename and classname.
5452         (JCF_FINISH): Cast args to FREE to char * when appropriate.
5453         * lang.c (init_parse): Constify parameter and return value.
5454         * lex.c (java_get_line_col): Constify filename parameter.
5455         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
5456         * parse.y (java_parser_context_suspend,
5457         issue_warning_error_from_context, safe_layout_class): Constify
5458         local char *.
5459         * parse.c: Regenerate.
5460
5461 2000-05-08  Tom Tromey  <tromey@cygnus.com>
5462
5463         * expr.c (build_jni_stub): Cache the result of
5464         _Jv_LookupJNIMethod.
5465
5466 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5467
5468         * decl.c (predef_filenames_size): Now 7.
5469         (predef_filenames): New seventh entry.
5470
5471 2000-05-04  Tom Tromey  <tromey@cygnus.com>
5472
5473         * boehm.c (mark_reference_fields): Don't mark RawData fields.
5474         Keep track of when we've seen a reference field after a
5475         non-reference field.
5476         (get_boehm_type_descriptor): Handle case where we see
5477         non-reference fields but no trailing reference field.
5478         * decl.c (rawdata_ptr_type_node): Define.
5479         (init_decl_processing): Initialize rawdata_ptr_type_node.
5480         * java-tree.h (rawdata_ptr_type_node): Declare.
5481
5482 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5483
5484         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
5485         specifiers in calls to fprintf.
5486
5487 2000-05-03  Andrew Haley  <aph@cygnus.com>
5488
5489         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
5490
5491         * javaop.h (WORD_TO_INT): New function.
5492         (IMMEDIATE_s4): Use WORD_TO_INT.
5493         * jcf.h (JPOOL_INT): Ditto.
5494
5495         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
5496         separator.
5497
5498 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5499
5500         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
5501         on native function.
5502         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
5503         JNI methods.
5504         * expr.c (build_jni_stub): New function.
5505         * lang-specs.h: -fjni and -femit-class-file are incompatible.
5506         * parse.c: Rebuilt.
5507         * parse.y (java_complete_expand_methods): Expand a native method
5508         and call build_jni_stub if -fjni given.
5509         * lang-options.h: Document -fjni.
5510         * lang.c (flag_jni): New global.
5511         (lang_f_options): Added `jni' entry.
5512         * java-tree.h (soft_lookupjnimethod_node,
5513         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
5514         Declare.
5515         (flag_jni): Declare.
5516         (build_jni_stub): Declare.
5517         (struct lang_decl): Added `native' flag.
5518         (METHOD_NATIVE): Redefined to use `native' field of lang specific
5519         structure.
5520         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
5521         soft_jnipopsystemframe_node): New globals.
5522         (init_decl_processing): Set them.  _Jv_InitClass only takes one
5523         argument.
5524
5525         * java-tree.def: Put into `C' mode.
5526
5527 2000-04-27  Tom Tromey  <tromey@cygnus.com>
5528
5529         Fix for PR gcj/2:
5530         * expr.c (expand_invoke): Generate check to see if object pointer
5531         is null in nonvirtual invocation case.
5532         * java-tree.h (soft_nullpointer_node): Declare.
5533         * decl.c (soft_nullpointer_node): New global.
5534         (init_decl_processing): Initialize soft_nullpointer_node.
5535         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5536         or `private' methods.
5537         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5538
5539 Wed Apr 26 14:29:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5540
5541         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
5542         from <clinit>
5543
5544 2000-04-26  Tom Tromey  <tromey@cygnus.com>
5545
5546         * zextract.c (find_zip_file_start): New function.
5547         (read_zip_archive): Use it.
5548
5549 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5550
5551         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
5552
5553 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5554
5555         * class.c (common_enclosing_context_p): New function.
5556         * java-tree.h (common_enclosing_context_p): Added prototype.
5557         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
5558         classes sharing an outer context with the current instance.
5559         * parse.y (build_access_to_thisn): Fixed leading comment.
5560         (verify_constructor_super): New local `supper_inner'. Skip
5561         enclosing context argument in the case of inner class constructors.
5562         (patch_method_invocation): Insert proper context as second
5563         parameter to pure inner class constructor super invocations.
5564
5565 Mon Apr 24 14:59:36 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5566
5567         * parse.y (end_class_declaration): Reset the interface number
5568         counter.
5569
5570 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5571
5572         * parse.y (source_start_java_method): Deleted unnecessary code.
5573         (patch_method_invocation): Fixed comment.
5574
5575 2000-04-24  Robert Lipe <robertlipe@usa.net>
5576
5577         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
5578
5579 2000-04-23  Tom Tromey  <tromey@cygnus.com>
5580
5581         * boehm.c (mark_reference_fields): Use int_byte_position.
5582
5583 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5584
5585         * boehm.c (mark_reference_fields): Only call byte_position on
5586         non-static fields.
5587
5588 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5589
5590         * boehm.c (mark_reference_fields): Added `last_view_index'
5591         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
5592
5593 Thu Apr 20 17:41:28 2000  Mo DeJong  <mdejong@cygnus.com>
5594
5595         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
5596         * parse.y (check_class_interface_creation): Fixed comments. Select
5597         permitted modifiers for (inner) interfaces. Changed error message
5598         to report rejected modifiers used with local classes.
5599
5600 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5601
5602         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
5603         of directly inherited type considered in scope.
5604         * parse.y (do_resolve_class): Search inherited classes for inner
5605         classes.
5606
5607 2000-04-20  Tom Tromey  <tromey@cygnus.com>
5608
5609         * parse.y (not_accessible_p): Use member's class, not current
5610         class, when doing inheritance check for protected reference.
5611         Fixes PR gcj/124.
5612
5613 Thu Apr 20 18:20:58 2000  Jason Schroeder  <shrode@subnature.com>
5614
5615         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
5616
5617 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5618
5619         * parse.y (lookup_field_wrapper): Search for final local aliases.
5620         (resolve_expression_name): Let lookup_field_wrapper search for
5621         final local aliases. Force the value of `name' if one is found.
5622         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
5623         an expression name. Fixed comments.
5624
5625 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5626
5627         * parse.y (yyerror): `msg' can be null, don't use it in that case.
5628
5629 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5630
5631         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
5632
5633 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5634
5635         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
5636
5637 2000-04-18  Tom Tromey  <tromey@cygnus.com>
5638
5639         PR gcj/211:
5640         * gjavah.c (utf8_cmp): Changed return value.
5641         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
5642         result.
5643         (cxx_keywords): New global.
5644         (get_field_name): Handle new result of cxx_keyword_subst.
5645         (print_method_info): Likewise.
5646
5647 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
5648
5649         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
5650         with a newline, for CNI.
5651         (print_stub_or_jni): Print a space or newline before method name for
5652         CNI as well as JNI.
5653         (print_cxx_classname): Don't write leading "::" in CNI stub method.
5654         (process_file): Include gcj/cni.h if generating CNI stubs.
5655
5656 2000-04-16  Tom Tromey  <tromey@cygnus.com>
5657
5658         * gjavah.c (decompile_method): Use print_field_name.
5659         Fixes PR gcj/205.
5660
5661 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5662
5663         * parse.y (java_expand_classes): Reverse the package list once.
5664         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
5665         reduction.
5666         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
5667         the `==' and `!=' operators.
5668
5669 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5670
5671         * jcf-write.c (generate_bytecode_insns): At invokation time,
5672         always relate an interface method to the type of its selector.
5673
5674 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5675
5676         Fix for PR gcj/2:
5677         * expr.c (expand_invoke): Generate check to see if object pointer
5678         is null in nonvirtual invocation case.
5679         * java-tree.h (soft_nullpointer_node): Declare.
5680         * decl.c (soft_nullpointer_node): New global.
5681         (init_decl_processing): Initialize soft_nullpointer_node.
5682         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5683         or `private' methods.
5684         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5685
5686 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5687
5688         Fix for PR gcj/140:
5689         * parse.y (check_final_assignment): Recognize assignments to the
5690         `length' field of an array when generating class files.
5691
5692 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5693
5694         * class.c (decl_hash): Prototype removed.
5695         (decl_compare): Likewise.
5696
5697 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5698
5699         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
5700         * parse.y (check_modifiers_consistency): Check for final/volatile
5701         clash.  Fixes PR gcj/164.
5702
5703 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5704
5705         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
5706         made global.
5707         (java_hash_compare_tree_node): Renamed from `decl_compare, made
5708         global.
5709         (add_method_1): Use `java_hash_hash_tree_node' and
5710         `java_hash_compare_tree_node'.
5711         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
5712         (java_hash_compare_tree_node): Likewise.
5713         * parse.y (find_applicable_accessible_methods_list): Create,
5714         delete and use a hash table to remember already searched interfaces.
5715
5716 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
5717
5718         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
5719         with latest entry.
5720
5721 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5722
5723         * boehm.c (mark_reference_fields, set_bit): Prototype.
5724         (set_bit): Un-ANSI-fy definition.
5725
5726         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
5727         Prototype.
5728
5729         * decl.c (emit_init_test_initialization): Likewise.
5730
5731         * gjavah.c (jni_print_char): Likewise.
5732
5733         * parse.y (create_new_parser_context): Likewise.
5734
5735 Thu Mar 30 15:26:56 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5736
5737         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
5738         patch missing hunk. Fixed indentation.
5739
5740 2000-03-30  Tom Tromey  <tromey@cygnus.com>
5741
5742         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
5743         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
5744
5745 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5746
5747         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5748         when negative *before* using it as an array index.
5749         * ChangeLog: Fixed typo.
5750
5751 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5752
5753         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5754         to 0 when it reaches -1.
5755
5756 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5757
5758         * jcf-parse.c (get_constant): Properly cast `num' during the
5759         invocation of `add_double'.
5760         * jcf-write.c (push_long_const): Properly cast `lo' before
5761         comparing it to short bounds.
5762         * parse-scan.y (interface_declaration:): Rule re-arrange so that
5763         `interface_body:' is reduced after the current interface is
5764         pushed.
5765
5766 2000-03-26  Tom Tromey  <tromey@cygnus.com>
5767
5768         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
5769         Java-specific `-f' option.
5770
5771 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5772
5773         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
5774         Adjust order of making types.
5775         Make bitsize_*_node values.
5776
5777 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5778
5779         * class.c (make_field_value): Use byte_position.
5780         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
5781         (java_array_data_offset): Likewise.
5782         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
5783         bzero call.
5784
5785 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5786
5787         * parse.y (check_abstract_method_definitions): New local
5788         `end_type_reached'. Make sure we also consider `end_type'.
5789         (java_check_abstract_method_definitions): Make sure we eventually
5790         consider `java.lang.Object'.
5791         (maybe_use_access_method): Don't use access method if not in the
5792         context of a pure inner class or if the method's context is right.
5793         (find_applicable_accessible_methods_list): New static flag
5794         `object_done'. Don't search abstract classes as interfaces. Fixed
5795         indentation. Fixed the `java.lang.Object' only search. Search
5796         class interface(s) first, then fully search enclosing contexts.
5797         (find_most_specific_methods_list): Pick the closest candidate when
5798         they're all abstract.
5799
5800 Mon Mar 20 08:58:51 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5801
5802         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
5803         properly initialize `finished_label'. Don't emit gotos for empty
5804         try statements.
5805
5806 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5807
5808         * except.c (emit_handlers): Clear catch_clauses_last.
5809
5810 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5811
5812         * parse.y (check_method_types_complete): New function.
5813         (create_class): Reset anonymous class counter only when seeing an
5814         non inner classe.
5815         (java_complete_class): JDEP_METHOD: Don't recompute signature
5816         if incomplete.
5817
5818 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5819
5820         * class.c (build_static_ref): Fixed indentation in comment.
5821         * java-tree.def (TRY_EXPR): Fixed typo in name.
5822         (CLASS_LITERAL): Likewise.
5823         * java-tree.h: (TYPE_DOT_CLASS): New macro.
5824         (struct lang_type): New field `dot_class'.
5825         * jcf-write.c (generate_bytecode_insns): Fixed error message.
5826         (generate_classfile): Method `class$' is synthetic.
5827         * parse.y (build_do_class_method): New function.
5828         (build_dot_class_method_invocation): Likewise.
5829         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
5830         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
5831         (qualify_ambiguous_name): Likewise.
5832         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
5833         (build_try_statement): Fixed leading comment.
5834
5835 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5836
5837         * class.c (make_field_value): Properly handle sizes.
5838         (get_dispatch_vector): Use tree_low_cst and host_integerp.
5839         (layout_class_method): Count using trees.
5840         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
5841         * expr.c (java_array_data_offset): Use int_bit_position.
5842         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
5843         (build_invokevirtual): Use tree_low_cst and do computations with trees.
5844
5845 2000-03-16  Tom Tromey  <tromey@cygnus.com>
5846
5847         * lang.c (flag_hash_synchronization): New global.
5848         (lang_f_options): Added `hash-synchronization'.
5849         * lang-options.h: Mention -fhash-synchronization.
5850         * java-tree.h (flag_hash_synchronization): Declare.
5851         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
5852         hash table synchronization is disabled.
5853         * decl.c (init_decl_processing): Only push `sync_info' value when
5854         hash table synchronization is disabled.
5855         * class.c (make_class_data): Only push `sync_info' field when hash
5856         table synchronization is disabled.  Removed dead code.
5857
5858 2000-03-16  Tom Tromey  <tromey@cygnus.com>
5859
5860         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
5861
5862 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5863
5864         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
5865         classes.
5866         * parse.y (patch_method_invocation): Handle anonymous classes
5867         creation in static context.
5868
5869 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5870
5871         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
5872         * parse.y (resolve_qualified_expression_name): Use it.
5873         (patch_method_invocation): Likewise.
5874
5875 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5876
5877         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
5878         depending on the type of dependency which dictates what the
5879         current class is.
5880         (unresolved_type_p): Resolved types limited to the current class.
5881
5882 2000-03-15  Tom Tromey  <tromey@cygnus.com>
5883
5884         * decl.c (init_decl_processing): Set type of `sync_info' to be
5885         pointer to Object.
5886
5887         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
5888         Correctly compute bit number for current slot.  Zero `high' and
5889         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
5890         mark_reference_fields.
5891         (mark_reference_fields): New function.
5892
5893 Tue Mar 14 17:15:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5894
5895         * parse.y (register_incomplete_type): Fixed initialization of
5896         JDEP_ENCLOSING.
5897
5898 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5899
5900         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
5901         static globals.
5902         (push_class_context, pop_class_context): New function.
5903         (class_body:): Call pop_class_context.
5904         (interface_body:): Likewise.
5905         (INNER_QUALIFIER): New macro.
5906         (report_class_declaration): Changed output format and use
5907         INNER_QUALIFIER. Call push_class_context.
5908
5909 2000-02-14  Andrew Haley  <aph@cygnus.com>
5910
5911         * check-init.c (check_init): Add new cases for unary and binary
5912         tree nodes.
5913
5914 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5915
5916         * parse.y (resolve_package): Set `next' once a type name has been
5917         progressively discovered.
5918         (resolve_qualified_expression_name): Propagate resolution only if
5919         there are remaining qualifiers. Take into account `q' might have
5920         been cleared after re-qualification.
5921         * parse.y (patch_method_invocation): New local `resolved'.
5922         Section dealing with qualified expression rewritten to use
5923         resolve_field_access.
5924
5925 Mon Mar 13 12:21:13 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5926
5927         * parse.h (PUSH_CPC): Fixed indentation.
5928         (DEBUG_CPC): New macro.
5929         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
5930         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
5931         * parse.y (class_body_declaration:): Use
5932         SET_CPC_INSTANCE_INITIALIZER_STMT.
5933         (method_declaration:): Check for null current_function_decl.
5934         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
5935         (java_parser_context_pop_initialized_field): Better handling of
5936         empty lists.
5937         (maybe_make_nested_class_name): Mark nested class name as
5938         qualified when necessary.
5939         (end_class_declaration): Don't call java_parse_context_resume when
5940         one or more error occurred.
5941         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
5942         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
5943         SET_CPC_INITIALIZER_STMT.
5944         (method_header): Check for inner classes declaring static methods.
5945         (resolve_qualified_expression_name): Handle situation where `this'
5946         is implied.
5947
5948 Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
5949
5950         * typeck.c (build_prim_array_type): Correctly set the high word too.
5951
5952 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5953
5954         * parse.y (java_complete_expand_methods): Leave <clinit> out of
5955         ordinary methods.
5956         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
5957         list of methods for interfaces.
5958
5959 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5960
5961         * parse.y (qualify_ambiguous_name): Properly handle expressions
5962         using `null'.
5963
5964 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5965
5966         * parse.y (check_final_assignment): Extended to process
5967         COMPOUND_EXPR.
5968         (patch_assignment): Have check_final_assignment called only once.
5969
5970 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5971
5972         * java-tree.h (IS_INIT_CHECKED): New flag.
5973         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
5974         * parse.y (patch_string): Call force_evaluation_order on the
5975         completed string concatenation tree.
5976         * expr.c (force_evaluation_order): Call force_evaluation_order on
5977         function's arguments too.
5978
5979 Mon Mar  6 18:07:07 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5980
5981         * decl.c (emit_init_test_initialization): Mark KEY as unused.
5982         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5983         (build_anewarray): Likewise.
5984         * parse.y (patch_newarray): Likewise.
5985         * parse.c: Regenerated.
5986
5987 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
5988
5989         * decl.c (init_decl_processing): Added new class fields `depth',
5990         `ancestors', and `idt' to class_type_node. Use
5991         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
5992         * class.c (make_class_data): Push initial values for new fields.
5993         * java-tree.h: Updated prototype for `build_invokeinterface'.
5994         * expr.c (build_invokeinterface): Changed parameters to accept
5995         `method' tree. Calculate index of `method' in its declaring
5996         interface. Build call to _Jv_LookupInterfaceMethodIdx.
5997         (expand_invoke): Call `build_invokeinterface' with new parameters.
5998         * parse.y (patch_invoke): Call `build_invokeinterface' with new
5999         parameters.
6000
6001 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
6002
6003         * typeck.c (lookup_do): Search superinterfaces first
6004         when looking up an interface method. From Godmar Back
6005         <gback@cs.utah.edu>
6006
6007 2000-03-06  Tom Tromey  <tromey@cygnus.com>
6008
6009         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
6010
6011 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6012
6013         * java-tree.h (lookup_argument_method2): Declared.
6014         (safe_layout_class): Prototype moved from parse.h.
6015         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
6016         * parse.y (java_check_regular_methods): Local `super_class' gone.
6017         Call lookup_argument_method2 instead of lookup_argument_method.
6018         Perform modifier match for methods found declared in implemented
6019         interfaces. Fixed indentation problem. Overriding/hiding error
6020         report to take place only for methods found in classes.
6021         * typeck.c (lookup_argument_method): Changed leading
6022         comment. Re-written by calling lookup_do.
6023         (lookup_argument_method2): New function.
6024         (lookup_java_method): Re-written by calling lookup_do.
6025         (lookup_do): New function.
6026
6027 Thu Mar  2 15:18:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6028
6029         * check-init.c (check_init): Removed dead code. Handle (blank)
6030         final variables.
6031         * parse.y (declare_local_variables): New local `final_p', set it
6032         and use it to initialize LOCAL_FINAL.
6033         (check_final_assignment): Only check FIELD_DECLs.
6034
6035 2000-02-17  Tom Tromey  <tromey@cygnus.com>
6036
6037         * Makefile.in (JAVA_OBJS): Added boehm.o.
6038         (boehm.o): New target.
6039         * Make-lang.in (JAVA_SRCS): Added boehm.c.
6040         * java-tree.h (flag_use_boehm_gc): Declare.
6041         (get_boehm_type_descriptor): Declare.
6042         * lang.c (lang_f_options): Added `use-boehm-gc'.
6043         (flag_use_boehm_gc): New global.
6044         * lang-options.h: Added -fuse-boehm-gc.
6045         * boehm.c: New file.
6046         * class.c (get_dispatch_table): If class uses a Boehm type
6047         descriptor, put it in the vtable.
6048         (make_class_data): Removed dead code.
6049
6050 2000-03-03  Per Bothner  <per@bothner.com>
6051
6052         * decl.c (init_decl_processing):  Initialize sizetype properly.
6053
6054 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6055
6056         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
6057         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
6058         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6059         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
6060         (jcf_parse): New local `current'. Load innerclasses seen in outer
6061         context being processed.
6062         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6063         * jcf-write.c (append_innerclasses_attribute): New function.
6064         (append_innerclasses_attribute_entry): Likewise.
6065         (get_access_flags): Handle static classes. Set anonymous and local
6066         classes to be private.
6067         (generate_classfile): Attribute count adjusted. Call
6068         append_innerclasses_attribute.
6069         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
6070         PURE_INNER_CLASS_TYPE_P.
6071         * parse.y (parser_qualified_classname): New parameter `is_static',
6072         produce non qualified name accordingly.
6073         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
6074         (create_interface): Added argument to parser_qualified_classname.
6075         (create_class): Added argument to parser_qualified_classname. Setup
6076         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
6077         (add_inner_class_fields): Fixed indentation.
6078         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
6079         (method_declarator): Fixed typo in comment.
6080         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
6081         (build_current_thisn): Likewise.
6082         (patch_method_invocation): Likewise.
6083
6084 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6085
6086         * decl.c (current_function_decl): Move to toplev.c.
6087
6088 Mon Feb 28 08:20:42 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6089
6090         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
6091         (DECL_BIT_INDEX): Use underlying representation.
6092         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
6093
6094 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6095
6096         * expr.c (build_java_ret): Pass proper type to size_binop.
6097
6098 2000-02-25  Anthony Green  <green@cygnus.com>
6099
6100         * expr.c (build_class_init): Mark the decl to be ignored by
6101         check_init.
6102         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
6103         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
6104         * class.c (init_test_hash_newfunc): New function.
6105         (decl_hash): New function.
6106         (decl_compare): New function.
6107         * decl.c (emit_init_test_initialization): New function.
6108         (complete_start_java_method): Traverse the init test hashtable,
6109         calling emit_init_test_initialization.
6110         (always_initialize_class_p): Define.
6111         * expr.c (build_class_init): Use initialization tests when
6112         emitting class initialization code.
6113         (always_initialize_class_p): Declare.
6114         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
6115         1.
6116         * java-tree.h: Include hash.h.
6117         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
6118         (struct lang_decl): Add init_test_table field.
6119         (init_test_hash_entry): Define.
6120
6121 Fri Feb 25 18:41:31 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6122
6123         * gjavah.c (main): Avoid using `argi' to report unimplemented
6124         options.
6125
6126 Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6127
6128         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
6129         initialize locals to avoid warnings. Local `exception_type' moved
6130         into if statement.
6131
6132 Fri Feb 25 18:00:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6133
6134         * parse.y (resolve_expression_name): Use `orig' as a second
6135         argument to resolve_field_access.
6136         (resolve_field_access): Removed unnecessary code when dealing with
6137         static fields.
6138
6139 Wed Feb 23 17:41:50 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6140
6141         * class.c (push_super_field): Don't push the field twice.
6142         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
6143         * parse.h (java_reorder_fields): Prototyped.
6144         * parse.y (java_reorder_fields): New function.
6145         (java_layout_class): Simplified not to worry about re-ordering.
6146
6147 2000-02-23  Tom Tromey  <tromey@cygnus.com>
6148
6149         * gjavah.c (print_name): In JNI case, correctly quote string.
6150         (print_method_info): Don't handle overrides in JNI mode.
6151
6152 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6153
6154         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
6155         value type set to `boolean_type_node'.
6156
6157 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6158
6159         * jcf-dump.c (main): Test for correct condition after
6160         output file creation.
6161
6162 2000-02-19  Anthony Green  <green@cygnus.com>
6163
6164         * jcf-depend.c (add_entry): Fix test for first list entry.
6165
6166 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6167
6168         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
6169         * constants.c (build_constants_constructor): Likewise.
6170
6171 2000-02-19  Anthony Green  <green@cygnus.com>
6172
6173         * jcf-depend.c (add_entry): Add entries to the end of the list.
6174
6175 Wed Nov 03 02:16:00 PST 1999  Pekka Nikander  <pekka.nikander@hut.fi>
6176
6177         * decl.c (INT_TYPE_SIZE): Define if necessary.
6178         (expand_java_return): Handle the case of a native integer smaller
6179         than a JVM integer.
6180
6181 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6182
6183         * gjavah.c (help): Use GCCBUGURL.
6184         * jv-scan.c (help): Likewise.
6185         * jcf-dump.c (help): Likewise.
6186
6187 Thu Feb 17 14:30:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6188
6189         * jcf-write.c (generate_bytecode_insns): Don't generate empty
6190         `finally' clauses.
6191
6192 Thu Feb 17 13:20:58 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6193
6194         * jcf-parse.c (load_class): Call `fatal' if no file containing
6195         the target class are found.
6196
6197 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
6198
6199         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
6200         lex.c, lex.h, and PARSE_H to...
6201         (parse.o, parse-scan.o): ...here, respectively.
6202
6203         * lex.c: Split out code that may trigger SIGFPE from yylex()
6204         to its own function.
6205         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
6206
6207 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6208
6209         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
6210
6211 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6212
6213         * parse.y (outer_field_access_p): Stop in time when outer contexts
6214         are exhausted.
6215         (resolve_qualified_expression_name): Properly qualify *everything*
6216         after a package.type to be resoled as expression names.
6217         (find_applicable_accessible_methods_list): Save/restore `class' to
6218         isolate it from a possible outer context search.
6219
6220 2000-02-15  Tom Tromey  <tromey@cygnus.com>
6221
6222         * gjavah.c (jni_print_char): New function.
6223         (print_full_cxx_name): Use it.
6224         (decode_signature_piece): Likewise.
6225         (print_cxx_classname): Likewise.
6226
6227 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6228
6229         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
6230         version.o.
6231         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
6232
6233         * gjavah.c: Include version.h.
6234
6235         * jcf-dump.c: Likewise.
6236
6237         * jv-scan.c: Likewise.
6238
6239 Sat Feb 12 04:34:04 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6240
6241         * parse.y (outer_field_access_fix): First parameter now a tree
6242         node. Check for assignement to final. First argument to
6243         build_outer_field_access_fix modified to accommodate prototype.
6244         (build_outer_field_access): Don't check for assignment to final
6245         here.
6246         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
6247         possibly returned by outer_field_access_fix. Changed
6248         outer_field_access_fix's first argument.
6249         (check_final_assignment): $finit$'s context is OK.
6250         (patch_unaryop): Use node instead of its line/column value when
6251         calling outer_field_access_fix.
6252
6253 Fri Feb 11 17:38:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6254
6255         * parse.y (interface_declaration:): No longer tagged
6256         <node>. Re-installed default action.
6257         (class_member_declaration:): Handle inner interfaces.
6258         (interface_member_declaration): Handle inner interfaces and
6259         classes.
6260         (create_interface): Push error if one seen. Suspend parsing
6261         context when processing an inner interface.
6262         (register_fields): Inner class static field limitations not to
6263         apply to inner interfaces.
6264
6265 Thu Feb 10 22:07:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6266
6267         * jcf-parse.c (load_class): Update `java_error_count' when a
6268         class' file can't be found.
6269         (parse.y): Avoid (byte)code generation when errors seen.
6270
6271 Thu Feb 10 20:10:43 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6272
6273         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
6274         decodes a valid node.
6275         (patch_binop): Handle TRUNC_DIV_EXPR.
6276
6277 Thu Feb 10 16:04:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6278
6279         * parse.y (resolve_package): New local `acc'. Try to progressively
6280         build and guess a package and type name.
6281
6282 Thu Feb 10 12:52:09 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6283
6284         * parse.y (find_applicable_accessible_methods_list): Load and
6285         layout the search class if necessary.
6286         (java_complete_tree): Keep to original type of the folded initial
6287         value.
6288
6289 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6290
6291         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
6292         Generate error message if circularity is detected. New static
6293         local `list'.
6294         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
6295         * jcf-write.c (generate_bytecode_insns): Very simply handle
6296         SAVE_EXPR.
6297         * parse.y (java_check_circular_reference): Use
6298         `cyclic_inheritance_report' during report, if necessary.
6299         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
6300         walking NEW_ARRAY_INIT twice.
6301
6302 2000-02-09  Tom Tromey  <tromey@cygnus.com>
6303
6304         * parse.y (check_class_interface_creation): Allow inner classes to
6305         be `private' or `protected', check modifiers' consistency. Prevent
6306         block local classes from bearing any modifiers.
6307
6308 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6309
6310         * except.c (check_start_handlers): Re-add prototype lost in last
6311         patch.
6312         (maybe_start_try): Remove excess argument to `check_start_handlers'.
6313
6314 2000-02-09  Andrew Haley  <aph@cygnus.com>
6315
6316         * decl.c (clear_binding_level): Remove excess initializer.
6317         (maybe_poplevels): Remove unused variable.
6318         (force_poplevels): Ditto.
6319         (struct binding_level): Add comment.
6320
6321 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6322
6323         * jcf-write.c (generate_classfile): Don't consider
6324         pre-initialization with reference value (use <clinit> instead.)
6325         * parse.y (java_fix_constructors): No generated constructor for
6326         interfaces.
6327         (build_outer_field_access): Removed debug message.
6328         (outer_field_expanded_access_p): Adapted to bytecode generation.
6329         (build_outer_field_access_method): Use fix_method_argument_names.
6330         (build_outer_method_access_method): Fixed indentation. Added
6331         comment. Handle access method generation for static and also void
6332         methods.
6333         (build_access_to_thisn): Inserted debug message.
6334         (maybe_build_thisn_access_method): Use fix_method_argument_names.
6335         (resolve_qualified_expression_name): Fixed comment.
6336         (not_accessible_p): Adapted to bytecode generation. Added comment.
6337         (patch_method_invocation): Added comment.
6338         (maybe_use_access_method): Fixed leading comment. Handle static
6339         methods.
6340         (java_complete_lhs): Don't shortcut handling of initialized upon
6341         declaration String type static fields when generating bytecode.
6342         (patch_unaryop): Handle outer field access when generating
6343         bytecode.
6344
6345 Thu Feb  3 20:23:19 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6346
6347         * java-tree.h (FIELD_THISN): New macro.
6348         * jcf-write.c (append_synthetic_attribute): New function.
6349         (generate_classfile): Set "Synthetic" attribute on this$<n>,
6350         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
6351         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
6352         this$<n> fields.
6353         (build_outer_field_access): Turned on access functions usage and
6354         generation when compiling to bytecode.
6355         (maybe_use_access_method): Likewise.
6356
6357 2000-01-25  Andrew Haley  <aph@cygnus.com>
6358
6359         * java-except.h (struct eh_range): Add `expanded' field.
6360         (maybe_start_try): Add end_pc arg.
6361         (maybe_end_try): Ditto.
6362         * java-tree.h (force_poplevels): new function.
6363         * expr.c (expand_byte_code): Don't call maybe_start_try or
6364         maybe_end_try.
6365         * except.c (add_handler): Reset expanded.
6366         (expand_start_java_handler): Set expanded.
6367         (check_start_handlers): Don't expand a start handler that's
6368         already been expanded.
6369         (maybe_start_try): Add end_pc arg.  Only expand a handler which
6370         ends after end_pc.
6371         (expand_end_java_handler): call force_poplevels.
6372         (force_poplevels): new function.
6373         * decl.c (binding_level): Add start_pc of binding level.
6374         (maybe_pushlevels): Call maybe_start_try when pushing binding
6375         levels.
6376         (maybe_poplevels): Call maybe_end_try when popping binding levels.
6377         (LARGEST_PC): Define.
6378         (clear_binding_level): Use LARGEST_PC.
6379
6380         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
6381         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
6382         (binding_depth, is_class_level, current_pc): new variables.
6383         (struct binding_level): ditto.
6384         (indent): new function.
6385         (push_jvm_slot): add debugging info.
6386         (maybe_pushlevels): ditto.
6387         (maybe_poplevels): ditto.
6388         (pushlevel): ditto.
6389         (poplevel): ditto.
6390         (start_java_method): ditto.
6391         (give_name_to_locals): comment only.
6392         * except.c (binding_depth, is_class_level, current_pc):
6393         new variables.
6394         (expand_start_java_handler): add debugging info.
6395         (expand_end_java_handler): ditto.
6396
6397 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6398
6399         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
6400         (print_name_for_stub_or_jni, process_file): Constify a char*.
6401
6402 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6403
6404         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
6405
6406 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6407
6408         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
6409         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
6410         defined to be 1.
6411
6412 Wed Feb  2 18:43:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6413
6414         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
6415         * java-tree.h (TYPE_II_STMT_LIST): New macro.
6416         (struct lang_type): New field `ii_block'.
6417         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
6418         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
6419         * parse.h (struct parser_ctxt): New field `instance_initializers'.
6420         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
6421         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
6422         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
6423         macros.
6424         * parse.y (add_instance_initializer): New function.
6425         (in_instance_initializer): New static global.
6426         (class_body_declaration:): Link instance initializer block.
6427         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
6428         (array_creation_expression:): Remove unused local.
6429         (java_parser_context_push_initialized_field): Fixed leading
6430         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
6431         CPC_INSTANCE_INITIALIZER_LIST.
6432         (java_parser_context_pop_initialized_field): Likewise.
6433         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
6434         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
6435         CPC_INITIALIZER_STMT.
6436         (fix_constructors): New local `class_type'. Use it. Call
6437         add_instance_initializer.
6438         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
6439         (patch_return): Forbid return in instance initializers.
6440         (patch_throw_statement): Enforce exception handling in the context
6441         of instance initializers.
6442
6443 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6444
6445         * Make-lang.in (java.mostlyclean): Remove executables in
6446         `mostlyclean'.
6447
6448 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6449
6450         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
6451         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
6452         (java_float_finite): Convert to use union Word from javaop.h.
6453         (java_double_finite): Convert to use union DWord from javaop.h.
6454
6455 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6456
6457         * gjavah.c (options): Added `jni' entry.
6458         (help): Document -jni.
6459         (flag_jni): New global.
6460         (process_file): Handle JNI output.  Don't print text from
6461         -prepend, -add, etc, when generating stubs.  Only remove `.class'
6462         suffix if it actually exists.
6463         (main): Create a `.c' file when run with `--jni --stubs'.  Create
6464         correct output file name with `--jni'.
6465         (print_include): Mangle header name differently in JNI case.
6466         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
6467         method list.
6468         (print_method_info): Handle JNI case.  Put signature info into
6469         method name.  Handle case when STREAM is NULL.
6470         (print_name_for_stub_or_jni): New function.
6471         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
6472         (print_cxx_classname): Handle JNI.
6473         (print_full_cxx_name): Likewise.
6474         (decode_signature_piece): Likewise.
6475         (overloaded_jni_method_exists_p): New function.
6476         (struct method_name): Added `signature' and `sig_length' fields.
6477         (HANDLE_END_FIELD): Do nothing in JNI mode.
6478
6479 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6480
6481         * jv-scan.c: Include version.c, <getopt.h>.
6482         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
6483         (options): New array.
6484         (usage): New function.
6485         (version): New function.
6486         (main): Use getopt_long to parse command line.
6487         * jcf-dump.c: Include version.c, <getopt.h>.
6488         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
6489         OPT_JAVAP): New macros.
6490         (options): New array.
6491         (usage): Return `void'.  Changed message.
6492         (help): New function.
6493         (version): New function.
6494         (main): Use getopt_long_only to parse command line.
6495         * gjavah.c: Include <getopt.h>.
6496         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
6497         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
6498         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
6499         (options): New array.
6500         (java_no_argument): Removed.
6501         (help): Updated with missing options.
6502         (main): Use getopt_long_only to parse command line.
6503         (usage): Changed message.
6504
6505 Tue Feb  1 22:23:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6506
6507         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
6508         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
6509         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
6510         * parse.y (array_creation_expression:): Handle anonymous arrays.
6511         (build_array_from_name): Don't set `ret_name' if null.
6512         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
6513         (qualify_ambiguous_name): Likewise.
6514         (java_complete_expand_class): Likewise.
6515
6516 Tue Feb  1 14:59:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6517
6518         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
6519         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
6520         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
6521         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
6522         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
6523         AIPL_FUNCTION_COMPLETED_INVOCATION.
6524         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
6525         AIPL_FUNCTION_INVOCATION_READY.
6526         (AIPL_FUNCTION_DECLARATION): New enum entry.
6527         * parse.y (reorder_static_initialized): New function.
6528         (java_parser_context_pop_initialized_field): Use it.
6529         (add_inner_class_fields): Use
6530         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
6531         augmented. Install marker after last alias initializer, if any.
6532         (generate_finit): Fixed typo. Don't try to retain only the used
6533         fields.
6534         (method_header): Compute and set DECL_FUNCTION_NAP.
6535         (method_declarator): Fixed comment. Insert alias initializer in
6536         parameter list.
6537         (build_alias_initializer_parameter_list): Fixed leading
6538         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
6539         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
6540         (java_complete_expand_class): Code to retain only used aliases
6541         removed.
6542         (java_complete_expand_methods): New local `first_decl'. Generate
6543         $finit$ first, then expand the constructors, regular methods and
6544         <clinit>.
6545         (java_complete_expand_method): Don't report error on missing
6546         return statement if previously detected bogus.
6547         (fix_constructors): Don't patch constructor parameters list.
6548         (patch_method_invocation): Use new AIPL enum values. Reverse
6549         alias initializer list for anonymous classes.
6550
6551 2000-01-30  Anthony Green  <green@redhat.com>
6552
6553         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
6554         determine how many stack slots to pop.
6555
6556 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6557
6558         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
6559         error handling/recovery.
6560         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
6561
6562 Fri Jan 28 20:10:57 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6563
6564         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
6565         FIELD_LOCAL_ALIAS_USED): New macros.
6566         (DECL_FUNCTION_NAP): New macro.
6567         (struct lang_decl): New field `nap'.
6568         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
6569         (struct lang_type): New fields `finit_stmt_list' and
6570         `clinit_stmt_list'.
6571         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
6572         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
6573         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
6574         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
6575         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
6576         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
6577         (BUILD_THROW): Macro line separator re-indented.
6578         * parse.y (end_class_declaration): New function.
6579         (maybe_generate_pre_expand_clinit): New name for
6580         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
6581         pre-expand static fields.
6582         (maybe_generate_clinit): Function deleted.
6583         (check_for_static_method_reference): Prototype's parameter list
6584         indented.
6585         (generate_finit): New name for maybe_generate_finit. Changed
6586         leading comment. Function rewritten to use
6587         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
6588         (build_alias_initializer_parameter_list): New function.
6589         (java_parser_context_pop_initialized_field): Likewise.
6590         (add_inner_class_fields): Likewise.
6591         (type_declaration:): Call end_class_declaration.
6592         (class_member_declaration:): Likewise.
6593         (formal_parameter_list:): Fixed typos.
6594         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
6595         element. Improved error handling.
6596         (block_statement:): Call end_class_declaration.
6597         (anonymous_class_creation:): Likewise.
6598         (create_anonymous_class): Fixed comments.
6599         (create_class): Call add_inner_class_fields.
6600         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
6601         (method_header): Use MARK_FINAL_PARMS.
6602         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
6603         (method_declarator): Propagate final argument flag.
6604         (craft_constructor): New local `artificial'. Call
6605         build_alias_initializer_parameter_list. Use
6606         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
6607         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
6608         necessary.
6609         (complete_expand_class): Get rid of unused outer context local
6610         alias fields.
6611         (java_complete_expand_methods): Fixed leading
6612         comment. Generate/pre-expand <clinit> first. Changed method
6613         expansion order to regular, $finit$, constructors, <clinit>.
6614         (java_complete_expand_method): Set current_function_decl.
6615         (fix_constructors): Fix constructor parameter list to account for
6616         outer context local alias initializers.
6617         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6618         (resolve_expression_name): Lookup outer context local aliases. New
6619         local `access', use it.
6620         (patch_method_invocation): Patch inner class ctor invocation with
6621         outer context local aliases initialization values. $finit$
6622         invocation patching now includes things generated with
6623         build_alias_initializer_parameter_list.
6624         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6625         (build_super_invocation): Likewise.
6626         (patch_assignment): Changed comment.
6627
6628 2000-01-27  Andrew Haley  <aph@cygnus.com>
6629
6630         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
6631         (emit_if): Ditto.
6632         (emit_jsr): Ditto.
6633
6634 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6635
6636         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
6637         concatenation.
6638         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
6639
6640         * parse.y (register_fields): Don't pass a format specifier to
6641         OBSOLETE_MODIFIER_WARNING.
6642         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
6643         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
6644         specifier.
6645         (check_modifiers): Change function into a macro.
6646         (check_class_interface_creation): Pass a literal format string.
6647
6648 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6649
6650         * buffer.h: PROTO -> PARAMS.
6651         * check-init.c: Likewise.
6652         * class.c: Likewise.
6653         * constants.c: Likewise.
6654         * convert.h: Likewise.
6655         * decl.c: Likewise.
6656         * except.c: Likewise.
6657         * expr.c: Likewise.
6658         * gjavah.c: Likewise.
6659         * java-except.h: Likewise.
6660         * java-tree.h: Likewise.
6661         * jcf-depend.c: Likewise.
6662         * jcf-dump.c: Likewise.
6663         * jcf-parse.c: Likewise.
6664         * jcf-path.c: Likewise.
6665         * jcf-reader.c: Likewise.
6666         * jcf-write.c: Likewise.
6667         * jcf.h: Likewise.
6668         * jv-scan.c: Likewise.
6669         * jvgenmain.c: Likewise.
6670         * jvspec.c: Likewise.
6671         * lang.c: Likewise.
6672         * lex.c: Likewise.
6673         * lex.h: Likewise.
6674         * parse-scan.y: Likewise.
6675         * parse.h: Likewise.
6676         * parse.y: Likewise.
6677         * typeck.c: Likewise.
6678         * verify.c: Likewise.
6679         * xref.c: Likewise.
6680         * xref.h: Likewise.
6681         * zextract.c: Likewise.
6682         * zipfile.h: Likewise.
6683
6684 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6685
6686         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
6687         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
6688         * constants.c (build_constant_data_ref): Check for cached
6689         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
6690         in TYPE_CPOOL_DATE_REF.
6691         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
6692         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
6693         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
6694         (LOCAL_FINAL): New macro.
6695         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
6696         constant pool -- don't try to reuse.
6697         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
6698         TYPE_LANG_SPECIFIC.
6699         (find_in_current_zip): Use TYPE_JCF.
6700         * parse.h (java_check_final): Prototype removed.
6701         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
6702         (maybe_create_class_interface_decl,
6703         check_class_interface_creation): Likewise.
6704         (java_expand_finals): Function removed.
6705         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
6706         (block_statement:): Fixed comment.
6707         (anonymous_class_creation:): Likewise.
6708         (check_class_interface_creation): Reversed Jan 12, 2000 extra
6709         argument patch.
6710         (check_class_interface_creation): Loosened error report on (inner)
6711         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
6712         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
6713         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
6714         argument patch.
6715         (create_interface): Likewise.
6716         (anonymous_class_counter): New static global.
6717         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
6718         patch. Fixed comments.
6719         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
6720         anonymous_class_counter when declaring a toplevel class.
6721         (craft_constructor): Fixed constructor name when handling
6722         anonymous classes. Anonymous class constructors to feature hidden
6723         this$<n> parameter.
6724         (java_fix_constructors): Added comment.
6725         (java_check_final): Function removed.
6726         (java_complete_expand_methods): Fixed comment. Don't generate
6727         class data, save its outgoing constant pool instead.
6728         (verify_constructor_super): Skip anonymous class constructor
6729         hidden this$<n> parameter.
6730         (java_expand_classes): New local `saved_ctxp'. Removed call to
6731         java_expand_finals and java_check_final. Expand anonymous class
6732         constructors. Generate class data.
6733         (build_super_invocation): Skip anonymous class hidden this$<n>
6734         parameter.
6735         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
6736         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
6737         (set_java_signature): Likewise.
6738
6739 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6740
6741         * gjavah.c: Delete ACC_VISIBILITY define.
6742         * jcf.h: Add ACC_VISIBILITY define.
6743         * parse.y: final: rule tagged <value>.
6744         (java_check_regular_methods): Use ACC_VISIBILITY define for
6745         default package access check.
6746         (local_variable_declaration_statement): Use final: rule.
6747
6748 Mon Jan 17 11:58:17 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6749
6750         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
6751         (final:): New rule.
6752
6753 2000-01-17  Tom Tromey  <tromey@cygnus.com>
6754
6755         * gjavah.c (print_field_info): Allow non-static final fields.
6756
6757 Fri Jan 14 18:03:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6758
6759         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
6760         * parse.y (patch_anonymous_class): New function.
6761         (create_anonymous_class): Register incomplete type when the
6762         class/interface to extends/implement isn't known yet.
6763         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
6764         (verify_constructor_super): Tuned error message.
6765
6766 Fri Jan 14 00:14:24 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6767
6768         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
6769         (ANONYMOUS_CLASS_P): New macro.
6770         (TYPE_SIGNATURE, TYPE_JCF): New macros.
6771         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
6772         * parse.y (create_class): Added leading argument.
6773         (maybe_create_class_interface_decl,
6774         check_class_interface_creation): Likewise.
6775         (craft_constructor): New function.
6776         (verify_constructor_super): Added argument in prototype.
6777         (class_declaration:): Inserted leading argument.
6778         (for_begin:): Use FOR_LOOP_P.
6779         (anonymous_class_creation): Create WFL of the anonymous class to
6780         instantiate. Call build_new_invocation. Added comments.
6781         (check_class_interface_creation): Handle parameter `anonymous' in
6782         verbose mode class creation announce.
6783         (link_nested_class_to_enclosing): Exclude anonymous classes.
6784         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
6785         anonymous class, even though they appear to have an enclosing
6786         context.
6787         (create_interface): Pass extra argument to
6788         check_class_interface_creation.
6789         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
6790         (create_class): Call check_class_interface_creation and
6791         maybe_create_class_interface_decl with extra new argument. Don't
6792         add private this$<n> to anonymous classes.
6793         (method_declarator): Insert hidden this$<n> to anonymous class
6794         constructors.
6795         (java_fix_constructors): Deleted code creating default
6796         constructor. Call craft_constructor instead.
6797         (java_check_regular_methods): Set `saw_constructor' to 1 for
6798         anonymous classes.
6799         (fix_constructors): Pass extra argument to verify_constructor_super.
6800         (verify_constructor_super): New local `sdecl', use it. Search for
6801         matching constructor (possibly featuring arguments) in super
6802         class.
6803         (lookup_method_invoke): Craft constructor according to arguments
6804         list when dealing with anonymous class constructors.
6805         (build_super_invocation): Pass arguments to anonymous class super
6806         constructors.
6807         (search_loop): Use FOR_LOOP_P.
6808         (labeled_block_contains_loop_p): Likewise.
6809
6810 Wed Jan 12 00:38:47 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6811
6812         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
6813         (enclosing_context_p): New function.
6814         (get_access_flags_from_decl): Handle CLASS_STATIC.
6815         (maybe_layout_super_class): Extra first argument passed to
6816         do_resolve_class.
6817         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
6818         ID_INIT_P.
6819         * decl.c (access0_identifier_node): New global.
6820         (init_decl_processing): access0_identifier_node initialized.
6821         (pushdecl): Set DECL_CONTEXT only on non type decls.
6822         * expr.c (lookup_field): Lookup inner class fields in enclosing
6823         contexts.
6824         (expand_invoke): Use ID_INIT_P.
6825         (expand_java_field_op): Use DECL_CLINIT_P.
6826         * java-tree.def (CLASS_LITERAL): New tree code.
6827         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
6828         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
6829         (struct lang_decl): New field `inner_access'.
6830         (enclosing_context_p): Prototyped.
6831         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
6832         ID_CLINIT_P): New macros.
6833         (CLASS_STATIC): New macro.
6834         (CLASS_ACCESS0_GENERATED_P): New macro.
6835         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
6836         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
6837         INNER_CLASS_P): New macros.
6838         (DECL_INNER_CLASS_LIST): New macro.
6839         * jcf-parse.c (yyparse): Avoid the use of ANSI string
6840         concatenation.
6841         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
6842         the shift value to int. Fixed typo in comment.
6843         * lex.c (inst_id, wpv_id): Initialize.
6844         * mangle.c (unicode_mangling_length): Take `$' into account.
6845         * parse.h (DRECOVER, RECOVER): Terminate properly.
6846         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
6847         (typedef struct _jdep): New field `enclosing'.
6848         (JDEP_ENCLOSING): New macro.
6849         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
6850         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
6851         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
6852         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
6853         GET_ENCLOSING_CPC_CONTEXT): New macros.
6854         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
6855         (do_resolve_class): Added extra argument in prototype.
6856         * parse.y (resolve_class): Added extra argument in prototype.
6857         (maybe_create_class_interface_decl): Likewise.
6858         (maybe_use_access_method, build_wfl_wrap): New functions.
6859         (java_complete_expand_classes, java_complete_expand_class):
6860         Likewise.
6861         (java_parser_context_push_initialized_field,
6862         java_parser_context_suspend, java_parser_context_resume):
6863         Likewise.
6864         (maybe_make_nested_class_name, make_nested_class_name,
6865         set_nested_class_simple_name_value,
6866         link_nested_class_to_enclosing, find_as_inner_class,
6867         find_as_inner_class_do, check_inner_class_redefinition,
6868         build_thisn_assign, build_current_thisn, build_access_to_thisn,
6869         maybe_build_thisn_access_method, build_outer_field_access,
6870         build_outer_field_access_methods, build_outer_field_access_expr,
6871         build_outer_method_access_method, build_new_access_id,
6872         build_outer_field_access_method, outer_field_access_p,
6873         outer_field_expanded_access_p, outer_field_access_fix,
6874         build_incomplete_class_ref, patch_incomplete_class_ref,
6875         create_anonymous_class): Likewise.
6876         (inst_id, wpv_id): New static global variables.
6877         (synchronized:): New rule, tagged <node>.
6878         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
6879         rules.
6880         (anonymous_class_creation:): New rule, tagged <node>.
6881         (NEW_TK): Tagged <node>.
6882         (type_literals, array_type_literal): New rules, tagged <node>.
6883         (class_declaration:): Removed action when reducing by class_body:
6884         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
6885         using GET_CPC in sub-rules.
6886         (class_member_declaration): Handle inner classes.
6887         (method_declaration): When reducing method_header:, reset
6888         current_function_decl when appropriate.
6889         (method_declarator:): Set the number of formal parameter to 0 for
6890         method declared without arguments.
6891         (constructor_declarator:): Likewise.
6892         (static_initializer:): List of elements kept in a list.
6893         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
6894         use of the keyword `static' for type declarations.
6895         (block_statement:): Handle inner class declarations.
6896         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
6897         type qualified `this'.
6898         (class_instance_creation_expression): Use anonymous_class_creation:
6899         to handle inner class instances creation. Handle qualified `new'.
6900         (something_dot_new): Added appropriate actions.
6901         (create_new_parser_context): New function.
6902         (java_push_parser_context, java_parser_context_save_global,
6903         java_parser_context_suspend): Use create_new_parser_context.
6904         (check_modifiers): Changed leading comment.
6905         (check_class_interface_creation): Handle interclasses.
6906         (add_superinterfaces): Fixed comment.
6907         (create_interface): Build qualified name from the raw_name instead
6908         of its matching WFL. Push the initialized fields list. raw_name added
6909         as an extra argument to maybe_create_class_interface_decl.
6910         (create_class): Build qualified name from the raw_name instead of
6911         its matching WFL. Removed assignment to current_parsed_class_un.
6912         Call PUSH_ERROR before returning an error. Suspend the current
6913         parser context when processing an inner class. Push the
6914         initialized fields list. raw_name added as an extra argument to
6915         maybe_create_class_interface_decl. Add the private this$<n>
6916         field.
6917         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
6918         (register_fields): Get the class type from GET_CPC and handle
6919         previous errors.  Added code to handle the creation of static
6920         fields in inner classes. Initialized fields initialization
6921         statements kept in a list of lists.
6922         (maybe_generate_finit): Initialized fields initialization
6923         statements kept in a list of lists. Use GET_CPC.
6924         (maybe_generate_clinit): Likewise.
6925         (method_header): Use GET_CPC and GET_CPC_UN.
6926         (parser_qualified_classname): Handle inner classes.
6927         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
6928         (java_fix_constructors): Hide pointer to enclosing context
6929         instance in constructor list when dealing with inner classes.
6930         (jdep_resolve_class): Call resolve_class with extra first argument
6931         JDEP_ENCLOSING.
6932         (resolve_class): Add enclosing context as a first extra argument
6933         to do_resolve_class.
6934         (do_resolve_class): Call find_as_inner_class. Handle WFLs
6935         properly.
6936         (resolve_no_layout): Extra argument added to resolve_class
6937         invocation.
6938         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
6939         (java_get_real_method_name): Use GET_CPC_UN.
6940         (check_abstract_method_definitions): Use DECL_CLINIT_P.
6941         (java_check_abstract_methods): Handle static method declared in
6942         inner classes by an error.
6943         (java_check_regular_methods): Use DECL_CLINIT_P.
6944         (source_start_java_method): Also set DECL_MAX_LOCALS.
6945         (create_artificial_method): Call java_parser_context_save_global
6946         and java_parser_context_restore_global instead of saving/restoring
6947         the context by hand.
6948         (expand_start_java_method): Improved verbose mode message.
6949         (java_complete_expand_methods): Fixed leading comment. Use
6950         DECL_CLINIT_P.
6951         (fix_constructors): Added assignment to this$<n> if necessary.
6952         (java_expand_classes): Call java_complete_expand_classes instead
6953         of java_complete_expand_methods.
6954         (make_qualified_primary): Simplified.
6955         (merge_qualified_name): Optimized for missing left or right parts.
6956         (resolve_expression_name): Handle access to outer class fields from
6957         interclasses.
6958         (resolve_qualified_expression_name): New macro
6959         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
6960         classes. Report error on non appropriate qualification of
6961         `new'. Handle qualified `this'.
6962         (not_accessible_p): Allow access to outer class private fields from
6963         inner classes.
6964         (patch_method_invocation): Handle method invocations through
6965         access methods and inner class constructor invocations.
6966         (find_applicable_accessible_methods_list): Search enclosing
6967         contexts of an inner class.
6968         (search_applicable_methods_list): Fixed typo.
6969         (argument_types_convertible): Handle inner class constructors'
6970         hidden outer context reference argument.
6971         (qualify_ambiguous_name): Handle qualified `this'.
6972         (java_complete_lhs): Handle use of field accessed through
6973         artificial access methods in various cases of assignments. Handle
6974         CLASS_LITERAL node.
6975         (check_final_assignment): Use DECL_CLINIT_P.
6976         (valid_ref_assignconv_cast_p): Handle the destination being an
6977         enclosing context of the source.
6978         (patch_unaryop): Handle use of field accessed through artificial
6979         access methods.
6980         (patch_return): Use DECL_CLINIT_P.
6981         (patch_throw_statement): Use DECL_CLINIT_P.
6982         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
6983         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
6984         ID_INIT_P.
6985
6986 2000-01-16  Anthony Green  <green@cygnus.com>
6987
6988         * parse.y (build_string_concatenation): Only use
6989         StringBuffer(String) shortcut if String arg is constant.
6990
6991 Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6992
6993         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
6994         the shift value to int. Fixed typo in comment.
6995
6996 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
6997
6998         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
6999         * jcf-write.c: Likewise.
7000         * parse.y: Likewise.
7001         * parse.c: Regenerate.
7002
7003 2000-01-09  Anthony Green  <green@cygnus.com>
7004
7005         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
7006         bytecodes in the correct order.
7007
7008 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7009
7010         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
7011
7012 Thu Jan  6 16:31:28 2000  Anthony Green  <green@cygnus.com>
7013
7014         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7015         before building constant array decl.
7016
7017 Thu Jan  6 00:54:10 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7018
7019         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
7020         method invocation and typo in conditional expression.
7021         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
7022         the appropriate NOTE_POP.
7023         * parse.y (patch_binop): Shift value mask to feature the right
7024         type.
7025
7026 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7027
7028         * class.c (assume_compiled, assume_compiled_node): Add static
7029         prototype.
7030         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
7031
7032         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
7033
7034         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
7035
7036         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
7037         to `__modifier' to avoid stringifying it.
7038
7039         * parse.y (verify_constructor_circularity): Don't call a variadic
7040         function with a non-literal format string.
7041         (java_check_abstract_methods): Move unreachable code inside
7042         `continue' statement.
7043         (lookup_method_invoke): Call xstrdup, not strdup.
7044
7045         * expr.c (expand_java_field_op): Avoid the use of ANSI string
7046         concatenation.
7047
7048         * jcf-parse.c (yyparse): Likewise.
7049
7050         * jv-scan.c (main): Likewise.
7051
7052 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7053
7054         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
7055         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
7056         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
7057         concatenation.
7058
7059         * parse.y (synchronized, variable_redefinition_error,
7060         check_class_interface_creation, create_interface, create_class,
7061         method_header, finish_method_declaration,
7062         check_modifiers_consistency, method_declarator,
7063         complete_class_report_errors, check_abstract_method_definitions,
7064         java_check_regular_methods, check_throws_clauses,
7065         java_check_abstract_methods, read_import_dir,
7066         check_pkg_class_access, declare_local_variables, fix_constructors,
7067         cut_identifier_in_qualified, resolve_expression_name,
7068         resolve_qualified_expression_name, patch_method_invocation,
7069         java_complete_lhs, patch_assignment, try_builtin_assignconv,
7070         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
7071         patch_exit_expr, patch_exit_expr, patch_switch_statement,
7072         patch_try_statement, patch_synchronized_statement,
7073         patch_throw_statement, check_thrown_exceptions,
7074         patch_conditional_expr): Likewise.
7075
7076 Fri Dec 24 00:25:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7077
7078         * Makefile.in (LIBDEPS): Added gcc's errors.o
7079         (../jcf-dump$(exeext):): Link with gcc's errors.o
7080         (../gcjh$(exeext):): Likewise.
7081         * expr.c (expand_java_NEW): Layout the entire target type instead of
7082         laying out its methods only.
7083         (lookup_field): Layout the class after having loaded it.
7084         * java-tree.h (java_debug_context): Declared.
7085         * jcf-io.c (toplev.h): Included.
7086         (find_class): Removed assignment to jcf's outofsynch
7087         field. Force source file to be read if newer than its matching
7088         class file. Tweaked debug messages.
7089         * jcf-parse.c (jcf_out_of_synch): Deleted.
7090         (read_class): Call to jcf_out_of_synch removed.
7091         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
7092         (jcf_out_of_synch): Prototype deleted.
7093         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
7094         `deprecated' and `class_err': integer turned into bit-fields.
7095         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
7096         * parse.y (package_list): New global.
7097         (package_declaration:): Record newly parsed package name.
7098         (extra_ctxp_pushed_p): Static global deleted.
7099         (java_parser_context_save_global): Create buffer context for the
7100         purpose of saving globals, if necessary.
7101         (java_parser_context_restore_global): Pop context pushed for the
7102         purpose of saving globals, if necessary.
7103         (java_debug_context_do): New prototype and function.
7104         (java_debug_context): Likewise.
7105         (do_resolve_class): Use already parsed package names to qualify
7106         and lookup class candidate.
7107         (java_pre_expand_clinit): Removed unnecessary local variable.
7108
7109 1999-12-17  Tom Tromey  <tromey@cygnus.com>
7110
7111         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
7112         fixes PR gcj/119.
7113         (process_file): Use `\n\' at end of each line in string.
7114
7115 Thu Dec 16 00:09:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7116
7117         * expr.c (expand_invoke): Layout the loaded class before
7118         attempting to use it.
7119         (expand_java_field_op): Allow final field assignments to take
7120         place in $finit$.
7121         * typeck.c (convert): Return error_mark_node if expr is null.
7122
7123 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7124
7125         * class.c (class_depth): Return -1 if the class doesn't load
7126         properly.
7127         * expr.c (can_widen_reference_to): Check for errors during depth
7128         computation and return 0 accordingly.
7129         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
7130         create default constructors and add an other error check.
7131         * parse.h (java_fix_constructors): Prototyped.
7132         * parse.y (java_pre_expand_clinit): Likewise.
7133         (build_super_invocation): Re-prototyped to feature one argument.
7134         (java_check_circular_reference): Directly use `current'.
7135         (java_fix_constructors): New function.
7136         (java_check_regular_methods): Don't create default constructors
7137         here, but abort if none were found.
7138         (java_complete_expand_methods): Pre-process <clinit> calling
7139         java_pre_expand_clinit.
7140         (java_pre_expand_clinit): New function.
7141         (fix_constructors): build_super_invocation invoked with the
7142         current method declaration as an argument.
7143         (build_super_invocation): Use the context of the processed method
7144         decl argument instead of current_class.
7145         * typeck.c (lookup_java_method): Take WFLs in method names into
7146         account.
7147
7148 Tue Dec 14 14:20:16 1999  Per Bothner  <per@bothner.com>
7149
7150         * class.c (make_class_data): flag_keep_inline_functions to keep
7151         private methods in the method array.
7152
7153 1999-12-15  Anthony Green  <green@cygnus.com>
7154
7155         * check-init.c (check_init): Take into account both types of
7156         `throw's when checking for uninitialized variables.
7157
7158 Fri Dec 10 21:53:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7159
7160         * parse.y (java_complete_lhs): Force convertion of array
7161         dimensions to int_type_node, that's what runtime's ABI expects.
7162
7163 Fri Dec 10 16:13:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7164
7165         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
7166         operand of a WFL, until the Java front-end gets fixed with regard
7167         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
7168
7169 1999-12-10  Andrew Haley  <aph@cygnus.com>
7170
7171         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
7172         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
7173         expr.c (build_java_athrow): Add support for sjlj-exceptions.
7174         java-tree.h: Ditto.
7175         jcf-write.c: Ditto.
7176
7177 Wed Dec  8 15:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7178
7179         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7180         before calling expand_eh_region_start and expand_start_all_catch.
7181         * except.c (expand_start_java_handler): Switch to permanent
7182         obstack before calling expand_eh_region_start.
7183         (expand_end_java_handler): Switch to permanent obstack before
7184         calling expand_start_all_catch.
7185
7186 1999-12-5  Anthony Green  <green@cygnus.com>
7187
7188         * decl.c (init_decl_processing): Mark throw_node as a noreturn
7189         function with side effects.
7190         (init_decl_processing): Mark all memory allocating DECLs with
7191         DECL_IS_MALLOC.
7192
7193 Wed Dec  1 04:25:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7194
7195         * except.c (expand_end_java_handler): Call
7196         expand_resume_after_catch and end_catch_handler.
7197
7198 Tue Nov 30 12:36:15 1999  Anthony Green  <green@cygnus.com>
7199
7200         * verify.c (verify_jvm_instructions): Create new return label
7201         chain if non existent (don't rely on the verified state of the jsr
7202         target.)
7203
7204 Tue Nov 30 12:28:34 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7205
7206         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
7207         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
7208
7209         * parse.y (patch_assignment): Removed bogus final class test on
7210         lhs when checking on whether to emit an ArrayStoreException runtime
7211         check.
7212         * expr.c (expand_java_arraystore): Likewise.
7213
7214 1999-11-28 Anthony Green <green@cygnus.com>
7215
7216         * decl.c (find_local_variable): Reuse single slot decls when
7217           appropriate.
7218
7219 Wed Nov 24 17:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7220
7221         * jcf-parse.c (saw_java_source): Global variable removed.
7222         (read_class): Don't use `saw_java_source'. Added extra braces.
7223         (yyparse): Code setting `saw_java_source' removed.
7224
7225 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
7226
7227         * except.c (emit_handlers): Zero catch_clauses after emitting them.
7228
7229 Tue Nov 23 17:29:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7230
7231         * verify.c (merge_type_state): Non verified subroutines being
7232         considered more than once to trigger passive type merge.
7233
7234 Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7235
7236         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
7237         in case of error. Error message tuned.
7238
7239 1999-11-21  Anthony Green  <green@cygnus.com>
7240
7241         * constants.c (find_methodref_index): Unwrap method names before
7242         inserting them in the constant pool.
7243
7244         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
7245
7246         * class.c (assume_compiled_node): New typedef.
7247         (assume_compiled_tree): New static data.
7248         (find_assume_compiled_node): New function.
7249         (add_assume_compiled): New function.
7250         (assume_compiled): New function.
7251         * class.c (make_class_data): Use assume_compiled.
7252         (is_compiled_class): Use assume_compiled.
7253
7254         * java-tree.h (add_assume_compiled): Declare.
7255
7256         * lang.c (lang_decode_option): Parse new options.
7257
7258 Wed Nov 17 21:09:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7259
7260         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
7261         int_type_node: that's what `_Jv_AllocObject' expects.
7262
7263 Thu Nov 11 01:57:14 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7264
7265         * parse.y (lookup_method_invoke): Use lang_printable_name to
7266         reliably build the type name during error report. Fixes PR gcj/97.
7267
7268 1999-11-09  Tom Tromey  <tromey@cygnus.com>
7269
7270         * jcf-path.c: Include <sys/stat.h>.
7271         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
7272         (DIR_UP): New macro.
7273
7274 Tue Nov  9 12:12:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7275
7276         * parse.y (source_end_java_method): Resume permanent allocation,
7277         reversing Apr 27 1998 patch.
7278         (patch_string_cst): Pop obstacks after having pushed the permanent
7279         ones.
7280
7281 1999-11-05  Tom Tromey  <tromey@cygnus.com>
7282
7283         * class.c (finish_class): Emit inlined methods if any native
7284         methods exist in the class.  Fixes PR gcj/85.
7285
7286 Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7287
7288         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
7289         (qualify_ambiguous_name): Likewise.
7290
7291 Wed Nov  3 15:20:02 MST 1999  Godmar Back <gback@cs.utah.edu>
7292
7293         * typeck.c: (lookup_java_method):  search all inherited
7294         interfaces when looking up interface method.
7295
7296 Mon Nov  1 23:42:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7297
7298         * parse.y (method_header:): Issue error message for rule `type
7299         error'.
7300         (synchronized:): Error report when not using synchronized.
7301
7302 Mon Nov  1 01:32:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7303
7304         * parse.y (resolve_qualified_expression_name): Prevent `this' from
7305         being used before the superclass constructor has been called.
7306         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
7307         instead of `CALL_THIS_CONSTRUCTOR_P'.
7308
7309 Sat Oct 30 21:35:13 1999  Todd T. Fries <todd@lighthouse.fries.net>
7310
7311         * check-init.c: Fix typo in comment.
7312
7313 Fri Oct 29 14:35:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7314
7315         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
7316         and final method.
7317
7318 Fri Oct 29 14:23:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7319
7320         * parse.y (expression_statement:): Call function to report
7321         improper invocation of a constructor.
7322         (parse_ctor_invocation_error): New function.
7323
7324 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
7325
7326         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
7327         remember_end_note.
7328
7329 1999-10-21  Tom Tromey  <tromey@cygnus.com>
7330
7331         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
7332         in generated `main'.
7333
7334 Thu Oct 21 01:27:31 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7335
7336         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
7337         (qualify_ambiguous_name): Likewise.
7338
7339 Wed Oct 20 01:41:47 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7340
7341         * parse.y (java_complete_tree): fold_constant_for_init to work on
7342         permanent_obstack.
7343         (java_complete_lhs): Likewise.
7344         (array_constructor_check_entry): Complete an initializer element
7345         on permanent_obstack.
7346
7347 1999-10-19  Tom Tromey  <tromey@cygnus.com>
7348
7349         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
7350         From Mike Moreton <mike@pillim.demon.co.uk>.
7351
7352 1999-10-15  Greg McGary  <gkm@gnu.org>
7353
7354         * java-tree.h (flag_bounds_check): Remove extern decl.
7355         * lang.c (flag_bounds_check): Remove global variable.
7356         (lang_f_options): Remove "bounds-check" entry.
7357         (lang_init_options): Default flag_bounds_check to "on".
7358
7359 1999-10-14  Tom Tromey  <tromey@cygnus.com>
7360
7361         * jvgenmain.c (usage): New function.
7362         (main): Use it.  Also, handle `-D' options.
7363         * jvspec.c (lang_specific_driver): Recognize -D.
7364         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
7365
7366         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
7367
7368 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7369
7370         * jcf-dump.c (print_constant, disassemble_method): Don't call a
7371         variadic function with a non-literal format string.
7372
7373         * parse-scan.y (report_main_declaration): Likewise.
7374
7375         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
7376
7377         * parse.y (read_import_dir, patch_assignment, patch_binop,
7378         patch_array_ref): Likewise.
7379
7380         * typeck.c (build_java_array_type): Likewise.
7381
7382         * verify.c (verify_jvm_instructions): Likewise.
7383
7384 Tue Oct 12 22:28:10 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7385
7386         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
7387
7388 1999-10-07  Anthony Green  <green@cygnus.com>
7389
7390         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
7391         where CHECK_PUT may fail for valid reasons.
7392
7393         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
7394         UNSAFE_PUTN): New macros.
7395
7396 1999-10-04  Tom Tromey  <tromey@cygnus.com>
7397
7398         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
7399         well.  Fixes Java PR gcj/59.
7400         * parse-scan.y (yyerror): Report errors.
7401
7402 Fri Sep 24 12:23:05 1999  Glenn Chambers  <GChambers@provsol.com>
7403
7404         * decl.c (insert_block): Remove unconditional `abort'.
7405
7406 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7407
7408         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
7409         FUNCTION_CODE now of type int.  All callers changed.
7410         Set the builtin's DECL_BUILT_IN_CLASS.
7411
7412 1999-09-23  Tom Tromey  <tromey@cygnus.com>
7413
7414         * jvspec.c (lang_specific_driver): Don't read spec file if
7415         -fsyntax-only given.
7416
7417 1999-09-22  Tom Tromey  <tromey@cygnus.com>
7418
7419         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
7420
7421         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
7422         (WORDS_TO_LONG): Likewise.
7423         (WORDS_TO_DOUBLE): Likewise.
7424
7425 Tue Sep 14 16:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7426
7427         * jcf-write.c (RELOCATION_VALUE_0): New macro.
7428         (RELOCATION_VALUE_1): Likewise.
7429         (emit_iinc, emit_reloc, push_constant1, push_constant2,
7430         push_in_const, push_long_const): Prototyped.
7431         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
7432         (push_constant2): Likewise.
7433         (push_int_const): Cast find_constant1's integer arguments to `jword'.
7434         (find_constant_wide): Cast find_constant2's integer arguments to
7435         `jword'.
7436         (find_constant_index): Cast find_constant2's and find_constant2's
7437         integer arguments to `jword'.
7438         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
7439         (emit_switch_reloc): Use RELOCATION_VALUE_0.
7440         (emit_if): Use RELOCATION_VALUE_1.
7441         (emit_goto): Likewise.
7442         (emit_jsr): Likewise.
7443         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
7444         argument to push_long_const to HOST_WIDE_INT.
7445
7446 1999-09-15  Andreas Schwab  <schwab@suse.de>
7447
7448         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
7449
7450 1999-09-20  Nick Clifton  <nickc@cygnus.com>
7451
7452         * lang.c (lang_decode_option): Extend comment.
7453
7454 Thu Sep 16 15:42:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7455
7456         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
7457         instead of fndecl.
7458
7459 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7460
7461         * gjavah.c (get_field_name, print_method_info, print_include,
7462         add_namelet): Use xmalloc, not malloc.
7463
7464         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
7465         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
7466         NULL pointer.
7467
7468         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
7469
7470         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
7471
7472         * jcf-path.c (add_entry): Likewise.
7473
7474         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
7475
7476         * jv-scan.c (xmalloc): Remove definition.
7477
7478         * jvgenmain.c (xmalloc): Likewise.
7479
7480         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
7481
7482         * lex.c (java_store_unicode): Use xrealloc, not realloc.
7483
7484         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
7485         concat, not xmalloc/sprintf.
7486         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
7487         (xstrdup): Remove definition.
7488
7489         * parse.y (duplicate_declaration_error_p,
7490         constructor_circularity_msg, verify_constructor_circularity,
7491         check_abstract_method_definitions, java_check_regular_methods,
7492         java_check_abstract_methods, patch_method_invocation,
7493         check_for_static_method_reference, patch_assignment, patch_binop,
7494         patch_cast, array_constructor_check_entry, patch_return,
7495         patch_conditional_expr): Use xstrdup, not strdup.
7496
7497         * zextract.c (ALLOC): Use xmalloc, not malloc.
7498
7499 Sun Sep 12 23:30:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7500
7501         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
7502
7503         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
7504         (do_spec, lang_specific_pre_link, lang_specific_driver,
7505         input_filename, input_filename_length): Don't declare.
7506         (main_class_name, jvgenmain_spec, lang_specific_driver):
7507         Constify a char*.
7508         (lang_specific_driver): All calls to the function pointer
7509         parameter now explicitly call `fatal'.
7510
7511 Sat Sep 11 16:46:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7512
7513         * parse.y (find_applicable_accessible_methods_list): Search
7514         abstract classes as interfaces.
7515
7516 Thu Sep  9 17:33:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7517
7518         * class.c (finish_class): We're now outside a valid method
7519         declaration. Tell the rest of gcc so.
7520
7521 1999-09-08  Bruce Korb  autogen@linuxbox.com
7522
7523         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
7524
7525 1999-09-07  Tom Tromey  <tromey@cygnus.com>
7526
7527         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
7528         java-array.h.
7529         (decode_signature_piece): Don't emit "::" in JArray<>.
7530         (print_namelet): Only print trailing `;' when printing a class.
7531
7532 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7533
7534         * java-tree.h: Delete declarations for all tree nodes now moved to
7535         global_trees.
7536         * decl.c: Delete their definitions.
7537
7538 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
7539
7540         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
7541         * Makefile.in (OBJS): Add ggc-callbacks.o.
7542         (OBJDEPS): Likewise.
7543
7544 1999-09-03  Tom Tromey  <tromey@cygnus.com>
7545
7546         * parse.y (strip_out_static_field_access_decl): Return operand if
7547         it satisfies JDECL_P.
7548
7549 1999-09-02  Tom Tromey  <tromey@cygnus.com>
7550
7551         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
7552         Handle nested arrays, like `[[I'.
7553
7554 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7555
7556         * class.c (finish_class): Remove unused parameter, all callers
7557         changed.
7558
7559         * expr.c (build_java_athrow): Change return type to void.
7560         (java_lang_expand_expr): Make sure each case in switch returns a
7561         value.
7562
7563         * java-tree.h (finish_class): Fix prototype to take void args.
7564
7565         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
7566         (main): Issue return from main, not exit.
7567
7568         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
7569
7570         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
7571
7572         * jv-scan.c (main): Issue return from main, not exit.
7573
7574         * parse.y (check_abstract_method_definitions,
7575         java_check_abstract_method_definitions): Add static prototypes.
7576         (java_complete_expand_methods): Fix call to `finish_class'.
7577
7578         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
7579         and `prevpc'.
7580
7581 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7582
7583         * lang.c (language_string): Constify.
7584
7585 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7586
7587         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
7588         Remove hacks for stuff which comes from libiberty.
7589
7590         * Make-lang.in: Likewise.
7591
7592 Mon Aug 30 16:41:41 1999  Hans-Peter Nilsson  <hp@axis.se>
7593
7594         * Makefile.in (xref.o): Depend on xref.c explicitly.
7595
7596 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7597
7598         * java-tree.h (lang_printable_name): Constify a char*.
7599
7600         * lang.c (lang_printable_name): Likewise.
7601
7602 Fri Aug 27 23:31:57 1999  Jeffrey A Law  (law@cygnus.com)
7603
7604         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
7605         comments in C code.
7606
7607 1999-08-26  Tom Tromey  <tromey@cygnus.com>
7608
7609         * gjavah.c (print_cxx_classname): Print "::" before qualified
7610         name.
7611
7612 Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7613
7614         * parse.y (lookup_cl): Changed leading comment. Now does its best
7615         to set the column number.
7616         (qualify_ambiguous_name): Take WFL wrappers into account.
7617
7618 Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
7619
7620         * verify.c (verify_jvm_instructions): Don't check instruction
7621         validity beyond end of method.
7622
7623 1999-08-25  Tom Tromey  <tromey@cygnus.com>
7624
7625         * jvspec.c (lang_specific_driver): Correctly handle --help again.
7626
7627 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7628
7629         * gjavah.c (print_name, print_base_classname, utf8_cmp,
7630         cxx_keyword_subst, generate_access, name_is_method_p,
7631         get_field_name, print_field_name, super_class_name, print_include,
7632         decode_signature_piece, print_class_decls, usage, help,
7633         java_no_argument, version, add_namelet, print_namelet): Add static
7634         prototype.
7635         (print_base_classname, utf8_cmp, cxx_keyword_subst,
7636         name_is_method_p): Constify a char*.
7637         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
7638         Provide a final else clause in an if-else-if.
7639         (print_field_info): Add missing final arg in function call to
7640         `print_field_name'.
7641         (print_method_info, decompile_method, decode_signature_piece,
7642         print_c_decl, print_full_cxx_name, print_stub,
7643         print_mangled_classname, super_class_name, print_include,
7644         add_namelet, add_class_decl, print_class_decls, process_file,
7645         help): Constify a char*.
7646
7647         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
7648         push_int_const, find_constant_wide, find_constant_index,
7649         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
7650         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
7651         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
7652         emit_if, emit_goto, emit_jsr, call_cleanups,
7653         make_class_file_name): Add static prototypes.
7654         (generate_bytecode_return, generate_bytecode_insns): Pass a
7655         NULL_PTR, not a NULL_TREE.
7656
7657         * jv-scan.c: Include "jcf.h".
7658         (main): Declare using DEFUN macro.
7659
7660         * jvspec.c (find_spec_file, lang_specific_pre_link,
7661         lang_specific_driver): Add prototypes.
7662         (find_spec_file): Constify a char*.
7663
7664         * keyword.gperf (hash, java_keyword): Add prototypes.
7665
7666         * lang.c (lang_print_error): Add static prototype.
7667         (lang_init): Prefer memcpy over bcopy to avoid casts.
7668
7669         * lex.c (yylex): Add static prototype.
7670
7671         * parse-scan.y: Include "lex.c" earlier.
7672
7673         * parse.h: Remove redundant declaration for `yylex'.
7674
7675         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
7676         labeled_block_contains_loop_p): Add static prototypes.
7677         (not_accessible_p): Make static to match prototype.
7678
7679         * verify.c (start_pc_cmp): Don't needlessly cast away const.
7680
7681 Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7682
7683         * parse.y (check_method_redefinition): Changed leading comment.
7684         (check_abstract_method_definitions): New function.
7685         (java_check_abstract_method_definitions): New function.
7686         (java_check_regular_methods): Call it.
7687         (verify_constructor_super): Fixed indentation.
7688         (lookup_method_invoke): Likewise.
7689
7690 Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7691
7692         * parse.y (method_header): Return a null pointer if the current
7693         class node is null.
7694         (finish_method_declaration): Return if the current function decl
7695         is null.
7696         (source_start_java_method): Likewise.
7697         (java_method_add_stmt): Likewise.
7698
7699 Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7700
7701         * class.c (emit_register_class): Removed unnecessary call to
7702         start_sequence.
7703         * parse.y (labeled_block_contains_loop_p): Removed unused local
7704         variable.
7705
7706 Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7707
7708         * parse.y (java_refold): Added prototype.
7709
7710 Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7711
7712         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
7713         (java_stabilize_reference): Removed unnecessary `else'.
7714         (java_complete_lhs): Set flag to remember boolean. Call
7715         java_refold. Added comments.
7716         (java_decl_equiv): New function.
7717         (binop_compound_p): Likewise.
7718         (java_refold): Likewise.
7719         (patch_unaryop): Striped static field access assigned to decl and
7720         op. Changed promotion scheme for ++/-- operators.
7721         (search_loop): New function.
7722         (labeled_block_contains_loop_p): Likewise.
7723         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
7724         comment.
7725         (patch_bc_statement): Call search_loop. Fixed comment.
7726
7727 1999-08-14  Anthony Green  <green@cygnus.com>
7728
7729         * expr.c (java_lang_expand_expr): Mark static array data as
7730         referenced.
7731
7732 Tue Aug 10 00:28:31 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7733
7734         * jvgenmain.c (main): NUL-terminate name_obstack.
7735
7736 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7737
7738         * check-init.c (check_bool2_init, done_alternative): Add static
7739         prototypes.
7740
7741         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
7742         (add_method, build_utf8_ref, build_class_ref,
7743         append_gpp_mangled_type, layout_class_method): Constify a char*.
7744
7745         * decl.c (push_promoted_type, make_binding_level): Add static
7746         prototypes.
7747         (push_promoted_type, pushdecl): Constify a char*.
7748
7749         * except.c (find_handler_in_range, link_handler,
7750         check_start_handlers): Add static prototypes.
7751
7752         * expr.c (process_jvm_instruction): Constify a char*.
7753
7754         * gjavah.c (main): Constify a char*.
7755
7756         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
7757         Constify a char*.
7758
7759         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
7760         static prototypes.
7761         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
7762         munge, print_ents): Constify a char*.
7763
7764         * jcf-dump.c (disassemble_method): Constify a char*.
7765         (print_constant_pool, print_exception_table): Add static prototypes.
7766         (print_constant, print_exception_table, main, disassemble_method):
7767         Constify a char*.
7768
7769         * jcf-io.c (find_classfile, find_class): Likewise.
7770
7771         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
7772         (set_source_filename, predefined_filename_p): Add static prototypes.
7773         (set_source_filename, get_constant, get_class_constant,
7774         find_in_current_zip): Constify a char*.
7775
7776         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
7777         static prototypes.
7778         (add_entry, add_path, jcf_path_classpath_arg,
7779         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
7780
7781         * jcf-reader.c (get_attribute, jcf_parse_preamble,
7782         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
7783         jcf_parse_one_method, jcf_parse_methods,
7784         jcf_parse_final_attributes): Add static prototypes.
7785         (get_attribute): Constify a char*.
7786
7787         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
7788         jcf_dependency_add_target, jcf_path_classpath_arg,
7789         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
7790
7791         * jv-scan.c (main): Constify a char*.
7792         (gcc_obstack_init): Add prototype arguments.
7793
7794         * jvgenmain.c (gcc_obstack_init): Likewise.
7795         (main): Constify a char*.
7796
7797         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
7798         static prototypes.
7799         (put_decl_string, lang_print_error): Constify a char*.
7800         (lang_init): Remove redundant extern prototype.
7801
7802         * mangle.c (emit_unicode_mangled_name): Constify a char*.
7803
7804         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
7805         Add static prototypes.
7806         (get_type_from_signature): Constify a char*.
7807
7808         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
7809         Add static prototypes.
7810         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
7811         (verify_jvm_instructions): Constify a char*.
7812
7813         * xref.c (xref_flag_value): Likewise.
7814
7815         * xref.h (xref_flag_value): Likewise.
7816
7817         * zextract.c (makeword, makelong): Add static prototypes.
7818         (makeword, makelong): Constify a uch*.
7819
7820 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7821
7822         * lang.c (java_dummy_print): Constify a char*.
7823         (lang_print_error): Likewise.
7824         (lang_init): Remove redundant prototype for `print_error_function'.
7825         (lang_init_source): Likewise.
7826         (lang_identify): Constify a char*.
7827
7828 1999-08-09  Tom Tromey  <tromey@cygnus.com>
7829
7830         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
7831         (WORDS_TO_LONG): Likewise.
7832         (WORDS_TO_DOUBLE): Likewise.
7833
7834 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7835
7836         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
7837
7838         * expr.c (java_stack_pop, java_array_data_offset,
7839         build_java_throw_out_of_bounds_exception, case_identity,
7840         build_java_check_indexed_type): Add static prototypes.
7841         (linenumber_table, expand_invoke, expand_java_field_op,
7842         build_primtype_type_ref, expand_byte_code): Constify a char*.
7843
7844         * java-tree.h (build_primtype_type_ref, linenumber_table):
7845         Constify a char*.
7846         (java_lang_expand_expr): Add prototype.
7847
7848         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
7849         `java_lang_expand_expr'.
7850
7851         * lex.c (java_lex_error): Constify a char*.
7852         (java_get_unicode, java_read_char, java_allocate_new_line,
7853         java_unget_unicode, java_sneak_unicode): Prototype.
7854
7855         * parse-scan.y (current_class, package_name, method_declarator,
7856         report_class_declaration, yyerror): Constify a char*.
7857
7858         * parse.h (java_report_errors): Prototype.
7859         (yyerror): Constify a char*.
7860
7861         * parse.y (classitf_redefinition_error, check_modifiers,
7862         parse_jdk1_1_error, lookup_package_type,
7863         lookup_package_type_and_set_next, get_printable_method_name,
7864         purify_type_name): Constify a char*.
7865         (build_super_invocation, maybe_generate_finit,
7866         verify_constructor_super, parser_add_interface,
7867         add_superinterfaces, jdep_resolve_class, note_possible_classname,
7868         java_complete_expand_methods, java_expand_finals,
7869         cut_identifier_in_qualified, java_stabilize_reference,
7870         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
7871         merge_string_cste): Prototype.
7872         (single_type_import_declaration, yyerror,
7873         variable_redefinition_error, build_array_from_name,
7874         build_unresolved_array_type, check_class_interface_creation,
7875         resolve_class, complete_class_report_errors,
7876         note_possible_classname, read_import_dir,
7877         find_in_imports_on_demand, resolve_package, fix_constructors,
7878         check_deprecation, lookup_method_invoke,
7879         maybe_build_primttype_type_ref, array_constructor_check_entry):
7880         Constify a char*.
7881         (java_complete_expand_methods, java_expand_finals): Make static.
7882         (convert_narrow): Remove static prototype.
7883
7884 Tue Aug  3 20:21:20 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
7885
7886         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
7887
7888 1999-08-02  Richard Henderson  <rth@cygnus.com>
7889
7890         * decl.c: Include defaults.h instead of expr.h.
7891         * parse.y: Likewise.
7892
7893 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
7894
7895         * java/decl.c (start_java_method): Change all uses of
7896         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7897         Ensure expr.h is included.
7898         * java/expr.c (pop_arguments): Ditto.
7899         * java/parse.y (expand_start_java_method): Ditto.
7900
7901 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7902
7903         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
7904
7905 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
7906
7907         * decl.c: Include "function.h".
7908         * except.c: Likewise.
7909         * parse.y: Likewise.
7910         * Makefile.in: Update dependencies.
7911
7912 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7913
7914         * expr.c (build_java_soft_divmod): Provide a default case in switch.
7915         (java_lang_expand_expr): Mark parameters `target', `tmode' and
7916         `modifier' with ATTRIBUTE_UNUSED.
7917
7918         * gjavah.c (process_file): Add braces around ambiguous `else'.
7919
7920         * jcf-dump.c (print_access_flags, localvar_free): Change return
7921         type to void.
7922
7923         * parse.y (java_complete_expand_method): Initialize variable
7924         `exception_copy'.
7925         (resolve_qualified_expression_name): Likewise for `field_decl'.
7926         (patch_method_invocation): Likewise for `class_to_search'.
7927         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
7928         (patch_assignment): Likewise for `lhs_type'.
7929
7930         * verify.c (verify_jvm_instructions): Remove unused variable
7931         `caller'.
7932
7933 1999-07-25  Richard Henderson  <rth@cygnus.com>
7934
7935         * decl.c (va_list_type_node): New.
7936
7937 1999-07-25  Anthony Green  <green@cygnus.com>
7938
7939         * gjavah.c (print_stub): New function.
7940         (METHOD_IS_NATIVE): New macro.
7941         (print_mangled_classname): Make static.
7942         (HANDLE_END_FIELD): Don't emit fields during stub generation.
7943         (process_file): Perform stub generation.
7944         (HANDLE_METHOD): Don't emit class decls during stub
7945         generation.
7946         (HANDLE_END_METHOD): Take into account stub generation.
7947         (print_method_info): Handle stub generation.
7948         (print_stub): New function.
7949         (print_cxx_classname): Make signature consistant with others.
7950         (help): Describe -stubs option.
7951         (main): Create stub file.
7952         (version): Use version.c.
7953         (print_full_cxx_name): New function.
7954         (print_c_decl): Use print_full_cxx_name.
7955
7956 Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7957
7958         * check-init.c (check_init): Handle MAX_EXPR.
7959
7960 1999-07-15  Andrew Haley  <aph@cygnus.com>
7961
7962         * lang.c (flag_use_divide_subroutine): New variable.
7963         * typeck.c: (convert_ieee_real_to_integer): Bounds check
7964         fp-to-integer conversion.
7965         (convert): Call convert_ieee_real_to_integer when flag_fast_math
7966         is not set.
7967
7968         * expr.c (build_java_soft_divmod): New function.
7969         (build_java_binop): Call build_java_soft_divmod if
7970         flag_use_divide_subroutine is set.
7971         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
7972         soft_lrem_node: new builtin functions.
7973         (init_decl_processing) Initialize the new builtins.
7974         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
7975         soft_lrem_node: new builtin functions.
7976         (build_java_soft_divmod): New function.
7977         * parse.y: Call build_java_soft_divmod if
7978         flag_use_divide_subroutine is set.
7979         * parse.c: Rebuilt.
7980
7981         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
7982         a --specs= arg) even if not linking.
7983         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
7984         -fuse-divide-subroutine
7985
7986 Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7987
7988         * parse.y (resolve_and_layout): Check methods only once.
7989         (resolve_qualified_expression_name): Verify thrown exceptions
7990         compatibility.
7991         (check_thrown_exceptions): Reject exceptions thrown in
7992         initializer. Error message tuned.
7993
7994 1999-07-14  Andrew Haley  <aph@cygnus.com>
7995
7996         * expr.c (expand_expr): Do not return the last statement in a
7997         block as the block's value.
7998
7999 Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8000
8001         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
8002         CALL_EXPR, to avoid order of evaluation changes.
8003
8004 Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8005
8006         * parse.y (qualify_ambiguous_name): Do not use
8007         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
8008
8009 Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8010
8011         * check-init.c (check_init): Handle MAX_EXPR.
8012         * expr.c (force_evaluation_order): Force method call arguments to
8013         be evaluated in left-to-right order.
8014         * parse.y (qualify_ambiguous_name): Loop again to qualify
8015         NEW_ARRAY_EXPR properly.
8016
8017 Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8018
8019         * parse.y (patch_invoke): Resolve unresolved invoked method
8020         returned type.
8021         (qualify_ambiguous_name): STRING_CST to qualify expression for
8022         type name resolution.
8023
8024 1999-06-24  Andrew Haley  <aph@cygnus.com>
8025
8026         * class.c (finish_class): Whenever a deferred method is
8027         output, rescan the list of methods to see if a new candidate for
8028         output can be found.
8029
8030 1999-06-28  Tom Tromey  <tromey@cygnus.com>
8031
8032         * jvspec.c (lang_specific_driver): Recognize --help.
8033
8034 Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8035
8036         * parse.y (resolve_package): Fixed bogus return statement.
8037         (patch_method_invocation): Resolve method invocation beginning with
8038         a package name qualifier.
8039
8040 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8041
8042         * Make-lang.in (java.stage1): Depend on stage1-start.
8043         (java.stage2): Likewise for stage2-start.
8044         (java.stage3): Likewise for stage3-start.
8045         (java.stage4): Likewise for stage4-start.
8046
8047 Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8048
8049         * parse.y (java_complete_lhs): When doing cross referencing, don't
8050         try to keep file location on a WFL expanded as a CALL_EXPR.
8051
8052 Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8053
8054         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
8055         compiling to class file a void method with an empty method body.
8056         As a side effect, the bytecode backend will generate the
8057         appropriate `return' instruction.
8058
8059 Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8060
8061         * parse.y (lookup_package_type_and_set_next): New function prototype.
8062         (resolve_package): Search current and imported packages.
8063         (lookup_package_type_and_set_next): New function.
8064
8065 1999-06-22  Andrew Haley  <aph@cygnus.com>
8066
8067         * verify.c (verify_jvm_instructions): Check for pending blocks
8068         before invalid PC test and opcode switch, not after.
8069
8070 1999-06-21  Andrew Haley  <aph@cygnus.com>
8071
8072         * except.c (find_handler_in_range): The upper limit for exception
8073         ranges is exclusive, not inclusive: (start <= pc < end).
8074         (link_handler): find child pointer which points to outer by
8075         searching sibling list: previous code incorrectly assumed that
8076         outer->outer->first_child must point to outer.
8077         * verify.c (verify_jvm_instructions): FIXME added to code for
8078         `athrow'.
8079         (verify_jvm_instructions): Do not assume that the last block
8080         processed in a subroutine is a block which ends with a `ret'
8081         instruction.  With some control flows it is possible that the last
8082         block ends with an `athrow'.
8083
8084 Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8085
8086         * parse.y (qualify_ambiguous_name): Reorganized the post
8087         evaluation of non WFL leading expression nodes.
8088
8089 Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8090
8091         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
8092         CONVERT_EXPR.
8093
8094 Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8095
8096         * parse.y (qualify_ambiguous_name): Handle qualified expression
8097         beginning with a STRING_CST.
8098
8099 Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8100
8101         * parse.y (register_fields): Set DECL_INITIAL on both
8102         pre-initialized static and public fields.
8103         (resolve_field_access): Static field access expressions to always
8104         use pointer types.
8105         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
8106         qualification. CONVERT_EXPR to be resolved as an expression name.
8107         (java_complete_lhs): Identify and access qualified final
8108         initialized field in switch statement case expression.
8109         (fold_constant_for_init): Pre-initialized field decl constant to
8110         be folded.
8111
8112 Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8113
8114         * parse.y (note_possible_classname): Mark returned node with
8115         QUALIFIED_P only if the original class name contained a '/'.
8116
8117 Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
8118
8119         * Make-lang.in (gcjh): More parallel build fixes.
8120
8121 1999-06-03  Mike Stump  <mrs@wrs.com>
8122
8123         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
8124
8125 Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
8126
8127         * except.c (link_handler): Chain exception handlers in order.
8128
8129 Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
8130
8131         * expr.c (expand_byte_code): Fill unreachable bytecode regions
8132         with nops and process as usual in order to always set correct EH
8133         ranges.  Emit detailed warnings about unreachable bytecodes.
8134
8135 Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
8136
8137         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
8138         constant.
8139
8140 Fri May 28 18:22:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8141
8142         * parse.y (lookup_field_wrapper): Unified returned value to NULL
8143           or the searched field decl.
8144
8145 Fri May 28 11:34:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8146
8147         * parse.y (fold_constant_for_init): Convert numerical constant
8148         values to the type of the assigned field.
8149
8150 Thu May 27 19:57:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8151
8152         * expr.c (lookup_field): Relaxed the test on class loading error
8153         detection.
8154         * parse.y (fold_constant_for_init): Enabeled old code.
8155
8156 Wed May 26 18:06:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8157
8158         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
8159         decide the validity of the cast of a java.lang.Cloneable reference
8160         to an array.
8161         (patch_conditional_expr): Fixed first argument passed to
8162         binary_numeric_promotion.
8163
8164 Wed May 26 15:33:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8165
8166         * parse.y (qualify_ambiguous_name): Take into account that a
8167         CONVERT_EXPR might specify a type as a WFL.
8168
8169 Tue May 25 15:06:13 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8170
8171         * parse.y (patch_assignment): Save the rhs before using it as an
8172         argument to _Jv_CheckArrayStore.
8173
8174 Tue May 25 11:23:59 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8175
8176         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
8177
8178 Mon May 24 13:26:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8179
8180         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
8181         floating point litteral only when the exponent indicator has been
8182         parsed.
8183
8184 Sat May 22 13:54:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8185
8186         * parse.y (formal_parameter:): Construct argument tree list
8187         element even if a yet unsupported final parameter was encountered.
8188
8189 Tue May 18 00:28:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8190
8191         * parse.y (finish_method_declaration): Issue errors for native or
8192         abstract methods declared with a method body, as well as for non
8193         native or non abstract methods with no method body.
8194
8195 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8196
8197         * class.c (build_utf8_ref): Initialize variable `field'.
8198
8199         * decl.c (init_decl_processing): Initialize variable `field'.
8200
8201         * expr.c (build_known_method_ref): Mark parameters `method_type',
8202         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
8203         (process_jvm_instruction): Likewise for parameter `length'.
8204
8205         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
8206         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
8207         ATTRIBUTE_UNUSED.
8208
8209         * parse.y (maybe_generate_clinit): Remove unused variable
8210         `has_non_primitive_fields'.
8211         (find_in_imports_on_demand): Initialize variables `node_to_use'
8212         and `cl'.
8213         (patch_binop): Likewise for variable `prom_type'.
8214         (patch_unaryop): Likewise for variable `prom_type'.
8215
8216         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
8217
8218         * xref.c (xref_table): Add missing initializer.
8219
8220 1999-05-14  Tom Tromey  <tromey@cygnus.com>
8221
8222         * java-except.h (struct eh_range): Removed unused `next' member.
8223         * verify.c (verify_jvm_instructions): Call check_nested_ranges
8224         after adding all exception handlers.  Sort exception ranges in
8225         order of start PC.
8226         (struct pc_index): New structure.
8227         (start_pc_cmp): New function.
8228         * except.c (add_handler): Return `void'.  Don't call link_handler;
8229         instead construct an ordinary linked list and do range
8230         coalescing.
8231         (check_nested_ranges): New function.
8232         (link_handler): Changed interface to allow merging of eh_ranges.
8233         Split overlapping ranges.  Return `void'.
8234
8235 Mon May 17 19:20:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8236
8237         * parse.y (constructor_block_end:): New rule, tagged <node>.
8238         (constructor_body:): Use `constructor_block_end' instead of
8239         `block_end'.
8240
8241 Mon May 17 18:01:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8242
8243         * parse.y (statement_nsi:): Pop `for' statement block.
8244         (java_complete_lhs): Labeled blocks containing no statement are
8245         marked as completing normally.
8246
8247 Fri May 14 12:31:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8248
8249         * xref.c (xref_set_current_fp): New function, defined.
8250         * xref.h (xref_set_current_fp): New function, prototyped.
8251
8252 Fri May 14 11:57:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8253
8254         * check-init.c (check_init): Take into account that
8255         LABELED_BLOCK_STMT can be empty.
8256
8257 Thu May 13 18:30:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8258
8259         * parse.y (java_check_regular_methods): Warning check on not
8260         overriding methods with default access in other packages does not
8261         apply to `<clinit>'.
8262         (java_complete_lhs): If block body is an empty_stmt_node, replace
8263         it by NULL_TREE. This prevents gcc from generating an irrelevant
8264         warning.
8265
8266 Thu May 13 13:23:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8267
8268         * check-init.c (check_init): Removed code accepting to see things
8269         falling through default:, when doing xrefs.
8270         * java-tree.h (do_not_fold): New global variable, declared.
8271         * parse.y (do_not_fold): New global variable, defined.
8272         (java_complete_expand_method): Set `do_not_fold' to the value of
8273         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
8274         and reinstall them after them have been purged; do not check for
8275         initializations; do not issue missing return errors.
8276         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
8277         when doing xrefs.
8278         (patch_binop): Skip the fold part when doing xrefs.
8279         (build_string_concatenation): Skip the concatenation part when
8280         doing xrefs.
8281         (patch_synchronized_statement): Do not generate a try-finally when
8282         doing xrefs.
8283         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
8284         and keep the location where the throw was seen.
8285         * typeck.c (convert): When `do_not_fold' is set, do not attempt
8286         any treatment on the converted node an simply return a NOP_EXPR of
8287         the targeted type.
8288         * xref.c (xref_get_data): New function, defined.
8289         * xref.h (xref_get_data): New function, declared.
8290         (XREF_GET_DATA): Use xref_get_data.
8291
8292 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8293
8294         * gjavah.c (print_include): Cast the result of `strlen' to int
8295         when comparing against a signed value.
8296         (add_namelet): Likewise.
8297
8298 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8299
8300         * expr.c (expand_invoke): Mark parameter `nargs' with
8301         ATTRIBUTE_UNUSED.
8302         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
8303
8304         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
8305         ATTRIBUTE_UNUSED.
8306
8307         * jcf-reader.c (get_attribute): Cast a value to long
8308         when comparing against a signed expression.  Likewise.
8309
8310         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
8311         HOST_BITS_PER_CHAR.
8312
8313 1999-05-11  Andrew Haley  <aph@cygnus.com>
8314
8315         * parse.y (source_end_java_method): If the current method contains
8316         any exception handlers, force asynchronous_exceptions: this is
8317         necessary because signal handlers in libjava may throw exceptions.
8318         * decl.c (end_java_method): Ditto.
8319
8320 1999-05-11  Tom Tromey  <tromey@cygnus.com>
8321
8322         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
8323         flags.
8324         * jvspec.c (THREAD_NAME): Removed.
8325         (GC_NAME): Likewise.
8326         (MATHLIB): Likewise.
8327         (WITHLIBC): Likewise.
8328         (GCLIB): Likewise.
8329         (THREADLIB): Likewise.
8330         (MATH_LIBRARY): Likewise.
8331         (lang_specific_driver): Don't add `-l' options to command line.
8332         Instead, add a single --specs option.  Recognize `-L' options and
8333         use them to search for spec file.
8334         (find_spec_file): New function.
8335         (SPEC_FILE): New define.
8336
8337 Tue May 11 11:46:36 1999  Dave Brolley  <brolley@cygnus.com>
8338
8339         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
8340         cpplib-enabled build.
8341
8342 1999-05-05  Per Bothner  <bothner@cygnus.com>
8343
8344         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
8345         temporarily zero it while calling rest_of_decl_compilation.
8346
8347         * java-tree.h (string_ptr_type_node):  Add declaration.
8348         * decl.c:  Define and initialize string_ptr_type_node.
8349         * parse.y (patch_string_cst):  Use string_ptr_type_node.
8350
8351         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
8352         * parse.y (for_statement):  Now unconditionally exit_block.
8353         (finish_labeled_statement):  No longer exit_block if for-loop.
8354         (patch_loop_statement):  Check harder if the loop is already labeled.
8355
8356         * parse.y (patch_initialized_static_field):  Removed function.
8357         (maybe_generate_clinit):  Removed special handling for interfaces.
8358         (java_complete_expand_methods):  Do a preliminary java_complete_tree
8359         on <clinit> to determine if it can be removed.
8360         (java_complete_expand_method):  Remove special handling for <clinit>.
8361         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
8362         optimize if we get back empty_stmt_node.
8363         For MODIFY_EXPR, re-do checking of static initializers.
8364         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
8365         For VAR_DECL, pass correct context.
8366
8367         * verify.c (verify_jvm_instructions):  Better error messages.
8368
8369 1999-05-03  Tom Tromey  <tromey@cygnus.com>
8370
8371         * parse-scan.y (interface_declaration): Call
8372         report_class_declaration for interfaces.
8373
8374 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
8375
8376         * Makefile.in: Remove -v from bison command lines.
8377
8378 Fri Apr 30 17:54:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8379
8380         * check-init.c (check_init): Exclude a case of error when doing
8381         xrefs.
8382         * class.c (layout_class_method): Don't generate the error message
8383         twice when compiling from source.
8384         * lang-options.h: Added `-Wredundant-modifers' and
8385         `-Wunusupported-jdk11' flags and help text.
8386         * lang.c (lang_decode_option): Added support for
8387         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
8388         flag_static_local_jdk11 and flag_redundant set accordingly.
8389         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
8390         * parse.h (EXPR_WFL_ADD_COL): New macro.
8391         (DECL_END_SOURCE_LINE): Likewise.
8392         (DECL_INHERITED_SOURCE_LINE): Likewise.
8393         * parse.y (static_ref_err): New function, prototyped.
8394         (CCB_TK): Now tagged <operator>.
8395         (class_body:): Remember the location of the closing '}' of a class
8396         definition when doing xrefs.
8397         (block:): Likewise.
8398         (block_end:): Likewise.
8399         (create_class): Remember the location of the inherited class
8400         identifier when doing xrefs.
8401         (register_fields): Added test on first operand of `init' before
8402         testing it TREE_CODE.
8403         (method_header): Store the location of the class identifier in the
8404         class decl when doing xrefs.
8405         (finish_method_declaration): Don't combine first/last method line
8406         when doing xref.
8407         (java_check_regular_methods): Warning check on not overriding
8408         methods with default access on other packages move before check on
8409         static methods. Initialization of `aflags' also moved up.
8410         (resolve_expression_name): Call static_ref_err to report the error.
8411         (static_ref_err): New function, implemented.
8412         (resolve_field_access): Returned simplified static field access
8413         when doing xrefs.
8414         (resolve_qualified_expression_name): Check for illegal use of
8415         static fields in a non static context. Call static_ref_err to
8416         report error in various places.
8417         (java_complete_tree): Do not fold initialized static fields when
8418         doing xrefs.
8419         (java_complete_lhs): Likewise.
8420
8421 1999-04-29  Anthony Green  <green@cygnus.com>
8422
8423         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
8424         create internal labels.
8425         (lookup_label): Ditto.
8426
8427 Sat Apr 24 16:50:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8428
8429         * class.c (layout_class_method): Generate <clinit>'s rtl for
8430         interfaces.
8431         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8432         for interfaces' <clinit>.
8433         * expr.c (lookup_field): Search for fields in interfaces.
8434         (expand_invoke): Fixed indentation.
8435         (expand_java_field_op): Likewise. Use IS_CLINIT.
8436         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
8437         (IS_CLINIT): New macro.
8438         * parse.y (type_declaration:): Call maybe_generate_clinit after an
8439         interface was parsed.
8440         (maybe_generate_clinit): Don't generate if the current class is an
8441         interface with only fields of primitive types.
8442         (reset_method_name): Use IS_CLINIT.
8443         (java_complete_expand_method): Expand <clinit> when it exists for
8444         interfaces. Use IS_CLINIT.
8445         (resolve_expression_name): Use DECL_CONTEXT instead of
8446         current_class to build static field references.
8447         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
8448         ARRAY_REF when doing xreferencing.
8449         (check_final_assignment): Fixed typo in leading comment. Use
8450         IS_CLINIT.
8451         (patch_array_ref): Don't fully expand array references when
8452         xreferencing.
8453         (patch_return): Use IS_CLINIT.
8454         (patch_throw_statement): Likewise.
8455
8456 1999-04-22  Tom Tromey  <tromey@cygnus.com>
8457
8458         * Make-lang.in (JAVA_SRCS): Added check-init.c.
8459
8460 Wed Apr 21 11:13:36 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8461
8462         * decl.c (predef_filenames, predef_filenames_size): New globals
8463         (init_decl_processing): predef_filenames and predef_filenames_size
8464         initialized.
8465         * java-tree.h (predef_filenames, predef_filenames_size): Declared
8466         extern.
8467         * jcf-parse.c (predefined_filename_p): New function.
8468         (yyparse): Check that files on the command line are specified only
8469         once and issue a warning otherwise.
8470         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
8471         * parse.y (source_end_java_method): Nullify NOP method bodies, to
8472         avoid a gcc warning with -W -Wall turned on.
8473         (java_expand_classes): Abort if errors were encountered.
8474         (java_complete_lhs): If the cross reference flag is set, wrap
8475         field DECL node around a WFL when resolving expression name.
8476
8477 Mon Apr 19 14:44:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8478
8479         * lang.c (lang_decode_option): Fixed returned value when parsing
8480         `-fxref=...' and `-Wall'.
8481         * parse.y (source_end_java_method): Do not generate code when
8482         flag_emit_xref is set.
8483         (resolve_expression_name): Do not build static field access when
8484         flag_emit_xref is set.
8485         (resolve_field_access): No special treatment on `length' when
8486         flag_emit_xref is set. Do not build qualified static field access
8487         when flag_emit_xref is set.
8488         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
8489         when flag_emit_xref is set.
8490         (patch_assignment): Do not generate array store runtime check when
8491         flag_emit_xref is set.
8492         * xref.c (xref_flag_value): Fixed function declaration
8493         indentation.
8494         (xset_set_data): New function.
8495         * xref.h (xref_set_data): Added prototype for new function.
8496         (typedef struct xref_flag_table): New field data.
8497         (XREF_GET_DATA): New macro.
8498
8499 1999-04-19  Tom Tromey  <tromey@cygnus.com>
8500
8501         * xref.h (enum): Removed trailing comma.
8502
8503         * parse.y (resolve_qualified_expression_name): Added missing
8504         `break'.
8505
8506 Thu Apr 15 13:08:03 1999  Anthony Green  <green@cygnus.com>
8507
8508         * gjavah.c: New prototypes for java_float_finite and
8509         java_double_finite.
8510
8511 Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8512
8513         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
8514         references.
8515
8516 Tue Apr  6 23:15:52 1999  Jeffrey A Law  (law@cygnus.com)
8517
8518         * Makefile.in (TREE_H): Add tree-check.h.
8519         (RTL_H): Add genrtl.h.
8520
8521 Tue Apr  6 15:15:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8522
8523         * parse.y (patch_assignment): Added ArrayStoreException runtime
8524         check.
8525
8526 1999-04-06  Per Bothner  <bothner@cygnus.com>
8527
8528         * expr.c (pop_type_0):  New function.
8529         (pop_type):  Use pop_type_0.
8530         * java-tree.h (pop_type_0):  New declaration.
8531         * verify.c (verify_jvm_instructions):  Check return instructions.
8532
8533         * parse.y (patch_binop):  Don't fold if non-constant and emiting
8534         class files.
8535
8536 Mon Apr  5 16:06:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8537
8538         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
8539
8540         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
8541         (main_jcf): Don't define.
8542         (process_file): Don't set `main_jcf'.
8543
8544         * java-tree.h (main_jcf): Don't declare.
8545
8546         * jcf-parse.c (main_jcf): Add static definition.
8547
8548         * lang.c (main_jcf): Don't define.
8549
8550 Mon Apr  5 15:43:51 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8551
8552         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
8553
8554         * decl.c (copy_lang_decl): Likewise for `bcopy'.
8555
8556         * jcf-depend.c: Include "config.h", not <config.h>.
8557
8558         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
8559         `bcopy' to PTR.
8560
8561         * jcf-path.c: Include "config.h", not <config.h>.
8562
8563         * lex.c: Don't include various system header files.
8564         (java_init_lex): Cast the argument of `bzero' to PTR
8565
8566         * parse-scan.y (java_push_parser_context): Likewise.
8567
8568         * parse.y (java_push_parser_context): Likewise.
8569         (patch_bc_statement): Match format specifier to variable argument.
8570
8571         * xref.c: Don't include <stdio.h>.
8572
8573 Mon Apr  5 11:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8574
8575         * parse.y (struct parser_ctxt *ctxp): Now global.
8576         (declare_local_variables): Use WFL compound value for the
8577         declaration source line value, when doing cross-referencing.
8578
8579 1999-03-31  Tom Tromey  <tromey@cygnus.com>
8580
8581         * gjavah.c (print_field_info): Allow constants of other types.
8582         (print_include): Generate include when new name is proper prefix
8583         of already printed name.
8584         (add_namelet): Likewise.
8585         (cxx_keyword_subst): New function.
8586         (print_method_info): Use it.
8587         (print_field_name): New function.
8588         (get_field_name): New function.
8589         (print_field_info): Use get_field_name and print_field_name.
8590
8591 Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8592
8593         * Makefile.in (keyword.h): Generate using gperf language 'C', not
8594         'KR-C', so gperf uses the `const' keyword on strings.
8595
8596         * keyword.gperf (java_keyword): Const-ify a char*.
8597
8598 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8599
8600         * parse.y (patch_bc_statement): Fixed identation and a bogus
8601         `printf' format.
8602
8603 Tue Mar 30 11:29:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8604
8605         * parse.y (patch_assignment): Allow static variables in other
8606         classes to be assigned.
8607
8608 Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8609
8610         * class.c (maybe_add_interface): Remove unused variable
8611         `interface_binfo'.
8612         (make_class_data): Use = for assignment, not ==.  Likewise.
8613         (emit_register_classes): Remove unused variable `decl'.
8614
8615         * lex.c: Fix comment so as not to contain an embedded `/*'.
8616
8617         * verify.c (verify_jvm_instructions): Remove unused variable
8618         `self_type'.
8619
8620 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
8621
8622         * parse.y (complete_loop_body):  Rename to finish_loop_body.
8623         (complete_labeled_statement):  Rename to finish_labeled_statement.
8624         (complete_for_loop):  Rename to finish_for_loop.
8625         (complete_method_declaration):  Rename to finish_method_declaration.
8626
8627         * java-tree.h (continue_identifier_node):  New global node.
8628         * decl.c:  Define and initialize continue_identifier_node.
8629         * parse.y (generate_labeled_block):  Remove - no longer needed.
8630         (build_loop_body):  Use continue_identifier_node for continue block.
8631         (finish_labeled_statement):  Also do pop_labeled_block actions.
8632         (java_complete_lhs):  POP_LOOP even if error.
8633         (build_labeled_block):  Special handling for continue_identifier_node.
8634         (patch_loop_statement):  Re-organize.
8635         (patch_bc_statement):  Re-write.
8636
8637 Sat Mar 27 15:13:21 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8638
8639         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
8640         using a WFL compound value.
8641         * parse.y (xref.h): Include.
8642         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
8643         WFL compound value.
8644         (register_fields): Set WFL compound value to lineno if doing
8645         xrefs.
8646         (java_complete_expand_method): Call expand_xref if flag_emit_xref
8647         is set.
8648         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
8649         * xref.h (expand_xref): Prototype renamed from xref_generate.
8650
8651 Sat Mar 27 14:16:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8652
8653         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
8654         (GET_CURRENT_BLOCK): New macro.
8655         * parse.y (current_static_block): New global variable.
8656         (method_body:): Define action.
8657         (complete_method_declaration): Set current_function_decl to NULL
8658         when work on the current method is done.
8659         (declare_local_variables): Use GET_CURRENT_BLOCK.
8660         (java_method_add_stmt): Likewise.
8661         (java_complete_expand_method): Disable the use of `this' when
8662         expanding <clinit>.
8663         (enter_a_block): If no current method exist, use
8664         current_static_block to link static initializer blocks.
8665         (exit_block): Rewritten to use current_static_block when no current
8666         method decl exists.
8667         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
8668         (patch_return): Forbid the use of `return' in static initializers.
8669         (patch_throw_statement): Fixed indentation. Issue specific error
8670         for uncaught thrown checked exception in static initializer
8671         blocks. Removed FIXME.
8672
8673 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
8674
8675         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
8676         Link gcj from gcc.o.
8677
8678 Tue Mar 23 10:48:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8679
8680         * parse.y (find_applicable_accessible_methods_list): When dealing
8681         with interface: ensure that a given interface or java.lang.Object
8682         are searched only once.
8683
8684 Tue Mar 23 10:05:27 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8685
8686         * gjavah.c (print_c_decl): Remove unused argument `flags'.
8687
8688         * jcf-dump.c (print_access_flags): Add braces around if-else.
8689
8690         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
8691         COMBINE_INPUTS.
8692
8693         * lex.c (build_wfl_node): Add static prototype.
8694
8695         * lex.h (build_wfl_node): Remove static prototype.
8696
8697         * parse.y: Include lex.c early enough to declare everything needed.
8698         Ensure calls to `build_wfl_node' pass the proper arguments.
8699         (create_class): Remove unused variable `super_decl'.
8700         (get_printable_method_name): Initialize variable `name'.
8701
8702 Mon Mar 22 20:14:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8703
8704         * Changelog: Fixed 1999-03-22 typos.
8705         * lang.c (lang_decode_option): Fixed typo in error string in the
8706         XARG section.
8707
8708 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8709
8710         * Makefile.in (JAVA_OBJS): Added entry xref.o.
8711         (xref.o): New rule.
8712         * java-tree.h (flag_emit_xref): Declared extern.
8713         * lang.c (xref.h): Included.
8714         (flag_emit_xref): New global variable.
8715         (lang_decode_option): Added support for -fxref.
8716         * xref.c: Created.
8717         * xref.h: Likewise.
8718
8719 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
8720
8721         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
8722         linked with.
8723
8724 Sun Mar 21 08:30:30 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8725
8726         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
8727         $(srcdir)/../system.h and $(JAVA_TREE_H).
8728         (jcf-io.o): Depend on $(JAVA_TREE_H).
8729         (mangle.o): Likewise.
8730
8731         * check-init.c (check_cond_init): Add static prototype.
8732
8733         * class.c (build_java_method_type, hashUtf8String,
8734         make_field_value, get_dispatch_vector, get_dispatch_table,
8735         append_gpp_mangled_type, mangle_static_field): Likewise.
8736         (strLengthUtf8): Hide unused definition.
8737         (hashUtf8String): Const-ify.
8738         (make_field_value): Un-ANSI-fy.
8739
8740         * constants.c: Move inclusion of jcf.h above java-tree.h.
8741         (set_constant_entry, find_class_or_string_constant,
8742         find_name_and_type_constant, get_tag_node,
8743         build_constant_data_ref): Add static prototype.
8744
8745         * decl.c (push_jvm_slot, builtin_function,
8746         lookup_name_current_level): Likewise.
8747         (builtin_function): Const-ify.
8748
8749         * except.c (expand_start_java_handler, expand_end_java_handler):
8750         Add static prototype.
8751
8752         * expr.c (flush_quick_stack, push_value, pop_value,
8753         java_stack_swap, java_stack_dup, build_java_athrow,
8754         build_java_jsr, build_java_ret, expand_java_multianewarray,
8755         expand_java_arraystore, expand_java_arrayload,
8756         expand_java_array_length, build_java_monitor, expand_java_pushc,
8757         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
8758         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
8759         expand_compare, expand_test, expand_cond, expand_java_goto,
8760         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
8761         expand_java_field_op, java_push_constant_from_pool): Likewise.
8762
8763         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
8764         (build_java_arraynull_check): Mark parameters `node' and `type'
8765         with ATTRIBUTE_UNUSED.
8766         (note_label): Likewise for parameter `current_pc'.
8767         (expand_java_call, expand_java_ret): Hide unused definition.
8768
8769         * java-tree.h (make_class, build_constants_constructor,
8770         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
8771         init_outgoing_cpool, register_class, emit_register_classes,
8772         java_layout_seen_class_methods): Prototype.
8773         (unicode_mangling_length): Const-ify.
8774         (append_gpp_mangled_name, append_gpp_mangled_classtype,
8775         emit_unicode_mangled_name, format_int, format_uint,
8776         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
8777         jcf_print_utf8_replace, open_class): Prototype.
8778
8779         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
8780         <stdio.h>.  Include tree.h/java-tree.h.
8781         (utf8_equal_string usage, process_class): Add static prototype.
8782         (open_class): Don't prototype this here.
8783         (utf8_equal_string): Match arguments to format specifiers.
8784         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
8785         TABLE_SWITCH, disassemble_method): Likewise.
8786
8787         * jcf-io.c: Include tree.h/java-tree.h.
8788         (open_class, find_classfile, jcf_print_utf8,
8789         jcf_print_utf8_replace): Const-ify.
8790
8791         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
8792         parse_class_file): Add static prototype.
8793         (find_in_current_zip): Match definition to existing static
8794         prototype.
8795
8796         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
8797         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
8798         finish_jcf_block, define_jcf_label, get_jcf_label_here,
8799         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
8800         write_chunks, adjust_typed_op, generate_bytecode_conditional,
8801         generate_bytecode_return, perform_relocations, init_jcf_state,
8802         init_jcf_method, release_jcf_state, generate_classfile):
8803         Add static prototype.
8804         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
8805         (make_class_file_name): Const-ify.
8806
8807         * jcf.h (find_classfile): Const-ify.
8808
8809         * jv-scan.c (reset_report): Remove prototype.
8810
8811         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
8812         (error): Rewrite to allow varargs.
8813
8814         * lang.c (lang_f_options): Const-ify.
8815
8816         * lex.c (java_parse_escape_sequence): Add static prototype.
8817         (java_allocate_new_line): Match definition to existing static
8818         prototype.
8819
8820         * mangle.c Include tree.h/java-tree.h.
8821         (unicode_mangling_length, emit_unicode_mangled_name,
8822         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
8823
8824         * parse.h (jdep_code): Remove trailing comma in enumeration.
8825         (java_get_line_col): Move prototype outside of !JC1_LITE test.
8826         (reset_report): Add prototype.
8827
8828         * verify.c (push_pending_label, merge_types): Add static
8829         prototypes.
8830
8831         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
8832
8833 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8834
8835         * parse.y (find_applicable_accessible_methods_list): Extend the
8836         search to superinterfaces when relevant.
8837         (search_applicable_methods_list): New function.
8838
8839 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8840
8841         * class.c (unmangle_classname): Implemented stricter testing
8842         before setting the QUALIFIED_P flag on an identifier.
8843
8844 Tue Mar 16 15:15:41 1999  Per Bothner  <bothner@cygnus.com>
8845
8846         * parse.y (java_complete_lhs):  Call force_evaluation_order
8847         after patch_newarray.
8848         (patch_binop):  Don't call fold if there are side effects.
8849
8850 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8851
8852         * parse.y (java_stabilize_reference): Use save_expr instead of
8853         building a SAVE_EXPR node.
8854         (java_complete_lhs): Patch the resulting string of the `+='
8855         operator (if necessary) and complete the RHS after having built
8856         the cast.
8857
8858 Mon Mar 15 12:18:29 1999  Per Bothner  <bothner@cygnus.com>
8859
8860         * class.c (make_class):  Don't set CLASS_P here (because
8861         this function is also called by build_java_array_type).
8862         (push_class):  Set CLASS_P here instead.
8863         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
8864
8865         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
8866         context.  If the context is class, perfer "super" over "synchronized".
8867         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
8868
8869         * parse.y (create_class):  Don't call parser_check_super here;
8870         it is not robust.  Always wait until later.
8871
8872         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
8873         match what JDK 1.2 does), but don't set ACC_PUBLIC.
8874
8875 Sat Mar 13 18:16:34 1999  Per Bothner  <bothner@cygnus.com>
8876
8877         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
8878         * lex.h (UNGETC):  Change misleading macro.
8879
8880 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8881
8882         * parse.y (java_stabilize_reference): Return NODE when patching a
8883         COMPOUND_EXPR.
8884         (java_complete_lhs): Put parenthesis around truth values.
8885
8886 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8887
8888         * class.c (layout_class_method): Don't make rtl for interface
8889         methods.
8890         * parse.h (GET_TYPE_NAME): New macro.
8891         * parse.y (if_then_statement:): Fixed indentation.
8892         (if_then_else_statement:): Likewise.
8893         (for_statement:): Fixed spacing.
8894         (try_statement:): Fixed indentation.
8895         (create_interface): Don't force interfaces to be abstract.
8896         (method_header): Abstract methods are OK in interfaces.
8897         (declare_local_variables): Fixed typo in comment.
8898         (java_complete_expand_method): Fixed indentation.
8899         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
8900         non accessible fields.
8901         (java_stabilize_reference): New function.
8902         (java_complete_lhs): Fixed indentation. Use
8903         java_stabilize_reference in compound assignement. Insert the
8904         cast. If not processing `+' fix string constants before processing
8905         binop.
8906
8907 Fri Mar 12 19:42:55 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8908
8909         * constants.c (find_class_or_string_constant): Cast variable `j'
8910         to a `jword' when comparing against one.
8911
8912         * expr.c (java_lang_expand_expr): Remove unused variables
8913         `has_finally_p' and `op0'.
8914
8915         * gjavah.c (print_field_info): Cast a value to jint when comparing
8916         against one.  Likewise for a jlong.
8917         (add_namelet): Likewise cast a `sizeof' to an int when comparing
8918         against a signed quantity.
8919
8920         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
8921         (print_signature): Don't needlessly dereference variable `str'
8922
8923         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
8924         `max_locals' with ATTRIBUTE_UNUSED.
8925         (jcf_parse_class): Likewise for variable `index'.
8926
8927         * parse.h (reverse_jdep_list): Remove static prototype.
8928
8929         * parse.y (build_jump_to_finally): Remove prototype and definition.
8930         (reverse_jdep_list): Add static prototype.
8931
8932         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
8933         `assignment' and `expr_decl'.
8934
8935         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
8936
8937 1999-03-12  Andrew Haley  <aph@cygnus.com>
8938
8939         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
8940         we'll need a directory separator and a null character.
8941
8942 Wed Mar 10 23:20:11 1999  Per Bothner  <bothner@cygnus.com>
8943
8944         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
8945
8946   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8947
8948         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
8949         interfaces.
8950
8951 Fri Mar  5 15:17:29 1999  Per Bothner  <bothner@cygnus.com>
8952
8953         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
8954
8955         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
8956
8957         * class.c (layout_class_method):  A static method in a base class
8958         is never overridden, so treat it like it doesn't exist.
8959         However, do complain about private non-static method overriding
8960         public static method.
8961
8962         * parse.y:  Don't set unused INITIALIZED_P flag.
8963         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
8964
8965         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
8966         (build_array_from_name):  Re-order &index[string] to &string[index].
8967
8968         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
8969         error_mark (it might catch more errors, but it is more likely to lose).
8970
8971 Sat Mar  6 11:17:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8972
8973         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
8974         (parse-scan.o): Depend on toplev.h.
8975
8976         * class.c (make_method_value): Add prototype.  Make it static.
8977         Remove unused second argument, caller changed.
8978
8979         * expr.c (java_lang_expand_expr): Remove unused variable
8980         `return_label'.
8981
8982         * java-tree.h: Don't prototype find_in_current_zip.
8983         Add prototypes for verify_constant_pool, start_java_method,
8984         end_java_method, give_name_to_locals, expand_byte_code,
8985         open_in_zip, set_constant_value, find_constant1, find_constant2,
8986         find_utf8_constant, find_string_constant, find_class_constant,
8987         find_fieldref_index, find_methodref_index, write_constant_pool,
8988         count_constant_pool_bytes and encode_newarray_type.
8989
8990         * jcf-dump.c: Remove unused variable `LONG_temp'.
8991
8992         * jcf-parse.c: Include parse.h.
8993         (jcf_parse_source): Remove unused parameter, all callers changed.
8994         (jcf_figure_file_type): Add static prototype.
8995         (find_in_current_zip): Likewise.  Also remove unused parameter,
8996         all callers changed.
8997         (read_class): Initialize variable `saved_pos'.
8998
8999         * jcf-reader.c (jcf_parse_preamble): Mark variables
9000         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
9001
9002         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
9003         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
9004         (java_parse_doc_section): Initialize variable `seen_star'.
9005         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
9006         (java_lex_error): Mark parameters `msg' and `forward' with
9007         ATTRIBUTE_UNUSED.
9008         (java_get_line_col): Mark parameters `filename' and `line' with
9009         ATTRIBUTE_UNUSED.
9010
9011         * parse-scan.y: Include toplev.h.
9012         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
9013
9014         * parse.h: use `struct JCF', not plain `JCF'.
9015         (java_parser_context_save_global, java_expand_classes
9016         java_parser_context_restore_global, java_parse): Add prototypes.
9017
9018         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
9019         `node'.
9020
9021 Wed Feb 24 16:13:59 1999  Per Bothner  <bothner@deneb.cygnus.com>
9022
9023         *  check-init.c (check_init):  COPYN takes word count, not bit count.
9024
9025 Fri Feb 26 14:06:21 1999  Per Bothner  <bothner@cygnus.com>
9026
9027         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
9028         explicit build_decl.  (Avoids crash in reload when optimizing.)
9029
9030 Thu Feb 25 21:05:04 1999  Per Bothner  <bothner@cygnus.com>
9031
9032         * decl.c (complete_start_java_method):  Handle synchronized method
9033         even when compiling from bytecode.
9034
9035 1999-02-26  Tom Tromey  <tromey@cygnus.com>
9036
9037         * gjavah.c (add_class_decl): Only generate `#include' if outer
9038         class is not the name of the class we are processing.  Correctly
9039         append `.h' in #include.
9040         (process_file): Clean up newlines around generated `#include's.
9041         (decode_signature_piece): Correctly handle inner classes.
9042         (struct include): New structure.
9043         (all_includes): New global.
9044         (print_include): New function.
9045         (add_class_decl): Use it.
9046         (process_file): Likewise.
9047         (add_class_decl): Generate include for java-array.h if array
9048         seen.
9049         (process_file): Don't generate java-array.h include.
9050
9051         * gjavah.c (add_namelet): Check for standard package names here.
9052         (add_class_decl): Don't check for standard package names here.
9053
9054 1999-02-25  Tom Tromey  <tromey@cygnus.com>
9055
9056         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
9057         When reading a zip file, only use strncmp if both strings are
9058         bigger than the buffer length.  Initialize `k' when looping
9059         through zip file.
9060
9061 1999-02-24  Tom Tromey  <tromey@cygnus.com>
9062
9063         * gjavah.c (struct namelet): New structure.
9064         (add_namelet): New function.
9065         (print_namelet): New function.
9066         (print_class_decls): Use add_namelet and print_namelet to generate
9067         namespaces and not classes.
9068         (method_printed): New global.
9069         (HANDLE_END_METHOD): Examine method_printed.
9070         (print_method_info): Set method_printed when required.  Print
9071         error if function to be ignored is marked virtual.  Handle $finit$
9072         method.
9073         (METHOD_IS_FINAL): New macro.
9074         (print_field_info): Use it.
9075         (HANDLE_METHOD): Clear method_printed.
9076         (method_pass): New global.
9077         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
9078         (process_file): Do two passes over both fields and methods.
9079         (HANDLE_METHOD): Examine method_pass.
9080         (root): New global.
9081         (add_class_decl): New function.
9082         (print_class_decls): Don't scan over entire constant pool.
9083
9084 1999-02-23  Tom Tromey  <tromey@cygnus.com>
9085
9086         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
9087         disable linking in that case.
9088
9089 1999-02-20  Tom Tromey  <tromey@cygnus.com>
9090
9091         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
9092         not 0x1f.
9093
9094 Sun Feb 21 14:56:11 1999  Per Bothner  <bothner@cygnus.com>
9095
9096         * decl.c (build_result_decl), java-tree.h:  New method.
9097         (complete_start_java_method):  Handle synchronized methods.
9098         Don't build DECL_RESULT here.  (Ordering dependency problem.)
9099         (start_java_method):  Call build_result_decl here instead  ...
9100         * parse.y (java_complete_expand_method):  ... and here.
9101         (expand_start_java_method): Don't call complete_start_java_method here.
9102         (java_complete_expand_method):  Call it here instead.
9103         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
9104         * java-tree.h:  ... here.
9105
9106         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
9107         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
9108         for ARRAY_REF - it doesn't work when array bounds are checked.
9109         (patch_array_ref):  Handle it here instead.
9110
9111         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
9112
9113 Fri Feb 19 15:35:01 1999  Per Bothner  <bothner@cygnus.com>
9114
9115         Force left-to-right evaluation of binary operations etc.
9116         * expr.c (force_evaluation_order), java-tree.h:  New function.
9117         * parse.y (java_complete_lhs):  Pass binary operations, procedure
9118         calls, and ARRAY_REFs to force_evaluation_order.
9119         (various):  Set TREE_SIDE_EFFECTS more carefully.
9120
9121         Tolerate random (non-UTF8) encoding in comments without complaining.
9122         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
9123         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
9124
9125         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
9126         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
9127
9128         * parse.y (java_complete_lhs):  Ignore an empty statement in a
9129         COMPOUND_EXPR.  Don't complain about empty statement after return.
9130
9131 Fri Feb 19 13:00:56 1999  Per Bothner  <bothner@cygnus.com>
9132
9133         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
9134         in TREE_LIST - just chain the POINTER_TYPEs together.
9135         (resolve_class):  If type already resolved, return decl.
9136         After resolving, update TREE_TYPE(class_type), and name (if array).
9137         * parse.h (do_resolve_class), parse.y:  Make non-static.
9138         * class.c (maybe_layout_super_class):  Take this_class argument.
9139         Do do_resolve_class if necessary.
9140         (layout_class, layout_class_methods): Adjust calls appropriately.
9141         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
9142         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
9143         * typeck.c (build_java_array_type):  Don't call layout_class.
9144
9145 Wed Feb 17 15:47:20 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9146
9147         * parse.y (check_pkg_class_access): Allow private class access
9148         within the same package.
9149         (strip_out_static_field_access_decl): New function.
9150         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
9151         operator argument before testing its nature.
9152
9153 Wed Feb  3 12:38:43 1999  Per Bothner  <bothner@cygnus.com>
9154
9155         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
9156         (TRY_EXPR):  Simplify - it no longer has a finally clause.
9157         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
9158         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9159         * expr.c (java_lang_expand_expr):  Likewise.
9160         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
9161         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
9162         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
9163         (build_try_statement):  Remove finally parameter and handling.
9164         (build_try_finally_statement):  New function.
9165         (patch_try_statement):   No longer need to support finally clause.
9166         (try_statement):  Update grammar action rules.
9167         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
9168         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9169
9170 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
9171
9172         * jcf-parse.c (get_constant): Add braces around computation of 'd'
9173         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
9174
9175 1999-02-17  Andrew Haley  <aph@cygnus.com>
9176
9177         * class.c (build_utf8_ref): Back out broken patch which was
9178         intended to to output signatures using '.' as a separator.
9179
9180         * class.c (make_class_data): Output signatures using '.' as a
9181         separator, rather than '/'.
9182         (mangled_classname): Likewise.
9183         (make_field_value): Likewise.
9184         (make_method_value): Likewise.
9185         * constants.c (alloc_class_constant): Likewise.
9186         * expr.c (build_invokeinterface): Likewise.
9187
9188 Thu Feb 11 21:25:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9189
9190         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
9191         of an ancient workaround.
9192
9193 Wed Feb 10 23:27:33 1999  Jeffrey A Law  (law@cygnus.com)
9194
9195         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
9196         here anymore.
9197
9198 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9199
9200         * lex.c (yylex): Encode \0 as UTF8.
9201
9202 1999-02-10  Tom Tromey  <tromey@cygnus.com>
9203
9204         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
9205         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
9206         (libgcj_zip): Renamed.
9207         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
9208         LIBJAVA_ZIP_FILE.
9209         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
9210
9211         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
9212         (GC_NAME): Renamed -lgc to -lgcjgc.
9213
9214 Tue Feb  9 19:31:09 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9215
9216         * lex.c (java_lang_cloneable): Initialize.
9217         * parse.y (java_lang_cloneable): New static variable.
9218         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
9219         doing one more qualification round.
9220         (valid_ref_assignconv_cast_p): Reject null source or
9221         destination. Allow an array to be cast into java.lang.Cloneable.
9222         (patch_cast): Swapped two first arguments to first call to
9223         valid_ref_assignconv_cast_p.
9224
9225 Mon Feb  8 11:50:50 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9226
9227         * parse.h: DECL_P renamed JDECL_P.
9228         * parse.y: DECL_P replaced by JDECL_P.
9229         (build_array_from_name): Always use pointer's type.
9230         (patch_bc_statement): Extra code to search continue target in a
9231         for loop. Fixed comments. Continue target is current loop when
9232         unlabeled.
9233
9234 1999-02-05  Andrew Haley  <aph@cygnus.com>
9235
9236         * class.c (make_class_data): The superclass of an interface should
9237         be null, not class Object.
9238
9239         * lex.c (java_lex): Sign extend hex literals.
9240
9241 1999-02-04  Andrew Haley  <aph@cygnus.com>
9242
9243         * class.c (build_utf8_ref): Output signatures using '.' as a
9244         separator, rather than '/'.
9245         (make_class_data): Likewise.
9246
9247 Wed Feb  3 22:50:17 1999  Marc Espie <Marc.Espie@liafa.jussieu.fr>
9248
9249         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
9250         mkstemp.o.  Get them from libiberty now.
9251
9252 Tue Feb  2 19:49:12 1999  Jeffrey A Law  (law@cygnus.com)
9253
9254         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
9255
9256 Tue Feb  2 20:04:50 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9257
9258         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
9259         from libiberty.h
9260
9261 Tue Feb  2 10:39:47 1999  Per Bothner  <bothner@cygnus.com>
9262
9263         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
9264         * jcf-write.c (generate_bytecode_return):  New function.
9265         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
9266
9267         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
9268         generate special [fd]const_[01] instructions.
9269
9270         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
9271
9272         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
9273         handling OPCODE_lookupswitch or OPCODE_tableswitch.
9274
9275 Mon Feb  1 20:44:47 1999  Per Bothner  <bothner@cygnus.com>
9276
9277         * parse.y (patch_method_invocation):  Handle calling static methods,
9278         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
9279
9280         * parse.y (java_complete_lhs):  Don't complain about unreachable
9281         exit condition in a do-while statement.
9282
9283 Fri Jan 29 18:19:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9284
9285         * lex.c (java_read_char): Fixed utf8 decoding.
9286         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
9287         range.
9288         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
9289         comments. Local variable `all_primitive' is gone. Broadened
9290         acceptance of `0' to floating point targets. `long' can now be
9291         widened to `double' or `float'.
9292         (valid_method_invocation_conversion_p): Added leading
9293         comment. Fixed tabulation.
9294         (build_string_concatenation): Optimize out left or right empty
9295         string constants.
9296
9297 Thu Jan 28 18:51:26 1999  Per Bothner  <bothner@cygnus.com>
9298
9299         * jcf-write.c (localvar_alloc):  Only emit entry for
9300         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
9301         (generate_bytecode_insns):  Only call put_linenumber if
9302         debug_info_level > DINFO_LEVEL_NONE.
9303         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
9304         is specified, add -g1 (for compatibility wih javac).
9305
9306 Thu Jan 28 09:17:51 1999  Hans-Peter Nilsson  <hp@axis.se>
9307
9308         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
9309         gjavah.o, check-init.o, jv-scan.o
9310
9311 Mon Feb  1 09:50:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9312
9313         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
9314
9315         * gjavah.c: Include config.h and system.h.
9316
9317         * javaop.h (inline): Don't define, its handled by system.h.
9318         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
9319         from `inline' to `static inline'.
9320
9321         * jcf.h (inline): Don't define, its handled by system.h.
9322
9323         * lex.c (inline): Likewise.
9324
9325 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
9326
9327         * lang-specs.h: Map -Qn to -fno-ident.
9328
9329 Fri Jan 29 16:51:56 1999  Richard Henderson  <rth@cygnus.com>
9330
9331         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
9332
9333 1999-01-29  Tom Tromey  <tromey@cygnus.com>
9334
9335         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
9336         then cast it to Object before calling `append' method.
9337
9338 Thu Jan 28 14:45:39 1999  Per Bothner  <bothner@cygnus.com>
9339
9340         * check-init.c (check_bool2_init, check_bool_init, check_init):
9341         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
9342         * jcf-write.c (generate_bytecode_insns):  Likewise.
9343
9344 Thu Jan 28 11:50:11 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9345
9346         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
9347         * parse.y (patch_cast): Allow a boolean to be cast into a
9348         boolean.
9349
9350 Wed Jan 27 10:19:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9351
9352         * parse.y: (class_declaration:): Fixed indentation.
9353         (class_member_declaration:): Extra `;' after field declaration now
9354         accepted.
9355         (interface_declaration:): Removed debug messages in error reports.
9356         (patch_binop): Nodes created and returned inherit the orignal
9357         node's COMPOUND_ASSIGN_P flag value.
9358         (patch_cast): Fix cast from char to floating point.
9359
9360 Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
9361
9362         * except.c, java-except.h (expand_resume_after_catch): new
9363         function.
9364         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
9365         to branch back to main flow of control after a catch block.
9366
9367 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9368
9369         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
9370         $(srcdir)/../system.h.
9371         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
9372         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
9373         (jcf-write.o): Likewise.
9374         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9375         (mangle.o): Depend on $(srcdir)/../toplev.h.
9376         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9377         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9378
9379         * class.c: Include output.h and parse.h.
9380         (mangled_classname): Add the `const' keyword to a char*.
9381         (find_named_method): Hide unused function definition.
9382         (build_utf8_ref): Change type of variable `c' to unsigned char.
9383         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
9384         (build_class_ref): Add the `const' keyword to a char*.
9385         (layout_class_method): Remove unused variable `buf'.
9386
9387         * decl.c (find_local_variable): Remove unused variable `rtl'.
9388         (pushdecl): Likewise for variables `different_binding_level' and
9389         `oldglobal'.
9390         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
9391         (maybe_build_cleanup): Likewise for parameter `decl'.
9392
9393         * except.c (expand_start_java_handler): Mark parameter `range'
9394         with ATTRIBUTE_UNUSED.
9395
9396         * expr.c: Include except.h.
9397         (pop_type): Remove unused variable `i'.
9398         (pop_value): Likewise for variables `n_words' and `i'.
9399         (expand_java_arrayload): Likewise for variable `convert'.
9400         (java_lang_expand_expr): Likewise for variables `op0', `type',
9401         `mode', `unsignedp', `node' and `elements'.
9402         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
9403         `eh_ranges'.
9404         (process_jvm_instruction): Add a `const' qualifier to a char*.
9405
9406         * gjavah.c (output_directory): Add the `const' keyword to a char*.
9407         (temp_directory): Likewise.
9408         (print_c_decl): Likewise.
9409         (print_method_info): Likewise.
9410         (decode_signature_piece): Likewise.
9411         (print_mangled_classname): Likewise.
9412
9413         * java-except.h: Provide prototypes for maybe_start_try,
9414         maybe_end_try and add_handler.
9415
9416         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
9417         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
9418         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
9419         init_expr_processing, push_super_field, init_class_processing,
9420         can_widen_reference_to, class_depth, verify_jvm_instructions,
9421         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
9422         set_local_type, merge_type_state, push_type, load_type_state,
9423         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
9424         emit_unicode_mangled_name): Add prototypes.
9425
9426         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
9427         (print_signature_type): Use ISDIGIT, not isdigit.
9428         (print_signature): Remove unused variable `j'.
9429
9430         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
9431         int when comparing against one.
9432
9433         * jcf-parse.c: Include toplev.h.
9434
9435         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
9436         (localvar_free): Remove unused variable `i'.
9437         (generate_bytecode_conditional): Likewise for variable `kind'.
9438
9439         * jv-scan.c: Include config.h and system.h.  Remove redundant
9440         OS header and gansidecl.h includes.
9441         (warning): Add the `const' keyword to a char*.  Also add
9442         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
9443         __STDC__, when determining whether to use ANSI-isms.
9444         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
9445         (xmalloc): Don't redundantly prototype here.
9446         (main): Remove unused parameter `envp'.  Also fix the arguments
9447         passed to function `fatal' to match the format specifier.
9448
9449         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
9450
9451         * mangle.c: Include toplev.h.
9452         (emit_unicode_mangled_name): Declare parameter `len'.
9453
9454         * parse.y (parse_warning_context): Add the `const' keyword to a
9455         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
9456         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
9457         (issue_warning_error_from_context): Add the `const' keyword to
9458         a char*.
9459         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
9460         not `__STDC__' for whether to use ANSI-isms.
9461
9462         * typeck.c (incomplete_type_error): Mark parameters `value' and
9463         `type' with ATTRIBUTE_UNUSED.
9464         (parse_signature_type): Use ISDIGIT, not isdigit.
9465
9466         * verify.c (check_pending_block): Add the `const' keyword to a char*.
9467         (verify_jvm_instructions): Likewise.  Remove unused variables
9468         `field_name' and `default_val'.
9469
9470         * zextract.c: Include config.h and system.h.  Remove redundant
9471         OS header includes.
9472
9473         * zipfile.h: Prototype `read_zip_archive'.
9474
9475 Thu Jan 21 16:00:06 1999  Andrew Haley  <aph@cygnus.com>
9476
9477         * typeck.c (convert): Allow conversions to void type: some
9478         optimizations in gcc do this.
9479
9480 Thu Jan 21 15:21:49 1999  Andrew Haley  <aph@cygnus.com>
9481
9482         * typeck.c (convert_ieee_real_to_integer): New function.
9483         (convert): When not using fast-math and using hardware fp, convert
9484         an IEEE NaN to zero.
9485
9486 1999-01-18  Andrew Haley  <aph@cygnus.com>
9487
9488         * parse.y (patch_binop): Do a type conversion from signed to
9489         unsigned and then back to signed when a ">>>" is found.
9490
9491 Sun Jan 17 22:34:22 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9492
9493         * java-tree.h: (check_for_initialization): Added prototype.
9494         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
9495         * parse.y (do_resolve_class): Removed unused locals.
9496         (read_import_dir): Likewise.
9497         (resolve_qualified_expression_name): Array creation
9498         expressions are valid primary expressions.
9499         (qualify_ambiguous_name): Likewise.
9500         (patch_synchronized_statement): Removed unused local.
9501
9502 Sun Jan 17 21:55:42 1999  Jeffrey A Law  (law@cygnus.com)
9503
9504         * Makefile.in (zextract.o): Add dependencies.
9505
9506         * Makefile.in: Do not put ^Ls at the start of a line.
9507
9508 Fri Jan 15 20:16:20 1999  Per Bothner  <bothner@cygnus.com>
9509
9510         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
9511         sub-type the result of the call that gets the exception value.
9512
9513         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
9514         don't call finish_class.
9515
9516         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
9517         clear found before continuing.
9518
9519         * verify.c (verify_jvm_instructions):  On an array load, allow
9520         and handle top of stack to be TYPE_NULL.
9521
9522         * gjavah.c (generate_access):  Translate Java package private or
9523         protected access to C++ public, but with a comment.
9524
9525 1999-01-13  Andrew Haley  <aph@cygnus.com>
9526
9527         * expr.c (generate_name): Name prefix changed to avoid clashes
9528         with assembler temp labels.
9529
9530         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
9531         MODIFY_EXPR.  Without this, code for the assignement may not be
9532         generated at all and the synchronized statement will read an
9533         uninitialized variable.
9534
9535 Wed Jan 13 01:24:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9536
9537         * class.c (maybe_layout_super_class): Fixed returned value.
9538         * lex.c: Added 1999 to the copyright.
9539         (java_init_lex): Initialize java_lang_imported.
9540         * lex.h: Added 1999 to the copyright.
9541         * parse.h: Added 1999 to the copyright.
9542         (REGISTER_IMPORT): Fixed typo in trailing macro.
9543         (CURRENT_OSB): New macro.
9544         (struct parser_ctxt): New fields osb_depth, osb_limit.
9545         * parse.y (java_lang_id): New global variable.
9546         (type_import_on_demand_declaration): Don't import java.lang.* twice.
9547         (array_creation_expression:): Use CURRENT_OSB.
9548         (dims:): Uses a stack to keep track of array dimensions.
9549         (cast_expression:): Use CURRENT_OSB.
9550         (find_expr_with_wfl): Return NULL if node found doesn't meet the
9551         conditions.
9552         (register_fields): Fixed typos in comment.
9553         (check_method_redefinition): Fixed comment indentation.
9554         (java_check_regular_methods): Set saved found wfl to NULL after
9555         having reinstalled it in the previously found DECL_NAME.
9556
9557 Sun Jan 10 13:36:14 1999  Richard Henderson  <rth@cygnus.com>
9558
9559         * gjavah.c (java_float_finite): Use a union to do type punning.
9560         (java_double_finite): Likewise.
9561
9562 Sat Jan  9 11:25:00 1999  Per Bothner  <bothner@cygnus.com>
9563
9564         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
9565         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
9566         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
9567         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
9568         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
9569         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
9570
9571 Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
9572
9573         * check-init.c (check_init):  If compiling to native, we don't
9574         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
9575
9576 1999-01-08  Tom Tromey  <tromey@cygnus.com>
9577
9578         * parse-scan.y (variable_declarator_id): Set or increment
9579         bracket_count.
9580         (bracket_count): New global.
9581         (formal_parameter): Handle case where bracket pairs trail variable
9582         declarator id.
9583
9584 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
9585
9586         * jcf-parse.c (yyparse): variable len changed from a char to an
9587         int to prevent overflow.
9588
9589 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
9590
9591         * java-tree.h:  Declare read_class.
9592         * jcf-parse.c (read_class):  New function.
9593         (load_class):  Now just call read_class.
9594
9595         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
9596         * jcf-parse.c (parse_source_file):  Declare save_error_count,
9597         which is needed by java_parse_abort_on_error macro,
9598         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
9599
9600         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
9601         constructor, if initializing a static field.
9602         (patch_new_array_init):  Set TREE_CONSTANT if it is.
9603         * expr.c (java_lang_expand_expr):  For a static array constructor
9604         of primitive elements, allocate the array itself statically.
9605         Disabled until we can set the vtable field statically.
9606
9607         * check-init.c:  New file.  Checks for definite assignment.
9608         * Makefile.in (JAVA_OBJS):  Add check-init.o.
9609         * parse.y (java_complete_expand_method): Call check_for_initialization.
9610         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
9611
9612 Wed Jan  6 14:53:10 1999  Graham <grahams@rcp.co.uk>
9613
9614         * parse.y : include system.h instead of including
9615         standard headers directly with the exception of <dirent.h>.
9616
9617 Wed Jan  6 16:20:06 1999  Per Bothner  <bothner@cygnus.com>
9618
9619         * lex.h:  Moved static function declarations to lex.c,
9620         to shut up some -Wall warnings.
9621         * lex.c:  Static function declarations moved here.
9622         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
9623
9624 Tue Jan  5 22:15:40 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9625
9626         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
9627
9628 Tue Dec 22 11:25:19 1998  Per Bothner  <bothner@cygnus.com>
9629
9630         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
9631         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
9632
9633         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
9634         (localvar_alloc):  Change return type to void,
9635         (emit_unop):  Remove unused variable size.
9636
9637         * jcf-write.c (struct jcf_block):  Add new union.
9638         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
9639         (call_cleanups):  New functions.
9640         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
9641         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
9642         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
9643         * lang.c (lang_init):  Call using_eh_for_cleanups.
9644         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
9645         completing operands to patch_synchronized_statement.
9646         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
9647         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
9648         WITH_CLEANUP_EXPR instead of TRY_EXPR.
9649
9650 Sun Dec 20 16:15:44 1998  John F. Carr  <jfc@mit.edu>
9651
9652         * Make-lang.in: Comment out control-Ls; they upset some makes.
9653
9654 1998-12-18  Tom Tromey  <tromey@cygnus.com>
9655
9656         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
9657         consistently.
9658
9659 1998-12-17  Tom Tromey  <tromey@cygnus.com>
9660
9661         * parse.y (DIR_SEPARATOR): New define.
9662         (check_class_interface_creation): Use it.
9663
9664         * parse-scan.y (report_main_declaration): Recognize
9665         `java.lang.String' in argument to main.
9666
9667 Wed Dec 16 16:18:59 1998  Per Bothner  <bothner@cygnus.com>
9668
9669         * parse.y (create_interface):  Remove bogus test.
9670
9671 Wed Dec 16 14:42:19 1998  Per Bothner  <bothner@cygnus.com>
9672
9673         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
9674         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
9675
9676 1998-12-16  Tom Tromey  <tromey@cygnus.com>
9677
9678         * parse-scan.y (qualified_name): Use correct sprintf format.
9679
9680 1998-12-15  Tom Tromey  <tromey@cygnus.com>
9681
9682         * gjavah.c (print_field_info): Changed how most negative number is
9683         printed.
9684
9685 Mon Dec 14 18:49:29 1998  Per Bothner  <bothner@cygnus.com>
9686
9687         * parse.y (fold_constant_for_init):  New function.
9688         (resolve_expression_name):  Don't replace static final
9689         constant-initialized fields by its value.
9690         (java_complete_lhs):  New.  Same as java_complete_tree, except does
9691         not replace static final constant-initialized fields by their values.
9692         (register_fields):  If there is an initializer, set DECL_INITIAL and
9693         MODIFY_EXPR_FROM_INITIALIZATION_P.
9694         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
9695         Only call patch_initialized_static_field if
9696         MODIFY_EXPR_FROM_INITIALIZATION_P.
9697         (patch_initialized_static_field):  If not valid constant, clear
9698         DECL_INITIAL.
9699
9700         * parse.y (lookup_field_wrapper):  Fix thinko.
9701
9702         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
9703         set and restore global lineno.
9704
9705 1998-12-14  Tom Tromey  <tromey@cygnus.com>
9706
9707         * gjavah.c (print_field_info): If value to print is the smallest
9708         value of its size, then print as hex to avoid later warnings from
9709         C++ compiler.
9710
9711 1998-12-14  Tom Tromey  <tromey@cygnus.com>
9712
9713         * gjavah.c (decompile_method): Decompile `return null'.
9714         (process_file): Generate `#pragma interface'.
9715         (method_declared): New global.
9716         (print_method_info): Set it.
9717         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
9718         (print_method_info): Handle abstract methods.
9719
9720 Sun Dec 13 17:31:40 1998  Per Bothner  <bothner@cygnus.com>
9721
9722         * parse.y (patch_method_invocation):  If class_decl is null
9723         (e.g. an array type), use original type.
9724
9725         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
9726         errors about uncaught exception from clone (of array, specifically).
9727
9728 1998-12-13  Tom Tromey  <tromey@cygnus.com>
9729
9730         * gjavah.c (decompile_method): Handle all types of `return'
9731         opcode.  Decompile `return this' and `return'.
9732         (method_access): New global.
9733         (print_method_info): Set it.
9734         (decompile_method): Don't decompile a synchronized method.
9735
9736 1998-12-13  Tom Tromey  <tromey@cygnus.com>
9737
9738         * jcf-reader.c (jcf_parse_one_method): Recognize
9739         HANDLE_END_METHOD.
9740         * gjavah.c (HANDLE_END_METHOD): New macro.
9741         (HANDLE_CODE_ATTRIBUTE): New macro.
9742         (decompile_method): New function.
9743         (print_method_info): Don't print `;\n' at end of function decl.
9744         Include java-opcodes.h.
9745         (decompiled): New global.
9746
9747 Sat Dec 12 20:13:19 1998  Per Bothner  <bothner@cygnus.com>
9748
9749         * class.c (build_class_ref):  Handle PRIMTYPE.class if
9750         flag_emit_class_files.
9751         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
9752         if flag_emit_class_files.
9753         * parse.y (java_complete_tree):  Pre-liminary support for
9754         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
9755
9756         * parse.y (patch_synchronized_statement):   Don't call monitorexit
9757         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
9758
9759         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
9760
9761         * zipfile.h (opendir_in_zip):  New declaration.
9762         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
9763         (opendir_in_zip):  New function, using code from open_in_zip.
9764         (open_in_zip):  Call opendir_in_zip.
9765         (find_class):  Remove no-longer-used do_class_file parameter,
9766         but add source_ok parameter.  Change logic so if we find a .java file,
9767         we don't look for .class in later classpath emtries.
9768         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
9769         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
9770         * gjavah.c: Update call to find_class.
9771         * jcf-dump.c:  Likewise.
9772
9773         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
9774         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
9775         nothing if body is empty_stmt_node.
9776         Various little fixes so SP gets correctly adjusted.
9777         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
9778         For CALL_EXPR, test if static first.
9779         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
9780         such as the ones we create for Object and Class.
9781         Set and restore current_function_decl.
9782         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
9783         (note_possible_classname):  New function.
9784         (read_import_entry):  Removed.  Merged with read_import_dir.
9785         (read_import_dir):  Don't call find_class - that only gives us
9786         the first classpath entry having the needed package.
9787         Use the struct buffer data structure from buffer.h.
9788         (read_import_dir, find_in_imports_on_demand):  The remembered
9789         class names now use '.' (not '/') as package separator.
9790
9791         * parse.y (java_complete_expand_methods):  Call write_classfile
9792         here, and not in java_expand_classes (which only gets first class).
9793
9794 Sat Dec 12 19:46:04 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9795
9796         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
9797         (register_fields):  If a static fields has an initializer, just
9798         chain it on ctxp->static_initialized, and handle later.
9799         (java_complete_expand_methods):  Force <clinit> first.
9800         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
9801         - it's already been completed.
9802         (patch_initialized_static_field):  New function.
9803         (java_complete_field):  Call it.
9804
9805 Sat Dec 12 19:21:11 1998  Per Bothner  <bothner@cygnus.com>
9806
9807         * expr.c (encode_newarray_type, build_new_array):  New functions.
9808         * java-tree.h:  Declare build_new_array.
9809         * jcf-write.c (patch_newarray):  Use build_new_array.
9810
9811         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
9812         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
9813
9814         * parse.y (patch_new_array_init):  Re-organize.
9815         Now is passed the actual array (pointer) type of the value.
9816         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
9817         (patch_array_constructor):  Removed - merged into patch_new_array_init.
9818         (java_complete_tree):  Update patch_new_array_init.
9819
9820         * jcf-write.c (find_constant_index):  New function.
9821         (generate_bytecode_insns):  Use find_constant_index.
9822         (generate_classfile):  Use find_constant_index for ConstantValue.
9823
9824 1998-12-11  Tom Tromey  <tromey@cygnus.com>
9825
9826         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
9827         * decl.c (init_decl_processing): Renamed dtable -> vtable.
9828         * class.c (make_class_data): Renamed dtable -> vtable, and
9829         dtable_method_count -> vtable_method_count.
9830
9831 Thu Dec 10 20:00:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9832
9833         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
9834         global variables, initialized.
9835         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
9836         Declared new global variables.
9837         * lex.c (java_lex): Return long_zero_node, float_zero_node,
9838         double_zero_node, integer_zero_node upon direct matching.
9839         * parse.y (purify_type_name): Added function prototype.
9840         (duplicate_declaration_error_p): Consider new_type as potentially
9841         being a incomplete type. Use purify_type_name on type string.
9842         (method_header): saved_type: unused variable removed. Don't figure
9843         return type if method name is invalid.
9844         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
9845         processed by patch_unaryop.
9846         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
9847         increment/decrement node into its original type after binary
9848         numeric promotion on its operands.
9849
9850 Thu Dec 10 11:02:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9851
9852         * parse.y (array_initializer:): Array init operand is NULL_TREE
9853         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
9854         now an error. Fixed indentation problems.
9855         (patch_string): Handle error_mark_node as an argument.
9856         (patch_new_array_init): Fixed indentation problems.
9857         (array_constructor_check_entry): Removed check on null wfl_value.
9858         Return an error if wfl_value's walk returns an error.
9859
9860 Wed Dec  9 15:37:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9861
9862         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
9863         * lex.c (java_lex): Remember column position before advancing one
9864         token. Retain location information on OCB_TK.
9865         * lex.h (typedef struct java_lc): Added new field.
9866         * parse.h (GET_SKIP_TYPE): New macro.
9867         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
9868         * parse.y (build_new_array_init, patch_new_array_init,
9869         patch_array_constructor, maybe_build_array_element_wfl,
9870         array_constructor_check_entry): New function prototypes.
9871         (switch_block:): Tagged <node>.
9872         (OCB_TK): Tagged <operator>.
9873         (array_initializer:): Installed actions.
9874         (variable_initializer): Build location information on element if
9875         necessary.
9876         (switch_statement:): Fixed indentation typo.
9877         (switch_block:): Redefined default action.
9878         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
9879         (patch_assignment): Removed duplicate code.
9880         (maybe_build_array_element_wfl, build_new_array_init,
9881         patch_new_array_init, patch_array_constructor,
9882         array_constructor_check_entry): New functions.
9883
9884 Mon Dec  7 15:13:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9885
9886         * parse.y (array_initializer): Tagged <node>.
9887         (variable_initializer:): Use default rule.
9888         (array_initializer:): Defined actions.
9889         (variable_initializers:): Likewise.
9890         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
9891         non-static field accesses.
9892         (patch_invoke): Fixed indentation typo.
9893         (java_complete_tree): Likewise.
9894         (build_labeled_block): Changed leading comment. Generate an error
9895         in case of duplicate loop labels.
9896         (patch_conditional_expr): Patch results of string concatenation
9897         operations.
9898
9899 Sun Dec  6 13:45:00 1998  Per Bothner  <bothner@cygnus.com>
9900
9901         * constants.c (find_methodref_index):  When the class is an interface,
9902         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
9903
9904         * decl.c (finit_identifier_node):  Use "$finit$", rather than
9905         "<finit>" (which Sun's verifier rejects).
9906         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
9907         (generate_field_initialization_code):  Removed.
9908         (fix_constructors)  Don't add call to $finit$ here (wrong order).
9909         (patch_method_invocation):  Add $finit$ call here.
9910
9911         * java-tree.h (CALL_USING_SUPER):  New macro.
9912         * parse.y (patch_invoke):  Remove im local variable.
9913         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
9914         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
9915         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
9916
9917         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
9918
9919         * parse.y (java_complete_tree):  Don't complain about unreachable
9920         statement if it is empty_stmt_node.
9921
9922         * jcf-write.c (find_constant_wide):  New function.
9923         (push_long_const):  Use find_constant_wide.
9924
9925         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
9926         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
9927         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
9928         Emit invokeinterface when calling an interface method.
9929         Emit invokespecial also when calling super or private methods.
9930
9931         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
9932
9933 Sun Dec  6 13:21:18 1998  Per Bothner  <bothner@cygnus.com>
9934
9935         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
9936
9937 Thu Dec  3 17:11:12 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9938
9939         * java-tree.h (java_layout_seen_class_methods): New function
9940         prototype.
9941         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
9942         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
9943         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
9944         * parse.y (method_declarator:): Defined action.
9945         (issue_warning_error_from_context): input_filename saved, set to
9946         the appropriate value and restored after java_error is called.
9947         (build_unresolved_array_type): Fixed comment.
9948         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
9949         (method_header): Deal with return type the same way type are
9950         handled for fields and method's parameters and local variables
9951         types are handled.
9952         (check_method_redefinition): Removed extra CR.
9953         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
9954         (java_layout_seen_class_methods): New function.
9955         (java_layout_classes): Call java_layout_seen_class_methods.
9956
9957 Thu Dec  3 15:56:50 1998  Per Bothner  <bothner@cygnus.com>
9958
9959         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
9960
9961 Thu Dec  3 15:08:30 1998  Per Bothner  <bothner@cygnus.com>
9962
9963         * jcf-dump.c (main):  Fix error message.
9964         * jcf-path.c (add_entry):  Style fix.
9965
9966 Wed Dec  2 15:52:25 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9967
9968         * class.c (layout_class_method): Call build_java_argument_signature
9969         on constructors too.
9970         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
9971         (patch_method_invocation): Define a primary when resolving an
9972         expression name. Augmented comment on code checking illegal `this'
9973         usage. Loosened it test by accepting NEW_CLASS_EXPR.
9974
9975 Tue Dec  1 13:53:24 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9976
9977         * class.c (layout_class_method): Don't report error on non-static
9978         overriding static if the method is private.
9979         * java-tree.h (finish_class): Prototype added.
9980         * lex.c (java_get_line_col): Handle col argument -2 value.
9981         * parse.h: All static method declarations moved to parse.y.
9982         * parse.y: Now contains all static method declarations previously
9983         found in parse.h.
9984         (find_expr_with_wfl, missing_return_error,
9985         unreachable_stmt_error): New functions.
9986         (java_get_real_method_name): Identify constructors bearing class
9987         names in source code compiled classes only.
9988         (java_complete_expand_methods): Call missing_return_error.
9989         (invocation_mode): Private methods invoked as static methods.
9990         (java_complete_tree): Call unreachable_stmt_error.
9991
9992 1998-12-01  Tom Tromey  <tromey@cygnus.com>
9993
9994         * Makefile.in (+target): Removed.
9995         (+xmake_file): Likewise.
9996         (+tmake_file): Likewise.
9997         (.NOEXPORT): Removed duplicate.
9998
9999 Fri Nov 27 13:20:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10000
10001         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
10002
10003         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
10004
10005         * jvgenmain.c: Remove the xmalloc prototype, we get it from
10006         libiberty.h.  Provide an xmalloc definition.
10007
10008         * jvspec.c: Remove the xmalloc prototype.
10009
10010         * parse-scan.y: Include config.h and system.h.  Don't include
10011         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
10012         Provide an xstrdup definition.
10013
10014 Thu Nov 26 22:03:58 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
10015
10016         * jcf-path.c (add_entry): Recognize ".jar" too.
10017         * lang-specs.h: Likewise.
10018
10019 Thu Nov 26 12:44:07 1998  Per Bothner  <bothner@cygnus.com>
10020
10021         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
10022         soft_monitorenter_node, soft_monitorexit_node, throw_node.
10023
10024         * jcf-write.c (generate_bytecode_insns):
10025         Handle pre/post-increment/decrement of long.
10026
10027         * jcf-write.c (generate_bytecode_insns):
10028         Handle missing exception handler (finally for synchronized).
10029
10030 Wed Nov 25 09:47:15 1998  Per Bothner  <bothner@cygnus.com>
10031
10032         * java-tree.h (end_params_node):  Declare global.
10033         * decl.c (end_params_node):  New global.
10034         (init_decl_processing, start_java_method):  Use end_params_node for
10035         end of list of parameter types.  Follows correct gcc conventions.
10036         * expr.c (pop_argument_types, pop_arguments):  Likewise.
10037         * lang.c (put_decl_node):  Likewise.
10038         * typeck.c (various places):  Likewise.
10039         * class.y (various places):  Likewise.
10040         * parse.y (various places):  Likewise.
10041
10042         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
10043         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
10044
10045         * class.c:  Add #include flags.h, remove no-longer needed declaration.
10046
10047         * class.c (layout_class_method):  Remove commented-out code, re-format.
10048         Don't add vtable entry (or index) for private methods.
10049         * expr.c (expand_invoke):  A private method is implicitly final.
10050         * class.c (make_class_data):  If inlining or optimizing,
10051         skip private methods.
10052
10053         * class.c (finish_class):  New function.  Calls existing methods,
10054         but alls emits deferred inline functions.
10055         * jcf-parse.c (parse_class_file):  Call finish_class.
10056         * parse.y (java_complete_expand_methods):  Likewise.
10057
10058         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
10059
10060         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
10061
10062 Wed Nov 25 00:50:58 1998  Marc Espie <espie@quatramaran.ens.fr>
10063
10064         * jcf-write.c (generate_bytecode_conditional): Fix typo.
10065
10066 Tue Nov 24 17:06:38 1998  Per Bothner  <bothner@cygnus.com>
10067
10068         * (generate_classfile): Always write class access flag with
10069         ACC_SUPER set.
10070
10071 Tue Nov 24 16:34:33 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10072
10073         * class.c (maybe_layout_super_class): New function.
10074         (layout_class): Reorganized. Loop on class methods dispatched into
10075         a new function. Call maybe_layout_super_class.
10076         (layout_class_methods, layout_class_method): New functions.
10077         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
10078         class.
10079         (expand_invoke): Likewise.
10080         * java-tree.h (all_class_list): New global variable declared.
10081         (layout_class_methods, layout_class_method): New function
10082         prototypes.
10083         (LAYOUT_SEEN_CLASS_METHODS): New macro.
10084         * jcf-parse.c (all_class_list): New global variable.
10085         (load_class): Extended what class_or_name can be. Use parser
10086         context mechanism to save globals before calling jcf_parse.
10087         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
10088         is set on the file name.
10089         (jcf_parse): Layout class methods when Object is loaded, otherwise
10090         record class in all_class_list for delayed method layout.
10091         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
10092         * lang.c (put_decl_node): Decode <init> into the decl context
10093         class name.
10094         * lex.c (java_allocate_new_line): Use xmalloc.
10095         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
10096         pointers, not TREE_LIST elements.
10097         (struct parser_ctxt): Fixed comment indentations, added comments
10098         and reordered some fields.
10099         (java_check_methods): Function prototype removed.
10100         * parse.y (java_push_parser_context): Use xmalloc.
10101         (java_parser_context_restore_global): Pop extra pushed ctxp only
10102         when there's nothing next.
10103         (maybe_create_class_interface_decl): Fixed comment, add new
10104         created class decl to all_class_list.
10105         (method_header): Use GET_REAL_TYPE on argument's types.
10106         (method_declarator): Use GET_REAL_TYPE, change type to the real
10107         type in TREE_LIST dependency node. Build argument list with the
10108         real type.
10109         (create_jdep_list): Use xmalloc. Removed allocation error message.
10110         (obtain_incomplete_type): Fixed leading comment. Broadened
10111         incoming argument meaning.
10112         (register_incomplete_type): Use xmalloc. Removed allocation error
10113         message.
10114         (safe_layout_class): Fixed leading comment.
10115         (jdep_resolve_class): Reversed if statement condition and switch
10116         if and else bodies.
10117         (resolve_and_layout): Fixed leading comment. Broadened incoming
10118         argument meaning.
10119         (complete_class_report_errors): New local variable name, for
10120         clarity. purify_type_name used for all error cases.
10121         (java_get_real_method_name): Stricter check on constructors.
10122         (java_check_regular_methods): Reverse methods list only if not
10123         already laid out. Layout artificial constructor.
10124         (java_check_methods): Deleted.
10125         (source_start_java_method): Obtain incomplete type for patchable
10126         method arguments.
10127         (java_layout_classes): Fixed leading comment. Use
10128         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
10129         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
10130         before returning. Fixed comments.
10131         (java_expand_classes): Check for errors up front.
10132         (patch_method_invocation): Class to search is resolved and laid
10133         out.
10134
10135 Tue Nov 24 12:57:13 1998  Per Bothner  <bothner@cygnus.com>
10136
10137         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
10138
10139         * javaop.h (int8):  Removed - not used.
10140         (jbyte):  Redefine portably with correct signedness.
10141
10142         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
10143
10144         * jcf-write.c (generate_bytecode_insns):  Fix typo
10145         OPCODE_getstatic to OPCODE_getfield.
10146
10147         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
10148         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
10149         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
10150
10151 Thu Nov 19 11:16:55 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10152
10153         * jcf-parse.c (jcf_parse_source): Function returned type is
10154         void. Added prototype.
10155         (jcf_parse): Function returned type is void.
10156         (yyparse): Remove call to fclose on the last parsed file.
10157
10158         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
10159
10160 Wed Nov 18 23:54:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10161
10162         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
10163         (layout_class): Cope with methods featuring WFL in decl names.
10164         * decl.c (unqualified_object_id_node): New global variable,
10165         initialized.
10166         (build_decl_no_layout): Removed.
10167         * expr.c (build_primtype_type_ref): Handle Double.
10168         (java_lang_expand_expr): Fixed indentations.
10169         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
10170         (flag_wall, flag_redundant, flag_not_overriding,
10171         flag_static_local_jdk1_1, unqualified_object_id_node): Global
10172         variable declarations.
10173         (build_decl_no_layout): Removed prototype.
10174         (java_get_real_method_name): Added prototype.
10175         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
10176         (java_parse_abort_on_error): Macro now just returns.
10177         * jcf-parse.c (jcf_parse_source): Check fclose returned
10178         value. Call emit_register_classes if java_report_errors returns
10179         zero.
10180         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
10181         flag_static_local_jdk1_1): New integer flags.
10182         (lang_decode_option): New flags set here.
10183         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
10184         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
10185         the flag_redundant variable.
10186         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
10187         when parsing java.lang.Object class.
10188         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
10189         NULL_TREE to build.
10190         (resolve_qualified_expression_name): Fixed indentation.
10191         (patch_array_ref): Changed prototype.
10192         (not_initialized_as_it_should_p): Prototype removed.
10193         (java_report_errors): Added function prototype.
10194         * parse.y (formal_parameter:): Changed error message for not yet
10195         supported final parameters.
10196         (class_type_list:): Set both PURPOSE and VALUE of created
10197         TREE_LIST to be class_type.
10198         (primary_no_new_array:): Handle class literals on primitive types.
10199         (parse_warning_context): Reinstalled correct force_error and
10200         do_warning flags setups.
10201         (java_report_errors): Changed prototype. Return java_error_count
10202         value.
10203         (variable_redefinition_error): Consider treating variable type as
10204         a fake pointer.
10205         (create_interface): Warn about redundant abstract modifier if
10206         flag_redundant is set. Changed error message.
10207         (lookup_field_wrapper): Save/restore globals before/after looking
10208         up field.
10209         (duplicate_declaration_error_p): Consider treating declaration
10210         type as a fake pointer.
10211         (register_fields): Extract real type from dependency node. Check
10212         for duplicate field declaration after type adjustment. Use
10213         DECL_INITIAL to store static final initialized values.
10214         (method_header): Extract real function type from dependency node.
10215         (check_abstract_method_header): Use GET_METHOD_NAME.
10216         (obtain_incomplete_type): Layout fake pointer type.
10217         (safe_layout_class): Don't try to check for methods before layout.
10218         (java_complete_class): Don't check for correct throws clause
10219         elements inheritance here.
10220         (resolve_and_layout): Broadened name parameter meaning.
10221         (reset_method_name): Use GET_METHOD_NAME.
10222         (java_get_real_method_name): New function.
10223         (java_check_regular_methods): Don't check methods in
10224         java.lang.Object.  Verify lineage of throws clause elements. Use
10225         flag_no_overriding in warning report.
10226         (check_throws_clauses): Don't check if class was from
10227         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
10228         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
10229         (declare_local_variables): Use flag_static_local_jdk1_1 to report
10230         warning on unsupported final local variables. Use build_decl
10231         instead of build_decl_no_layout. Get real local variable type from
10232         dependency node.
10233         (source_start_java_method): Get real parameter type from
10234         dependency node. Call build_decl instead of build_decl_no_layout.
10235         (java_layout_classes): Reverse tree and layout type and class as
10236         required. Mark class as loaded when done.
10237         (resolve_field_access): Fixed indentation. Restricted condition
10238         leading to static field access code generation. Set field_type
10239         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
10240         (resolve_qualified_expression_name): Initialize type_found to
10241         null. Handle static field resolved during qualification. Fixed
10242         layout on non primitive field decl types.
10243         (not_accessible_p): Fixed typo in comment.
10244         (patch_method_invocation): Resolve and layout class to search from
10245         type.
10246         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
10247         layout non primitive type, if necessary. Make method node only to
10248         report errors.
10249         (find_applicable_accessible_methods_list): Consider WFL'ed method
10250         decl names. Fixed indentation.
10251         (argument_types_convertible): Resolve and layout target type if
10252         necessary.
10253         (java_complete_tree): Fixed indentation problems. Rewrote
10254         CALL_EXPR thrown exceptions check. Re-installed further processing
10255         of the assignment in certain cases.
10256         (patch_assignment): Call maybe_build_primttype_type_ref to perform
10257         inlining on class literals.
10258         (valid_builtin_assignconv_identity_widening_p): Cope with constant
10259         0 literal.
10260         (valid_method_invocation_conversion_p): Likewise.
10261         (patch_string): Temporary disable forbidden use of `this' in
10262         explicit constructor invocations when doing string concatenation
10263         within their scope.
10264         (patch_unaryop): Added comment. Reinstalled code to disable
10265         further check on assignment operation with cast expression RHS.
10266         (patch_switch_statement): Fixed indentation.
10267         (build_try_statement): Call build_decl instead of
10268         build_decl_no_layout.
10269         (patch_synchronized_statement): Likewise.
10270         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
10271         IS_UNCHECKED_EXPRESSION_P.
10272         (check_thrown_exceptions_do): Changed leading comment. Resolve and
10273         layout argument exception type.
10274         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
10275         of IS_UNCHECKED_EXPRESSION_P.
10276
10277 Wed Nov 18 14:21:48 1998  Anthony Green  <green@cygnus.com>
10278
10279         * jcf-parse.c (yyparse): Open class file in binary mode.
10280
10281 Sun Nov 15 17:14:17 1998  Per Bothner  <bothner@cygnus.com>
10282
10283         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
10284
10285         * jcf-write.c (perform_relocations):  Move check out one loop.
10286
10287 Sun Nov 15 15:09:56 1998  Anthony Green  <green@hoser.cygnus.com>
10288
10289         * Make-lang.in: Fix reference to srcdir.
10290         * jv-scan.c: Add missing xmalloc prototype.
10291         * jvgenmain.c: Ditto.
10292
10293 Sun Nov 15 14:36:29 1998  Per Bothner  <bothner@cygnus.com>
10294
10295         * decl.c (error_mark_node), java-tree.h:  New global.
10296         * parse.y:  Use empty_stmt_node instead of size_zero_node.
10297         (build_if_else_statement):  If missing else, use empty_stmt_node.
10298
10299         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
10300         (java_complete_expand_method):  Complain if return is missing.
10301         (java_check_regular_methods):  Comment out incorrect error check.
10302         (not_accessible_p):  Fix incorrect handling of protected methods.
10303         (patch_method_invocation):  Pass correct context to not_accessible_p.
10304         (find_applicable_accessible_methods_list):  Likewise.
10305         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
10306         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
10307         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
10308         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
10309
10310         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
10311         (push_int_const):  Remove reundant NOTE_PUSH.
10312         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
10313         (- case SWITCH_EXPR):  Fix code generation bug.
10314         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
10315         (generate_classfile):  More robust for abstract methods.
10316
10317 Sun Nov 15 13:52:39 1998  Anthony Green  <green@cygnus.com>
10318
10319         * Makefile.in: jv-scan and jvgenmain all require libiberty.
10320         * Make-lang.in: Ditto.
10321
10322         * jv-scan.c: Remove xmalloc and xstrdup definitions.
10323         * jvgenmain: Ditto.
10324
10325 Sun Nov 15 14:10:56 1998  Per Bothner  <bothner@cygnus.com>
10326
10327         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
10328
10329         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
10330
10331 Sat Nov 14 17:19:18 1998  Per Bothner  <bothner@cygnus.com>
10332
10333         Allow uses of interface types to verify.  This is not really
10334         type-safe, but it matches what Sun does, and is OK as long as
10335         there are appropriate run-time checks.
10336         * verify.c (merge_types):  If merging two interface types,
10337         just set the result to java.lang.Object.
10338         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
10339
10340 1998-11-13  Tom Tromey  <tromey@cygnus.com>
10341
10342         * gjavah.c (main): Handle --output-class-directory argument.
10343         * jvspec.c (lang_specific_driver): Translate `-d' into
10344         -foutput-class-dir.
10345         * jcf.h (jcf_write_base_directory): Declare.
10346         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
10347         * lang-options.h: Mention -foutput-class-dir.
10348         * jcf-write.c (jcf_write_base_directory): New global.
10349         (make_class_file_name): Put generated .class file into `-d'
10350         directory, or into source directory if -d not given.  Function now
10351         static.
10352         (write_classfile): Free class file name.  Handle case where class
10353         file name is NULL.
10354         (DIR_SEPARATOR): New macro.
10355         Include <sys/stat.h>
10356
10357         * Makefile.in (prefix): New macro.
10358
10359 Thu Nov 12 14:15:07 1998  Per Bothner  <bothner@cygnus.com>
10360
10361         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
10362         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
10363         here (done in patch_invoke instead).
10364         (case_identity):  Moved here from parse.y.
10365
10366         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
10367         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
10368         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
10369         so they can be efficiently scanned without recursion.
10370         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
10371         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
10372         in BLOCK iteratively, rather than recursively.
10373
10374         * parse.y (do_unary_numeric_promotion):  New function.
10375         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
10376
10377         * parse.y (patch_newarray):  Various fixes.
10378
10379         Re-do handling of switch statements (for proper block scoping).
10380         * parse.y:  Add just a single block for the enture switch block,
10381         but don't create any "case blocks".
10382         (group_of_labels):  Rmeoved unneeded non-terminal.
10383         CASE_EXPR and DEFAULT_EXPR are added to current block.
10384         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
10385         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
10386         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
10387         * parse.y (wfl_operator, print_int_node): Make non-static.
10388         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
10389         as part of recursive scan of block.
10390         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
10391         (patch_switch_statement):  Most tests move dinto java_complete_tree.
10392
10393         * parse.y:  Make various production be non-typed (void).
10394         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
10395         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
10396         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
10397
10398         * jcf-write.c (struct jcf_handler):  New type.
10399         (struct jcf_switch_state):  New type.
10400         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
10401         (alloc_handler, emit_unop, emit_reloc):  New functions.
10402         (adjust_typed_op):  Add extra parameter ("max type" offset).
10403         (emit_switch_reloc, emit_case-reloc):  New function.
10404         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
10405         (generate_bytecode_insns):  Support REAL_CST, switch statements,
10406         exception handling, method calls, object/array creation, and more.
10407
10408         * class.c:  Remove some unused variables.
10409         * constants.c (find_string_constant):  New function.
10410         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
10411         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
10412         if flag_emit_class_files.
10413
10414 1998-11-12  Tom Tromey  <tromey@cygnus.com>
10415
10416         * jcf-io.c (find_class): Added explanatory comment.
10417
10418         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
10419         trailing slash to `.zip' entries.
10420
10421         * jvspec.c (lang_specific_driver): Correctly handle case where
10422         GC_NAME not defined.
10423
10424 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10425
10426         * jvspec.c (GC_NAME): New define.
10427         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
10428         if required.
10429         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
10430
10431 Wed Nov 11 19:08:52 1998  Per Bothner  <bothner@cygnus.com>
10432
10433         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
10434
10435 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10436
10437         * jcf-dump.c (main): Correctly recognize `--'-style long options.
10438
10439 Tue Nov 10 12:34:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10440
10441         * class.c (is_compiled_class): Call safe_layout_class for class
10442         compiled from source.
10443         * conver.h (convert_to_integer, convert_to_real,
10444         convert_to_pointer): Added prototypes.
10445         * decl.c (init_decl_processing): Non longer push the decls of
10446         `methodtable', `constants', `Class', `Field', `dispatchTable'
10447         `jexception' and `Method'.
10448         * expr.c (build_invokeinterface): New function.
10449         (expand_invoke): static variable CLASS_IDENT now in
10450         build_invokeinterface. Use build_invokeinterface.
10451         (expand_java_field_op): Moved code to inline
10452         java.lang.PRIMTYPE.TYPE into a function.
10453         (build_primtype_type_ref): New function.
10454         * java-tree.def (INSTANCEOF_EXPR): New tree code.
10455         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
10456         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
10457         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
10458         (DECL_LOCAL_STATIC_VALUE): New macro.
10459         (build_invokeinterface, build_primtype_type_ref): New function
10460         prototypes.
10461         (java_parse_abort_on_error): Macro rewritten.
10462         * jcf-parse.c (current_method): Add comment to declaration.
10463         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
10464         Function prototypes fixed.
10465         (jcf_parse_source): push/pop parser context. save/restore global.
10466         (parse_source_file): Fixed leading comment. Now take a
10467         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
10468         classes and pop the parser context anymore.
10469         (yyparse): Push parser context, save globals, parse the source
10470         file, restore globals and pop the parser context when processing a
10471         source file.
10472         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
10473         * lex.c (java_parse_doc_section): New function.
10474         (java_lex): Call java_parse_doc_section when appropriate. Build an
10475         operator around INSTANCEOF_TK.
10476         * lex.h (java_lineterminator, java_sprint_unicode,
10477         java_unicode_2_utf8, java_lex_error, java_store_unicode):
10478         Prototypes rewritten.
10479         (java_parse_escape_sequence, java_letter_or_digit_p,
10480         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
10481         java_read_unicode, java_store_unicode, java_read_char,
10482         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
10483         Added function prototypes.
10484         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
10485         define.
10486         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
10487         New macros
10488         (struct parser_ctxt): New fields: deprecated,
10489         current_parsed_class_un, gclass_list.
10490         (fix_method_argument_names, issue_warning_error_from_context,
10491         resolve_package, lookup_package_type): New function prototypes.
10492         (resolve_expression_name): Fixed function prototype.
10493         (find_applicable_accessible_methods_list): Fixed indentation, added
10494         extra argument in prototype.
10495         (check_final_assignment, build_null_of_type, check_deprecation,
10496         check_method_redefinition, reset_method_name,
10497         java_check_regular_methods, java_check_abstract_methods,
10498         maybe_build_primttype_type_ref): New function prototype.
10499         * parse.y (conver.h): Include.
10500         (INSTANCEOF_TK): Tagged <operator>.
10501         (single_type_import_declaration): Use REGISTER_IMPORT macro.
10502         (relational_expression:): Build binop for instanceof.
10503         (java_push_parser_context): Remember ctxp->gclass_list across
10504         contexts.
10505         (java_pop_parser_context): Simply return if no context
10506         exists. Remember gclass_list across contexts.
10507         (issue_warning_error_from_context): New function.
10508         (parse_error_context): Don't setup ctxp->elc here. Call
10509         issue_warning_error_from_context instead.
10510         (parse_warning_context): Likewise.
10511         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
10512         setup. Link new class/interface to ctxp->gclass_list.
10513         (add_superinterfaces): Register interface as incomplete if not
10514         loaded.
10515         (create_class): Remember class unqualified name in
10516         ctxp->current_parsed_class_un. Check class deprecation.
10517         (register_fields): Check field deprecation. Remember static final
10518         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
10519         processing INIT.
10520         (method_header): New local variable ORIG_ARG. Use unqualified
10521         current class name for check on constructor errors. Promote return
10522         type if of record type. Argument list fix moved in
10523         fix_method_argument_names, called here. Check method deprecation.
10524         (fix_method_argument_names): New function.
10525         (method_declarator): Promote record typed arguments.
10526         (safe_layout_class): Check class methods before layout.
10527         (java_complete_class): Compute field layout when patched.
10528         (do_resolve_class): Try to load class after having it renamed
10529         after the package name.
10530         (get_printable_method_name): Use DECL_CONTEXT.
10531         (reset_method_name): New function.
10532         (check_method_redefinition): Use reset_method_name.
10533         (java_check_regular_methods): New local variable
10534         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
10535         names for error report. Check for compile-time error when method
10536         found has default (package) access.
10537         (java_check_abstract_methods): Now takes an interface DECL node as
10538         an argument. Also reinstall real name on unchecked
10539         overriding/hiding methods for error report.
10540         (java_check_methods): Fixed leading comment. Get classes to verify
10541         from ctxp->gclass_list. Use CHECK_METHODS macro and set
10542         CLASS_METHOD_CHECKED_P on class verification.
10543         (lookup_java_method2): Get real method name if necessary.
10544         (find_in_imports): Don't check package class access here.
10545         (resolve_package, lookup_package_type): New functions.
10546         (java_layout_classes): Fixed leading comment. Take classes to be
10547         laid out from ctxp->gclass_list.
10548         (java_complete_expand_methods): Don't expand native and abstract
10549         methods.
10550         (java_expand_classes): New function.
10551         (resolve_expression_name): Use additional argument ORIG.  Retrieve
10552         values of static final field of primitive types.
10553         (resolve_field_access): Handles static final field of promotive
10554         type.
10555         (resolve_qualified_expression_name): Handle STRING_CST as
10556         primaries and package name resolution. Check deprecation on found
10557         decls. Set where_found and type_found on non static field resolved
10558         during qualification. Layout non primitive field decl types.
10559         (check_deprecation): New function.
10560         (maybe_access_field): Simplified.
10561         (patch_method_invocation_stmt): Local variable CLASS_TYPE
10562         removed. Reverse method's argument when primary is a type. Don't
10563         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
10564         instead. Include abstract class in the list of class searchable
10565         for constructors. Use DECL_CONTEXT of found method for access
10566         checks. Check method deprecation.
10567         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
10568         converting arguments. Handle INVOKE_INTERFACE.
10569         (lookup_method_invoke): Search constructor using existing
10570         infrastructure (don't rely on lookup_java_constructor anymore).
10571         (find_applicable_accessible_methods_list): Extra argument flag
10572         LC. Now include constructor in the search.
10573         (qualify_ambiguous_name): Conditional expression are primaries.
10574         (not_initialized_as_it_should_p): static final are always
10575         initialized.
10576         (java_complete_tree): Pass extra NULL argument to
10577         resolve_expression_name. Stricter test to carry on patching
10578         assignments. New case for INSTANCEOF_EXPR.
10579         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
10580         (check_final_assignment, maybe_build_primttype_type_ref): New
10581         functions.
10582         (patch_assignment): Detect resolved static finals and carry normal
10583         assignment error check on them. Inline PRIMTYPE.TYPE read access.
10584         (try_builtin_assignconv): Access constant 0 on all primitive
10585         types.
10586         (valid_builtin_assignconv_identity_widening_p): Accept identical
10587         types. Accept all promoted type on int type.
10588         (valid_ref_assignconv_cast_p): Accept a null pointer to be
10589         assigned to a reference.
10590         (valid_method_invocation_conversion_p): Accept to check null
10591         pointers.
10592         (build_binop): Merge declaration and initialization of local
10593         variable BINOP.
10594         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
10595         numeric types. Improved validity test for qualify operators on
10596         references.
10597         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
10598         and PREINCREMENT_EXPR. Also detect resolved static finals of a
10599         primitive type and issue the appropriate error message.
10600         (resolve_type_during_patch): Mark class loaded when resolved.
10601         (patch_cast): Allow null to be cased to reference types.
10602         (build_null_of_type): New function.
10603         (patch_array_ref): Handle array on references correctly.
10604         (patch_return): Removed unused local variable MODIFY. Force
10605         boolean to be returned as integers. Allows null to be returned by
10606         a function returning a reference.
10607         * typeck.c (convert_to_integer, convert_to_real,
10608         convert_to_pointer): Prototypes moved to convert.h
10609         (lookup_argument_method): Use method real name, if necessary.
10610
10611 1998-10-30  Tom Tromey  <tromey@cygnus.com>
10612
10613         * class.c (build_class_ref): Changed name of primitive classes to
10614         start with `_Jv_'.
10615
10616         * class.c (make_class_data): Renamed fields: nmethods to
10617         method_count, method_count to dtable_method_count.  Always set
10618         `state' field to 0.
10619         * decl.c (init_decl_processing): Likewise.
10620
10621 Wed Oct 28 08:03:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10622
10623         * class.c (layout_class): Don't mangle <finit>, produce
10624         __finit<class> instead. Don't verify artificial methods.
10625         * decl.c (finit_identifier_node): New declared global.
10626         (init_decl_processing): finit_identifier_node initialized.
10627         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
10628         * java-tree.h (finit_identifier_node): Declared as extern.
10629         (struct lang_decl): New field called_constructor.
10630         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
10631         (CLASS_HAS_FINIT_P): New macro.
10632         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
10633         explicit constructor invocation.
10634         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
10635         CALL_SUPER_CONSTRUCTOR_P): New macros.
10636         (write_classfile): Added prototype.
10637         * jcf-parse.c (jcf_parse_source): Parse and remember for
10638         generation if the file was seen on the command line.
10639         (parse_source_file): Don't write the class file here.
10640         (yyparse): Loop on files rewritten. Set current_jcf.
10641         (parse_zip_file_entries): Parse class file only if it was found.
10642         * lang.c (init_parse): Don't open command line provided filename
10643         here.
10644         (lang_parse): Don't set main_jcf anymore.
10645         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
10646         (JCONSTRUCTOR_CHECK): New macro.
10647         (JBSC_TYPE_P): New macro.
10648         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
10649         (COMPLETE_CHECK_OP_2): New macro.
10650         (struct parse_ctxt): New field explicit_constructor_p.
10651         (check_class_interface_creation): Fixed prototype indentation.
10652         (patch_method_invocation_stmt): Prototype reflects added argument.
10653         (patch_invoke): Likewise.
10654         (complete_method_declaration, build_super_invocation,
10655         verify_constructor_circularity,
10656         build_this_super_qualified_invocation, get_printable_method_name,
10657         patch_conditional_expr, maybe_generate_finit, fix_constructors,
10658         verify_constructor_super, create_artificial_method,
10659         start_artificial_method_body, end_artificial_method_body,
10660         generate_field_initialization_code): New function prototypes.
10661         * parse.y: Fixed leading comment
10662         (constructor_header:, constructor_body:, block_end:): Rules tagged
10663         <node>.
10664         (type_declaration:): Call maybe_generate_finit.
10665         (method_declaration:): Action for method_body: placed in new
10666         function complete_method_declaration, called here.
10667         (constructor_declaration:): Defined actions. Removed leading
10668         FIXME.
10669         (constructor_header:): New rule with action.
10670         (constructor_body:): Rule rewritten using block_begin: and
10671         block_end:. Defined actions.
10672         (constructor_declarator:, explicit_constructor_invocation:):
10673         Defined actions.
10674         (block:): Use new rules block_begin: block_end:.
10675         (block_begin:, block_end:): New rules and actions.
10676         (block_statements:): Fixed error message for explicit
10677         constructors.
10678         (method_invocation:): Call build_this_super_qualified_invocation
10679         if primary is `this' or `super' was seen.
10680         (conditional_expression:): Action defined.
10681         (extra_ctxp_pushed_p): New static global flag.
10682         (java_parser_context_save_global): Create parser context if
10683         necessary. Use extra_ctxp_pushed_p to remember it.
10684         (java_parser_context_restore_global): Pop extra parser context if
10685         one exists.
10686         (build_array_from_name): Array on primitive types are marked
10687         loaded.
10688         (register_fields): Restore new name in field initializer
10689         expression if type was altered. Non static fields initialized upon
10690         declaration marked initialized.
10691         (maybe_generate_finit): New function.
10692         (maybe_generate_clinit): Use create_artificial_method,
10693         start_artificial_method_body, end_artificial_method_body. Generate
10694         debug info for enclosed initialization statements.
10695         (method_header): Fixed leading comment. Check constructor
10696         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
10697         accordingly.
10698         (complete_method_declaration, constructor_circularity_msg,
10699         verify_constructor_circularity): New functions.
10700         (get_printable_method_name): New function.
10701         (check_method_redefinition): Don't rename <finit> methods. Fix
10702         declared constructor names. Error message for
10703         constructors modified.
10704         (java_check_regular_methods): Local variable seen_constructor
10705         renamed saw_constructor. Skip verification on constructors. Create
10706         default constructor with create_artificial_method.
10707         (java_check_methods): Removed unnecessary empty line.
10708         (create_artificial_method, start_artificial_method_body,
10709         end_artificial_method_body): New functions.
10710         (java_layout_classes): Changed leading comment. Reverse fields
10711         list if necessary. Always layout java.lang.Object if being
10712         defined.
10713         (java_complete_expand_methods): Verify constructor circularity.
10714         (java_complete_expand_method): Call fix_constructor on
10715         constructors.  Local variable no_ac_found removed. Restore
10716         bindings if method body expansion failed.
10717         (fix_constructors, verify_constructor_super,
10718         generate_field_initialization_code): New function.
10719         (java_expand_classes): Fixed leading comment. Write class file
10720         here.
10721         (resolve_expression_name): Check for illegal instance variable
10722         usage within the argument scope of an explicit constructor
10723         invocation.
10724         (resolve_qualified_expression_name): Pass extra from_super flag
10725         when invoking patch_method_invocation_stmt. New case for
10726         conditional expression when used as a primary. Check for error
10727         when acquiring super.
10728         (patch_method_invocation_stmt): Added extra argument super. New
10729         local variable is_static_flag. Set class_to_search according to
10730         the nature of the constructor invocation. Don't add `this'
10731         argument when expanding NEW_CLASS_EXPR. Check for illegal method
10732         invocation within the argument scope of explicit constructor
10733         invocation. Set is_static according to is_static_flag. Provide
10734         extra `super' argument to patch_invoke invocation.
10735         (patch_invoke): New argument from_super. Loop on arguments
10736         indentation fixed. Pass from_super to invocation_mode. New switch
10737         case INVOKE_SUPER. Fixed error message in switch default case.
10738         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
10739         value.
10740         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
10741         (lookup_method_invoke): Fixed prototypes in candidates list. Error
10742         message takes constructors into account.
10743         (find_applicable_accessible_methods_list): Fixed indentation.
10744         (qualify_ambiguous_name): Take explicit constructor invocation
10745         into account. Deal with a conditional expression as a primary to
10746         a method call.
10747         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
10748         case. Added extra argument to patch_method_invocation_stmt.
10749         Register calls made to explicit constructor `this'. Don't call
10750         save_expr in ARRAY_REF case when emitting class files. Check for
10751         illegal use of this when expanding explicit constructor invocation
10752         arguments.
10753         (complete_function_arguments): Set and reset parser context
10754         explicit_constructor_p field value when appropriate.
10755         (build_super_invocation, build_this_super_qualified_invocation):
10756         New functions.
10757         (patch_assignment): Fixed typo.
10758         (patch_unaryop): Check on final fields occurs only when a decl
10759         exits.
10760         (patch_return): Take constructors into account.
10761         (patch_conditional_expr): New function.
10762         * typeck.c (build_java_signature): Removed unnecessary empty line.
10763
10764 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
10765
10766         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
10767
10768 1998-10-28  Tom Tromey  <tromey@cygnus.com>
10769
10770         * decl.c (init_decl_processing): Renamed fields.
10771         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
10772         interface_len, msize fields.
10773
10774         * class.c (make_class_data): Removed subclass_head and
10775         subclass_next fields.
10776         * decl.c (init_decl_processing): Removed subclass_head and
10777         subclass_next fields.
10778
10779 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
10780
10781         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
10782         * mangle.c (emit_unicode_mangled_name): Similarly.
10783
10784 Mon Oct 26 12:17:23 1998  Nick Clifton  <nickc@cygnus.com>
10785
10786         * jcf-parse.c (get_constant): Place braces around code to compute
10787         'd' when REAL_ARITHMETIC is not defined.
10788
10789 Sun Oct 25 14:58:05 1998  H.J. Lu  (hjl@gnu.org)
10790
10791         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
10792         dependency.
10793
10794 1998-10-23  Tom Tromey  <tromey@cygnus.com>
10795
10796         * lang-specs.h: `.zip' files are input to jc1.
10797
10798 Thu Oct 22 23:01:54 1998  Per Bothner  <bothner@cygnus.com>
10799
10800         * jvspecs.c:  Add (but don't enable) support for combining multiple
10801         .class and .java input filenames to a single jc1 invocation.
10802         Add support for -C flag (copile to .class files).
10803         Translate -classpath and -CLASSPATH arguments.
10804         * lang-specs.h:  Don't set %2 spec.
10805
10806 1998-10-22  Tom Tromey  <tromey@cygnus.com>
10807
10808         * jcf-path.c (add_entry): Don't add trailing separator if entry is
10809         a .zip file.
10810         (add_path): Don't add trailing separator to non-empty path
10811         elements.
10812
10813         * lang.c (lang_decode_option): Check for -fclasspath and
10814         -fCLASSPATH before examining other `-f' options.
10815
10816         * java-tree.h (finalize_identifier_node): Don't declare.
10817         * class.c (make_class_data): Don't push "final" field.
10818         * decl.c (init_decl_processing): Don't push "final" field.
10819         (finalize_identifier_node): Removed.
10820         (init_decl_processing): Don't set finalize_identifier_node.
10821
10822         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
10823
10824 Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
10825
10826         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
10827         (JV_SCAN_SOURCES): New macro.
10828         (JCF_DUMP_SOURCES): Likewise.
10829         (jcf-dump$(exeext)): New target.
10830         (jv-scan$(exeext)): New target.
10831
10832 1998-10-22  Tom Tromey  <tromey@cygnus.com>
10833
10834         * Makefile.in (LEX): Removed.
10835         (LEXFLAGS): Likewise.
10836         (SET_BISON): New macro.
10837         (BISON): Removed.
10838         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
10839         spurious diffs in parse.c.
10840         ($(PARSE_SCAN_C)): Likewise.
10841         (PARSE_DIR): New macro.
10842         (PARSE_C): Use it.
10843         (PARSE_SCAN_C): Likewise.
10844         (PARSE_RELDIR): New macro.
10845
10846         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
10847
10848         * jcf-io.c (find_class): Use saw_java_source to determine when to
10849         look for `.java' file.
10850         * jcf-parse.c (saw_java_source): New global.
10851         (yyparse): Set it if `.java' file seen.
10852
10853         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
10854         (GCJH_SOURCES): Likewise.
10855         * Makefile.in (datadir): New macro.
10856         (libjava_zip): Likewise.
10857         (JAVA_OBJS): Added jcf-path.o.
10858         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
10859         (../gcjh$(exeext)): Likewise.
10860         (jcf-path.o): New target.
10861         * java-tree.h (fix_classpath): Removed decl.
10862         * jcf-parse.c (fix_classpath): Removed.
10863         (load_class): Don't call fix_classpath.
10864         * parse.y (read_import_dir): Don't call fix_classpath.
10865         * lex.h: Don't mention classpath.
10866         * lex.c (java_init_lex): Don't initialize classpath.
10867         * jcf-io.c (classpath): Removed global.
10868         (find_class): Use jcf_path iteration functions.  Correctly search
10869         class path for .java file.
10870         (open_in_zip): New argument `is_system'.
10871         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
10872         classpath-related options.
10873         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
10874         and -I.
10875         (lang_init): Call jcf_path_init.
10876         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
10877         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
10878         Correctly put braces around second string in each entry.
10879         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
10880         classpath-related options.
10881         (help): Updated for new options.
10882         * jcf.h: Declare functions from jcf-path.c.  Don't mention
10883         `classpath' global.
10884         * jcf-path.c: New file.
10885
10886         * jcf-depend.c: Include jcf.h.
10887
10888         * jcf-write.c (localvar_alloc): Returns `void'.
10889         (localvar_free): Removed unused variable.
10890
10891         * lang.c (OBJECT_SUFFIX): Define if not already defined.
10892         (init_parse): Use OBJECT_SUFFIX, not ".o".
10893
10894 Wed Oct 21 07:54:11 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10895
10896         * class.c (emit_register_classes): Renamed from
10897         emit_register_class.
10898         * java-tree.h (emit_register_classes): Prototype renamed from
10899         emit_register_class.
10900         * jcf-parse.c (yyparse): Call emit_register_classes once before
10901         returning.
10902         * parse.y (java_expand_classes): No longer register classes.
10903
10904 Tue Oct 20 09:15:38 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10905
10906         * class.c (is_compiled_class): New local variable
10907         seen_in_zip. Identify classes found in currently compiled source
10908         file(s).
10909         * decl.c (complete_start_java_method): Fixed typo.
10910         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
10911         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
10912         (CLASS_P): Moved around.
10913         (java_parse_abort_on_error): Macro moved from jcf-parse.c
10914         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
10915         java-parse.h
10916         (jcf_parse_source): Changed leading comment. Removed unnecessary
10917         fclose and CLASS_FROM_SOURCE_P marking.
10918         (parse_source_file): New local variables remember_for_generation
10919         and filename. Mark parsed file name identifier node. Removed block
10920         executed when parse_only was null. Set remember_for_generation.
10921         Use it as an argument to java_pop_parser_context.
10922         (yyparse): New local variables several_files, list, next node and
10923         current_file_list. Split ampersand separated file names into
10924         current_file_list. Iterate through the list and parse accordingly.
10925         * parse.h (java_pop_parser_context): New function prototype.
10926         * parse.y (ctxp_for_generation): New static global variable.
10927         (java_pop_parser_context): New argument generate. Link popped ctxp
10928         to ctxp_for_generation list accordingly.
10929         (java_complete_expand_methods): Fixed indentation.
10930         (java_expand_classes): New function.
10931
10932 Sat Oct 17 11:25:21 1998  Per Bothner  <bothner@cygnus.com>
10933
10934         * Makefile.in:  Link with libiberty.a instead of memmove.o.
10935
10936 Fri Oct 16 10:59:01 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10937
10938         * lex.c (setjmp.h): No longer included.
10939         * lex.h (setjmp.h): Included.
10940         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
10941         (duplicate_declaration_error_p): Renamed from
10942         duplicate_declaration_error.
10943         (build_array_from_name): New function prototype.
10944         * parse.y (setjmp.h): No longer included.
10945         (variable_declarator_id): Define action.
10946         (build_array_from_name): New function.
10947         (duplicate_declaration_error_p): Renamed from
10948         duplicate_declaration_error.  Fixed leading comment.
10949         (register_fields): Main `for' loop reorganized. Uses
10950         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
10951         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
10952         build_array_from_name.
10953         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
10954         types.
10955         (read_import_dir): Don't try to skip `.' and `..'.
10956         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
10957         build_array_from_name. Main `for' loop reorganized.
10958         (resolve_qualified_expression_name): When building access to a
10959         field, use the type where the field was found, not its own type.
10960         (maybe_access_field): Use field DECL_CONTEXT if the type where the
10961         field was found is null.
10962         (qualify_ambiguous_name): Sweep through all successive array
10963         dimensions.
10964
10965 Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10966
10967         * java-tree.h (pop_labeled_block, lang_printable_name,
10968         maybe_add_interface, set_super_info, get_access_flags_from_decl,
10969         interface_of_p, inherits_from_p, fix_classpath,
10970         complete_start_java_method, emit_handlers, init_outgoing_cpool,
10971         make_class_data, register_class, alloc_name_constant): New
10972         function prototypes.
10973         * lang.c (lang_decode_option): Set argc argument unused. Fixed
10974         indentation. Added cast to remove warning.
10975         (lang_printable_name): Set v argument unused.
10976         (lang_print_error): Added argument to lang_printable_name call.
10977         (java_dummy_print, print_lang_decl, print_lang_type,
10978         print_lang_identifier, lang_print_xnode): All argument marked
10979         unused.
10980         * lex.c (java_unget_unicode): Removed unnecessary argument.
10981         (java_allocate_new_line): Unused local variable is gone.
10982         (java_read_char): Added parenthesis in expressions to remove
10983         warnings.  Added final return statement.
10984         (java_read_unicode): Added parenthesis in expression to remove
10985         warning.
10986         (java_parse_end_comment): Fixed java_unget_unicode invocation.
10987         (java_parse_escape_sequence): Likewise.
10988         (java_lex): Unused local variables are gone. Fixed
10989         java_unget_unicode invocation.
10990         * lex.h (set_float_handler): Prototype added when JC1_LITE not
10991         defined.
10992         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
10993         lang_printable_name invocation in macro.
10994         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
10995         Likewise.
10996         (duplicate_declaration_error): Suppressed unused argument in
10997         prototype.
10998         (identical_subpath_p): Function declaration is gone.
10999         (patch_invoke): Suppressed unused argument in prototype.
11000         (patch_cast, build_labeled_block, check_thrown_exceptions):
11001         Likewise.
11002         * parse.y (setjmp.h): Included
11003         (toplev.h): Likewise.
11004         (field_declaration:): Suppressed unused local
11005         (label_decl:): Fixed build_labeled_block invocation.
11006         (java_pop_parser_context): Put extra parenthesis around assignment
11007         in if.
11008         (yyerror): Suppressed unused local variables.
11009         (variable_redefinition_error): Fixed lang_printable_name
11010         invocation.
11011         (create_interface): Suppressed unused local variables.
11012         (create_class): Likewise.
11013         (duplicate_declaration_error): Suppressed unused argument. Fixed
11014         lang_printable_name invocation.
11015         (register_fields): Suppressed unused local variable. Fixed
11016         duplicate_declaration_error invocation.
11017         (method_header): Suppressed unused local variable.
11018         (method_declarator, parser_check_super): Likewise.
11019         (java_complete_class): Suppressed unused local variable. Fixed
11020         fatal error message.
11021         (complete_class_report_errors): Added default: in switch.
11022         (java_check_regular_methods): Fixed lang_printable_name
11023         invocations.
11024         (check_throws_clauses): Likewise.
11025         (java_check_abstract_methods): Suppressed unused local
11026         variable. Fixed lang_printable_name invocation.
11027         (read_import_entry): Added supplemental return statement.
11028         (read_import_dir): Suppressed unused local variables.
11029         (check_pkg_class_access, declare_local_variables): Likewise.
11030         (source_start_java_method): Suppressed unused extern variable
11031         declarations
11032         (expand_start_java_method): Suppressed unused extern and local
11033         variable declarations.
11034         (java_complete_expand_methods): Likewise.
11035         (java_complete_expand_method): Suppressed unused local variables.
11036         (make_qualified_name): Likewise.
11037         (resolve_qualified_expression_name): Added default: in
11038         switch. Fixed lang_printable_name invocation.
11039         (class_instance_creation_expression): Added parenthesis around
11040         expressions.
11041         (patch_method_invocation_stmt): Fixed lang_printable_name and
11042         patch_invoke invocations.
11043         (check_for_static_method_reference): Fixed lang_printable_name
11044         invocation.
11045         (patch_invoke): Suppressed unused arguments and local variables.
11046         (lookup_method_invoke): Suppressed unused local variables.
11047         (qualify_ambiguous_name): Added default: in switch.
11048         (identical_subpath_p): Function removed.
11049         (patch_assignment): Suppressed unused local variables. Suppressed
11050         unnecessary if statement. Fixed lang_printable_name invocations.
11051         (try_builtin_assignconv): Fixed lang_printable_name invocations.
11052         (valid_ref_assignconv_cast_p): Parenthesis around
11053         expression. Suppressed unused local variables.
11054         (build_binop): Suppressed unused local variables. fixed
11055         lang_printable_name invocations.
11056         (string_constant_concatenation): Suppressed unused local
11057         variables.
11058         (patch_unaryop): Fixed lang_printable_name invocation.
11059         (patch_cast): Suppressed unnecessary argument. Fixed
11060         lang_printable_name invocation.
11061         (patch_array_ref): Fixed lang_printable_name invocation.
11062         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
11063         (build_labeled_block): Suppressed unused argument.
11064         (generate_labeled_block): Fixed build_labeled_block invocation.
11065         (build_loop_body): Suppressed unused local variables.
11066         (patch_loop_statement): Likewise.
11067         (patch_exit): Fixed lang_printable_name invocation.
11068         (patch_switch_statement): Likewise.
11069         (case_identity): First argument marked unused.
11070         (patch_try_statement): Fixed lang_printable_name invocations.
11071         (patch_synchronized_statement, patch_throw_statement): Likewise.
11072         (check_thrown_exceptions): Fixed check_thrown_exceptions and
11073         lang_printable_name invocations.
11074         (check_thrown_exceptions_do): Suppressed unused argument.
11075
11076 1998-10-14  Tom Tromey  <tromey@cygnus.com>
11077
11078         * jcf-write.c (write_classfile): Add output class file as target.
11079         * lang-options.h: Added -MD, -MMD, -M, and -MM.
11080         * jcf.h: Added declarations for dependency-tracking functions.
11081         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
11082         * lang.c (lang_decode_option): Recognize -MD and -MMD.
11083         (finish_parse): Call jcf_dependency_write.
11084         (dependency_tracking): New global.
11085         (DEPEND_SET_FILE): New define.
11086         (DEPEND_ENABLE): New define.
11087         (init_parse): Enable dependency tracking if required.
11088         Include "flags.h".
11089         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
11090         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
11091         (../gcjh$(exeext)): Likewise.
11092         (jcf-depend.o): New target.
11093         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
11094         (GCJH_SOURCES): Likewise.
11095         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
11096         dep_name argument.
11097         (find_classfile): Added dep_name argument.
11098         (find_class): Compute name of dependency.
11099         (open_in_zip): Call jcf_dependency_add_file.
11100         * gjavah.c (output_file): No longer global.
11101         (usage): Don't mention "gjavah".
11102         (help): Likewise.
11103         (java_no_argument): Likewise.
11104         (version): Likewise.
11105         (main): Recognize and handle -M family of options.
11106         (print_mangled_classname): Return is void.
11107         (process_file): Handle case where output is suppressed.
11108         (HANDLE_END_FIELD): Likewise.
11109         (HANDLE_METHOD): Likewise.
11110         * jcf-depend.c: New file.
11111
11112 Tue Oct 13 23:34:12 1998  Jeffrey A Law  (law@cygnus.com)
11113
11114         * java-tree.def: Add missing newline at EOF.
11115
11116 1998-10-13  Tom Tromey  <tromey@cygnus.com>
11117
11118         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
11119         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
11120         function.
11121         Include <config.h> and "system.h".
11122         (disassemble_method): Undefine RET to avoid clash with
11123         config/i386/i386.h.
11124
11125 Tue Oct 13 03:50:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11126
11127         * decl.c (runtime_exception_type_node, error_exception_type_node):
11128         New global variables.
11129         (init_decl_processing): Initialized.
11130         * expr.c (java_lang_expand_expr): Set caught exception type to
11131         null if catch handler argument doesn't exit.
11132         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
11133         tree codes.
11134         * java-tree.h (runtime_exception_type_node,
11135         error_exception_type_node): Global variables declared.
11136         (DECL_FUNCTION_THROWS): New macro.
11137         (DECL_FUNCTION_BODY): Modified comment.
11138         (DECL_SPECIFIC_COUNT): Likewise.
11139         (struct lang_decl): New field throws_list.
11140         (IS_UNCHECKED_EXPRESSION_P): New macro.
11141         * lex.c (java_lex): Generate location information for THROW_TK.
11142         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
11143         EXCEPTIONS_P): New macros.
11144         (enum jdep_code): New value JDEP_EXCEPTION.
11145         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
11146         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
11147         PATCH_METHOD_RETURN_ERROR): New macros.
11148         (patch_method_invocation_stmt): Added new argument to prototype.
11149         (patch_synchronized_statement, patch_throw_statement,
11150         check_thrown_exceptions, check_thrown_exceptions_do,
11151         purge_unchecked_exceptions, check_throws_clauses): New function
11152         prototypes.
11153         * parse.y Fixed typo in keyword section.
11154         (throw:): Rule tagged <node>.
11155         (THROW_TK): Keyword tagged <operator>.
11156         (method_header:): Last argument to call to method_header passed
11157         from throws: rule.
11158         (throws:, class_type_list:, throw_statement:,
11159         synchronized_statement:, synchronized:): Defined actions.
11160         (method_header): New local variable current. Register exceptions
11161         from throws clause.
11162         (java_complete_tree): Complete and verify exceptions from throws
11163         clause.
11164         (complete_class_report_errors): Error message on exceptions not
11165         found
11166         (java_check_regular_methods): Fixed typo. Shortcut on private
11167         overriding methods. Changed error message on method
11168         redefinition. Check for throws clause compatibility.
11169         (check_throws_clauses): New function.
11170         (java_check_abstract_methods): Use DECL_NAME for wfl or current
11171         method. Changed error message on method redefinition.
11172         (currently_caught_type_list): New static variable.
11173         (java_complete_expand_methods): Purge unchecked exceptions from
11174         throws clause list. Call PUSH_EXCEPTIONS before walk and
11175         POP_EXCEPTIONS after.
11176         (resolve_qualified_expression_name): Pass new argument as NULL to
11177         patch_method_invocation_stmt.
11178         (patch_method_invocation_stmt): New argument ref_decl. Invoke
11179         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
11180         argument list when appropriate. Use new argument if non null to
11181         store selected method decl.
11182         (patch_invoke): Convert if necessary args of builtin types before
11183         forming CALL_EXPR. Argument list no longer reversed here.
11184         (invocation_mode): Treat final methods as static methods.
11185         (java_complete_tree): New cases for THROW_EXPR: and
11186         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
11187         function call.
11188         (complete_function_arguments): No more RECORD_TYPE
11189         conversion. Function parameter nodes no longer saved.
11190         (valid_ref_assignconv_cast_p): Avoid handling null type.
11191         (patch_binop): Fixed null constant reference handling.
11192         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
11193         BUILD_THROW macros.
11194         (patch_try_statement): Fixed comments. Record caught types in
11195         list, push the list, expand try block and pop the list.
11196         (patch_synchronized_statement, patch_throw_statement,
11197         check_thrown_exceptions, check_thrown_exceptions_do,
11198         purge_unchecked_exceptions): New functions.
11199         * typeck.c (lookup_argument_method): Allow WFL in place of method
11200         DECL_NAME during method definition check
11201
11202 1998-10-09  Tom Tromey  <tromey@cygnus.com>
11203
11204         * gjavah.c (decode_signature_piece): New function.
11205         (print_c_decl): Use it.  Added `name_override' argument.
11206         (print_method_info): Use name_override argument to print_c_decl.
11207         (seen_fields): Removed.
11208         (print_field_info): Don't update seen_fields.
11209         (struct method_name): New structure.
11210         (method_name_list): New global.
11211         (print_method_info): Add new method to list of methods.
11212         (name_is_method_p): New function.
11213         (print_field_info): If field name has same name as method, then
11214         change field name.
11215         (process_file): Parse methods before fields.
11216         (field_pass): New global.
11217         (HANDLE_END_FIELD): Take field_pass into account.
11218
11219 Wed Oct  7 12:10:48 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11220
11221         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
11222         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11223
11224 Sat Oct  3 13:29:46 1998  Anthony Green  <green@cygnus.com>
11225
11226         * jvspec.c: Fix bug in jvgenmain_spec patch.
11227
11228 Fri Oct  2 17:22:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11229
11230         * Makefile.in (lang.o:): Install dependency on java-tree.def.
11231         * decl.c (soft_exceptioninfo_call_node): New global variable.
11232         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
11233         takes extra integer argument. soft_exceptioninfo_call_node
11234         initialized.
11235         * except.c (java_set_exception_lang_code): New function
11236         (method_init_exceptions): Called here.
11237         (prepare_eh_table_type): New function.
11238         (expand_end_java_handler): Called here.
11239         * expr.c (build_java_throw_out_of_bounds_exception): Now features
11240         one argument. Modified generation of call to
11241         soft_badarrayindex_node to use new argument.
11242         (build_java_arrayaccess): Pass faulty index value to
11243         build_java_throw_out_of_bounds_exception.
11244         (generate_name): New function.
11245         (java_lang_expand_expr): New local variables node, current,
11246         has_finally_p. Expand TRY_EXPR node.
11247         (process_jvm_instruction): Replace top of the stack with thrown
11248         object reference when entering exception handler.
11249         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
11250         specific tree codes.
11251         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
11252         global.
11253         (DECL_SPECIFIC_COUNT): New macro.
11254         (prepare_eh_table_type, java_set_exception_lang_code,
11255         generate_name): New function declarations.
11256         (match_java_method): Declaration deleted.
11257         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
11258         macros.
11259         * lex.c (TRY_TK, CATCH_TK): Generate location information.
11260         * parse.h (redefinition_error, refine_accessible_methods_list,
11261         can_cast_to_p): Function declaration removed.
11262         (classitf_redefinition_error, variable_redefinition_error,
11263         parse_jdk1_1_error, find_applicable_accessible_methods_list,
11264         find_most_specific_methods_list, argument_types_convertible,
11265         enter_a_block, valid_builtin_assignconv_identity_widening_p,
11266         valid_cast_to_p, valid_method_invocation_conversion_p,
11267         try_reference_assignconv, add_stmt_to_compound,
11268         build_jump_to_finally, build_tree_list, patch_try_statement,
11269         java_get_catch_block): New function declarations.
11270         * parse.y (string_buffer_type): Global variable deleted.
11271         (group_of_labels, catches, catch_clause, catch_clause_parameter,
11272         finally): Rules tagged <node>.
11273         (TRY_TK, CATCH_TK): Token tagged <operator>.
11274         (class_body_declaration:, class_member_declaration:,
11275         formal_parameter:, explicit_constructor_invocation:,
11276         interface_member_declaration:, constant_declaration:,
11277         primary_no_new_array:, class_instance_creation_expression:,
11278         array_creation_expression:): Issue error on unsuported JDK1.1
11279         features.
11280         (try_statement:, catches:, finally:): Define actions.
11281         (catch_clause_parameter): New rule.
11282         (catch_clause:): Use new rule catch_clause_parameter.
11283         (parse_jdk1_1_error): New function.
11284         (redefinition_error): Renamed classitf_redefinition_error.
11285         (variable_redefinition_error): New function.
11286         (check_class_interface_creation): Call
11287         classitf_redefinition_error.
11288         (java_complete_tree): Added error message on JDEP_TYPE: case.
11289         (complete_class_report_errors): Fixed indentation.
11290         (declare_local_variables): Call variable_redefinition_error.
11291         (source_end_java_method): Call java_set_exception_lang_code and
11292         emit_handlers where appropriate.
11293         (java_method_add_stmt): Call add_stmt_to_block.
11294         (add_stmt_to_block): New function.
11295         (lookup_method_invoke): Fixed outside comment. new local variable
11296         candicates.  Call find_applicable_accessible_methods_list and
11297         find_most_specific_methods_list when searching for a
11298         method. Modified error report to list possible candidates when
11299         applicable.
11300         (find_applicable_accessible_methods_list,
11301         find_most_specific_methods_list, argument_types_convertible): New
11302         function.
11303         (refine_accessible_methods_list): Function deleted.
11304         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
11305         expr (if applicable) before calling patch_array_ref.
11306         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
11307         (enter_block): Fixed comment.
11308         (enter_a_block): New function.
11309         (patch_assignment): Reorganized. Call try_reference_assignconv for
11310         references. Call valid_cast_to_p instead of can_cast_to_p.
11311         (try_reference_assignconv,
11312         valid_builtin_assignconv_identity_widening_p): New functions.
11313         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
11314         (valid_cast_to_p, valid_method_invocation_conversion_p): New
11315         functions.
11316         (build_string_concatenation): Don't resolve StringBuffer.
11317         (patch_cast): Fixed inverted arguments.
11318         (patch_array_ref): Code to save array expr deleted. Call
11319         valid_cast_to_p instead of can_cast_to_p.
11320         (generate_labeled_block): Call generate_name.
11321         (build_jump_to_finally, build_try_statement, java_get_catch_block,
11322         patch_try_statement): New functions.
11323         * typeck.c (match_java_method): Function deleted.
11324
11325 Fri Oct  2 13:48:36 1998  Anthony Green  <green@cygnus.com>
11326
11327         * jvspec.c: jvgenmain_spec uses different temporary file names.
11328
11329 Fri Oct  2 12:50:19 1998  Anthony Green  <green@cygnus.com>
11330
11331         * jvspec.c (lang_specific_driver): Fail if user specifies
11332         --main= when not linking.
11333
11334 Mon Sep 28 13:48:33 1998  Tom Tromey  <tromey@cygnus.com>
11335
11336         * class.c (make_class_data): Push value for `thread' field.
11337         * decl.c (init_decl_processing): Added `thread' field to class.
11338
11339         * class.c (add_field): Always make static fields externally
11340         visible.
11341
11342 Sat Sep 26 08:22:47 1998  Anthony Green  <green@cygnus.com>
11343
11344         * expr.c (build_java_athrow,
11345         build_java_throw_out_of_bounds_exception, expand_invoke,
11346         build_newarray, expand_java_multianewarray, build_java_monitor):
11347         Update comments to reflect _Jv_* function names.
11348
11349 Fri Sep 25 16:03:02 1998  Per Bothner  <bothner@cygnus.com>
11350
11351         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
11352         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
11353         * parse.y (expand_start_java_method):  Likewise.
11354
11355 Thu Sep 24 12:20:35 1998  Per Bothner  <bothner@cygnus.com>
11356
11357         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
11358
11359         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
11360         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
11361         * expr.c:  Remove no-longer-needed calls to promote_type.
11362         * decl.c (give_name_to_locals):  Liekwise.
11363         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
11364         * parse.y:  Add/remove promote_type calls as appropriate.
11365         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
11366         (parse_signature_string):  Likewise.
11367         (build_java_array_type):  Fix for now signature convenions.
11368
11369         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
11370
11371 Wed Sep 23 14:49:35 1998  Tom Tromey  <tromey@cygnus.com>
11372
11373         * class.c (init_class_processing): libjava function renamed to
11374         _Jv_RegisterClass.
11375
11376 Tue Sep 22 12:00:02 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11377
11378         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
11379         * java-tree.def: Fixed DEFTREECODE third argument.
11380         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
11381         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
11382         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
11383         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
11384         JAVA_THIS_EXPR): Now replaced by tree code definitions.
11385         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
11386         * lang.c (java_tree_code_type, java_tree_code_length,
11387         java_tree_code_name): New arrays.
11388         (lang_init): Append Java tree node definitions to Gcc ones.
11389         * lex.c (expression_obstack): Declared as extern when JC1_LITE
11390         defined.
11391         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
11392         wfl_to_string.
11393         (java_lex): Allow declaration of empty string constants. Retain
11394         location information on CASE_TK and DEFAULT_TK.
11395         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
11396         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
11397         Modified to be more robust.
11398         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
11399         (build_new_invocation, try_builtin_assignconv,
11400         patch_switch_statement, string_constant_concatenation,
11401         build_string_concatenation, patch_string_cst, patch_string,
11402         java_expand_switch): New function declarations.
11403         * parse.y: Rules related to switch and EH tagged <node>.
11404         (label_id): Set to NULL_TREE
11405         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
11406         tree nodes.
11407         (this_or_super:): Fixed indentation.
11408         (statement:, statement_nsi:, statement_without_trailing_substatement:,
11409         statement_expression:): Removed call to RULE on all sub-rules.
11410         (switch_expression:, switch_labels:): New rules.
11411         (switch_statement:, switch_block:, switch_block_statement_groups:,
11412         switch_block_statement_group:, switch_labels:, switch_label:):
11413         Defined actions.
11414         (throw_statement:, synchronized_statement:, try_statement:):
11415         Defined temporary actions.
11416         (class_instance_creation_expression:): Call
11417         build_new_invocation. Fixed indentation.
11418         (field_access): Fixed indentation.
11419         (method_invocation): Likewise.
11420         (make_qualified_primary): Use THIS_EXPR.
11421         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
11422         resolving from SUPER, set *type_found.
11423         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
11424         (java_complete_tree): Removed unused local variable `location'. Case
11425         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
11426         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
11427         on MODIFY_EXPR: and all binary operator tree code cases. Removed
11428         STRING_CST: case. default: checks for patchable strings.
11429         (complete_function_arguments): Transform string constant or
11430         crafted StringBuffer if necessary.
11431         (build_method_invocation): Fixed comments.
11432         (build_new_invocation): New function.
11433         (patch_assignment): Call try_builtin_assignconv to figure a valid
11434         assignment conversion between builtin types.
11435         (try_builtin_assignconv): New function.
11436         (build_binop): Use URSHIFT_EXPR directly to call build.
11437         (operator_string): Use UNARY_PLUS_EXPR.
11438         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
11439         operator.
11440         (do_merge_string_cste, merge_string_cste,
11441         string_constant_concatenation, build_string_concatenation,
11442         patch_string, patch_string_cst): New function.
11443         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
11444         (patch_unaryop): Likewise. New test of valid ++/-- operands.
11445         (build_newarray_node): Use NEW_ARRAY_EXPR.
11446         (build_this): Use THIS_EXPR.
11447         (build_return): Enable debug information on return statement.
11448         (build_if_else_statement): Likewise.
11449         (complete_labeled_statement): Fixed related comment.
11450         (build_loop_body): Fixed comment.
11451         (build_bc_statement): Enable debug information on break/continue
11452         statements.
11453         (patch_bc_statement): Fixed typos. Handle SWITCH statement
11454         context.
11455         (patch_switch_statement, case_identity, java_expand_switch): New
11456         functions.
11457
11458 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11459
11460         * buffer.h (BUFFER_INIT):  New macro.
11461         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
11462         Pass (struct jcf_partial *state) to most functions.
11463         (jcf_block, jcf_relocation):  New types.
11464         Support labels, branches, conditionals, loops.
11465
11466 Mon Sep 21 15:08:48 1998  Tom Tromey  <tromey@cygnus.com>
11467
11468         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
11469
11470 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11471
11472         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
11473         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
11474         not integer_type_node (INT_TYPE_SIZ bits).
11475
11476         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
11477
11478         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
11479         * jcf-dump.c (print_exception_table):  New function.
11480         (disassemble_method):  Better handling of wide instructions.
11481         Make more robust for bad input.
11482
11483 Wed Sep 30 20:53:51 1998  Jeffrey A Law  (law@cygnus.com)
11484
11485         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
11486         FreeBSD.
11487
11488 Thu Sep 17 19:45:01 1998  Jeffrey A Law  (law@cygnus.com)
11489
11490         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
11491
11492 Thu Sep 17 16:21:52 1998  Tom Tromey  <tromey@cygnus.com>
11493
11494         * Makefile.in ($(PARSE_H)): Removed target.
11495
11496 Thu Sep 17 01:57:07 1998  Jeffrey A Law  (law@cygnus.com)
11497
11498         * Makefile.in (JAVA_OBJS): Add memmove.o
11499         (memmove.o): New target & rules.
11500
11501 Tue Sep 15 23:21:55 1998  Tom Tromey  <tromey@cygnus.com>
11502
11503         * expr.c (expand_invoke): Don't generate a call to the class init
11504         code.
11505
11506 Mon Sep 14 10:14:47 1998  Jeffrey A Law  (law@cygnus.com)
11507
11508         * Makefile.in: Add many missing dependencies.
11509         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
11510         as appropriate.
11511         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
11512         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
11513
11514 Fri Sep 11 14:05:21 1998  Per Bothner  <bothner@cygnus.com>
11515
11516         * decl.c (complete_start_java_method):  If method is static (and
11517         not private) call _Jv_InitClass.
11518         * expr.c (expand_invoke):  Don't call build_class_init.
11519
11520         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
11521
11522 Thu Sep 10 10:33:31 1998  Jeffrey A Law  (law@cygnus.com)
11523
11524         * Make-lang.in (GCJ): Define before using.
11525
11526 Wed Sep  9 21:23:10 1998  Jeffrey A Law  (law@cygnus.com)
11527
11528         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
11529         losing due to namespace pollution in GNU getopt.h
11530
11531 Wed Sep  9 13:33:39 1998  Tom Tromey  <tromey@cygnus.com>
11532
11533         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
11534         (java.all.cross): Likewise.
11535         (java.rest.encap): Likewise.
11536
11537 Tue Sep  8 10:34:05 1998  Jeffrey A Law  (law@cygnus.com)
11538
11539         * gjavah.c (print_class_decls): Fix thinko in arglist
11540         * jcv-io.c (find_classfile): Similarly.
11541
11542 Mon Sep  7 13:59:49 1998  Jeffrey A Law  (law@cygnus.com)
11543
11544         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
11545
11546 Sat Sep  5 16:08:01 1998  Tom Tromey  <tromey@cygnus.com>
11547
11548         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
11549         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
11550         * Makefile.in (PARSE_C): New macro.
11551         (PARSE_H): Likewise.
11552         (PARSE_SCAN_C): Likewise.
11553         ($(PARSE_C)): Target renamed from parse.c.
11554         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
11555         (clean): Remove parse-scan.c as well.
11556         (parse.o): Depend on $(PARSE_C).
11557
11558 Sat Sep  5 08:48:40 1998  Anthony Green  <green@cygnus.com>
11559
11560         * README, license.terms: Removed.
11561
11562         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
11563         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
11564         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
11565         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
11566         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
11567         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
11568         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
11569         and Java trademark attribution.
11570
11571 Fri Sep  4 10:42:05 1998  Tom Tromey  <tromey@cygnus.com>
11572
11573         * Makefile.in: Use gcjh, not gjavah.
11574         * config-lang.in (stagestuff): Use gcjh, not gjavah.
11575         * Make-lang.in: Changed gjavah to gcjh everywhere.
11576
11577 Thu Sep  3 18:04:09 1998  Per Bothner  <bothner@cygnus.com>
11578
11579         * gjavah.c:  Support new -prepend -add -append flags.
11580         (print_method_info):  Method is not virtual if class is final.
11581
11582 Thu Sep  3 12:03:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11583
11584         * jv-scan.c: Fixed copyright assignment.
11585         * keyword.gperf: Likewise.
11586         * keyword.h: Likewise.
11587         * lex.c: Fixed copyright assignment.
11588         (java_lex): Push unicode back when parsing '<'.
11589         * lex.h: Fixed copyright assignment.
11590         * parse-scan.y: Likewise.
11591         * parse.h: Fixed copyright assignment.
11592         (build_debugable_stmt, complete_for_loop): New function prototypes.
11593         * parse.y: Fixed copyright assignment.
11594         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
11595         size_zero_node when completing a loop with no exit condition.
11596         (for_statement_nsi:): Define action.
11597         (for_init:, for_update:): Return size_zero_node when empty.
11598         (declare_local_variables): Call build_debugable_stmt.
11599         (build_debugable_stmt): New function.
11600         (build_loop_body): Build debugable statement around loop
11601         condition part.
11602         (complete_loop_body): Take into account the debugable statement
11603         around the EXIT_EXPR.
11604         (complete_loop_body): New function.
11605         (patch_exit_expr): Fixed condition inversion.
11606
11607 Wed Sep  2 11:53:58 1998  Tom Tromey  <tromey@cygnus.com>
11608
11609         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
11610         name of thread define.
11611         * jvspec.c (THREAD_NAME): New macro.
11612         (GCLIB): Likewise.
11613         (THREADLIB): Likewise.
11614         (lang_specific_driver): Recognize attempt to link with thread
11615         library or gc library.  Recognize -ljava on command line so it
11616         isn't linked against more than once.
11617
11618 Wed Sep  2 11:28:35 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11619
11620         * parse-scan.y (report_main_declaration): Name of the class
11621         containing `main' can be a qualified name.
11622
11623 Mon Aug 31 13:25:58 1998  Tom Tromey  <tromey@cygnus.com>
11624
11625         * config-lang.in: Changed gjavac to gjc everywhere.
11626         * Make-lang.in: Changed gjavac to gjc everywhere.
11627
11628 Thu Aug 27 02:28:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11629
11630         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
11631         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
11632         and install the files.
11633         * Makefile.in (JAVA_OBJS_LITE): New variable.
11634         (compiler:): Now include jv-scan as a dependency.
11635         (../jv-scan$(exeext), parse-scan.c): New targets.
11636         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
11637         * config-lang.in (compilers): Removed gcj, gjavah from the list.
11638         * jcf-parse.c (parse_source_file): Call java_layout_classes and
11639         check for errors even if parse_only.
11640         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
11641         defined.
11642         (yylex): New function. Uses java_lex body.
11643         (java_lex): Removed commented out statement. Remove local variable
11644         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
11645         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
11646         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
11647         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
11648         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
11649         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
11650         where appropriate.
11651         (java_lex_error): Empty if JC1_LITE is defined.
11652         (java_get_line_col): Return 0 if JC1_LITE is defined.
11653         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
11654         SET_MODIFIER_CTX): Moved into the section containing the macros
11655         conditionally defined by JC1_LITE.
11656         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
11657         argument if JC1_LITE is defined.
11658         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
11659         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
11660         is defined.
11661         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
11662         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
11663         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
11664         to different values according to JC1_LITE.
11665         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
11666         declared if JC1_LITE set.
11667         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
11668         defined if JC1_LITE not set.
11669         (struct parser_ctx): Reorganized and skip the jc1 front end part
11670         if JC1_LITE set.
11671         (java_layout_classes): New function definition.
11672         (java_push_parser_context, java_init_lex, yyparse, yylex,
11673         yyerror): Prototype always declared. All other static function
11674         prototypes declared only if JC1_LITE is not set.
11675         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
11676         declared in parse.h.
11677         (java_layout_classes): New function.
11678         (java_complete_expand_methods): No longer layout the class here.
11679         * parse-scan.y: New file.
11680         * jv-scan.c: New file.
11681
11682 Tue Aug 25 10:17:54 1998  Tom Tromey  <tromey@cygnus.com>
11683
11684         * gjavah.c (main): Handle -friend option.
11685         (friend_specs): New global.
11686         (generate_access): Handle friend_specs.
11687         (process_file): Likewise.
11688         (MAX_FRIENDS): New macro.
11689         (friend_count): New global.
11690         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
11691         Changed all callers.
11692
11693 Mon Aug 24 20:19:27 1998  Per Bothner  <bothner@cygnus.com>
11694
11695         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
11696         (main):  Handle processing all the entries of a named .zip archive.
11697         * jcf-io.c (jcf_trim_old_input):  New function.
11698         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
11699
11700 Mon Aug 24 07:35:13 1998  Per Bothner  <bothner@cygnus.com>
11701
11702         * lang.c (flag_assume_compiled):  Make default be on.
11703
11704 Fri Aug 21 17:29:04 1998  Per Bothner  <bothner@cygnus.com>
11705
11706         * jcf-dump.c:  Add bunches of flags to control output more.
11707         (process_class):  New function;  support printing more than one class.
11708         (main): Support new --print-main and --javap flags.
11709         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
11710         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
11711
11712 Thu Aug 20 14:24:47 1998  Per Bothner  <bothner@cygnus.com>
11713
11714         Change mangling of dispatch table to match C++ vtable (w/thunks).
11715         * class.c (build_dtable_decl), java-tree.h:  New function.
11716         (make_class_data):  Call it.
11717         * decl.c (init_decl_processing):  Likewise.
11718
11719 Wed Aug 19 17:57:07 1998  Warren Levy  <warrenl@cygnus.com>
11720
11721         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
11722         soft_anewarray; adjust args passed.
11723         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
11724         match _Jv_NewObjectArray.
11725
11726 Wed Aug 19 09:33:23 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11727
11728         * decl.c (push_labeled_block, pop_labeled_block): New functions.
11729         * expr.c (loopup_label): Call create_label_decl.
11730         (create_label_decl): New function.
11731         (java_lang_expand_expr): Call expand_start_bindings with argument
11732         set to zero.
11733         * java-tree.h Added space after PROTO in function declarations
11734         when necessary.
11735         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
11736         (create_label_decl, push_labeled_block): New function
11737         declarations.
11738         * lex.c (label_id): Initialize.
11739         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
11740         switch.
11741         * parse.h Added space after PROTO in function declarations when
11742         necessary.
11743         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
11744         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
11745         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
11746         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
11747         macros.
11748         (struct parser_ctxt): New fields current_loop,
11749         current_labeled_block.
11750         (build_if_else_statement, patch_if_else_statement,
11751         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
11752         generate_labeled_block, complete_labeled_statement,
11753         build_bc_statement, patch_bc_statement, patch_loop_statement,
11754         build_new_loop, build_loop_body, complete_loop_body): New function
11755         declarations.
11756         * parse.y (java_warning_count): New global variable.
11757         (label_id): New static variable.
11758         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
11759         (block:): Return size_zero_node when block is empty.
11760         (empty_statement:): Return size_zero_node.
11761         (statement:): Implement supplemental action when for_statement: is
11762         reduced.
11763         (label_decl:): New rule.
11764         (labeled_statement:): Rewritten using label_decl. Actions
11765         implemented.
11766         (labeled_statement_nsi:): Likewise.
11767         (if_then_statement): Actions implemented.
11768         (while_expression): New rule.
11769         (while_statement:): Rewritten using while_expression. Actions
11770         implemented.
11771         (while_statement_nsi:): Likewise.
11772         (do_statement_begin:): New rule.
11773         (do_statement:): Rewritten using do_statement_begin. Actions
11774         implemented.
11775         (for_statement:): Rewritten using for_begin. Actions implemented.
11776         (for_statement_nsi:): Likewise.
11777         (for_header:, for_begin:): New rules.
11778         (for_init:): Actions implemented.
11779         (statement_expression_list:, break_statement:,
11780         continue_statement:): Likewise.
11781         (yyerror): Count number of issued warning(s).
11782         (java_report_errors): Report error(s) and/or warning(s).
11783         (java_complete_class): Use build_java_argument_signature to
11784         recompute completed method signature.
11785         (java_check_regular_methods): New locals method_wfl and aflags.
11786         Use method_wfl instead of lookup_cl during error reports. Fixed
11787         indentation and modified some error messages. Use
11788         lang_printable_name in method instead of the DECL_NAME. New code
11789         to issue warnings on methods not overriding corresponding methods
11790         private to a different package.
11791         (java_method_add_stmt): Call add_stmt_to_compound.
11792         (add_stmt_to_compound): New function.
11793         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
11794         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
11795         (build_if_else_statement, patch_if_else_statement,
11796         build_labeled_block, generate_labeled_block,
11797         complete_labeled_statement, build_new_loop, build_loop_body,
11798         complete_loop_body, patch_loop_statement, build_bc_statement,
11799         patch_bc_statement, patch_exit_expr): New functions.
11800         * typeck.c (build_java_signature): Build argument signature before
11801         enclosing it in between parenthesis.
11802
11803 Mon Aug 17 17:44:24 1998  Warren Levy  <warrenl@cygnus.com>
11804
11805         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
11806         (JAVA_OBJS): Added reminder comment
11807
11808 Thu Aug 13 10:01:45 1998  Nick Clifton  <nickc@cygnus.com>
11809
11810         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
11811         be interpreted as a long long.
11812
11813 Thu Aug 13 14:34:07 1998  Warren Levy  <warrenl@cygnus.com>
11814
11815         * decl.c (init_decl_processing): Use _Jv_InitClass, not
11816         soft_initialise_class.  Use _Jv_NewMultiArray, not
11817         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
11818         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
11819         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
11820         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
11821
11822 Wed Aug 12 14:23:13 1998  Per Bothner  <bothner@cygnus.com>
11823
11824         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
11825         length_identifier_node):  New global tree node constants.
11826         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
11827         Replace uses by super_identifier_node etc.
11828         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
11829
11830         * parse.y (resolve_field_access):  Don't special-case ".length" if
11831         flag_emit_class_files.
11832         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
11833         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
11834         and ARRAY.length.
11835
11836 Tue Aug 11 11:31:55 1998  Per Bothner  <bothner@cygnus.com>
11837
11838         * decl.c (init_decl_processing): Remove unused method_type_node fields.
11839         * class.c (make_method_value):  Remove init for removed fields.
11840
11841         * class.c (layout_class):  Use build_java_argument_signature.
11842         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
11843
11844         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
11845         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
11846         (build_java_signature):  Don't use push_java_argument_signature.
11847
11848         * typeck.c (lookup_argument_method):  New function.
11849         * parse.y (java_check_regular_methods):  Use lookup_argument_method
11850         instead of lookup_java_method2 followed by lookup_java_method.
11851
11852         * parse.y (check_method_redefinition):  Minor optimization.
11853
11854         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
11855         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
11856
11857 Mon Aug 10 09:57:15 1998  Tom Tromey  <tromey@cygnus.com>
11858
11859         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
11860         c-pragma.o.
11861
11862         * gjavah.c (java_float_finite): Use K&R-style definition.
11863         (java_double_finite): Likewise.
11864         (generate_access): Now returns void.  Changed all callers.
11865         (last_access_generated): Removed.
11866         (process_file): Only make a single pass over the .class file.
11867
11868 Wed Jul 29 17:50:23 1998  Per Bothner  <bothner@cygnus.com>
11869
11870         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
11871         for compatibility for G++ (with -fvtable-thunks).
11872         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
11873
11874         * gjavah.c (process_file):  Use public inheritance for super-class.
11875
11876 Wed Jul 29 13:19:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11877
11878         * lex.c (java_init_lex): Initialize ctxp->package.
11879         * parse.h (struct parser_ctxt): package and package_len replaced
11880         by tree package, an identifier node. Field method_decl_list is
11881         gone. Fixed comments.
11882         (lookup_field_wrapper, merge_qualified_name, not_accessible,
11883         class_in_current_package): New function prototypes.
11884         * parse.y (array_type:): Set class loaded flag on primitive type
11885         arrays.
11886         (package_declaration:): Assign ctxp->package to the
11887         identifier node.
11888         (method_invocation:): Handle invocation of method qualified by
11889         `super'.
11890         (single_type_import_declaration:): Removed ambiguity check.
11891         (java_pop_parser_context): New local variable `next'. Reset and
11892         set IMPORT_CLASSFILE_NAME flags on current and previous import
11893         list.
11894         (java_accstring_lookup): Use new local macro COPY_RETURN.
11895         (lookup_field_wrapper): New function.
11896         (parser_qualified_classname): Use merge_qualified_name.
11897         (parser_check_super_interface): Broaden error message.
11898         (do_resolve_class): Check for qualified class name in the current
11899         compilation unit if appropriate.
11900         (process_imports): Check for already defined classes.
11901         (check_pkg_class_access): Got rid of call to
11902         get_access_flags_from_decl.
11903         (java_complete_expand_methods): Call safe_layout_class based on
11904         the current class size.
11905         (make_qualified_primary): Build a WFL qualification on primary if
11906         none exists.
11907         (merge_qualified_name): New function.
11908         (make_qualified_name): Use merge_qualified_name.
11909         (resolve_expression_name): Use safe_lookup_field.
11910         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
11911         (resolve_qualified_expression_name): Likewise. Check on resolved
11912         element accessibility.
11913         (not_accessible_p, class_in_current_package): New functions.
11914         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
11915         (patch_method_invocation_stmt): Merged common pieces. Check
11916         accessibility of invoked method.
11917         (check_for_static_method_reference): Add returned type in error
11918         message.
11919         (invocation_mode): Get rid of bogus check on PRIVATE methods.
11920         (refine_accessible_methods_list): Merged two conditions in test.
11921         (java_complete_class): Sanity check on stabilize_ref gone.
11922         * zextract.c (read_zip_archive): Cast lseek second argument to long.
11923
11924 Tue Jul 28 21:39:22 1998  Per Bothner  <bothner@cygnus.com>
11925
11926         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
11927
11928 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
11929
11930         * gjavah.c (F_NAN): Removed.
11931         (F_NAN_MASK): New macro.
11932         (F_POSITIVE_INFINITY): Removed.
11933         (F_NEGATIVE_INFINITY): Likewise.
11934         (java_float_finite): Rewrote.
11935         (D_NAN_MASK): Renamed.
11936         (java_double_finite): Rewrote.
11937         (D_POSITIVE_INFINITY): Removed.
11938         (D_NEGATIVE_INFINITY): Likewise.
11939
11940         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
11941         If verbose, print underlying representation of value in hex.
11942
11943 Fri Jul 24 14:14:32 1998  Per Bothner  <bothner@cygnus.com>
11944
11945         * buffer.h, buffer.c:  New files.
11946         * Makefile.in (JAVA_OBJS):  Add buffer.o.
11947
11948         Support locals variables and writing their debug entries to .class.
11949         * jcf-write.c:  Simplify some by user new buffer type.
11950         (vode_buffer_grow):  Removed.
11951         (struct localvar_info):  New type.
11952         (localsvars, localvartable):  New buffers.
11953         (localvar_alloc, localvar_free):  New functions.
11954         (generate_bytecode_insns):  Handle local variables.
11955         (generate_classfile):  Write LocalVariableTable attribute.
11956
11957 Fri Jul 24 13:46:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11958
11959         * jcf-io.c (open_in_zip): Check the zipfile magic number.
11960         * zipfile.h (ZIPMAGIC): New macro.
11961
11962 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
11963
11964         * Makefile.in (gjavah.o): Updated dependencies.
11965         (jcf-dump.o): Likewise.
11966         (all.indirect): Use ../gjavah.
11967         (../gjavah$(exeext)): Likewise.
11968         (clean): Don't remove gjavah.
11969         (clean): Remove parse.c, not java/parse.c.
11970         * Make-lang.in (java): Added gjavah.
11971         (gjavah$(exeext)): New target.
11972         (GJAVAH_SOURCES): New macro.
11973         (java.all.build): Added gjavah.
11974         (java.all.cross): Likewise.
11975         (java.rest.encap): Likewise.
11976         * config-lang.in (compilers, stagestuff): Added gjavah.
11977
11978 Thu Jul 23 18:33:56 1998  Tom Tromey  <tromey@cygnus.com>
11979
11980         * gjavah.c (java_float_finite): New function.
11981         (java_double_finite): Likewise.
11982         (F_POSITIVE_INFINITY): New macro.
11983         (F_NEGATIVE_INFINITY): Likewise.
11984         (F_NAN): Likewise.
11985         (D_POSITIVE_INFINITY): Likewise.
11986         (D_NEGATIVE_INFINITY): Likewise.
11987         (D_NAN): Likewise.
11988         (print_field_info): Use java_float_finite and java_double_finite.
11989
11990 Thu Jul 23 15:28:24 1998  Per Bothner  <bothner@cygnus.com>
11991
11992         * parse.y (method_header):  Name "this" implicit argument.
11993
11994 Wed Jul 22 15:47:30 1998  Per Bothner  <bothner@cygnus.com>
11995
11996         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
11997         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
11998         (put_linenumber):  New function.
11999         (generate_bytecode_insns, generate_classfile):  Write line numbers.
12000
12001 Wed Jul 22 14:39:00 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12002
12003         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
12004         (lookup_name, build_known_method_ref, build_class_init,
12005         build_invokevirtual, invoke_build_dtable, match_java_method,
12006         build_field_ref, pushdecl_force_head, build_java_binop,
12007         binary_numeric_promotion, build_decl_no_layout,
12008         build_java_arrayaccess, build_newarray, build_anewarray,
12009         build_java_array_length_access, build_java_arraynull_check): New
12010         extern function prototypes.
12011         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12012         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
12013         java-tree.h.
12014         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
12015         to NULL
12016         * jcf.h (jcf_out_of_synch): New extern function prototype.
12017         * parse.h: Static/global function implemented in parse.y
12018         prototyped and declarations moved at the end of the file.
12019         (DECL_P): Check that the argument isn't null.
12020         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12021         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
12022         (QUAL_DECL_TYPE): New macro.
12023         (PARAMS): Macro definition removed.
12024         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
12025         (return_statement:): Call build_return.
12026         (field_access:): Call make_qualified_primary in sub rule.
12027         (method_invocation:): Build method invocation and call
12028         make_qualified_primary when processing primaries.
12029         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
12030         get_type_from_signature.
12031         (java_check_regular_method): Extra integer 0 argument when calling
12032         lookup_java_method2.
12033         (lookup_java_interface_method2): Extra method DECL argument when
12034         calling lookup_java_interface_method2.
12035         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
12036         COMPOUND_EXPR node.
12037         (java_complete_expand_method): Layout current class iff not
12038         already done. Don't process interface's methods.
12039         (java_complete_expand_method): Use super class only if it
12040         exists. Use current class otherwise.
12041         (make_qualified_primary): New function.
12042         (resolve_expression_name): Process qualified expression or
12043         expression from primary the same way.
12044         (resolve_expression_name): Two last arguments to
12045         resolve_field_access are now NULL_TREEs.
12046         (resolve_field_access): New variable is_static. Local field must
12047         be DECLs. is_static computed on field DECLs only. Append code in
12048         where_found to the field access if necessary. Use QUAL_DECL_TYPE
12049         to initialize field_type.
12050         (resolve_qualified_expression_name): New local variable,
12051         previous_call_static and is_static. Handle primaries with function
12052         calls, casts, array references and `this'. `super' now handled as
12053         `(super_class)this'. Use is_static to clarify boolean expressions.
12054         Added code to handle case where a proper handle is required to
12055         access a field. Use QUAL_DECL_TYPE where applicable.
12056         (maybe_access_field): New function.
12057         (patch_method_invocation_stmt): New arguments primary, where,
12058         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
12059         deleted. Use `where' as a type to search from if specified. Check
12060         for static method reference where forbidden. Append primary or
12061         current_this to the argument list if not calling constructor nor
12062         static methods.
12063         (check_for_static_method_reference): New function.
12064         (patch_invoke): Layout the class on which new is done if
12065         necessary.
12066         (lookup_method_invoke): Changed format to report errors on
12067         methods.
12068         (qualify_ambiguous_name): New local variable this_found. Now
12069         handle things from primaries. Method call are considered
12070         expression names.
12071         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
12072         changed into NULLs.
12073         (not_initialized_as_it_should_p): Comply with the new DECL_P.
12074         (java_complete_tree): New case fo RETURN_EXPR. Process function
12075         call arguments in separate function.
12076         (complete_function_arguments): New function.
12077         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
12078         anymore.
12079         (patch_assignment): Take the return function slot into account as
12080         a RHS. Distinguish assignment from a return.
12081         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
12082         when checking methods in interfaces.
12083         (resolve_type_during_patch): NULL argument to unresolve_type_p
12084         instead of NULL_TREE.
12085         (patch_newarray): Fixed typo in comment.
12086         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
12087         (build_return, patch_return): New functions.
12088         * typeck.c (lookup_java_constructor): Fixed typo in comment.
12089
12090 Tue Jul 21 12:10:04 1998  Per Bothner  <bothner@cygnus.com>
12091
12092         * constants.c (find_name_and_type_constant, find_fieldref_index,
12093         find_methodref_index):  New methods.
12094         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
12095         just return given method.  Also, rename to build_known_method_ref.
12096         (expand_invoke):  Rename call to build_invoke_non_interface.
12097         * java-tree.h, parse.h:  Update prototype.
12098         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
12099         (such as expand_expr_stmt) if flag_emit_class_files.
12100         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
12101         STACK_TARGET, IGNORE_TARGET):  New macros.
12102         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
12103         (generate_bytecode_insn):  New function to generate method's bytecode.
12104         (generate_classfile):  Node generate Code attribute for a method.
12105         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
12106         push_long_const, field_op, adjust_typed_op, maybe_wide):
12107         New functions used by generate_bytecode_insn.
12108
12109         * typeck.c (signature_include_return):  Remove variable.
12110         (push_java_argument_signature, build_java_argument_signature):  New.
12111         (build_java_signature):  Use push_java_argument_signature.
12112         * parse.y:  Use build_java_argument_signature instead of fiddling
12113         with signature_include_return.
12114
12115 Fri Jul 17 09:48:51 1998  Tom Tromey  <tromey@cygnus.com>
12116
12117         * gjavah.c (print_c_decl): Always generate JArray<>* for array
12118         types.
12119
12120         * Makefile.in (all.indirect): Added gjavah$(exeext).
12121         (gjavah$(exeext)): Added $(exeext).
12122         (clean): Likewise.
12123
12124 Thu Jul 16 15:29:20 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12125
12126         * class.c (layout_class): Call to java_layout_parsed_class replace
12127         by safe_layout_class.
12128         * expr.c (build_java_array_length_access): Removed static storage
12129         class in the function definition.
12130         (build_java_arraynull_check): Likewise.
12131         Also fixed typos in two comments.
12132         * lex.c (java_init_lex): Initialize static global kw_length.
12133         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
12134         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
12135         java_lex_error.
12136         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
12137         * parse.h (resolve_no_layout): New static function declaration.
12138         (get_identifier_in_static): Declaration removed.
12139         (java_layout_parsed_class): Function name declaration changed to
12140         safe_layout_class.
12141         (build_newarray_node, patch_newarray, resolve_type_during_patch,
12142         not_initialized_as_it_should_p, build_this): New static function
12143         declarations.
12144         (pushdecl_force_head, build_java_binop, int_fits_type_p,
12145         binary_numeric_promotion, stabilize_reference,
12146         build_decl_no_layout, build_java_arrayaccess): Extern function
12147         declarations moved into their own section.
12148         (build_newarray, build_anewarray, build_java_array_length_access,
12149         build_java_arraynull_check): New extern function declarations.
12150         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
12151         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
12152         fake tree codes.
12153         (CALL_CONSTRUCTOR_P): New macro.
12154         * parse.y (kw_length): New static global tree node.
12155         (return_statement): Tagged <node>.
12156         (RETURN_TK): Tagged <operator>.
12157         (variable_declarator_id:): Build variable declaration with an
12158         empty initialization value if a syntax error was found in the
12159         initialization part of the variable declaration.
12160         (statement_without_trailing_substatement:): return_statement: now
12161         uses the default rule.
12162         (return_statement:): Temporarily fixed to return NULL_TREE.
12163         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
12164         (class_instance_creation_expression:): Class creation rules now
12165         call build_method_invocation upon reduction.
12166         (array_creation_expression:): Rules call build_newarray_node upon
12167         reduction.
12168         (dim_exprs:): Build a list of dimension expressions.
12169         (dim_expr:): Store location of the OSB_TK in the dimension
12170         expression node.
12171         (method_invocation:): Added a new error rule.
12172         (build_unresolved_array_type): WFL argument may also be an array
12173         on a primitive type. Name of the argument changed to reflect this.
12174         (method_declarator): Insert argument type at the beginning of the
12175         argument type list and later reverse the list.
12176         (unresolved_type_p): Argument 'returned' may be optionally
12177         NULL_TREE.
12178         (java_layout_class_from_source): Function renamed
12179         safe_layout_class.
12180         (resolve_and_layout): Now call resolve_no_layout and
12181         safe_layout_class.
12182         (resolve_no_layout): New function.
12183         (purify_type_name): New function.
12184         (complete_class_report_errors): Call purify_type_name during error
12185         report on a type not found.
12186         (process_imports): error_found local variable doesn't need to be
12187         initialized to zero.
12188         (declare_local_variables): New local type_wfl. Fixed typo in error
12189         message. type_wfl assigned to unresolved type and used to register
12190         incomplete type. Build a WFL around the variable initialization
12191         statement so that debug info can be generated on it.
12192         (source_start_java_method): Reverse argument list after they've
12193         been processed.
12194         (current_this): New static global variable.
12195         (java_complete_expand_methods): Set current_this when appropriate.
12196         (resolve_expression_name): Build correct static and non static
12197         field access bearing a simple name.
12198         (resolve_field_access): Resolve the length field of arrays. Handle
12199         f.m() cases.
12200         (patch_method_invocation_stmt): Set the type of the method
12201         invocation to error_mark_node. This value is later overridden by a
12202         valid type, if any. Don't handle qualified constructor invocation
12203         as qualified method invocation. Call lookup_method_invoke with its
12204         new flag. It's no longer necessary to access the selected method
12205         as the value of a tree list. Handle constructor invocation.
12206         (patch_invoke): Reverse argument list when invoking non interface
12207         methods. Insert call to new as the first argument of the
12208         constructor.
12209         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
12210         defined within a final class. Return INVOKE_STATIC if the invoked
12211         method is a constructor.
12212         (lookup_method_invoke): New lc argument is a flag to indicate a
12213         constructor lookup. Now handle constructor lookup. Choose the most
12214         specific method in case several were matching the invocation
12215         requirements. Return a method decl instead of a tree list featuring
12216         one single method decl element.
12217         (refine_accessible_methods_list): New lc flag argument to
12218         indicate that a constructor is being looked up.
12219         (not_initialized_as_it_should_p): New function.
12220         (java_complete_tree): Now process fake tree codes
12221         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
12222         save_expr on resolved function call arguments. Case on
12223         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
12224         (patch_assignment): LHS can be a field access expression. When
12225         dealing with reference, lhs_type is the promoted type of the
12226         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
12227         applicable.
12228         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12229         (patch_binop): Use not_initialized_as_it_should_p where
12230         applicable.
12231         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12232         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
12233         where applicable.
12234         (resolve_type_during_patch): New function.
12235         (patch_cast): Call resolve_type_during_patch to resolve type and
12236         report error accordingly.
12237         (patch_array_ref): Use not_initialized_as_it_should_p where
12238         applicable. Array base expression is saved before being
12239         used. Promote the type of an array elements if it contains non
12240         builtin types.
12241         (build_newarray_node, patch_newarray, build_this): New functions.
12242
12243 Thu Jul 16 10:46:47 1998  Tom Tromey  <tromey@cygnus.com>
12244
12245         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
12246         increment it in `for' statement.
12247         (print_field_info): If number is inf or nan, don't print it.
12248         (print_method_info): If method name is `delete', just ignore it.
12249         (print_c_decl): Special-case jstringArray.
12250
12251         * gjavah.c (help): New function.
12252         (no_argument): New function.
12253         (usage): Changed text.
12254         (main): Rewrote argument handling.  Now handles -v, --help,
12255         --version.
12256         (version): New function.
12257         (found_error): New global.
12258         (main): Return found_error.
12259         (generate_access): Set found_error.
12260         (print_c_decl): Likewise.
12261
12262 Wed Jul 15 10:36:27 1998  Tom Tromey  <tromey@cygnus.com>
12263
12264         * gjavah.c (print_c_decl): Don't print "," when examining field.
12265         Skip type name when looking at "[L" types.
12266         (process_file): Now static.
12267         (generate_access): Now returns int.
12268         (last_access_generated): New global.
12269         (process_file): Clear last_access_generated; make multiple passes
12270         over the class.
12271         (print_field_info): Just return if generate_access returns true.
12272         (print_method_info): Likewise.  Also, allow <init> functions to
12273         pass through.
12274         (print_c_decl): Added is_init argument.  Print constructors
12275         properly.
12276         (print_cxx_classname): Use UTF8_GET to extract characters from
12277         string.
12278         (print_base_classname): New function.
12279         (print_class_decls): New function.
12280         (process_file): Use it.
12281         (utf8_cmp): New function.
12282
12283 Mon Jul 13 14:21:47 1998  Nick Clifton  <nickc@cygnus.com>
12284
12285         * lang-options.h: Format changed to match changes in gcc/toplev.c
12286         to implement a --help option.
12287
12288 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
12289
12290         * decl.c (init_decl_processing): Revert change to dtable_type.
12291
12292 Thu Jul  9 18:22:12 1998  Per Bothner  <bothner@cygnus.com>
12293
12294         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
12295
12296 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
12297
12298         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
12299
12300         * lang.c (lang_init): Default flag_exceptions to 1, without
12301         checking to see if it's 2 first.
12302
12303 Wed Jul  8 03:01:32 1998  Jeffrey A Law  (law@cygnus.com)
12304
12305         * constants.c: Include "system.h".
12306         * decl.c: Likewise.
12307         * lang.c (flag_new_exceptions): Get via extern now.
12308         (lang_init_options): New functions.  Turn on flag_new_exceptions.
12309
12310 Tue Jul  7 12:56:48 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12311
12312         * lex.c (java_lex): Return 0 when we see an invalid character in
12313         the input.
12314
12315         * lex.c (java_read_char): Specify extra argument when calling
12316         java_lex_error.
12317         (java_read_unicode, java_parse_end_comment,
12318         java_parse_escape_sequence): Likewise,
12319         (java_lex): Specify extra argument when calling
12320         java_lex_error. Test that IDs are beginning with a legal character
12321         for IDs. Handle invalid characters with an error message and a
12322         call to java_lex_error.
12323         (java_lex_error): Adjust column position by new argument
12324         `forward'. Issue an error even if in the middle of reporting an
12325         other error.
12326
12327 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
12328
12329         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
12330         we don't explicitly put a null pointer when we're copying it.
12331
12332 Tue Jul  7 09:38:38 1998  Tom Tromey  <tromey@cygnus.com>
12333
12334         * gjavah.c (print_cxx_classname): New function.
12335         (super_class_name): Likewise.
12336         (print_super_fields): Removed.
12337         (in_super): Removed.
12338         (print_field_info): Never generate #defines.
12339         (print_c_decl): Changed generated types to match JNI.  No longer
12340         print class name before method name.
12341         (print_method_info): Print "static" before static methods.
12342         Print "virtual" before non-final methods.
12343         (usage): Use exit(1), not exit(-1).
12344         (main): Likewise.
12345         (print_field_info): Use %.17g to print a double.
12346         (last_access): New globals.
12347         (process_file): Initialize last_access.
12348         (usage): Now static.
12349         (ACC_VISIBILITY): New define.
12350         (generate_access): New function.
12351         (print_field_info): Call it.
12352         (print_method_info): Likewise.  Also, generate information for all
12353         methods, not just native methods.  Return void.
12354         (print_c_decl): Return void.
12355         (print_field_info): Return void.
12356
12357 Thu Jul  2 16:53:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12358
12359         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
12360         processing the jc1 grammar file. Prefix bison functions and
12361         variables with java_.
12362         (parse.c): Dependencies on parse.h and lex.h
12363         * expr.c (build_java_arrayaccess): Function now global.
12364         * java-tree.h: Comment reorganized to carry on previous
12365         classification effort.
12366         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
12367         RESOLVE_TYPE_NAME_P): New flags on WFLs.
12368         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
12369         java_parse (new prefix java_ generated by bison).
12370         (java_layout_parsed_class, java_register_parsed_class): Function
12371         call removed.
12372         (yyparse): Removed unnecessary call to init_outgoing_cpool.
12373         * lex.c (static tree wfl_op): Variable deleted.
12374         (java_init_lex): Initialize kw_super and kw_this. Initialize more
12375         ctxp fields to NULL_TREE.
12376         (java_lex): No longer create WFL for operators. Filename caching
12377         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
12378         created as STRING_CST and later expanded. Removed extra argument
12379         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
12380         and SUPER.
12381         (build_wfl_node): Removed code in comments.
12382         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
12383         store token and location data in the current bison token.
12384         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
12385         static/extern function declaration at the beginning of the file.
12386         (struct qualification): Data structure definition deleted.
12387         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
12388         (qualify_ambiguous_name): Function declaration modified. Function
12389         now returns nothing.
12390         (build_array_ref, patch_array_ref, make_qualified_name,
12391         resolve_qualified_expression_name, maybe_generate_clinit,
12392         resolve_field_access): New static function declarations.
12393         (build_java_arrayaccess): New extern function declaration.
12394         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
12395         (CALL_EXPR_PRIMARY): Macro deleted.
12396         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
12397         (struct parser_ctxt): Field initialized_final
12398         removed. non_static_initialized, static_initialized: New fields.
12399         * parse.y (static tree kw_super, static tree kw_this): New global
12400         static.
12401         (%union): tree wfl field of operator member replaced by int
12402         location. WFLs are non longer created for operators.
12403         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
12404         (qualified_name:): Now calls make_qualified_name to build the
12405         identifier.
12406         (type_declaration:): Consider generating <clinit> when class
12407         parsing completed.
12408         (variable_declarator:): Directly build an assignment node when the
12409         variable is initialized when declared.
12410         (this_or_super:): Build a WFL and set current location when THIS
12411         or SUPER are parsed.
12412         (expression_statement:): Wrap statement around a WFL.
12413         (primary_no_new_array:): Fixed typo. Changed value returned by
12414         THIS_TK because of its new type (temporary).
12415         (dim_exprs:): Temporary fix because of OSB_TK's new type.
12416         (field_access:): Build qualified name with SUPER.
12417         (method_invocation:): Fixed returned value because of SUPER's new
12418         type.
12419         (array_access:): Use OSB_TK location information.
12420         (post_increment_expression:, post_decrement_expression:,
12421         unary_expression:, pre_increment_expression:,
12422         pre_decrement_expression:, unary_expression_not_plus_minus:,
12423         cast_expression:, multiplicative_expression:,
12424         additive_expression:, shift_expression:, relational_expression:,
12425         equality_expression:, and_expression:, exclusive_or_expression:,
12426         inclusive_or_expression:, conditional_and_expression:,
12427         conditional_or_expression:, assignment:): Use new location/token
12428         information available on operators.
12429         (create_class): Set super_decl_type to NULL_TREE when processing
12430         java.lang.Object.
12431         (register_fields): Field initialization is now a MODIFY_EXPR
12432         node. Chain initialization code to the matching lists (according
12433         the the field declaration modifiers).
12434         (maybe_generate_clinit): New function.
12435         (method_header): Don't set method's DECL_NAME to a WFL when adding
12436         methods to java.lang.Object.
12437         (resolve_and_layout): Now can return NULL_TREE if the type
12438         resolution fails. Otherwise, return the class DECL instead of its
12439         TYPE.
12440         (check_method_redefinition): Don't patch method DECL_NAME if it
12441         belongs to java.lang.Object.
12442         (process_imports): Simply assign error_found to the value returned
12443         by check_pkg_class_access.
12444         (declare_local_variables): Don't use their init statements (if
12445         any) when parsing error were previously found. Reuse MODIFY_EXPR
12446         build during parsing as an init statement.
12447         (java_method_add_stmt): Now return the current method body.
12448         (java_layout_parsed_class, java_register_parsed_class): Functions
12449         removed.
12450         (java_complete_expand_methods): Initialize the constant pool on a
12451         per class basis. Layout the classes before expanding their method
12452         bodies. Don't try expand artificial constructor code if error were
12453         found. Make the classes data and register them if no error were
12454         found.
12455         (java_complete_expand_method): Retrieve an artificial constructor
12456         argument list before entering its body. Assign the top block to
12457         the artificial constructor function body and set types of declared
12458         blocks and compound statements to void. Walk method body if not an
12459         artificial constructor.
12460         (make_qualified_name, cut_identifier_in_qualified): New functions.
12461         (resolve_expression_name): Fixed comments. Save/restore the
12462         current class CLASS_LOADED_P flag value. Build non qualified
12463         static field access and handle qualified expression names.
12464         (resolve_field_access, resolve_qualified_expression_name): New
12465         functions.
12466         (patch_method_invocation_stmt): Use the new expression resolution
12467         scheme, calling resolve_field_access when the function call is
12468         resolved as an expression.
12469         (qualify_ambiguous_name): Function rewritten to work on qualified
12470         expression produced by make_qualified_name.
12471         (java_complete_tree): Promote type when function's argument are
12472         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
12473         the assignment to discover further errors if RHS is a expression
12474         name that fails to evaluate. Declare LHS initialized even though
12475         the assignment failed. Don't use the location variable and removed
12476         extra argument in patch function calls. Now handle the ARRAY_REF
12477         case and build internal string representation when STRING_CSTs are
12478         walked.
12479         (build_method_invocation): Don't wrap function call around a WFL.
12480         (build_assignment): Likewise. Use the operator location
12481         information.
12482         (patch_assignment): Handle array access LHSs. Handle error
12483         provenance, resulting in a better error report.
12484         (build_binop): Use op_location from operator as binop location
12485         information.
12486         (build_unaryop, build_incdec, build_cast): Likewise.
12487         (patch_binop): Extract location information from the node. Fixed
12488         typo in error message.
12489         (patch_unary_op): Extract location information from the node.
12490         (build_array_ref, patch_array_ref): New functions.
12491
12492 Wed Jul  1 13:11:36 1998  Tom Tromey  <tromey@cygnus.com>
12493
12494         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
12495         match _Jv_IsInstanceOf.
12496         * decl.c (init_decl_processing): Use _Jv_NewArray, not
12497         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
12498
12499 Tue Jun 30 14:12:54 1998  Tom Tromey  <tromey@cygnus.com>
12500
12501         * decl.c (init_decl_processing): Functions are now named
12502         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
12503
12504 Mon Jun 29 14:47:10 1998  Per Bothner  <bothner@cygnus.com>
12505
12506         * java-tree.h (load_class):  Add prototype.
12507         * class.c (is_compiled_class):  Add missing arg to load_class.
12508         * expr.c (expand_java_NEW):  Call load_class.
12509         * parse.y (process_import):  Removed bogus use of void return value.
12510
12511 Thu Jun 25 11:50:48 1998  Per Bothner  <bothner@cygnus.com>
12512
12513         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
12514         Function name is "_Jv_Throw" instead of "soft_athrow".
12515         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
12516         Function name is "_Jv_AllocObject" instead of "soft_new".
12517         Takes an extra parameter (object size).
12518         * expr.c:  Update calls.
12519
12520 Wed Jun 24 13:59:02 1998  Per Bothner  <bothner@cygnus.com>
12521
12522         * lex.c (java_get_line_col):  Handle end-of-file.
12523         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
12524
12525 Wed Jun 24 09:22:34 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12526
12527         * lang.c (lang_init): Make -fexceptions the default.
12528         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
12529         exception handling is not turned on.
12530
12531 Tue Jun 23 10:17:09 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12532
12533         * lang.c (flag_new_exceptions): Make this this default.
12534         * decl.c (end_java_method): Call emit_handlers.
12535         * except.c (method_init_exceptions): Set language code and version.
12536         (expand_start_java_handler): Enable exception, and call
12537         expand_eh_region_start.
12538         (expand_end_java_handler): Enable exception, and set up catch blocks.
12539         (emit_handlers): New routine to generate the saved handlers.
12540         * java-except.h (emit_handlers): Add prototype.
12541
12542 Fri Jun 12 11:31:24 1998  Per Bothner  <bothner@cygnus.com>
12543
12544         We used to have three different representations of the constant pool:
12545         the CPool structure, the tree_constant_pool, and the constructures
12546         used to build the Class object (which may need class and string
12547         constants) in compiled code.  None were appropriate for compiling
12548         to .class files, so I did a major overhaul.
12549
12550         First, the tree_constant_pool array was removed.  Things were
12551         modified to the CPool structure in the JCF could be used.
12552         Second, a "capacity" field was added to the CPool, and functions
12553         written to search for a matching constant, adding one if not found.
12554         The code that generated the Class object was changed to use a CPool.
12555         The actual TREE_LISTs used to build the CONSTRUCTORs used for
12556         the static Class object are now only in build_constants_constructor.
12557         Finally, I wrote code which can generate a .class file (including its
12558         constant pool) from the RECORD_TYPE of a class.  This is a big step
12559         on the way to compiling Java source into .class files.
12560
12561         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
12562         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
12563
12564         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
12565         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
12566         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
12567         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
12568         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
12569         (lang_type):  Removed constant_pool field.
12570         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
12571         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
12572         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
12573         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
12574
12575         * constants.c (current_constant_pool_tags, current_constant_pool_data,
12576         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
12577         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
12578         (set_constant_entry, find_constant1, find_constant2,
12579         find_class_constant, count_constant_pool_bytes, write_constant_pool,
12580         find_utf8_constant, find_class_or_string_constant):  New functions.
12581
12582         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
12583         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
12584         (give_name_to_class, get_class_constant):  Likewise.
12585         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
12586         (get_name_and_type_constant, get_ref_constant):  Removed.
12587         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
12588         * parse.y:  Don't save/restore tree_constant_pool.
12589         * verify.c (verify_jvm_instructions):  Update for new approach.
12590         * expr.c (expand_invoke, expand_java_field_op): Likewise.
12591
12592         * lang-options.h:  Added -femit-class-file, -femit-class-files.
12593         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
12594         (lang_f_options):  Added "emit-class-file(s)".
12595
12596         * expr.c (build_java_arrayaccess):  Generate more efficient array
12597         bounds checking, by using unsigned compare.
12598
12599         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
12600
12601 Wed Jun 10 17:34:42 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12602
12603         * parse.h: New comment on the handling of unresolved type
12604         identifiers. JDEPs are now part of the jdep_code enum.
12605         (typedef struct jdep): Now use enum jdep_code or int, depending on
12606         availability. Both are narrowed down to an 8 bits bitfield.
12607         (CALL_EXPR_PRIMARY): Fixed comment.
12608
12609 Wed Jun 10 10:54:39 1998  Tom Tromey  <tromey@cygnus.com>
12610
12611         * Make-lang.in (java): Added gjavac and jvgenmain.
12612         (java.start.encap): Depend on gjavac.
12613         (java.rest.encap): Depend on jvgenmain.
12614
12615         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
12616         (JAVA_CROSS_NAME): Likewise.
12617         (java.all.build): Depend on jvgenmain and gjavac.
12618         (java.all.cross): Depend on jvgenmain and gjavac-cross.
12619         (jvgenmain$(exeext)): New target.
12620         (java.install-common): Wrote.
12621         * config-lang.in (compilers, stagestuff): Added gjavac and
12622         jvgenmain.
12623
12624 Wed Jun 10 12:19:04 1998  Dave Brolley  <brolley@cygnus.com>
12625
12626         * lang.c (lang_decode_option): New argc/argv interface.
12627
12628 Tue Jun  9 18:12:46 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12629
12630         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
12631         * decl.c (build_decl_no_layout): New function.
12632         * expr.c (java_lang_expand_expr): Layout declarations found in
12633         blocks before they're pushed.
12634         * jcf-parse.c (load_class): Save current line when parsing class
12635         file.
12636         (parse_source_file): Register class before expanding their
12637         methods.
12638         * lang.c (put_decl_node): Produce `null' when `void *' is
12639         processed.
12640         * lex.c (static tree wfl_op): New static global, for error report
12641         on casts.
12642         (java_init_lex): wfl_operator and wfl_op initialized
12643         here. Filename caching added for wfl_op. Return wfl_op when `(' is
12644         parsed.
12645         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
12646         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
12647         build_unresolved_array_type): New static function definitions.
12648         (build_decl_no_layout): New extern function declared.
12649         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
12650         faulty modifier exists.
12651         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
12652         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
12653         (UNARY_PLUS_EXPR): New fake operator.
12654         (struct parser_ctxt): New field osb_number.
12655         * parse.y (static tree wfl_operator): New static WFL for operator
12656         bound error messages.
12657         (DECR_TK, INCR_TK): Moved.
12658         (OP_TK): Tagged <operator>.
12659         (array_type:): Now call build_unresolved_array_type.
12660         (dim_expr:): Count the number of '[' seen.
12661         (post_increment_expression, post_decrement_expression,
12662         pre_increment_expression, pre_decrement_expression,
12663         unary_expression_not_plus_minus, unary_expression:): Actions are
12664         now building the corresponding unary expressions.
12665         (cast_expression:): Actions are now building cast expressions.
12666         (build_unresolved_array_type): New function.
12667         (create_interface): Reset the number of declared interfaces.
12668         (create_class): Likewise.
12669         (method_header): Methods declared within the scope of an interface
12670         are now implicitly set public and abstract.
12671         (java_complete_class): Variable's and parameter's type are patched
12672         with a promoted type.
12673         (declare_local_variables): Resolved non builtin types are promoted
12674         before being used to build a variable decl. Removed type patch
12675         posted on variable initialization statement.
12676         (source_start_java_method): Use build_decl_no_layout to build the
12677         decl of a parameter of incomplete type.
12678         (java_register_parsed_class): Process interfaces too. Call
12679         rest_of_decl_compilation on each processed class declarations.
12680         (java_complete_expand_methods): Don't attempt to expand things in
12681         interfaces.
12682         (java_complete_tree): Process CONVERT_EXPR, even though it always
12683         has a type. Propagate error_mark_node to node's type too. Promote
12684         method's call argument type and return error_mark_node if
12685         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
12686         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
12687         handle unary operator nodes.
12688         (build_assignment): Added comment.
12689         (print_int_node): New function.
12690         (patch_assignment): New second argument. New error handling. Use
12691         print_int_node. Handle references. Use can_cast_to_p to issue
12692         different error message according to the context and check upon
12693         the initialization of the RHS.
12694         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
12695         (operator_string): Handle more operators.
12696         (patch_binop): No longer use a function static
12697         wfl_operator. Improved error message on shift distance.
12698         (build_unaryop, build_incdec, build_cast, patch_unaryop,
12699         patch_cast): New functions.
12700
12701 Fri Jun  5 18:03:07 1998  Per Bothner  <bothner@cygnus.com>
12702
12703         * jvspec.c:  New file.
12704         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
12705
12706         * java-tree.h (identifier_subst):  Add declaration.
12707
12708 Thu Jun  4 13:44:23 1998  Tom Tromey  <tromey@cygnus.com>
12709
12710         * jvgenmain.c (main): Generate call to JvRunMain.
12711
12712         * class.c (make_class_data): Push value for "sync_info" field.
12713         * decl.c (init_decl_processing): Push "sync_info" field.
12714
12715 Wed Jun  3 20:39:14 1998  Per Bothner  <bothner@cygnus.com>
12716
12717         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
12718         Java (source) name, not signature.
12719         Set TYPE_ALIGN to (at least) that of element_type.
12720
12721 Tue Jun  2 15:19:19 1998  Per Bothner  <bothner@cygnus.com>
12722
12723         * class.c:  Moved classname-mangling-rekated code to ...
12724         * mangle.c:  ... this new file.
12725         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
12726         * Makefile.in:  Update for above changes.
12727
12728 Mon Jun  1 09:58:36 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12729
12730         * expr.c (truthvalue_conversion): Convert integer and floating
12731         point value to their truth value.
12732         * lex.c (java_lex): Handle the `null' literal.
12733         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
12734         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
12735         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
12736         New macros.
12737
12738         * parse.y: Reorganization/documentation on token declaration.
12739         (binop_lookup[]): New added new tree codes.
12740         (relational_expression): Build corresponding binary operators.
12741         (equality_expression, conditional_and_expression,
12742         conditional_or_expression): Likewise.
12743         (java_complete_class): Fix crash in debug message.
12744         (java_complete_tree): Check initialization of method call
12745         arguments. Further bogus node evaluation to detect more error
12746         during assignments. Handles more binary operators.
12747         (patch_assignment): Use DECL_P.
12748         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
12749         code.
12750         (operator_string): Handle more case. Compacted source.
12751         (patch_binop): Changed function comment. Checking for
12752         uninitialized first operand takes the compound assignment into
12753         account and uses DECL_P. Checking for uninitialized second operand
12754         delayed to routine's end. Use macros to issue type bound error
12755         messages and issue messages on both operands if their types are
12756         different. Force fixed type into node. Handle all binary
12757         operators.
12758
12759 Wed May 27 10:30:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12760
12761         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
12762         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
12763         build operator node and return tokens.
12764         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
12765         * parse.h (java_complete_tree): Changed returned type in prototype.
12766         (build_method_invocation, build_assignment, patch_assignment,
12767         patch_binop): New static function declarations.
12768         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
12769         BUILD_EXPR_WFL): New macros.
12770         * parse.y (enum tree_code binop_lookup[]): New static for token to
12771         TREE_CODE lookup.
12772         (%union): Parser union has new sub-structure `operator'.
12773         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
12774         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
12775         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
12776         ASSIGN_ANY_TK): Tokens tagged `operator'.
12777         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
12778         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
12779         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
12780         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
12781         (assignment_operator:): Rule tagged `operator'.
12782         (expression_statement:): Re-installed default rule.
12783         (method_invocation:): Sub rules call build_method_invocation.
12784         (postfix_expression:): Don't attempt to resolve name here. Just
12785         return an ID.
12786         (multiplicative_expression:): Sub-rules build corresponding binop
12787         expression node.
12788         (additive_expression:, shift_expression:, and_expression:,
12789         exclusive_or_expression:, inclusive_or_expression:): Likewise.
12790         (assignment:): Sub rule invoke build_assignment.
12791         (assignment_operator:): Default rules on sub rules.
12792         (force_error): Added documentation on this variable.
12793         (declare_local_variables): Build initialization calling
12794         build_assignment.
12795         (expand_start_java_method): Removed unused rtx declaration. Mark
12796         arguments as already initialized.
12797         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
12798         (java_complete_expand_methods): Don't process next method if
12799         completion of the previous one triggered errors.
12800         (java_complete_expand_method): Call source_end_java_method if no
12801         error were found during completion.
12802         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
12803         locals declaratilon. Handle names found within a class. Return
12804         error_mark_node when things aren't found.
12805         (patch_method_invocation_stmt): Return error_mark_node on failures.
12806         (patch_invoke): Removed unused local. Return the correct node.
12807         (java_complete_tree): Now returns a value. The BLOCK section binds
12808         local identifiers and the type of a BLOCK is now void. Assign the
12809         result of operand completion on COMPOUND_EXPR. Assign the
12810         encapsulated node of a WFL to the result of its completion, except
12811         when the node is an identifier. Now handle MODIFY_EXPR and several
12812         binary operators. Return error_mark_node on errors.
12813         (build_method_invocation, build_assignment, patch_assignment,
12814         build_binop, operator_string, patch_binop): New functions.
12815         * typeck.c (binary_numeric_promotion): New function.
12816
12817 Thu May 21 12:01:04 1998  Per Bothner  <bothner@cygnus.com>
12818
12819         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
12820         Replace most uses of ident_subst by identifier_subst.
12821
12822         * class.c (push_class_static_dummy_field):  Removed function.
12823         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
12824         instead of looking got "class" static field.  Create that decl here.
12825         (class_identifier_node):  Removed;  no longer needed.
12826         (init_class_processing):  Don't init class_identifier_node.
12827         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
12828         Do nreverse 0 times (instead of twice) for Object and Class.
12829         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
12830
12831 Wed May 20 16:35:04 1998  Per Bothner  <bothner@cygnus.com>
12832
12833         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
12834         while initializing linenumber_count and linenumber_table.
12835         Do it before init_function_start (which calls emit_line_note).
12836         * expr.c (expand_byte_code):  Don't need to clear lineno here.
12837
12838 Mon May 18 16:23:32 1998  Tom Tromey  <tromey@cygnus.com>
12839
12840         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
12841         then mangle number as _N_.
12842
12843         * class.c (mangle_class_field): New function.
12844         (build_class_ref): Set assembler name of class reference using
12845         mangle_class_field.
12846         (push_class_static_dummy_field): Likewise.
12847
12848 Sun May 17 12:52:35 1998  Michael Tiemann <tiemann@cygnus.com>
12849
12850         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
12851         of assigning to TREE_CODE.  The latter method exploits a feature
12852         of GCC that is not ANSI compliant.
12853
12854 Thu May 12 13:44:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12855
12856         * decl.c (pushdecl_force_head): New function.
12857         (pushlevel): Removed conditional printf.
12858         (complete_start_java_method): Don't enter local variable scope if
12859         function is compiled from source code.
12860         * expr.c: parse.h now included
12861         (java_lang_expand_expr): New function.
12862         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
12863         printf. Terminate buffer when doing directories.
12864         * jcf-parse.c (parse_source_file): Call lang_init_source before
12865         parsing and before code generation.
12866         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
12867         use printf if the macro is defined.
12868         * lang.c (lang_init): Install lang_expand_expr hook on
12869         java_lang_expand_expr.
12870         (java_dummy_print): New function.
12871         (lang_init_source): New function.
12872         * lex.c (java_lex): Remember location of an opening brace at the
12873         second nesting level.
12874         (java_is_eol): Unget character seen after a CR if it is EOF.
12875         * parse.h: Now includes lex.h
12876         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
12877         printf if the macro is defined.
12878         (expand_start_java_method, build_expr_block, enter_block,
12879         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
12880         New static function declarations.
12881         (pushdecl_force_head): New extern function declaration.
12882         (INCOMPLETE_TYPE_P): New macro.
12883         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
12884         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
12885         BLOCK_EXPR_ORIGIN): New macros.
12886         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
12887         DECL_SOURCE_LINE_LAST): New macros.
12888         (struct parser_ctxt): Removed field current_method_decl, redundant
12889         with the field current_function_decl. Added fields
12890         first_ccb_indent1 and pending_block.
12891         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
12892         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
12893         tagged <node>
12894         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
12895         (compilation_unit:): Cosmetic on sub rule.
12896         (type_declaration:): Cosmetic on sub rules. Added an error rule.
12897         (variable_initializer:): Installed default rule on expression:.
12898         (method_declaration:): method_header: starts a new
12899         method. method_body: installs the function body, absorbs blocks
12900         emitted for temporary variable scopings, pops function's body block
12901         and merges function's last statement lineno in DECL_SOURCE_LINE.
12902         (method_body:): Installed default rules.
12903         (block:): Call enter_block when an opening brace is seen.  Absorb
12904         scoping blocks and call exit_block when a closing brace is seen.
12905         (block_statement:): Cosmetic changes.
12906         (method_invocation:): Create WFL around CALL_EXPR node.
12907         (patch_stage): Added comment around definition.
12908         (method_header): Try to use first_ccb_indent1 as the first line of
12909         the method, so BP debug info are emitted at the first opening
12910         brace of the function. If the function has no body, use the
12911         location of the function's name. Override currently defined method
12912         name with the matching WFL so we can point redefinition errors
12913         using the location where the function's name was declared.
12914         (check_abstract_method_header): Interprets DECL_NAME as an
12915         identifier or as a WFL, accordingly.
12916         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
12917         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
12918         location and name information out of it and reinstall DECL_NAME to
12919         its original identifier node value.
12920         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
12921         function's source code).
12922         (read_import_dir): Test the value returned by find_class and issue
12923         a fatal accordingly.
12924         (declare_local_variables): Push a new block for the scope of the
12925         new variable(s) if code has been already generated at that nesting
12926         level. Pinpoint redefinition errors using the variable id
12927         WFLs. Generate initialization code if necessary. If the variable
12928         type is incomplete, register a patch on its decl.
12929         (source_start_java_method): Rewritten. Define a new block for the
12930         function's parameters. Build parameter decl out of function's
12931         arguments and register them for a patch if their types are
12932         incomplete.
12933         (expand_start_java_method): Includes the part of
12934         source_start_java_method that was pushing the parameter decls and
12935         completing the method start code.
12936         (source_end_java_method): Removed call the expand_end_bindings and
12937         poplevel (already taken care of). Reinstall function's arguments
12938         and get function's last line of code before calling
12939         expand_function_end.
12940         (java_method_add_stmt): New comment before the function's
12941         code. Complement the second operand of the current COMPOUND_EXPR
12942         if necessary.
12943         (java_complete_expand_methods): Don't generate debug info on line
12944         zero when expanding a generated constructor.
12945         (java_complete_expand_method): Set start and end line numbers for
12946         a artificially generated constructor to one and manually call
12947         enter_block and exit_block when defining it. For all methods:
12948         expand function's start calling the new expand_start_java_method
12949         and invoke java_complete_tree on the effective method's body, if
12950         any.
12951         (resolve_expression_name): Now use lookup_name_in_blocks to search
12952         local variable decls and print out an error when variables are
12953         undefined.
12954         (patch_method_invocation_stmt): Inserted comment before the
12955         function's code.
12956         (lookup_method_invoke): Chain method's arguments using chainon
12957         with the current arg list as a second argument. Inserted missing
12958         IDENTIFIER_POINTER when reporting an error on methods not found.
12959         (refine_accessible_methods_list): Don't retain constructors.
12960         (patch_arguments): Function removed.
12961         (java_complete_tree): Inserted comment before the function's
12962         code. New case for BLOCKs. Moved the WFL case a bit
12963         further. Complete function's arguments.
12964         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
12965         maybe_absorb_scoping_blocks): New functions.
12966
12967 Mon Apr 27 10:50:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12968
12969         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
12970         previously set.
12971         * jcf-parse.c (parse_source_file, java_error_count): New forward
12972         and extern declarations.
12973         (java_parse_abort_on_error): Macro moved.
12974         (jcf_parse_source): fatal called if fopen fails. Now calls
12975         parse_source_file.
12976         (parse_source_file): New parse_only parameter. Reflects the
12977         elimination of the second pass.
12978         (yyparse): parse_source_file called with argument set to 0.
12979         * jcf.h (JCF_ZERO): Sets java_source to zero.
12980         * lex.c (java_init_lex): pass argument is gone. Function modified
12981         to be called once during the analysis of a file.
12982         (java_unget_unicode): Fixed typo in fatal message.
12983         (java_get_line_col): Likewise.
12984         (java_lval): Likewise. String literals no longer built during
12985         second pass.
12986         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
12987         account.
12988         * parse.h (MODIFIER_WFL): New macro.
12989         (parse_check_super, parser_check_super_interface): Now return int.
12990         (parser_chain_incomplete_item, not_builtin_p,
12991         complete_method_decl): Declarations removed.
12992         (build_method_invocation_stmt, build_invoke): Renamed using the
12993         `patch' instead of `build'
12994         (register-incomplete_type, obtain_incomplete_type,
12995         java_complete_tree, java_complete_expand_method,
12996         unresolved_type_p, create_jdep_list): New function declarations.
12997         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
12998         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
12999         (jdep): New typedef on new struct _jdep.
13000         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
13001         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
13002         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13003         JDEP_RESOLVED_P): New macros.
13004         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
13005         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
13006         JDEP_VARIABLE): New enum values and jdep kinds.
13007         (jdeplist): New typedef on struct _jdeplist.
13008         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
13009         macros.
13010         (CALL_EXPR_PRIMARY): New macro.
13011         (struct parser_ctxt): Fields java_pass, current_method_decl,
13012         method_decl_list deleted. New field jdeplist.
13013         (INCOMPLETE_P): Macro deleted.
13014         * parse.y (single_type_import_declaration:): Removed pass switch.
13015         (type_import_on_demand_declaration): Likewise.
13016         (field_declaration:): Removed pass switch on all sub rules.
13017         (class_declaration:): Call the complete_class_decl removed on
13018         class_body rules.
13019         (method_declaration:): Removed second pass switch. No longer chain
13020         methods decl when method_header reduced.
13021         (method_header:): Sub rules no longer depend on pass switch.
13022         (method_declarator:): Likewise.
13023         (method_body:): Likewise.
13024         (abstract_method_declaration:): Likewise.
13025         (block_statement:): Likewise.
13026         (local_variable_declaration:): Likewise.
13027         (argument_list:): Likewise.
13028         (method_invocation:): Likewise. Call to build_method_invocation_stmt
13029         removed. Partial CLASS_EXPR tree node built instead.
13030         (postfix_expression:): Removed pass switch on all sub rules.
13031         (java_pop_parser_context): Free classd_list content.
13032         (yyerror): Call obstrack_grow0 to finalize error message.
13033         (check_class_interface_creation): Comment modified to reflect new
13034         returned value meaning. Removed second pass switch. Return 1 if an
13035         error was found, 0 otherwise. Adjust pointer on filename if a
13036         leading path separator was found.
13037         (maybe_create_class_interface_decl): Removed first pass switch
13038         when linking the class decl to the class_list. Install a new
13039         jdep_list for the class.
13040         (add_superinterfaces): List of unresolved interfaces is
13041         gone. Unresolved interfaces are directly added to the current
13042         dependencies list.
13043         (create_interface): Second pass shortcut removed.
13044         ctpx->modifier_ctx access through MODIFIER_WFL.
13045         (create_class): Second pass shortcut removed. Call to
13046         register_incomplete_type replaces the call to
13047         parser_chain_incomplete_item.
13048         (complete_class_decl): Function removed.
13049         (duplicate_declaration_error): New way of retrieving redeclared
13050         item type.
13051         (register_fields): Call to lookup_modifier_cl replaced by
13052         MODIFIER_WFL. New way of handling unresolved type, using
13053         unresolved_type_p and obtain_incomplete_type.
13054         register_incomplete_type replaces call to parser_chain_incomplete_item.
13055         (patch_stage): New static global variable.
13056         (method_header): New way of handling unresolved type, using
13057         unresolved_type_p and obtain_incomplete_type. patch_stage used to
13058         indicates that the method decl needs to be patched.
13059         (check_abstract_method_header): Call to lookup_modifier_cl
13060         replaced by MODIFIER_WFL.
13061         (method_declarator): Incomplete argument type are registered
13062         calling register_incomplete_type. Patch on the declared method is
13063         issued in that case.
13064         (unresolved_type_p): New function.
13065         (parser_check_super_interface): New comment to reflect function's
13066         modified returned type (int). Function and has a new argument
13067         this_wfl. Call to parse_error_context uses this_wfl instead of
13068         relying on lookup_cl.
13069         (parser_check_super): Comment reflects function's new returned
13070         type (int). Function returns nonzero value on error.
13071         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
13072         register_incomplete_type, jdep_resolve_class): New functions to
13073         handle incomplete types in declarations.
13074         (java_complete_class): Rewritten to work with the new incomplete
13075         type handling scheme.
13076         (complete_class_report_errors): Likewise.
13077         (complete_method_decl): Removed: it jobs is now handled by
13078         java_complete_class.
13079         (do_resolve_class): Class loaded in not already loaded and not
13080         found in Java source code.
13081         (java_check_regular_methods, java_check_abstract_methods): Don't
13082         call complete_method_decl anymore.
13083         (lookup_modifier_cl, not_builtin_p): Functions deleted.
13084         (read_import_dir): Got rid of the pass number dependency.
13085         (declare_local_variables): New handling of unresolved types (patch
13086         issued).
13087         (source_start_java_method): New parameter level. Function called
13088         with level set to 1 when argument types are potentially
13089         unresolved.  Called to complete the job with level set to 2 once
13090         types are complete.
13091         (source_end_java_method): Call to permanent_allocation
13092         removed. Waiting to be replaced by a more suitable obstack
13093         management.
13094         (java_complete_expand_methods, java_complete_expand_method,
13095         java_expand_finals): New functions.
13096         (build_method_invocation_stmt): Renamed
13097         patch_method_invocation_stmt. Extracts function call expression
13098         (wfl) and arguments (args) from CALL_EXPR tree operands.
13099         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
13100         call. Patch the function and argument operand of the CALL_EXPR
13101         tree argument.
13102         (patch_argument, java_complete_tree): New functions.
13103
13104 Mon Apr 20 18:26:57 1998  Per Bothner  <bothner@cygnus.com>
13105
13106         Recover from missing fields and methods (i.e. error instead of fatal).
13107         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
13108         * expr.c (expand_invoke):  Recover from missing method.
13109         (expand_java_field_op):  Recover from missing field.
13110         Inline references to java.lang.{Integer,Char,...}.TYPE.
13111         * typeck.c (get_type_from_signature), java-tree.h:  New function.
13112         * class.c (add_method):  Use get_type_from_signature.
13113         (build_class_ref):  Handle a class that was not found.
13114         * typeck.c (convert):  Handle conversion to pointers (for convenience).
13115         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
13116         instead of lookup_field to handle missing fields.
13117
13118         * jcf-parse.c (process_zip_dir):  Set java_source.
13119
13120 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
13121
13122         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
13123
13124 Tue Apr 14 15:59:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13125
13126         * jcf-parse.c (load_class): Don't change input_filename before
13127         calling jcf_parse_source (but still do it before calling
13128         jcf_parse).
13129         (jcf_parse_source): Assign input_filename after having saved the
13130         parser context.
13131         * lex.c (java_init_lex): Chain a WFL node to the import on demand
13132         list. ctxp->modifier_ctx zeroed according to its new
13133         definition. ctxp->filename initialized. Removed
13134         JAVA_MODIFIER_CTX_UNMARK.
13135         (java_unget_unicode): Update the character based column position.
13136         (java_allocate_new_line): ref_count not used anymore. Always free
13137         ctxp->p_line. Initialize c_line->char_col to 0.
13138         (java_get_unicode): Update the character based column position.
13139         (java_lex): Use ctxp->elc to store current position in source
13140         file, at the beginning of the parsed token. Set modifier_ctx entry
13141         corresponding to the parse modifier to a WFL node. Return a WFL
13142         node when an identifier is parsed.
13143         (java_lex_error): Now uses ctxp->elc to store current position in
13144         source.
13145         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
13146         * lex.h (build_wfl_node): New function definitions.
13147         (struct java_line): ref_count and next fields are gone. New field
13148         char_col.
13149         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13150         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
13151         (JAVA_COLUMN_DELTA): New macro.
13152         (java_lc): New typedef on new struct _java_lc.
13153         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
13154         (parse_error_context, parse_warning_context): Changed prototypes.
13155         (java_get_line_col): Added as an available global function.
13156         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
13157         (IC_DECL): Replaced by macro IC_TYPE
13158         (DEPEND_WFL): New macro.
13159         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
13160         wrong modifier.
13161         (exit_java_complete_class): Removed a commented out statement.
13162         (struct parser_ctxt): Added comments on fields. modifier_ctx is
13163         now an array of tree nodes. Deleted fields line_list and
13164         e_line. New field elc, to replace e_line.
13165         * parse.y (array_type:): Build WFL node.
13166         (qualified_name:): Build a single WFL node out of two. Retain
13167         the location information of the first node in the resulting node.
13168         (package_declaration:): Use package name as a WFL node
13169         (single_type_import_declaration:): Use imported name as a WFL node.
13170         (type_import_on_demand_declaration:): Use root of the imported
13171         packages as a WFL node.
13172         (field_declaration:): Removed unused local variable cl.
13173         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
13174         (yyerror): New static elc. Removed static error_line, error_pos.
13175         New local code_from_source. Save ctxp->elc into elc at the first
13176         pass. Call java_get_line_col to get a string of the line where
13177         the error occurred.
13178         (debug_line): Removed static function.
13179         (parse_error_context, parse_warning_context): Parameter cl is now
13180         a WFL node. Use its value to initialize ctxp->elc.
13181         (redefinition_error): Parameter cl is now a WFL node.
13182         (parse_add_interface): New parameter wfl. No longer call
13183         lookup_cl, use wfl instead.
13184         (check_class_interface_creation): Parameter cl is now a WFL node.
13185         (maybe_create_class_interface_decl): Likewise.
13186         (add_superinterfaces): New function.
13187         (create_interface): Removed local cl, node, super_decl,
13188         super_decl_type.  Function now uses id as a WFL node. Better
13189         warning/error report on obsolete or forbidden mix of
13190         modifiers. Now calls add_superinterfaces to register interfaces.
13191         (create_class): Removed local cl, node. Local variable id is used
13192         as a WFL node. Better error report on forbidden modifier
13193         mix. Uses add_superinterfaces to register interfaces.
13194         (find_field): Argument cl is now a WFL node. Now store the WFL
13195         node of a fields that needs to be checked for their
13196         initialization.
13197         (method_header): Local variable node non longer used. Local
13198         variable id replaces cl.
13199         (check_modifiers_consistency): Local variable cl is now a WFL
13200         node.
13201         (method_declarator): Local variable cl replaced by parameter id.
13202         (parser_qualified_name): Now uses parameter name as a WFL node.
13203         (parser_check_super_interface): New parameter wfl, for achieve
13204         greater accuracy during error reports.
13205         (parser_chain_incomplete_item): New parameter named location. Used,
13206         along the decl, to construct the incomplete item node.
13207         (java_complete_class): resolve_class now uses WFL node extracted
13208         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
13209         where appropriate.
13210         (complete_method_decl): Unresolved function's argument types are WFL.
13211         (resolve_class): Parameter cl is now a WFL node.
13212         (resolve_and_layout): Likewise.
13213         (do_resolve_class): Likewise. Try first to use cl and then do the
13214         lookup on the decl when calling check_pkg_class_access.
13215         (complete_class_report_errors): Use IC_TYPE in place of
13216         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
13217         instead of doing a lookup over the decl.
13218         (java_check_final): Use WFL info from field tree list.
13219         (lookup_cl): Rewritten and returns a statically defined WFL node.
13220         (lookup_modifier_cl): Now uses information from WFL nodes.
13221         (process_imports): Likewise.
13222         (read_import_dir): name and cl arguments replaced by a single WFL
13223         node. Function modified accordingly.
13224         (find_in_imports_on_demand): Now uses WFL node.
13225         (check_pkg_class_access): cl argument is now a WFL node.
13226         (declare_local_variables): Fixed to use WFL nodes.
13227         (resolve_expression_name): Likewise.
13228         (build_method_invocation_stmt): name_combo argument renamed
13229         wfl. Function modified to use WFL nodes.
13230         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
13231         (lookup_method_invoke): cl is now a WFL node. Added missing
13232         IDENTIFIER_POINTER to class type decl name.
13233
13234 Tue Apr 14 15:23:29 1998  Dave Brolley  <brolley@cygnus.com>
13235
13236         * lang.c (init_parse): Now returns char* containing the filename.
13237
13238 Fri Apr 10 11:36:04 1998  Per Bothner  <bothner@cygnus.com>
13239
13240         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
13241
13242         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
13243         * class.c (make_class_data):  If flag_assume_compiled, initial class
13244         state is CSTATE_PREPARED; make superclass and interfaces direct
13245         references, rather than constant pool indexes.
13246
13247 Thu Apr  9 16:10:56 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13248
13249         * parser.y: Include flags.h. Removed debug variable pl.
13250         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
13251         (block:): Likewise.
13252         (labeled_statement_nsi:): Generate debug info when reducing
13253         expression_statement:.
13254         (check_pkg_class_access): get_access_flags_from_decl invokation
13255         fixed for new CLASS_* flags location.
13256         (source_end_java_method): Save/restore parser context when
13257         entering/leaving this routine. Restore lineno to its right value
13258         before calling expand_end_bindings.
13259         (build_method_invocation_stmt): build_invoke called with the
13260         current line information.
13261         (build_invoke): New argument cl. Wrap the function call around a
13262         wfl node.
13263         (refine_accessible_methods_list): Changed comment, removed
13264         unnecessary code.
13265         * parse.h: Fixed typo in comments.
13266         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
13267         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
13268         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
13269         parser_ccb_indent.
13270         * lex.c (java_lex): Record the last closing curly bracket of a
13271         function.
13272         * jcf-parse.c (jcf_parse_source): Now calls
13273         java_check_methods. Clarified comment, fixed typo.
13274
13275 1998-04-09  Dave Brolley  <brolley@cygnus.com>
13276
13277         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
13278         (finish_parse): Expose for non USE_CPPLIB builds.
13279
13280 Wed Apr  8 13:06:23 1998  Jeffrey A Law  (law@cygnus.com)
13281
13282         * lang.c (lang_print_xnode): New function.
13283
13284 Fri Apr  3 13:22:41 1998  Per Bothner  <bothner@cygnus.com>
13285
13286         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
13287         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
13288         used to build a class's dispatch table.
13289         (make_class_data):  Generate dispatch table if flag_assume_compiled.
13290         Set dtable of class object to address of class_dtable_decl.
13291
13292         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
13293         be volatile and have side effects - generates better code.
13294
13295         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
13296         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
13297
13298         * expr.c (expand_invoke):  If class is final, method is
13299         effectively final, so can call it directly.
13300
13301         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
13302
13303         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
13304
13305 Thu Mar 19 16:59:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13306
13307         * parse.y (build_method_invocation_stmt): Removed extra argument
13308         to build_invoke.
13309
13310 Mon Mar 16 17:25:19 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13311
13312         * expr.c (dtable_indent): Now static global.
13313         (expand_invoke): Now call invoke_build_dtable and
13314         build_invokevirtual.
13315         (invoke_build_dtable, build_invokevirtual): New functions.
13316         * jcf-io.c (find_class): Defer issuing a warning by setting
13317         jcf->outofsynch to 1.
13318         * jcf-parse.c (jcf_out_of_synch): New function.
13319         (load_class): Test this_jcf.outofsynch flag and call
13320         jcf_out_of_synch accordingly.
13321         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
13322         comment indentation.
13323         * lex.c (java_get_unicode): Fixed code indentation.
13324         (java_lex): Create string literal. Fixed typo. Removed several
13325         premature obstack_free.
13326         * parse.h: New enums for name resolution and invocation mode.
13327         (struct qualification): New data structure.
13328         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
13329         (do_resolve_class, build_method_invocation_stmt,
13330         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
13331         debug_line, identical_subpath_p, invocation_mode,
13332         refine_accessible_methods_list, build_invoke,
13333         lookup_method_invoke): New functions declared.
13334         (build_invokevirtual, invoke_build_dtable, match_java_method,
13335         build_field_ref, jcf_out_of_synch): New references to external
13336         functions.
13337         (struct parse_ctxt): Removed artificial_constructor field.
13338         * parse.y: (array_type:): Type defined for this rule.
13339         (class_type:): Installed default rule for interface_type:.
13340         (array_type:): Now build Java array type.
13341         (qualified_name:): Now use obstack_grow0.
13342         (method_declaration:): Skip the artificial constructor added to
13343         the list, if any.
13344         (abstract_method_declaration:): Execute the code only during pass 1.
13345         (block:): Installed default rule in block_statements:.
13346         (block_statement:): Add the statement to the method during pass 2.
13347         (statement_expression): Installed default rule for
13348         method_invocation:.
13349         (argument_list:): Added code to build the argument list.
13350         (method_invocation:): Added call to create the method invocation
13351         node.
13352         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
13353         (debug_line): New function for debug.
13354         (complete_class_decl): No longer do something during pass 1.
13355         (method_header): Use BUILD_PTR_FROM_NAME.
13356         (parser_qualified_classname): Use obstack_grow0. Removed bogus
13357         obstack_free.
13358         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
13359         function's main comment.
13360         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
13361         classes.
13362         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
13363         (resolve_class): Now works with arrays.
13364         (do_resolve_class, resolve_and_layout): New functions.
13365         (java_check_regular_methods): Reverse method list before and after
13366         having processed it. No longer set ctxp->artificial_constructor.
13367         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
13368         accordingly. Fixed typo in issued error message. Now use
13369         obstack_grow0.
13370         (find_in_imports_on_demand): Now use obstack_grow0.
13371         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
13372         (source_end_java_method): Call expand_expr_stmt instead of
13373         expand_expr. Calls it before calling expand_function_end.
13374         (java_method_add_stmt): Do nothing if errors were found during
13375         parsing.
13376         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
13377         (build_method_invocation_stmt, build_invoke, invocation_mode,
13378         lookup_method_invoke, refine_accessible_methods_list,
13379         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
13380         New functions.
13381         * typeck.c (build_java_signature): Properly end method signature
13382         if return type skipped.
13383         (match_java_method): New function.
13384
13385 Mon Mar 16 10:40:47 1998  Per Bothner  <bothner@cygnus.com>
13386
13387         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
13388
13389 Wed Feb 25 08:55:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13390
13391         * expr.c (build_invoke_non_interface): New function.
13392         (methods_ident, ncode_ident): Now static globals.
13393         (expand_invoke): Use build_invoke_non_interface.
13394         * java-tree.h (struct lang_decl): New field function_decl_body.
13395         (DECL_FUNCTION_BODY): New macro.
13396         * jcf-parse.c (jcf_parse_source): Deeper check before setting
13397         CLASS_FROM_SOURCE_P.
13398         (parse_source_file): Fixed typos. Call java_layout_parsed_class
13399         before starting pass 2. Call to java_generate_parsed_class replaced
13400         by java_register_parsed_class.
13401         * lex.c: Fixed typo in header. Some line width related formating.
13402         * lex.h: Some line width related formating.
13403         * parse.h (source_end_java_method, resolve_expression_name,
13404         complete_class_decl, maybe_create_class_interface_decl,
13405         check_class_interface_creation): New static function declarations.
13406         (java_layout_parsed_class, java_method_add_stmt): New function
13407         declarations.
13408         (struct parser_ctxt): Field mark_class_generate removed. New
13409         fields class_list and artificial_constructor.
13410         * parse.y: Fixed typo in header.
13411         (class_declaration:): Call complete_class_decl when class body
13412         parsed.
13413         (method_declaration:): Call source_end_java_method in pass 2 when
13414         the method body is defined.
13415         (postfix_expression:): Do expression name resolution on sub-rule
13416         name during pass 2.
13417         (create_class, create_interface): Merged common pieces.
13418         (check_class_interface_creation, maybe_create_class_interface_decl):
13419         New functions.
13420         (complete_class_decl): New function.
13421         (register_fields): Fixed line width related typo.
13422         (method_header): Correctly skip first argument when fixing
13423         argument line. Changed the loop.
13424         (java_check_circular_reference): Now use ctxp->class_list.
13425         (java_complete_class): Removed start/stop marking.
13426         (java_check_regular_methods): Now takes a class decl as an
13427         argument.  Add default constructor if none were encountered.
13428         (java_check_methods): Now use ctxp->class_list. Changed call to
13429         java_check_regular_methods.
13430         (source_start_java_method): Set DECL_ARG_TYPE for each function
13431         arguments.
13432         (source_end_java_method, java_method_add_stmt): New functions.
13433         (java_generate_parsed_class): No longer exists.
13434         (java_layout_parsed_class, java_register_parsed_class): New functions.
13435         (resolve_expression_name): New function.
13436
13437 Thu Feb 12 11:54:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13438
13439         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
13440         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
13441         until pass initializations are done. Call read_import_dir with
13442         pass set to 0.
13443         * parse.h: (lookup_modifier_cl): New function declared.
13444         (INTERFACE_FIELD_MODIFIERS): New macro.
13445         (OBSOLETE_MODIFIER_WARNING): New macro.
13446         * parse.y: (register_fields): Class type and current field name in
13447         local variables. Check modifier(s) if adding field(s) to an interface.
13448         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
13449         and report errors using the faulty modifier line context.
13450         (lookup_modifier_cl): New function.
13451         (read_import_dir): Detect and report default import processing
13452         failure.
13453
13454 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
13455
13456         Add a pair of -fassume-compiled/-fno-assume-compiled options.
13457         * class.c (is_compiled_class): Return 1 after making sure it
13458         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
13459         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
13460         * java-tree.h (flag_assume_compiled): Add decl.
13461         * lang.c (lang_f_options): Add the flag.
13462         (flag_assume_compiled): Add decl, default to 0.
13463
13464 Wed Feb 11 11:27:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13465
13466         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
13467         (is_compiled_class): Likewise.
13468         (layout_class): Likewise.
13469         (layout_class): Detect and lay out classes defined in source code.
13470         (interface_of_p, add_interface_do, may_add_interface): New
13471         function.
13472         (add_interface): Now use add_interface_do.
13473         (add_method_1): New function.
13474         (add_method): Now use add_method_1.
13475         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
13476         (complete_start_java_method): New function.
13477         (start_java_mehod): Now call complete_start_java_method.
13478         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
13479         (expand_invoke): Likewise and fixed typo.
13480         *gjava.c: (print_super_field): Use new argument to find_class
13481         DO_CLASS_FILE.
13482         (main): Likewise.
13483         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
13484         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
13485         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
13486         IDENTIFIER_NODE.
13487         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
13488         (add_method_1, push_class): New prototypes.
13489         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
13490         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
13491         directory where the class was found.
13492         (find_class): New argument DO_CLASS_FILE. Function find_class
13493         modified accordingly.
13494         *jcf-parse.c: (fix_class_path): New function.
13495         (load_class): Use new VERBOSE argument. load_class now finds and
13496         loads/parses .class/.java files. Save read_state of current_jcf
13497         if necessary.
13498         (java_parser_abort_on_error): New macro.
13499         (jcf_parse_source, parse_source_file): New function.
13500         (jcf_parse): Fixed typo.
13501         (yyparse): Call parse_source_file () only.
13502         (process_zip_dir): Fixed typo, fix zdir->filename_length when
13503         writing the real class name back in the zip directory entry.
13504         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
13505         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
13506         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
13507         (find_class): Prototype fixed.
13508         *lex.c: Added 1998 time stamp.
13509         Removed all static global variables, moved into the parser
13510         context data structure.. Now include unistd.h if SEEK_SET not
13511         defined.
13512         (java_init_lex): Rewritten.
13513         (java_sneak_unicode): Modified current unicode access in current line.
13514         (java_unget_unicode): Likewise.
13515         (java_allocate_new_line): New allocation management.
13516         (java_read_char): Modified access and storage of unget_utf8_value.
13517         New way of processing current unicode.
13518         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
13519         (java_get_unicode): Now use the parser context.
13520         (java_lineterminator): Likewise.
13521         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
13522         of the reentrant parser implementation. Function now use the
13523         parser context data structure and java_lval. Fixed production of
13524         the float and double constant "out of range" error message. Fixed
13525         obstack use. Return integer value when hitting a modifier. Now
13526         return type for TRUE, FALSE and other predefined types. Return
13527         identifier as a TREE_LIST list containing the current line context
13528         as the TREE_VALUE sub-node.
13529         (java_unicode_2_utf8): Fixed typo in declaration.
13530         (java_lex_error): Now use the parser context data structure.
13531         *lex.h: Added 1998 time stamp.
13532         (struct java_line): New fields ref_count and next.
13533         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13534         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
13535         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
13536         *parse.h: Added 1998 time stamp.
13537         (java_parse_source_file): Renamed from parse_source_file.
13538         (YYERROR_NOW, YYNOT_TWICE): Fixed.
13539         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
13540         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
13541         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
13542         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
13543         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
13544         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
13545         (struct parser_ctxt): New data structure to keep the parser context.
13546         *parse.y: Added 1998 time stamp, got rid of static global variables.
13547         (java_error_count, ctxp): New global variables.
13548         (%union): New value field.
13549         (numeric_type, integral_type): Rules removed.
13550         (primitive_type): Rule defined to handle integral, float, double and
13551         boolean types.
13552         (qualified_name, package_declaration,
13553         single_type_import_declaration, type_import_on_demand_declaration,
13554         modifiers, class_declaration, super, interfaces,
13555         interface_type_list, class_body, field_declaration,
13556         field_declaration, variable_declarators, variable_declarator,
13557         variable_declarator_id, method_declaration, method_header,
13558         formal_parameter_list, formal_parameter, method_body, block,
13559         static, interface_declaration, extends_interfaces,
13560         abstract_method_declaration, local_variable_declarators): Rules now
13561         define actions.
13562         (force_error, do_warning): New global statics.
13563         (push_parser_context, parser_context_save_global,
13564         parser_context_restore_global, pop_parser_context): New functions.
13565         (yyerror): Now uses the global parser context. Fixed use of obstack.
13566         (parse_error, parse_error_context, parse_warning_context,
13567         java_accstring_lookup, redefinition_error, check_modifiers,
13568         parser_add_interface, create_interface, create_class, find_field,
13569         duplicate_declaration_error, register_fields, method_header,
13570         check_modifiers_consistency, check_abstract_method_header,
13571         method_declarator, parser_qualified_classname,
13572         parser_check_super_interface, parser_check_super,
13573         parser_chain_incomplete_item, java_check_circular_reference,
13574         layout_class_from_source, java_complete_class,
13575         complete_method_decl, resolve_class, complete_class_report_errors,
13576         java_check_final, check_method_redefinition,
13577         java_check_regular_methods, java_check_abstract_methods,
13578         java_check_methods, lookup_java_interface_method2,
13579         lookup_java_method2, lookup_cl, find_name_in_single_imports,
13580         process_imports, find_in_imports, read_import_entry,
13581         read_import_dir, find_in_imports_on_demand,
13582         check_pkg_class_access, not_builtin_p, declare_local_variables,
13583         source_start_java_method, java_generate_parsed_class): New
13584         functions.
13585         *typeck.c: (signature_include_return): New global variable.
13586         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
13587         to add the function returned type in the signature.
13588
13589 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
13590
13591         * jcf-io.c (open_in_zip): Use strncmp and LEN.
13592
13593 Thu Jan 29 16:12:13 1998  Dave Brolley  <brolley@cygnus.com>
13594
13595         * Make-lang.in (java.info): Added.
13596         (java.install-info): Added
13597
13598 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
13599
13600         * Makefile.in (clean): Also remove java/parse.c.
13601
13602 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
13603
13604         Add a pair of -fbounds-check/-fno-bounds-check options.
13605         * lang.c (lang_decode_option): Add code to grok arguments.
13606         (flag_bounds_check): Add decl.
13607         (lang_f_options): New array w/ the option in it.
13608         * java-tree.h (flag_bounds_check): Add decl.
13609         * lang-options.h: New file.
13610         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
13611         of a static macro value.
13612         (JAVA_ARRAY_EXCEPTION): Delete macro.
13613
13614 Fri Jan 23 14:19:47 1998  Per Bothner  <bothner@cygnus.com>
13615
13616         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
13617         * expr.c (build_anewarray):  Add missing promote_type.
13618
13619 Thu Jan 22 17:43:45 1998  Per Bothner  <bothner@cygnus.com>
13620
13621         Add array types with known length to optimize bounds checking.
13622         * typeck.c (build_java_array_type):  Take length parameter.
13623         (java_array_type_length, build_prim_array_type):  New functions.
13624         * java-tree.h:  Update for new functions.
13625         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
13626         * class.c:  Use build_prim_array_type.
13627         * expr.c (can_widen_reference_to):  Handle known-length array types.
13628         (verify_jvm_instructions):  Keep track of integer push instructions
13629         followed by newarray/anewarray, so we can build known-length arrays.
13630         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
13631         (java_array_data_offset):  New function.
13632         (build_java_array_length_access):  New function.  Optimize if constant.
13633         (build_java_arrayaccess):  Constant fold bounds check.
13634         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
13635         (build_newarray, build_anewarray):  New functions.
13636         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
13637         * verify.c (merge_types):  Handle known-lengh array types.
13638
13639 Mon Jan 19 13:09:25 1998  Per Bothner  <bothner@cygnus.com>
13640
13641         * expr.c (expand_byte_code):  Fix performace bug, which caused
13642         searching linenumber_table to be linear rather than constant.
13643
13644 Fri Dec 12 19:18:42 1997  Per Bothner  <bothner@cygnus.com>
13645
13646         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
13647
13648         * decl.c, java-tree.h (soft_fmod_node):  New global.
13649         * decl.c (init_decl_processing):  Define __builtin_fmod.
13650         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
13651         using __builtin_fmod.
13652
13653 Thu Dec  4 13:22:59 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13654
13655         * keyword.h: New file, output of keyword.gperf as processed by
13656         gperf.
13657         * lex.c (java_lex_init): Initialize java_error_flag.
13658         * parse.c (YYERROR_NOW): Uses java_error_flag.
13659         * parse.y: New static java_error_flag. Useless definition of
13660         buffer_error gone.
13661         * parse.y (java_error): Portable error recovery using
13662         java_error_flag (not yet completely tuned).
13663
13664 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
13665
13666         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
13667
13668 Wed Dec  3 18:37:42 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13669
13670         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
13671         (parse.c, lex.c, keyword.h): New rules for Java source code
13672         front-end.
13673         * parse.c: Renamed into jcf-parse.c.
13674         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
13675         * keyword.gperf: New file, Java keywords.
13676         * parse.y: New file, Java language grammar.
13677         * parse.h: New file, Java language grammar definitions.
13678         * lex.c: New file, Java language lexer.
13679         * lex.h: New file, Java language lexer definitions.
13680
13681 Wed Dec  3 17:00:17 1997  Per Bothner  <bothner@cygnus.com>
13682
13683         * decl.c (clinit_identifier_node), java-tree.h:  New global.
13684         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
13685         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
13686         * expr.c (expand_java_field_op):  Check for invalid assignment
13687         to final field.
13688
13689         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
13690
13691 Mon Oct 27 17:46:36 1997  Per Bothner  <bothner@cygnus.com>
13692
13693         * verify.c (verify_jvm_instructions):  When processing a handler,
13694         attempt to set the current_subr to the right value.
13695         (More complicated code combines Sep 17 and Oct 22 versions.)
13696
13697 Fri Oct 24 11:36:54 1997  Per Bothner  <bothner@cygnus.com>
13698
13699         * class.c (push_class):  Figure out (guess) name of source file.
13700         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
13701         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
13702         (parse_class_file):  Change return type from int to void.
13703         Call debug_start_source_file/debug_end_source_file.
13704
13705         * expr.c (build_java_binop):  Fix masking 2nd operand.
13706         * decl.c (init_decl_processing):  Set sizetype first.
13707
13708 Wed Oct 22 19:39:05 1997  Per Bothner  <bothner@cygnus.com>
13709
13710         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
13711         (Revert Sep 17 change.)
13712
13713 Tue Oct 21 15:09:02 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13714
13715         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
13716         .class extension in their name and fix thing so we don't process
13717         them parse_zip_file_entries().
13718         (parse_zip_file_entries): Cleaned unused local variables.
13719
13720 Mon Oct 20 14:52:42 1997  Per Bothner  <bothner@cygnus.com>
13721
13722         * expr.c (can_widen_reference_to):  Allows equal array element types.
13723         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
13724         * jcf-dump.c (RET):  Get (and print) index.
13725
13726         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
13727         Promote element type to POINTER_TYPE.
13728
13729 Mon Oct 20 13:40:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13730
13731         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
13732         find_in_current_zip, jcf_figure_file_type): Moved from
13733         jcf-reader.c to parse.c.
13734         * zextract.c: (read_zip_archive): takes file_comment_length possible
13735         field into account.
13736
13737 Mon Oct 20 11:45:06 1997  Per Bothner  <bothner@cygnus.com>
13738
13739         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
13740
13741         * verify.c (merge_types):  Handle array types even better ...
13742
13743 Fri Oct 17 15:56:37 1997  Per Bothner  <bothner@cygnus.com>
13744
13745         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
13746
13747         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
13748         * class.c (make_class_data):  Don't build fields_decl if no fields.
13749         When building fields_decl, skip if DECL_ARTIFICIAL.
13750
13751         * expr.c (java_stack_swap):  Update stack_type_map.
13752         * verify.c (merge_types):  Handle array types better.
13753
13754 Wed Oct 15 18:09:45 1997  Per Bothner  <bothner@cygnus.com>
13755
13756         * class.c (add_field):  Don't promote short integral fields to
13757         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
13758         * expr.c (push_value):  Promote and convert short integral values.
13759
13760         * decl.c, java-tree.h (integer_two_node):  New constant node.
13761         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
13762
13763 Wed Oct 15 17:04:50 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13764
13765         * class.c (append_gpp_mangled_type): Use function argument
13766         unpromoted type to generate mangled name.
13767
13768 Mon Oct 13 16:52:55 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13769
13770         * constants.c (build_constant_data_ref): Now uses current_class
13771         instead of main_class.
13772         (build_constants_constructor): Now uses current_class instead of
13773         main_class.
13774         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
13775         of the global variable SeepZipFiles done here.
13776         * zextract.c (read_zip_archive): extra_field optional field taken
13777         into account while computing the position of the class file in the
13778         archive.
13779         * verify.c (verify_jvm_instructions): Use current_jcf to search
13780         the constant pool.
13781         * parse.c (load_class): First search for the class to load in the
13782         current zip file. Saves current_jcf (restored before returning
13783         from that function). Don't call JCF_FINISH in the class was found
13784         in the current ZIP file.
13785         (jcf_parse): If the class was found in the current ZIP file, save
13786         its tree_constant_pool (for later reuse).
13787         (parse_class_file): New function. Process each method defined in
13788         the current class and record the class as to be later registered.
13789         (yyparse): Rewritten. Figure the type of the current file and switch
13790         accordingly.
13791         * lang.c: New global variable current_jcf.
13792         (lang_init): Removed compiling_from_source test (done later, in
13793         yyparse). Removed call the jcf_parse ().
13794         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
13795         (typedef struct JCF): New fields seen_in_zip (to mark a class found
13796         in the current ZIP file) and zip_offset (offset to the class data in
13797         the current zip file).
13798         * jcf-reader.c: zipfile.h included.
13799         localToFile: New ZipFileCache static global variable
13800         (parse_zip_file_entries): New function. Browse the current ZIP
13801         file directory and process each class found.
13802         (process_zip_dir): New function. Register each class found in the
13803         ZIP file directory. The class aren't parsed but a valid JCF is
13804         link to each of them.
13805         (find_in_current_zip): New function. Search for a class in the
13806         current ZIP file directory. If found, prepare the class so that it
13807         can be loaded.
13808         (jcf_figure_file_type): New function. Examine the file structure
13809         to figure a class file, a ZIP file. If none of these categories are
13810         matched, a source file is assumed.
13811         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
13812         SeenZipFile: New global variable.
13813         (open_in_zip): Use zipmember's length to accelerate the search for
13814         a member. If zipmember was NULL and zip file successfully read,
13815         return 0.
13816         * java-tree.h: New global variable current_jcf declared.  Added
13817         declaration for current_constant_pool_tags, current_constant_pool_data,
13818         current_constant_pool_length, current_constant_pool_data_ref.
13819         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
13820         store the JCF of classes seen in a zip file) and tree *constant_pool
13821         (to save a loaded class constant pool). current_class declared here.
13822         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
13823         retrieve method_ref_constant.
13824         (PUSHC): java_push_constant_from_pool now uses current_jcf.
13825         (OBJECT): get_class_constant now uses current_jcf.
13826         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
13827         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
13828         (expand_invoke): Now uses current_class instead of main_class
13829         (build_class_init): Now uses current_class instead of main_class
13830         * class.c: New static global variable registered_class.
13831         (register_class): New function.
13832         (emit_register_class): Modified to use registered_class instead of
13833         main_class
13834         (is_compiled_class): Now take into account class seen in the archive.
13835
13836 Mon Oct  6 12:03:23 1997  Per Bothner  <bothner@cygnus.com>
13837
13838         * except.h:  Renamed to: java-except.h.
13839         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
13840         * except.c:  Add semi-working (commented out) implementation.
13841
13842         * expr.c (expand_iinc):  Add needed flush_quick_stack.
13843         * parse.c (set_source_filename):  New function.
13844         (give_name_to_class):  Set input_filename from package.classname.java.
13845
13846         * jcf-io.c (find_class):  Don't look first in ".".
13847
13848 Wed Oct  1 11:26:10 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13849
13850         * zextract.c (read_zip_archive): Now takes into account the
13851         extra_field field.
13852         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
13853
13854 Sat Sep 20 12:44:28 1997  Per Bothner  <bothner@cygnus.com>
13855
13856         * constants.c, java-tree.h (build_internal_class_name):  New function.
13857         (alloc_class_constant):  Re-implement using build_internal_class_name.
13858         * class.c (make_class_data):  Likewise.
13859         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
13860
13861 Wed Sep 17 13:15:23 1997  Per Bothner  <bothner@cygnus.com>
13862
13863         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
13864         to NULL before pushing an exception handler target.
13865
13866         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
13867         (java_stack_swap, java_stack_dup):  Re-write to be safe from
13868         clobbering registers.
13869         (build_class_init):  New function.
13870
13871 Wed Sep 17 11:02:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13872
13873         * typeck.c (build_java_array_type): Temporary use
13874         permanent_obstack to create the array 'length' field.
13875         * expr.c (lookup_label): Temporay use permanent_obstack to create
13876         label if not found.
13877         * class.c (push_super_field): Tempory use permanent_obstack.
13878
13879 Mon Sep 15 11:33:31 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13880
13881         * typeck.c (type_for_mode): Now handles double_type_node and
13882         float_type_node.
13883         * verify.c (verify_jvm_instructions): The instruction following
13884         the wide bytecode is checked. OPCODE_ret added to the list of
13885         wide.
13886
13887 Thu Sep 11 19:45:18 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13888
13889         * class.c (make_class): Temporary use permanent_obstack. Set the
13890         class CLASS_P field to 1.
13891         (push_class): Temporary use permanent_obstack.
13892         (set_super_info): Temporary use permanent_obstack.
13893         (add_method): Temporary use permanent_obstack, set
13894         METHOD_TRANSIENT().
13895         (add_field): Temporary use permanent_obstack. Sets
13896         FIELD_VOLATILE() and FIELD_TRANSIENT().
13897         (build_class_ref): Temporary use permanent_obstack if the class
13898         isn't compiled.
13899         (build_static_field_ref): Temporary use permanent_obstack when
13900         creating field's rtl.
13901         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
13902         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
13903         and fields. Function finalized, as far as flag handling.
13904         (push_class_static_dummy_field): Temporary use permanent_obstack.
13905         (emit_register_class): Force generation of class registration at
13906         -O3 or deeper.
13907         * decl.c (end_java_method): Call permanent_allocation() before
13908         returning.
13909         * expr.c (can_widen_reference_to): Added comment to interface
13910         handling, fixed typo.
13911         (lookup_field): Now uses CLASS_P() to correct FIXME
13912         (expand_invoke): Verification on public && !static &&
13913         !abstract moved into soft_lookupinterfacemethod (kaffe).
13914         Use Object class dtable if objectref is an array when expanding
13915         invokeinterface.
13916         (java_push_constant_from_pool): Temporary use permanent_obstack
13917         for CONSTANT_string
13918         * parse.c (get_ref_constant): Temporary use permanent_obstack to
13919         create constant references.
13920         (get_constant): Temporary use permanent_obstack to create constant.
13921         (load_class): Temporary use permanent_obstack to load class.
13922         (jcf_parse): Temporary use permanent_obstack to perform class
13923         layout.
13924         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
13925         (build_java_signature): Temporary use permanent_obstack.
13926         * verify.c: (verify_jvm_instruction): removed unnecessary verification
13927         on ACC_SUPER flag.
13928         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
13929         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
13930         (CLASS_P): Defined
13931
13932 Thu Sep 11 11:57:32 1997  Per Bothner  <bothner@cygnus.com>
13933
13934         * class.c (append_gpp_mangled_type):  Fix typo.
13935         (emit_register_class):  Use main_class to get class object, rather
13936         than looking for no-longer-existing static decl starting with _CL.
13937         * typeck.c (parse_signature_type):  Promote array element type
13938         if it is a RECORD_TYPE.
13939
13940 Wed Sep 10 16:09:23 1997  Per Bothner  <bothner@cygnus.com>
13941
13942         * class.c (push_class_static_dummy_field):  New function.
13943         (mangle_static_field):  New. Do G++-style mangling of static fields.
13944         (layout_class):  Mandle static fields here, not in add_field.
13945         (build_class_ref):  The class object is now a dummy static field.
13946         * decl.c (find_local_variable):  Look for best, instead of first match.
13947         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
13948         (build_java_athrow):  Don't check here if exception is Throwable.
13949         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
13950         (TYPE_USED):  Removed.  No longer used ...
13951         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
13952         * verify.c (push_pending_label):  New function.
13953         (push_pending_block):  Renamed to check_pending_block.
13954         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
13955         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
13956         re-checking possible handlers) after a store (less wasted work).
13957         Check for null handler (finally) before calling add_handler.
13958         Various changes to (finally?) correctly handle try/finally.
13959
13960 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13961
13962         * class.c: Include stdio.h.
13963
13964 Thu Sep  4 21:30:55 1997  Per Bothner  <bothner@cygnus.com>
13965
13966         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
13967         to make sure class is initialized before static/special invoke.
13968
13969         * verify.c (verify_jvm_instructions):  On a store instruction,
13970         call find_local_variable to force pre-allocation of decl and rtx.
13971         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
13972
13973 Wed Sep  3 16:13:23 1997  Per Bothner  <bothner@cygnus.com>
13974
13975         * class.c (build_class_ref):   Strip off "promoted_" if need be.
13976         (make_field_value): Call build_java_signature when needed.
13977         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
13978         * expr.c (build_java_athrow):  Don't push_value of exception.
13979         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
13980         match specification of [fd]cmp[lg] for NaNs.
13981         (expand_byte_code):  Add support for exception handler ranges.
13982         * except.c:  Add skeleton for EH code-generation.
13983         * verify.c (merge_types):  Treat all promoted integral types as equal.
13984         * constants.c (build_constants_constructor):  To force creation of
13985         current_constant_pool_data_ref, call build_constant_data_ref.
13986
13987         * javaop.def (lload):  Fix typo.
13988         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
13989
13990 Tue Sep  2 17:37:25 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13991
13992         * parse.c: Don't include function.h.
13993
13994 Wed Aug 27 18:33:04 1997  Per Bothner  <bothner@cygnus.com>
13995
13996         * except.[ch]:  New files.
13997         * Makefile.in (JAVA_OBJS):  Add except.o
13998         * expr.c:  Temporary warning about unimplemented exceptions.
13999         * verify.c:  Verify exception handlers.
14000
14001         * jcf-dump.c (disassemble_method):  Print exception table.
14002
14003 Wed Aug 27 13:26:58 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14004
14005         * expr.c (verify_jvm_instructions): Started a thorough
14006         verification of invoke* bytecodes.
14007         (expand_byte_code): flush quick stack if PC is the target of a
14008         branch.  and undef RET (conflicting with config/i386/i386.h).
14009         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
14010         used.
14011         (expand_invoke): Now handles invokeinterface and do more
14012         verification according to the bytecode.
14013         (lookup_field): Don't try to load the class if processing
14014         dtable_type.
14015         (can_widen_reference_to): Now handles interfaces.
14016         * decl.c (init_decl_processing): New global variable
14017         soft_lookupinterfacemethod_node, declared in java-tree.h.
14018         Call set_super_info on string_type_node.
14019         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
14020         defined.
14021         * class.c (set_super_info): Fills the CLASS_* flags according to
14022         access_flags.
14023         (get_access_flags_from_decl): Handles all class flags.
14024
14025 Tue Aug 26 18:54:34 1997  Per Bothner  <bothner@cygnus.com>
14026
14027         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
14028         * parse.c (yyparse):  Check for abstract method, and missing code.
14029         * expr.c (expand_byte_code):  Change interface.
14030         * lang.c (put_decl_node):  Print promoted types prettier.
14031         * verify.c (verify_jvm_instruction):  Change interface.
14032         Partial support for scanning exception table.
14033         For load instructions, handle promoted integral types.
14034
14035 Thu Aug 21 13:48:01 1997  Per Bothner  <bothner@cygnus.com>
14036
14037         * verify.c:  New file, with contents moved from expr.c.
14038         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
14039         * typeck.c (is_array_type_p):  Moved here from expr.c.
14040         * java-tree.h:  Add some now-needed function declarations.
14041         * Makefile.in (JAVA_OBJS): Added verify.o.
14042
14043 Wed Aug 20 14:34:34 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14044
14045         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
14046         METHOD_ABSTRACT flag.
14047
14048         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
14049         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
14050         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
14051
14052         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
14053         variables.
14054         (start_java_method): Hook for SYNCHRONIZED methods.
14055
14056         * expr.c (build_java_jsr, build_java_ret): New functions
14057         (JSR,PRE): New macros
14058         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
14059         (verify_jvm_instructions): tableswitch, lookupswitch,
14060         monitorenter, monitorexit, goto_w: verified.
14061         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
14062         (build_java_monitor): New function.
14063         (MONITOR_OPERATION): Modified to call build_java_monitor()
14064         (verify_jvm_instructions): Started a thorough verification of
14065         invoke* bytecodes.
14066
14067 Tue Aug 19 13:35:49 1997  Per Bothner  <bothner@cygnus.com>
14068
14069         Support verification of jsr/ret subroutines (used for try/finally).
14070         * decl.c (return_address_type_node):  New type node.
14071         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
14072         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
14073         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
14074         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
14075         TYPE_USED):  New macros for special types in type_map.
14076
14077         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
14078         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
14079         BCODE_JUMP_TARGET.
14080         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
14081
14082         * expr.c (can_widen_reference_to):  New function.
14083         (pop_type):  Use it.
14084         (merge_type_state):  Support handling start of subroutine.
14085         (push_pending_block):  Return char* error message, instead of calling
14086         fatal on an error.  Also handle subroutines.
14087         (verify_jvm_instructions):  Handle errors from push_poending_block.
14088         Support jsr and ret instructions.
14089
14090 Tue Aug 19 13:33:36 1997  Per Bothner  <bothner@cygnus.com>
14091
14092         * jcf-io.c (find_classfile):  Fix thinko.
14093         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
14094
14095 Tue Aug 12 20:14:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
14096
14097         * Makefile.in (BISON): Remove.
14098
14099 Thu Aug  7 23:08:24 1997  Per Bothner  <bothner@cygnus.com>
14100
14101         * Makefile.in:  Convert to autoconf.
14102         * config-lang.in (outputs):  Added java/Makefile.
14103
14104         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
14105         Rename cc1java to jc1.
14106
14107         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
14108         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
14109
14110         * class.c (class_depth):  Do load_class if needed.
14111
14112         Mostly better verification.
14113         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
14114         (init_decl_processing):  Change return type of soft_checkcast.
14115         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
14116         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
14117         lang_print_error):  New functions.
14118         (lang_init):  Set global hook print_error_function to lang_print_error.
14119         * expr.c:  In the type_map ptr_type_node is only used for null now.
14120         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
14121         (merge_types):  Dererence pointer to record types before comparing.
14122         (decode_newarray_type, merge_types):  On error just return NULL.
14123         (build_java_binop):  Add preliminary implementation (with warning)
14124         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
14125         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
14126         (expand_compare, expand_java_goto, expand_java_call):  Don't
14127         push_pending_block, since that only makes sense when verifying.
14128         (merge_type_state):  Different return codes.
14129         (push_pending_block):  A block may need to be verified more than once.
14130         (expand_byte_code):  Warn about unused code at code generation time.
14131         (verify_jvm_instruction):  Changed logic, since code may need to be
14132         re-verified if type-state has changed.  Also, better error handling.
14133         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
14134         Improve newarray, anewarray, ?aload, athrow,
14135         * java-tree.h (LABEL_CHANGED):  New macro.
14136
14137 Tue Aug  5 12:21:27 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14138
14139         * decl.c (soft_athrow_node): New global variable initialized.
14140         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
14141         * typeck.c (convert): Added support for REAL_TYPE.
14142         (convert_to_char): New function.
14143         (convert): Handle CHAR_TYPE.
14144         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
14145         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
14146         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
14147         promoted type.
14148         (verify_jvm_instructions): Added break a the end of bogus unop: label.
14149         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
14150         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
14151         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
14152         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
14153         to Use The Right Things.
14154         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
14155         compatible with INT. BOOLEAN is made equivalent to BYTE.
14156         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
14157         OPCODE_ifnonnull): Now supported.
14158         (build_java_athrow): New function.
14159
14160 Mon Aug  4 15:46:45 1997  Per Bothner  <bothner@cygnus.com>
14161
14162         Rename method name <init> to match G++ (and fix mangling).
14163         * class.c (layout_class):  Replace method name of <init> by class name.
14164         (make_method_value):  Do inverse renaming of constructor from <init>.
14165         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
14166         * typeck.c (lookup_java_constructor):  New function.
14167         * expr.c (expand_invoke):  If method_name is <init>, call
14168         lookup_java_constructor to find constructor.
14169
14170         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
14171
14172 Fri Aug  1 11:37:09 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14173
14174         * parse.c (get_class_constant): Modified to handle array "classes"
14175         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
14176         wide type.
14177         (convert): Modified to handle real type.
14178         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
14179         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
14180         variables declared.
14181         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
14182         soft_multianewarray, soft_newarray_node, soft_throw_node): New
14183         global variables initialized.
14184         (find_local_variable): Handles the case of a pointer
14185         (end_java_method): Restore the use of one more scope
14186         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
14187         build_java_array_length_access, expand_java_arrayload,
14188         expand_java_arraystore, expand_java_array_length,
14189         expand_java_multianewarray, expand_java_anewarray,
14190         build_java_check_indexed_type, is_array_type_p,
14191         build_java_throw_out_of_bound_exception): New functions.
14192         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
14193         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
14194         OPCODE_<t>aload): Implemented code for verification.
14195         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
14196         ARRAY_NEW_MULTI): Macro defined.
14197         (CONVERT): Modified to invoke convert().
14198         (case OPCODE_aload2): Fixed index typo from 2 to 1.
14199
14200 Thu Jul 31 12:48:18 1997  Per Bothner  <bothner@cygnus.com>
14201
14202         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
14203         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
14204         (make_class_data):  Field name needs '/' as package prefix.
14205         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
14206
14207 Fri Jul 25 11:44:21 1997  Per Bothner  <bothner@cygnus.com>
14208
14209         Implement debug information for local variables.
14210         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
14211         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
14212         DECL_LOCAL_SLOT_CHAIN):  New macros.
14213         (struct lang_decl_var):  New type.
14214         * parse.c (give_name_to_locals):  Move to decl.c.
14215         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
14216         (start_java_method):  Re-write parameter handling.
14217         (pending_local_decls):  New global variable.
14218         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
14219         (find_local_variable):  Accept pc so we can skips decls not in range.
14220         (struct binding_level):  Add end_pc field.
14221         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
14222         (various):  Change so current pc gets passed to find_local_variable.
14223
14224         * decl.c (init_decl_processing):  Re-arrange fields in
14225         class_type_node and and method_type_node to match kaffe 0.9.1.
14226         * class.c (make_method_value, make_class_data):  Update
14227         initializations to match.
14228
14229 Wed Jul 16 17:17:50 1997  Per Bothner  <bothner@cygnus.com>
14230
14231         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
14232         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
14233         (push_super_field):  New function.
14234         (make_class_data):  Handle inheritance of class static initializer.
14235         (layout_class):  New name mangling.
14236         * constants.c (build_constant_data_ref):  Init type of data array
14237         to a one-element array.
14238         (build_constants_constructor):  Set DECL_SIZE from complete array type.
14239         * decl.c:  Rename class_type, object_type etc to class_type_node,
14240         object_type_node etc.  Make former inherit from latter.
14241         * expr.c (expand_invoke):  Add cast of function address.
14242         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
14243         * parse.c (yyparse):  Don't call layout_class here.
14244         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
14245
14246 Sat Jun 14 12:06:57 1997  Per Bothner  <bothner@cygnus.com>
14247
14248         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
14249         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
14250         (alloc_class_constant):  New.
14251         * expr.c (expand_invoke):  Make sure method's class is initialized.
14252         * class.c (interits_from_p, emit_register_class):  New functions.
14253         * parse.c (yyparse):  Call emit_register_class.
14254
14255 Mon Jun  9 18:08:06 1997  Per Bothner  <bothner@cygnus.com>
14256
14257         * constants.c:  New file, to handle constant pool.
14258         * Makefile.in (JAVA_OBJS):  Add constants.o.
14259         * decl.c (init_decl_processing):  Update, fix, finish various structs.
14260         (pushdecl_top_level):  New.
14261         * parse.c (layout_class):  Moved to class.c.
14262         * expr.c (java_push_constant_from_pool):  New function.
14263         * class.c (build_class_ref):  Make work fully
14264         (make_class_data):  Emit super-class, constant pool, interface vector.
14265
14266 Tue Jun  3 10:14:31 1997  Per Bothner  <bothner@cygnus.com>
14267
14268         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
14269         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
14270         * class.c (class_depth):  New function.
14271         (lookup_named_class):  Replaced by new function lookup_class.
14272         * decl.c (object_type_node, string_type_node):  New.
14273         Remove various types that we no longer need.
14274         * expr.c (verify_jvm_instructions):  New separate verifier pass.
14275         (push_type, pop_type):  New functions for verifier.
14276         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
14277         (expand_byte_code):  Simplify, since we assume already verified.
14278         (expand_invoke):  Now mostly works.
14279         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
14280         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
14281         * parse.c:  Wait to allocate class object until we know its name.
14282         (layout_class):  Calculate DECL_VINDEX for each virtual method.
14283         * typeck.c (get_array_type):  Rename to ...
14284         (build_java_array_type):  ... and provide working implementation.
14285         (build_java_signature):  New function - build Java signature of type.
14286         (set_java_signature):  New function - cache signature with type.
14287         (lookup_java_method):  New function.
14288
14289 Tue May  6 22:08:24 1997  Per Bothner  <bothner@deneb.cygnus.com>
14290
14291         * class.c (ident_subst):  Take extra SUFFIX parameter.
14292         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
14293         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
14294         (build_class_ref):  Actually implement.
14295         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
14296         * decl.c (builtin_function):  New.
14297         (init_decl_processing):  Update for current Kaffe.  Declare some
14298         builtin Kaffe functions.
14299         * expr.c (build_address_of):  New.
14300         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
14301         Renamed (from expand_java_new etc), and added working implementations.
14302         (build_field_ref):  Now also handle static fields.
14303         (expand_invoke):  Implement invokestatic, and start implement rest.
14304         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
14305         * javaop.def:  Rename invokevirt -> invokevirtual.
14306         * lang.c (use_handles):  Removed.
14307         * parse.c:  Add support for ConstantValue attribute.
14308         Handle nested loading of a class.  (JPOOL_UTF):  New.
14309
14310 Tue Mar 11 20:11:05 1997  Per Bothner  <bothner@deneb.cygnus.com>
14311
14312         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
14313
14314 Thu Feb 27 14:24:29 1997  Per Bothner  <bothner@deneb.cygnus.com>
14315
14316         * Make-lang.in (java.install-man):  New empty rule.
14317         * typeck.c (set_local_type):  New function.
14318         * expr.c (STORE_INTERNAL):  Call find_local_variable,
14319         not find_stack_slot.  Call set_local_type.
14320
14321 Wed Feb 12 16:11:05 1997  Per Bothner  <bothner@kalessin.cygnus.com>
14322
14323         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
14324         and building RECORD_TYPE CONSTRUCTORs.
14325         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
14326
14327         * lang.c (use_handles):  Change the default to 0.
14328         * decl.c:  Define and build class_type, field_type, utf8const_type.
14329         * class.c (make_class_data, make_field_value,
14330         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
14331         hashUtf8String, strLengthUtf8, mangled_classname:
14332         Functions to build reflective data structures.
14333         * parse.c (yyparse):  Call make_class_data.
14334
14335         * jcf-io.c (open_class, find_classfile):  New functions.
14336         * jcf-dump.c:  Support reading classfile from explicitly-named
14337         class file (without CLASSPATH searching).
14338
14339 Thu Oct 24 14:10:16 1996  Per Bothner  <bothner@deneb.cygnus.com>
14340
14341         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
14342         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
14343         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
14344         (get_constant):  Now trivial for CONSTANT_Utf8.
14345
14346         * jcf.h:  Make NEW_CPOOL the default.
14347         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
14348
14349 Thu Oct 24 13:52:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
14350
14351         New directory.