OSDN Git Service

PR optimization/6627
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2
3         PR optimization/6627
4         * lang.c (java_init): If storing the vbit in function
5         pointers, ensure that force_align_functions_log is atleast
6         one to aid compatability with g++ vtables.
7
8 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
9
10         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
11         foul of type-based aliasing.
12
13 2002-09-30  Anthony Green  <green@redhat.com>
14
15         * gcj.texi (Invoking jv-scan): Fix texinfo.
16
17 2002-09-28  Anthony Green  <green@redhat.com>
18
19         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
20         (Code Generation): Add -fno-assert documentation.
21         * jv-scan.c (flag_assert): New global.
22         (options): Add assert option.
23         (help): Add --no-assert documentation.
24         * parse-scan.y (flag_assert): New global.
25         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
26         (flag_assert): New global.
27         * java-tree.h (flag_assert): New global.
28         * lex.c (java_lex): Obey flag_assert.
29         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
30         calling cc1.
31
32 2002-09-26  Andrew Haley  <aph@redhat.com>
33
34         * expr.c (build_java_array_length_access): Check for null pointer.
35         * expr.c (expand_java_arrayload): Likewise.
36
37 2002-09-21  Richard Henderson  <rth@redhat.com>
38
39         * jcf-parse.c (get_constant): Decode from IEEE no matter 
40         what the target format.
41
42 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
43
44         * ChangeLog: Follow spelling conventions.
45         * class.c: Likewise.
46         * decl.c: Likewise.
47         * expr.c: Likewise.
48         * gjavah.c: Likewise.
49         * java-tree.h: Likewise.
50         * jcf-dump.c: Likewise.
51         * jcf-parse.c: Likewise.
52         * jvspec.c: Likewise.
53         * lang.c: Likewise.
54         * mangle.c: Likewise.
55         * parse.y: Likewise.
56
57 2002-09-17  Tom Tromey  <tromey@redhat.com>
58
59         * lex.c (java_read_unicode_collapsing_terminators): Handle case
60         where \r appears at EOF.  Fixes PR java/7950.
61
62 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
63
64         * java-tree.h (union lang_tree_node): Add chain_next option.
65
66 2002-09-16  Richard Henderson  <rth@redhat.com>
67
68         * jcf-parse.c (get_constant): Runtime check for IEEE format;
69         use new real.h interface.
70         * jcf-write.c (find_constant_index): Use new real.h interface.
71         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
72
73 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
74
75         * lang.c: Follow spelling conventions.
76
77 2002-09-11  Per Bothner  <per@bothner.com>
78
79         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
80         constant to the type of the field.
81         (java_complete_tree):  Remove now-redundant code.
82
83         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
84
85 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
86
87         For PR java/5794:
88         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
89         return label if a ret instruction for the jsr has been reached.
90
91 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
92
93         * parse.y (DIR_SEPARATOR): Don't define.
94         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
95
96 2002-08-28  Andrew Haley  <aph@redhat.com>
97
98         * verify.c (verify_jvm_instructions): Allow exception handler
99         inside code that is being protected, but generate a warning.
100         * except.c (link_handler): Initialize `expanded' in new eh_range.
101         (binding_depth, is_class_level, current_pc): Declare extern.
102
103 2002-09-01  Mark Wielaard <mark@klomp.org>
104
105         * gcj.texi: Add chapter about system properties.
106         Fixed some typos.
107
108 2002-08-26  Tom Tromey  <tromey@redhat.com>
109
110         * parse.y (try_builtin_assignconv): Allow narrowing primitive
111         conversion if RHS_TYPE is byte, short, or char.
112
113 2002-08-22  Tom Tromey  <tromey@redhat.com>
114
115         * gcj.texi (Invoking gij): Document -cp and -classpath.
116
117 2002-08-21  Tom Tromey  <tromey@redhat.com>
118
119         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
120         $(prefix)/share.  For PR libgcj/7633.
121
122         For PR java/6005 and PR java/7611:
123         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
124         (java_can_use_bit_fields_p): New function.
125
126 2002-08-16  Tom Tromey  <tromey@redhat.com>
127
128         * gcj.texi (Class Initialization): Mention class initialization of
129         arrays.
130
131 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
132
133         * Make-lang.in (java-tree-inline.o): New.
134         (JAVA_OBJS): Add java-tree-inline.o.
135         * parse.y (source_end_java_method): Call java_optimize_inline.
136         (java_expand_method_bodies): Save method's tree in
137         DECL_SAVED_TREE.
138         (add_stmt_to_compound): Keep track of the number of statments.
139         * lang.c (java_init): Enable flag_inline_trees.
140         (java_post_options): If flag_inline_functions is on, enable
141         flag_inline_trees instread.
142         (decl_constant_value): New.
143         (java_tree_inlining_walk_subtrees): New.
144         * java-tree.h (DECL_NUM_STMTS): New macro.
145         (java_optimize_inline): Declare.
146         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
147         Handle a LABEL_EXPR.
148         * decl.c (build_result_decl): If we already have a DECL_RESULT
149         don't make another.
150         (dump_function): New.
151         (java_optimize_inline): New.
152         (dump_function): New.
153
154 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
155
156         For PR java/7483:
157         * parse.y (build_assertion): Invert return from
158         desiredAssertionStatus.
159
160 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
161
162         * jcf-write.c (get_access_flags): Return correct access flags for 
163         private and protected inner classes.
164
165 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
166
167         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
168
169 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
170
171         * mangle_name.c: Don't include obstack.h twice.
172         * xref.c: Don't include obstack.h.
173
174 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
175
176         * class.c: (permanent_obstack): Delete declaration.
177         * constants.c: (permanent_obstack): Delete declaration.
178         * except.c: (permanent_obstack): Delete declaration.
179         * expr.c: (permanent_obstack): Delete declaration.
180         * jcf-parse.c: (permanent_obstack): Delete declaration.
181         (saveable_obstack): Delete declaration.
182         * parse.h: (permanent_obstack): Delete declaration.
183         * typeck.c: (permanent_obstack): Delete declaration.
184
185 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
186
187         * gcj.texi (version-gcc): Increase to 3.3.
188
189 2002-07-22  Tom Tromey  <tromey@redhat.com>
190
191         * lex.c (java_lex): Check for `e' or `E' after 0.
192
193 2002-07-21  Richard Henderson  <rth@redhat.com>
194
195         * lang.c (java_unsafe_for_reeval): New.
196         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
197
198 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
199
200         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
201         (jcf_path_init): Use GET_ENVIRONMENT.
202
203 2002-07-10  Roger Sayle  <roger@eyesopen.com>
204             Zack Weinberg <zack@codesourcery.com>
205
206         * builtins.c (initialize_builtins): Remove defines that
207         handled C/C++ specific junk hereby removed from builtins.def.
208
209 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
210
211         * lang.c (java_post_options): Update prototype.
212
213 2002-07-05  Roger Sayle  <roger@eyesopen.com>
214
215         * builtins.c (initialize_builtins): Ignore the additional
216         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
217         the builtins.def file.
218
219 2002-07-01  Tom Tromey  <tromey@redhat.com>
220
221         For PR libgcj/7073:
222         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
223         specially.
224
225 2002-07-01  Roger Sayle  <roger@eyesopen.com>
226
227         * java/decl.c (builtin_function): Accept additional parameter.
228         (java_init_decl_processing): Pass an additional NULL_TREE
229         argument to builtin_function.
230
231 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
232
233         * gcj.texi: Fixed gcj invocation example so that it compiles.
234
235 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
236
237         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
238         * parse.y (mark_parser_ctxt): Likewise.
239         (check_modifiers, declare_local_variables): Avoid incorrect
240         hardcoded constant 10.
241
242         * lex.c (java_read_char): Avoid "comparison is always true"
243         warning.
244
245 2002-06-25  Andreas Schwab  <schwab@suse.de>
246
247         * expr.c (JSR): Avoid undefined operation on PC.
248
249 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
250
251         * decl.c (clear_binding_level): Const-ify.
252
253 2002-06-13  Akim Demaille  <akim@epita.fr>
254
255         * parse.y (class_declaration, interface_declaration): Make sure
256         all their rules have an action, in order to avoid meaningless `$$
257         = $1' and their type clashes.
258
259 2002-06-11  Tom Tromey  <tromey@redhat.com>
260
261         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
262         * parse-scan.y (statement_without_trailing_substatement): Added
263         assert_statement.
264         (assert_statement): New rule.
265         * java-tree.h (struct lang_type) [assertions]: New field.
266         (TYPE_USES_ASSERTIONS): New macro.
267         (CLASS_USES_ASSERTIONS): Likewise.
268         (FIELD_SYNTHETIC): New define.
269         * lex.c (java_lval;): Added ASSERT_TK.
270         * parse.y (ASSERT_TK): Added.
271         (statement_without_trailing_substatement): Added assert_statement.
272         (assert_statement): New rule.
273         (build_assertion): New function.
274         (maybe_generate_pre_expand_clinit): Create and initialize
275         $assertionsDisabled.
276         (lookup_package_type): Removed decl.
277         * keyword.h: Rebuilt.
278         * keyword.gperf (assert): New token.
279
280 2002-06-10  Akim Demaille  <akim@epita.fr>
281
282         * parse.y (interface_type_list, class_member_declaration)
283         (unary_expression_not_plus_minus): Remove duplicate %type.
284         Whitespace changes.
285
286 2002-06-09  Tom Tromey  <tromey@redhat.com>
287
288         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
289
290         * parse.y (method_header): Give error message in all cases.
291         Fixes PR java/6865.
292
293 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
294
295         Don't use RTL inlining. Fix for PR java/6820.
296         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
297         (flag_really_inline): New.
298         (java_decode_option): Set flag_really_inline if -finline-functions
299         is seen.
300         (java_post_options): New function. Turn off inlining unless
301         flag_really_inline is set.
302
303 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
304
305         * gjavah.c (throwable_p): Accept argument as either a classname or 
306         signature fragment. Create null-terminated classname string for super
307         when calling itself recursively.
308         (decode_signature_piece): Skip first character from class name 
309         signature when calling throwable_p.
310
311 2002-06-08  H.J. Lu  (hjl@gnu.org)
312
313         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
314
315 2002-06-04  Tom Tromey  <tromey@redhat.com>
316
317         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
318
319 2002-06-04  Michael Koch  <konqueror@gmx.de>
320
321         * gcj.texi (Input Options): Fixed typo.
322
323 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
324
325         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
326         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
327         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
328         and all now-pointless local variables.  Rename other local
329         variables to reflect their not being handles.
330
331         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
332         #if JCF_USE_STDIO blocks.
333
334         * parse.y: Add missing semicolon at end of rule.
335
336 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
337
338         * check-init.c (attach_initialized_static_class): Delete, unused.
339         * parse.y: Use htab_t instead of struct hashtable, update
340         all uses.
341         * java-tree.h: Include hashtab.h instead of hash.h.
342         (struct lang_decl_func): Use htab_t, set up for gengtype.
343         (struct init_test_hash_entry): Delete.
344         (struct treetreehash_entry): New.
345         (java_treetreehash_find): New
346         (java_treetreehash_new): New prototype.
347         (java_treetreehash_create): New prototype.
348         (java_mark_tree): Delete prototype.
349         (java_hash_hash_tree_node): Delete prototype.
350         (java_hash_compare_tree_node): Delete prototype.
351         (attach_initialized_static_class): Delete prototype.
352         * expr.c (build_class_init): Update to use java_treetreehash
353         functions.
354         (java_expand_expr): Update to use htab_t.
355         (emit_init_test_initialization): Likewise.
356         * decl.c (java_mark_tree): Delete.
357         * class.c (init_test_hash_newfunc): Delete.
358         (java_hash_hash_tree_node): Delete.
359         (java_hash_compare_tree_node): Delete.
360         (add_method_1): Update to use java_treetreehash functions.
361         (JAVA_TREEHASHHASH_H): New macro.
362         (java_treetreehash_hash): New function.
363         (java_treetreehash_compare): New function.
364         (java_treetreehash_find): New function.
365         (java_treetreehash_new): New function.
366         (java_treetreehash_create): New function.
367         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
368
369         * Make-lang.in (java/parse.o): Depend on debug.h.
370         * java-tree.h (struct lang_identifier): Use gengtype.
371         (union lang_tree_node): New.
372         (struct lang_decl_func): Use gengtype.
373         (struct lang_decl_var): Likewise.
374         (struct lang_decl): Likewise.
375         * parse.y: Include debug.h.
376         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
377
378         * lang.c (struct language_function): New dummy structure.
379
380         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
381         descriminator for DECL_LANG_SPECIFIC.
382         (struct lang_decl_func): Rename from struct lang_decl.
383         (enum lang_decl_desc): New.
384         (struct lang_decl): Make it a union.  Update all the accessor macros.
385         (struct lang_type): Use gengtype.
386         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
387         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
388         are now the same size.
389         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
390         use discriminator to mark DECL_LANG_SPECIFIC.
391
392         * Make-lang.in (gt-java-builtins.h): New rule.
393         (java/builtins.o): Add dependency on gt-<filename>.h.
394         * builtins.c: Use gengtype for roots.
395         (union string_or_tree): Use gengtype.
396         (struct builtin_record): Use gengtype.
397         * config-lang.in (gtfiles): Add builtins.c.
398
399         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
400         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
401         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
402         gt-java-parse.h, gtype-java.h): Add rules to generate.
403         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
404         (class.o): Add dependency on gt-*.h.
405         (constants.o): Likewise.
406         (decl.o): Likewise.
407         (expr.o): Likewise.
408         (jcf-parse.o): Likewise.
409         (jcf-write.o): Likewise.
410         (lang.o): Likewise.
411         * config-lang.in (gtfiles): New.
412         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
413         * constants.c: Replace uses of ggc_add_* with GTY markers.
414         Include gt-*.h.
415         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
416         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
417         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
418         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
419         Include gt-*.h.
420         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
421         Include gt-*.h.
422         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
423         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
424         gt-*.h.
425         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
426         Include gtype-java.h.
427
428 2002-06-02  Tom Tromey  <tromey@redhat.com>
429
430         Fix for PR java/5913:
431         * parse.y (patch_binop): Call patch_string on op1.
432
433 2002-06-02  Tom Tromey  <tromey@redhat.com>
434
435         Fix for PR java/1343, PR java/6336:
436         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
437         formatting.  Changed return type.
438         (anonymous_class_counter): Moved to top of file.
439         (maybe_make_nested_class_name): Append number to class name for
440         function-local classes.
441
442 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
443
444         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
445         * Make-lang.in: Update dependency lists.
446
447 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
448
449         * gjavah.c (throwable_p): Do not free the name of the class after
450         passing it to find_class.
451         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
452         * jcf-io.c (dirent.h): Include it.
453         (fnmatch.h): Likewise.
454         (compare_path): New function.
455         (java_or_class_file): Likewise.
456         (memoized_dirlist_entry): New type.
457         (memoized_dirlist_lookup_eq): New function.
458         (memoized_dirlists): New variable.
459         (caching_stat): New function.
460         (memoized_class_lookup_eq): New function.
461         (memoized_class_lookups): Likewise.
462         (find_class): Use memoized_class_lookups and caching_stat.
463         * jcf.h (JCF_USE_SCANDIR): Define.
464         * parse.y (java_expand_classes): Write the class files in reverse
465         order.
466
467 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
468
469         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
470
471 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
472
473         * jcf-write.c (write_classfile): Unlink the temporary file if it
474         cannot be renamed.  Use concat to build up the name of the
475         temporary file.
476
477 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
478
479         * jcf-write.c (write_classfile): Write the file to a
480         temporary file and then rename it.
481
482 2002-05-07  Tom Tromey  <tromey@redhat.com>
483
484         * gjavah.c (throwable_p): Use xstrdup, not strdup.
485
486         Fix for PR java/1200:
487         * gjavah.c (throwable_p): New function.
488         (decode_signature_piece): Use it.  A `WeakReference' isn't the
489         same as a `jweak'.
490         Include hashtab.h.
491         (gcjh_streq): New function.
492
493 2002-05-07  Andreas Jaeger  <aj@suse.de>
494
495         * parse.y (finish_for_loop): Fix if statement.
496
497 2002-05-06  Tom Tromey  <tromey@redhat.com>
498
499         Fix for PR java/5941:
500         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
501         loop update expression.
502         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
503         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
504
505 2002-05-04  Mark Wielaard  <mark@klomp.org>
506
507         For PR java/6519:
508         * parse.y (build_string_concatenation): Return just op1 only when op2
509         is null and op1 is a STRING_CST, otherwise always construct a
510         StringBuffer.
511
512 2002-04-27  Tom Tromey  <tromey@redhat.com>
513
514         For PR java/6382:
515         * parse.y (string_convert_int_cst): New function.
516         (merge_string_cste): Use it.
517
518 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
519
520         * java-tree.h (java_parse_file): Update.
521         (java_set_yydebug): Remove.
522         * jcf-parse.c (yydebug): Remove.
523         (java_set_yydebug): Die.
524         (java_parse_file): Update.
525         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
526
527 2002-04-24  Tom Tromey  <tromey@redhat.com>
528
529         For PR java/6425:
530         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
531         EXPR_WFL_QUALIFICATION of qual_wfl.
532
533 2002-04-23  Per Bothner  <per@bothner.com>
534
535         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
536         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
537         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
538
539 2002-04-23  Tom Tromey  <tromey@redhat.com>
540
541         For PR java/6314:
542         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
543         recognize `-fcompile-resource='.
544         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
545         a bit.
546
547 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
548
549         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
550         paths. Fixes PR java/2791.
551
552 2002-04-19  Andrew Haley  <aph@redhat.com>
553
554         * jcf-write.c (push_long_const): lo, hi: New variables.
555         Use rshift_double to extract the high part of a 64-bit long.
556         Use WORD_TO_INT to extract the low part.
557
558         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
559         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
560         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
561
562 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
563
564         * typeck.c (incomplete_type_error): Remove.
565
566 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
567
568         * class.c (make_class_data): Set DECL_ALIGN on static class data,
569         for hash synchronization.
570         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
571         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
572         class_type_node.
573
574 2002-04-16  Mark Wielaard  <mark@klomp.org>
575
576         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
577         negative zero.
578
579 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
580
581         Fix for PR java/6294:
582         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
583         interfaces.
584
585 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
586
587         Fix for PR java/6085:
588         * parse.y (patch_method_invocation): Always use build_access_to_thisn
589         to get enclosing "this" argument for inner-class constructor
590         invocation. Pass correct arguments to build_access_to_thisn.
591
592 2002-04-10  Andreas Jaeger  <aj@suse.de>
593
594         * gcj.texi (Input Options): Fix extdirs patch.
595
596 2002-04-10  Anthony Green  <green@redhat.com>
597
598         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
599
600 2002-04-09  Anthony Green  <green@redhat.com>
601
602         * gcj.texi (Input Options): Add --extdirs documentation.
603         * jcf-dump.c (OPT_extdirs): New macro.
604         (options): Add extdirs option.
605         (help): Describe --extdirs.
606         (main): Handle OPT_extdirs.
607         * gjavah.c (OPT_extdirs): New macro.
608         (options): Add extdirs option.
609         (help): Describe --extdirs.
610         (main): Handle OPT_extdirs.
611         * jcf-path.c (jcf_path_init): Add extdirs support.
612         (jcf_path_extdirs_arg): New function.
613         (extensions): New variable to hold extensions path entries.
614         * jvspec.c: Remove -fextdirs= when compiling main().
615         * lang.c (java_decode_option): Handle -fextdirs=.
616         * jcf.h (jcf_path_extdirs_arg): Declare new function.
617         * Make-lang.in: Compile jcf-path with version info for use in
618         identifying the appropriate libgcj.jar.
619
620 2002-04-08  Tom Tromey  <tromey@redhat.com>
621
622         For PR libgcj/5303:
623         * .cvsignore: Added rmic.1 and rmiregistry.1.
624         * gcj.texi (Top): Link to new nodes.
625         (Invoking rmic): New node.
626         (Invoking rmiregistry): Likewise.
627         * Make-lang.in (java.generated-manpages): Added rmic.1 and
628         rmiregistry.1.
629         (java.maintainer-clean): Likewise.
630         ($(srcdir)/java/rmic.1): New target.
631         ($(srcdir)/java/rmiregistry.1): Likewise.
632         (java.install-man): Handle rmic.1 and rmiregistry.1.
633
634 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
635
636         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
637         Add note about handling uncaught exceptions. Add an exception handler
638         to example.
639
640 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
641
642         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
643         after using it to patch CALL_EXPR.
644
645 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
646
647         * gcj.texi (Invocation): Document CNI invocation API.
648
649 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
650
651         * expr.c (truthvalue_conversion): Rename.  Update.
652         (expand_compare): Update.
653         * java-tree.h (java_truthvalue_conversion): New.
654         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
655
656 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
657
658         * java-tree.h (java_mark_addressable): New.
659         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
660         * typeck.c (mark_addressable): Rename, update.
661
662 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
663
664         * expr.c (build_java_binop): Update.
665         * java-tree.h (java_signed_type, java_unsigned_type,
666         java_signed_or_unsigned_type): Update.
667         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
668         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
669         * parse.y (patch_binop): Update.
670         * typeck.c (signed_or_unsigned_type, unsigned_type,
671         signed_type): Update.
672
673 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
674
675         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
676         (java_dummy_print): Remove.
677         (lang_print_error): Rename.  Exit early if inhibiting output.
678         (inhibit_error_printing_function): New.
679         (java_init): Don't set hook.
680         (lang_init_source): Use new boolean.
681
682 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
683
684         * parse.y (do_resolve_class): Fix infinite recursion.
685
686 2002-03-29  Tom Tromey  <tromey@redhat.com>
687
688         * parse.y (check_inner_circular_reference): Ignore incomplete
689         types.
690
691 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
692
693         * Make-lang.in (builtins.o): Update.
694         * boehm.c (get_boehm_type_descriptor): Update.
695         * builtins.c: Include langhooks.h.
696         * decl.c (java_init_decl_processing): Update.
697         * java-tree.h (java_type_for_mode, java_type_for_size): New.
698         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
699         Redefine.
700         * typeck.c (type_for_mode, type_for_size): Update.
701
702 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
703
704         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
705
706 2002-03-28  Tom Tromey  <tromey@redhat.com>
707
708         * except.c (expand_end_java_handler): If the handler type is NULL,
709         use java.lang.Throwable.  Fixes PR java/5986.
710
711 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
712
713         Fix for PR java/4715:
714         * jcf-parse.c (parse_source_file_3): New function.
715         (read_class): Call it.
716         (java_parse_file): Likewise.
717
718 Thu Mar 28 13:22:22 CET 2002  Jan Hubicka  <jh@suse.cz>
719
720         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
721
722 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
723
724         * parse.y (resolve_package): Initialize "decl".
725         (lookup_package_type): Remove unused function.
726
727 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
728
729         Fix for PR java/5993:
730         * parse.y (resolve_package): Return the decl if resolution was
731         successful. Don't special case "java.lang" and "java.lang.reflect"
732         packages. Set type_name to the merged identifier.
733         (resolved_qualified_expression_name): Print error using "name" if
734         resolve_package returns NULL_TREE.
735
736 2002-03-27  Tom Tromey  <tromey@redhat.com>
737
738         * expr.c (expand_invoke): Don't generate null pointer check if
739         we're calling <init>.
740
741 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
742
743         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
744         fix prototype.
745         * java-tree.h (java_lang_expand_expr): Similarly.
746         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
747         (java_init): Don't set hook.
748
749 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
750
751         Fix for PR java/5850:
752         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
753         context if field was not found in the current scope.
754         * expr.c (lookup_field): Don't look in enclosing contexts.
755
756 2002-03-26  Tom Tromey  <tromey@redhat.com>
757
758         Fix for PR java/5942:
759         * parse.y (init_src_parse): Added sanity check.
760         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
761         elements, not 11.
762
763 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
764
765         * decl.c (lang_mark_tree): Rename java_mark_tree.
766         * java-tree.h (java_mark_tree): New.
767         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
768
769 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
770
771         * lex.c: Change java_perform_atof to take normal parameters
772         instead of a pointer to a parameter block.  Call it directly
773         from java_lex.
774
775 2002-03-22  Mark Wielaard  <mark@klomp.org>
776
777         Fix for PR java/5368:
778         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
779         when printing error message.
780
781 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
782
783         * decl.c (maybe_build_cleanup): Remove.
784
785 2002-03-22  Tom Tromey  <tromey@redhat.com>
786
787         Andrew Haley  <aph@cambridge.redhat.com>
788
789         * expr.c (build_field_ref): Don't build a check if the field is a
790         member of `this'.
791
792 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
793
794         Fix for PR java/6026:
795         * lex.c (java_lex): Fix parsing of consecutive floats.
796
797 2002-03-21  Tom Tromey  <tromey@redhat.com>
798
799         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
800         class.
801
802 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
803
804         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
805         insert_block, getdecls, kept_level_p, global_bindings_p): New.
806
807 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
808
809         * gcj.texi: @code{gcj} becomes @command{gcj}.
810         @code{gcc} becomes @command{gcc}.
811         GcjRaw changed to gnu.gcc.RawData.
812
813 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
814
815         * decl.c (start_java_method): Use new hook.
816         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
817         (java_init): Remove old hook.
818
819 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
820
821         * builtins.c (define_builtin): Do nothing if `type' is null.
822         Fixes PR java/5876.
823
824 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
825
826         * parse.y (parser_check_super_interface): Fix error message
827         grammar/order.
828
829 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
830
831         * jcf-parse.c (get_constant): Delete unused variables.
832
833 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
834
835         * java-tree.h (java_parse_file): New.
836         * jcf-parse.c (yyparse): Rename java_parse_file.
837         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
838
839 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
840
841         * parse.y (craft_constructor): Return the constructor decl.
842         (java_expand_classes): Update comments.
843         (lookup_method_invoke): Call fix_constructors immediately for
844         anonymous class. Fixes PR java/5935.
845
846 2002-03-15  Anthony Green  <green@redhat.com>
847
848         * jcf-parse.c (yyparse): Don't emit class registration
849         constructor when compiling resource files.
850
851 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
852
853         * lang.c (java_tree_code_type, java_tree_code_length,
854         tree_code_name): Delete.
855         (tree_code_type, tree_code_length, tree_code_name): Define.
856         (java_init): Don't try to copy into the various tree_code
857         arrays.
858
859 2002-03-12  Tom Tromey  <tromey@redhat.com>
860
861         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
862         UTF-8, not UCS-2.  Fixes PR java/5923.
863
864         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
865         a call_expr wrapped in a convert.  Fixes PR java/5848.
866
867 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
868
869         * jcf-write.c (write_classfile): Improve error strings.
870
871 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
872
873         * lex.c: Adjust comments to GNU standards.
874
875 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
876
877         Fix for PR java/5902:
878         * lex.c (java_lex): Fix parsing of literals.
879
880 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
881
882         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
883         to prevent it getting evaluated twice in the store checking case.
884         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
885         examining OBJECT.
886
887 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
888
889         * decl.c (java_init_decl_processing): Make sure class_type_node
890         alignment is not less than 64 bits if hash synchronization is enabled.
891
892 2002-03-08  Per Bothner  <per@bothner.com>
893
894         * parse.y (java_complete_lhs):  Check if patch_assignment
895         returned an error-mark.
896
897         * parse.y (try_builtin_assignconv):  Don't special-case zero.
898
899 2002-03-08  Per Bothner  <per@bothner.com>
900
901         Fix for PR java/5812.
902         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
903         here instead of in JSR macro.  Likewise with load_type_state call.
904         Do the latter on if the return_pc has been verified (the jsr returns).
905         (JSR):  Now just call build_java_jsr.
906
907 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
908
909         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
910         (java.install-common): Link native driver to
911         JAVA_TARGET_INSTALL_NAME.
912
913 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
914
915         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
916         * builtins.c(sin_builtin): Likewise
917         * builtins.c(sqrt_builtin): Likewise
918
919 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
920
921         * java/expr.c, java/jcf-parse.c, java/lex.c:
922         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
923         REAL_ARITHMETIC blocks unconditional.  Delete some further
924         #ifdef blocks predicated on REAL_ARITHMETIC.
925
926 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
927
928         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
929         explicit sizeof/sizeof.
930         * decl.c (java_init_decl_processing): Likewise.
931         * jcf-parse.c (init_jcf_parse): Likewise.
932         * parse.y (init_src_parse): Likewise.
933
934 2002-03-02  Per Bothner  <per@bothner.com>
935
936         Make --CLASSPATH by a synonym for --classpath and -classpath.
937         Implement --bootclasspath.
938         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
939         (classpath_l):  Remove.
940         (jcf_path_CLASSPATH_arg):  Remove.
941         (jcf_path_bootclasspath_arg):  New function.
942         (jcf_path_seal):  Simplify accordingly.
943
944         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
945         (jcf_path_CLASSPATH):  Remove declaration.
946         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
947         (lang_specific_driver):  Translate -bootclasspath.
948         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
949         * lang.c (decode_lang_options):  Do jcf_path_init first.
950         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
951         * gjavah.c:  Also handle --bootclasspath.
952         Handle --CLASSPATH as a synonum for --classpath.
953         * jcf-dump.c: Likewise.
954
955         "." is not part of system path, but is the default for --classpath.
956         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
957         (jcf_path_seal):  Add "." if no CLASSPATH specified.
958
959         * gcj.texi:  Document changes.
960
961 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
962
963         * expr.c (build_java_arraystore_check): Fix formatting.
964
965 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
966
967         Fix for PR java/5758, java/5632:
968         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
969         inner-class separator too.
970         * parse.y (do_resolve_class): New local `decl_result.'
971         Progressively build a name for what can have been loaded.
972
973 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
974
975         * expr.c (java_array_data_offset): Removed function.
976         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
977         (build_java_array_length_access): Obtain "length" value using a
978         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
979         (build_java_arrayaccess): Correct comment. Access "data" using a
980         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
981         (build_java_arraystore_check): New function.
982         (expand_java_arraystore): Use build_java_arraystore_check.
983         * parse.y (patch_assignment): Simplify code to insert a store check
984         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
985         * check-init.c (check_init): Update to reflect that an array length
986         access is now a COMPONENT_REF.
987         * gcj.texi (Code Generation): Improve documentation of
988         -fno-bounds-check. Add documentation for -fno-store-check.
989         * java-tree.h (flag_store_check): Declare.
990         (build_java_arraystore_check): Declare.
991         * lang.c (flag_store_check): Initialize to 1.
992         (lang_f_options): Add store-check option.
993         * jvspec.c: Don't pass store-check option to jvgenmain.
994         * lang-options.h: Add help string for -fno-store-check.
995
996 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
997
998         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
999         * java-tree.h (java_dup_lang_specific_decl): New.
1000         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
1001
1002 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
1003
1004         * builtins.c, decl.c: Delete traditional-mode-related code
1005         copied from the C front end but not used, or used only to
1006         permit the compiler to link.
1007
1008 2002-02-22  Tom Tromey  <tromey@redhat.com>
1009
1010         Fix for PR java/2369:
1011         * jvspec.c (verify_class_name): New function.
1012         (lang_specific_driver): Call it.
1013         (JAVA_START_CHAR_P): New macro.
1014         (JAVA_PART_CHAR_P): Likewise.
1015
1016 2002-02-22  Per Bothner  <per@bothner.com>
1017
1018         * class.c:  Change vtable to be more compatible with g++ v3 abi.
1019         (get_dispatch_table):  Prepend offset-to-top (always 0) and
1020         type_info pointer (currently unimplemented hence NULL) to vtable.
1021         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
1022         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
1023         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
1024         (build_dtable_decl):  Add declarations for new fields.
1025
1026 2002-02-20  Per Bothner  <per@bothner.com>
1027
1028         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
1029         to finit$ (otherwise generate_bytecode_insns drops it). However, we
1030         don't need to set it on the COMPOUND_EXPR - the caller does that.
1031
1032 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1033
1034         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
1035         `--CLASSPATH' becomes `--classpath.'
1036         * gjavah.c: Likewise.
1037         * jcf-dump.c: Likewise.
1038         * lang-options.h: Likewise.
1039         * lang.c: Likewise.
1040         * jcf-path.c: Updated comment.
1041         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
1042         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
1043         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
1044         (jcf_path_CLASSPATH_arg): Ditto.
1045         (classpath_u): Updated leading comment.
1046
1047 2002-02-20  Per Bothner  <per@bothner.com>
1048
1049         * builtins.c (check_for_builtin):  New function.
1050         (build_call_or_builtin):  Remove.
1051         * java-tree.h:  Update accordingly.
1052         * expr.c (expand_invoke):  Use build + check_for_builtin instead
1053         of build_call_or_builtin.
1054         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
1055         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
1056         flag (which had caused jcf-write to incorrectly emit invokevirtual).
1057
1058 2002-02-17  Tom Tromey  <tromey@redhat.com>
1059
1060         * java-tree.h (TYPE_STRICTFP): New macro.
1061         (struct lang_type) [strictfp]: New field.
1062         (CLASS_STRICTFP): New macro.
1063         (METHOD_STRICTFP): New macro.
1064         (struct lang_decl) [strictfp]: New field.
1065         * parse.y (method_header): Disallow strictfp constructor or
1066         abstract method.
1067         (STRICT_TK): Move before MODIFIER_TK.
1068         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
1069         (METHOD_MODIFIERS): Likewise.
1070         (INTERFACE_MODIFIERS): Likewise.
1071         * jcf-write.c (get_access_flags): Likewise.
1072         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
1073         (add_method_1): Likewise.
1074         (get_access_flags_from_decl): Likewise.
1075         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
1076         recognize strictfp flag.
1077         * jcf.h (ACC_STRICT): New define.
1078
1079 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
1080
1081         * class.c(build_utf8_ref): Move declaration of decl_size
1082
1083 2002-02-07  Tom Tromey  <tromey@redhat.com>
1084
1085         * gcj.texi (Input Options): --CLASSPATH does not suppress system
1086         path.
1087
1088 2002-02-04  Anthony Green  <green@redhat.com>
1089
1090         * class.c (build_utf8_ref): Put UTF-8 constants into merged
1091         sections if available.
1092
1093 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1094
1095         * parse.y (java_expand_classes): Fix typo in static field loop.
1096
1097 2002-02-02  Richard Henderson  <rth@redhat.com>
1098
1099         * class.c (add_field): Mark static fields external.
1100         (build_class_ref): Remove redundant set.
1101         * parse.y (java_expand_classes): Mark static fields of classes
1102         to be compiled as local.
1103         * jcf-parse.c (parse_class_file): Likewise.
1104
1105 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1106
1107         * gcj.texi (About CNI): New node.
1108
1109 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1110
1111         PR java/5080
1112         * jcf-parse.c : Check for HAVE_LOCALE_H before using
1113         setlocale() with LC_CTYPE as a parameter.
1114         * jv-scan.c: Same.
1115
1116 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
1117
1118         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
1119         Follow GNU Coding Standards for --version.
1120
1121 2002-01-28  Tom Tromey  <tromey@redhat.com>
1122
1123         * expr.c (build_jni_stub): Ensure storage for `meth' is
1124         generated.
1125         * parse.y (java_complete_expand_methods): Set
1126         current_function_decl before building JNI stub.
1127
1128 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
1129
1130         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
1131         BUILT_IN_SQRTF.
1132
1133 2002-01-22  Tom Tromey  <tromey@redhat.com>
1134
1135         * decl.c (java_init_decl_processing): Use add_predefined_file.
1136         Predefine RawData.java.
1137         (predef_filenames): Removed.
1138         (java_init_decl_processing): Don't register predef_filenames.
1139         * jcf-parse.c (add_predefined_file): New function.
1140         (predefined_filename_p): Rewrote.
1141         (predefined_filename_p): No longer static.
1142         * decl.c (java_init_decl_processing): Call initialize_builtins.
1143         * Make-lang.in (JAVA_OBJS): Added builtins.o.
1144         (java/builtins.o): New target.
1145         * builtins.c: New file.
1146         * parse.y (patch_invoke): Use build_call_or_builtin.
1147         * java-tree.h (build_call_or_builtin): Declare.
1148         (initialize_builtins): Declare.
1149         (java_set_exception_lang_code): Removed unused declaration.
1150         (PREDEF_FILENAMES_SIZE): Removed.
1151         (java_tree_index): Added JTI_PREDEF_FILENAMES.
1152         (predef_filenames): New define.
1153         (add_predefined_file): Declare.
1154         (predefined_filename_p): Declare.
1155         * expr.c (expand_invoke): Use build_call_or_builtin.
1156
1157 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1158
1159         * parse.y (patch_switch_statement): Fix format specifier.
1160
1161 2002-01-16  Tom Tromey  <tromey@redhat.com>
1162
1163         More for PR java/5365:
1164         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
1165         default.
1166         (process_file): Generate include for
1167         java.lang.UnsupportedOperationExceptions.
1168
1169 2002-01-15  Andreas Jaeger  <aj@suse.de>
1170
1171         * .cvsignore: Add man pages.
1172
1173 2002-01-15  Tom Tromey  <tromey@redhat.com>
1174
1175         Fix for PR java/5365:
1176         * gjavah.c (process_file): Turn class name into a file name.
1177
1178 2002-01-14  Matthias Klose  <doko@debian.org>
1179
1180         * gcj.texi: Fix whitespace and formatting errors in the
1181         synopsis of the man pages. Update copyright.
1182
1183 2002-01-14  Tom Tromey  <tromey@redhat.com>
1184
1185         For PR libgcj/5303:
1186         * Make-lang.in (java.install-man): Handle jv-convert man page.
1187         (java.generated-manpages): Added jv-convert.1.
1188         (java.uninstall): Remove jv-convert.1.
1189         (java.maintainer-clean): Likewise.
1190         ($(srcdir)/java/jv-convert.1): New target.
1191         * gcj.texi (Top): Link to jv-convert node.
1192         (Individual utilities): Likewise.
1193         (Invoking jv-convert): New node.
1194
1195 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
1196             Martin Kahlert  <martin.kahlert@infineon.com>
1197
1198         * jcf-parse.c (get_constant): Don't swap lo/hi for big
1199         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
1200
1201 2002-01-03  Graham Stott  <grahams@redhat.com>
1202
1203         * class.c (compile_resource_file): Update copyright date.
1204         Constify filename parameter.
1205         (java-tree.h): Update copyright date.
1206         (compile_resource_file): Constify filename parameter.
1207
1208 2002-01-03  Graham Stott  <grahams@redhat.com>
1209
1210         * gcc/jcf-parse.c: Update copyright date.
1211         (yyparse): Constify resource_filename.
1212
1213 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1214
1215         * parse.y (src_parse_roots): Don't needlessly zero init.
1216
1217 2001-12-31  Tom Tromey  <tromey@redhat.com>
1218
1219         * parse.y (dump_java_tree): New function.
1220         (source_end_java_method): Call it.
1221         (end_class_declaration): Likewise.
1222         * lang.c (java_decode_option): Call dump_switch_p.
1223
1224 2001-12-28  Tom Tromey  <tromey@redhat.com>
1225
1226         * gen-table.pl: Don't process characters after \uffff.  Added
1227         comment pointing to input file.
1228
1229 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1230
1231         * gen-table.pl: Const-ify output.  Document the location of a
1232         suitable unicode input file.
1233
1234         * chartables.h: Regenerate.
1235
1236 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1237
1238         * chartables.h: Const-ify.
1239         * gjavah.c (options): Likewise.
1240         * jcf-dump.c (options): Likewise.
1241         * jv-scan.c (options): Likewise.
1242         * lex.c (java_start_char_p, java_part_char_p): Likewise.
1243         * parse.y (binop_lookup): Likewise.
1244
1245 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1246
1247         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
1248         the static arrays that are output.
1249         * jvspec.c (jvgenmain_spec): Make static.
1250         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
1251         * keyword.h: Regenerate.
1252         * lang.c (string_option, process_option_with_no, lang_f_options,
1253         lang_W_options): Const-ify.
1254         * lex.c (java_lex): Likewise.
1255
1256 2001-12-21  Richard Henderson  <rth@redhat.com>
1257
1258         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
1259         (get_boehm_type_descriptor): ... here.  Arrange for the
1260         TREE_TYPE to get set properly.
1261
1262 2001-12-21  Richard Henderson  <rth@redhat.com>
1263
1264         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
1265         only if the target requires collect2.
1266
1267         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
1268
1269 2001-12-20  Tom Tromey  <tromey@redhat.com>
1270
1271         For PR java/4509:
1272         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
1273         CAN_COMPLETE_NORMALLY for the node.
1274         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
1275         generate code for second branch if first branch can't complete
1276         normally.
1277         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
1278         the loop head if the loop body can't complete normally.
1279
1280 2001-12-20  Tom Tromey  <tromey@redhat.com>
1281
1282         For PR java/4766:
1283         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
1284         case where `finally' clause can't complete normally.
1285
1286 2001-12-20  Tom Tromey  <tromey@redhat.com>
1287
1288         Fixes PR java/5057:
1289         * parse.y (analyze_clinit_body): Added this_class parameter.
1290         Check for more cases where we must keep <clinit>.
1291         (maybe_yank_clinit): Cleaned up flow control.
1292
1293 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1294
1295         * decl.c (java_init_decl_processing): Don't initialize
1296         finit_leg_identifier_node.
1297         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
1298         (finit_leg_identifier_node): Remove.
1299         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
1300
1301 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1302
1303         * mangle.c (mangle_member_name): Don't special-case for
1304         NO_DOLLAR_IN_LABEL.
1305         * mangle_name.c (unicode_mangling_length): Likewise.
1306         (append_unicode_mangled_name): Likewise.
1307         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
1308         code.
1309
1310 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1311
1312         * expr.c (build_java_array_length_access): Don't force null pointer
1313         check unless flag_check_references is set.
1314
1315 2001-12-20  Tom Tromey  <tromey@redhat.com>
1316
1317         Fix for PR java/3417:
1318         * parse.y (patch_assignment): Added special processing for
1319         `return'.
1320         (patch_return): Don't convert booleans to integers, and don't
1321         special-case `null'.
1322
1323 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1324
1325         * config-lang.in (diff_excludes): Remove.
1326
1327 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1328
1329         * gcj.texi: Update link to GCC manual.
1330
1331 2001-12-17  Tom Tromey  <tromey@redhat.com>
1332
1333         * parse.y (link_nested_class_to_enclosing): Removed useless
1334         statement.
1335
1336 2001-12-16  Tom Tromey  <tromey@redhat.com>
1337
1338         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
1339         Fixes PR java/5088.
1340
1341 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1342
1343         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
1344         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
1345         spelling errors.
1346
1347 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1348
1349         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
1350
1351 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1352
1353         * decl.c (java_init_decl_processing): Build otable_type correctly.
1354         otable_decl is an otable_type.
1355
1356 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1357
1358         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
1359         otable_type, otable_ptr_type, method_symbol_type,
1360         method_symbols_array_type, method_symbols_array_ptr_type): New
1361         field/global tree definitions.
1362         (flag_indirect_dispatch): New flag.
1363         * decl.c (java_init_decl_processing): Initialize new otable and
1364         otable_syms type nodes and decls. Add new field "index" to
1365         method_type_node.
1366         * class.c (build_method_symbols_entry): New function.
1367         (make_method_value): Set "index" to to method's vtable index for
1368         virtual methods when indirect-dispatch is not used.
1369         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
1370         and set vtable_method_count to -1. Set otable and otable_syms field
1371         if indirect-dispatch is used and there was something to put in them.
1372         (build_method_symbols_entry): New function.
1373         (emit_offset_symbol_table): New function.
1374         * expr.c (get_offset_table_index): New function.
1375         (build_invokevirtual): Build array reference to otable at the index
1376         returned by get_offset_table_index, and use the result as the vtable
1377         offset.
1378         (build_invokeinterface): Similar.
1379         * jcf-parse.c (yyparse): If indirect-dispatch, call
1380         emit_offset_symbol_table at the end of compilation, after all classes
1381         have been generated.
1382         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
1383         * lang.c (flag_indirect_dispatch): Define.
1384         (lang_f_options): Add indirect-dispatch flag.
1385
1386 2001-12-14  Matthias Klose  <doko@debian.org>
1387
1388         * gcj.texi: Markup for man page generation. Document missing
1389         options printed by <tool> --help.
1390         Terminate description of gij's -ms option with a dot.
1391         * Make-lang.in ($(srcdir)/java/*.1): New targets.
1392         (java.generated-manpages java.install-man, java.uninstall,
1393         java-maintainer-clean) Updated.
1394
1395 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
1396
1397         * class.c (get_dispatch_table): Fix java vtable layout
1398         for TARGET_VTABLE_USES_DESCRIPTORS.
1399         * decl.c (java_init_decl_processing): Initialize
1400         alloc_no_finalizer_node, finalize_identifier_node.
1401         * expr.c (class_has_finalize_method): New function.
1402         (expand_java_NEW): Generate calls for finalizer-free allocation.
1403         (build_invokevirtual): Fix java vtable layout for
1404         TARGET_VTABLE_USES_DESCRIPTORS.
1405         * java-tree.h (enum java_tree_index): New entries:
1406         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
1407         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
1408         (class_has_finalize_method): declare.
1409         (HAS_FINALIZER_P): New macro.
1410         * parse.y (patch_invoke): Generate calls for finalizer-free
1411         allocation.
1412
1413 2001-12-12  Matthias Klose  <doko@debian.org>
1414
1415         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
1416         whitespace at end of line.
1417
1418 2001-12-11  Tom Tromey  <tromey@redhat.com>
1419
1420         * lex.c (java_init_lex): Define wfl_to_string as
1421         gnu.gcj.runtime.StringBuffer unless generating bytecode.
1422
1423 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
1424
1425         * class.c (make_method_value): Use null_pointer_node to
1426         represent empty exception table.
1427
1428 2001-12-10  Tom Tromey  <tromey@redhat.com>
1429
1430         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
1431
1432 Mon Dec 10 06:09:57 2001  Douglas B. Rupp  <rupp@gnat.com>
1433
1434         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
1435
1436 2001-12-09  Per Bothner  <per@bothner.com>
1437
1438         * check-init.c (current_switch_has_default):  New static field.
1439         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
1440         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
1441         DEFAULT_EXPR seen, simulate a default alternative that copies state.
1442
1443 2001-12-09  Tom Tromey  <tromey@redhat.com>
1444
1445         * check-init.c (check_init): Don't allow pre- or post- increment
1446         or decrement of final variable.
1447         (final_assign_error): Minor error message rewording.
1448
1449 2001-12-08  Tom Tromey  <tromey@redhat.com>
1450
1451         * java-tree.h: Fixed typo.
1452
1453         * gjavah.c (decompile_method): Don't decompile to `return this'
1454         for static methods.
1455
1456         * gjavah.c (cxx_keywords): Re-sorted.
1457         * lex.c (cxx_keywords): Re-sorted.
1458
1459         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
1460         else.
1461
1462         * gjavah.c (print_namelet): Clear subnamelets.
1463         (HANDLE_METHOD): Set `method_printed' earlier.
1464
1465 2001-12-07  Tom Tromey  <tromey@redhat.com>
1466
1467         * lang.c (lang_f_options): Added
1468         optimize-static-class-initialization.
1469         (java_decode_option): Removed special case.
1470
1471 2001-12-07  Per Bothner  <per@bothner.com>
1472
1473         * check-init.c (check_init):  Fix typo freeing memory twice.
1474
1475 2001-12-05  Per Bothner  <per@bothner.com>
1476
1477         Restore support for static class initialization optimization.
1478         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
1479         * check-init.c (check_int):  At end of BLOCK handle initialization
1480         blocks, which used to be done in java_complete_expand_method but did
1481         not handle the case where check_for_initialization might allocate
1482         more than a word of bits.
1483         * decl.c (lang_make_tree):  The smic field is now a tree.
1484         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
1485         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
1486
1487         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
1488
1489         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
1490         Change from a hash table to a list.
1491         (struct_lang_decl):  Change field 'smic' to match.
1492         * class.c (add_method_1):  Initialize
1493         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
1494         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
1495         (java_expand_method_bodies): -here, since 'smic' is now a list.
1496         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
1497
1498         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
1499
1500         * class.c (java_hash_compare_tree_node):  Fix casts.
1501
1502 2001-12-04  Per Bothner  <per@bothner.com>
1503
1504         * check-init.c:   Handle definite unassignment to finals in addition
1505         to definite assignment.
1506         (loop_current_locals):  New field.
1507         (num_current_locals, int start_current_locals, num_current_words):
1508         Make static.
1509         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
1510         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
1511         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
1512         (get_variable_decl, check_final_reassigned):  New functions.
1513         (check_init, check_bool_init):  Modify as needed for checking finals.
1514         (check_for_initialization):  Take extra parameter and return void.
1515         Do extra start-up logic to check final fields for assignment.
1516         * parse.y (check_static_final_variable_assignment_flag,
1517         reset_static_final_variable_assignment_flag, check_final_assignment,
1518         check_final_variable_local_assignment_flag,
1519         reset_final_variable_indirect_assignment_flag,
1520         reset_final_variable_global_assignment_flag):  Remove functions.
1521         (java_complete_expand_methods, outer_field_access_fix,
1522         patch_assignment): Remove no-longer used logic.
1523         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
1524         * parse.y (register_fields, java_complete_tree):  Update accordingly.
1525
1526         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
1527         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
1528         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
1529
1530         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
1531
1532         * java-tree.h (DECL FINAL):  New bit-field.
1533         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
1534         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
1535         (DECL_INIT_CALLS_THIS):  New macro.
1536         (struct lang_decl):  New bit-field init_calls_this.
1537         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
1538         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
1539         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
1540         use it for both local variables and final fields.
1541         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
1542         and local_final.
1543         (struct lang_type):  Remove hfv bit-field.
1544         (check_for_initialization):  Change to return void.
1545
1546         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
1547         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
1548         * check-init.c (final_assign_error):  New helper function.
1549         (check_final_reassigned, check_init):  Use it.
1550         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
1551
1552         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
1553         bit-fields to unsigned.
1554
1555 2001-12-03  Per Bothner  <per@bothner.com>
1556
1557         * parse.y (patch_binop):  Minor constant folding.
1558
1559         * parse.y (build_current_thisn):  Shorter 'buffer'.
1560
1561 2001-12-03  Per Bothner  <per@bothner.com>
1562
1563         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
1564         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
1565         * jcf-write.c (generate_bytecode_insns):  Remove support for
1566         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
1567         * check-init.c (check_init):  Likewise.
1568
1569 2001-12-03  Per Bothner  <per@bothner.com>
1570
1571         * verify.c (subroutine_nesting):  New function.
1572         (verify_jvm_instructions):  Use it to fix logic for checking that
1573         we're done with the current subroutine.
1574
1575         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
1576         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
1577
1578 2001-12-03  Per Bothner  <per@bothner.com>
1579
1580         * jcf.h:  Fix obvious typo in comment.
1581         * typeck.c (build_null_signature):  Add comment.
1582
1583 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1584
1585         * expr.c: Remove leading capital from diagnostic messages, as
1586         per GNU coding standards.
1587         * jcf-io.c: Similarly.
1588         * jcf-parse.c: Similarly.
1589         * jv-scan.c: Similarly.
1590         * jvspec.c: Similarly.
1591         * mangle.c: Similarly.
1592
1593 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
1594             Alexandre Petit-Bianco  <apbianco@redhat.com>
1595
1596         * expr.c (build_java_arrayaccess): Call save_expr on array for
1597         correct evaluation order, modified comment, fixed indentation.
1598         * parse.y: (patch_assignment): Correctly extract the array base
1599         from the tree generate by build_java_arrayaccess, added comments.
1600         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
1601         Fixes PR java/3096, PR java/3803, PR java/3965.
1602
1603 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1604
1605         * expr.c (expand_byte_code): Remove trailing periods from messages.
1606         * jcf-parse.c (load_class, jcf_parse): Similarly.
1607         * jcf-write.c (generate_classfile): Similarly.
1608         * lex.c (java_lex): Similarly.
1609
1610 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1611
1612         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
1613
1614 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1615
1616         * Make-lang.in (java.generated-manpages): New dummy target.
1617
1618 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1619
1620         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1621         ASM_FINAL_SPEC.
1622         (lang_specific_pre_link): Use set_input to set input_filename.
1623         Append `main' here.
1624         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1625         (main): Fix definition.
1626         Strip `main' from classname.
1627         Fixes PR java/227.
1628
1629 2001-11-18  Roger Sayle <roger@eyesopen.com>
1630
1631         * parse.h (java_expand_switch): Remove old prototype.
1632
1633 2001-11-18  Tom Tromey  <tromey@redhat.com>
1634
1635         Fix for PR java/1401:
1636         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
1637         arg0 is null.
1638         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
1639         correctly.
1640
1641 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1642
1643         * lang.c (finish_parse): Rename to java_finish.
1644         (LANG_HOOKS_FINISH, java_finish): New.
1645
1646 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
1647
1648         * decl.c (init_decl_processing): Rename java_init_decl_processing.
1649         * java-tree.h: New prototype.
1650         * lang.c (java_init): Update prototype.  Combine with old init_parse.
1651
1652 2001-11-13  Tom Tromey  <tromey@redhat.com>
1653
1654         * gjavah.c (method_signature): New global.
1655         (HANDLE_METHOD): Set it.
1656         (decompile_return_statement): New function.
1657         (decompile_method): Use it.
1658         (print_method_info): Removed `synth' argument.
1659
1660 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1661
1662         * java-tree.h (java_set_yydebug): New.
1663         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
1664         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
1665         (print_lang_decl, print_lang_type, print_lang_identifier,
1666         print_lang_statistics, lang_print_xnode): Remove.
1667
1668 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1669
1670         * jcf-parse.c (init_lex): Remove.
1671         * lang.c (language_string, lang_identify): Remove.
1672         (struct lang_hooks): Constify.
1673         (LANG_HOOKS_NAME): Override.
1674         (init_parse): Update.
1675
1676 2001-11-08  Andreas Franck  <afranck@gmx.de>
1677
1678         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
1679         program_transform_name the way suggested by autoconf.
1680         (java.install-common): Also transform auxiliary program names with
1681         program_transform_name.
1682
1683 2001-11-08  Tom Tromey  <tromey@cygnus.com>
1684
1685         * parse.y (trap_overflow_corner_case): New rule.
1686         (unary_expression): Use it.
1687         * lex.c (java_init_lex): Don't set minus_seen.
1688         (yylex): Don't use minus_seen.  Communicate overflow to parser for
1689         it to handle.
1690         (error_if_numeric_overflow): New function.
1691         * parse.h (minus_seen): Removed field.
1692         (JAVA_RADIX10_FLAG): New define.
1693
1694 2001-11-07  Tom Tromey  <tromey@redhat.com>
1695
1696         Patch for PR java/1414:
1697         * parse.y (case_label_list): New global.
1698         (goal): Register case_label_list with GC.
1699         (java_complete_lhs): Save new case on case_label_list.
1700         (patch_switch_statement): Check for duplicate case labels.
1701
1702 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
1703
1704         * parse.y (patch_assignment): Removed unused third argument.
1705         (java_complete_lhs): Removed unused third argument to patch_assignment.
1706
1707 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1708
1709         * lang.c: Include langhooks-def.h.
1710         * Make-lang.in: Update.
1711
1712 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
1713
1714         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1715
1716 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1717
1718         * mangle.c (find_compression_record_match): Don't match compression
1719         records for package name elements unless they occur at the start of
1720         the name. Fix for PR java/4717.
1721
1722 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1723
1724         * expr.c (expand_java_field_op): Don't special-case references to
1725         java.lang.PRIMTYPE.TYPE.
1726         (build_primtype_type_ref): Removed.
1727         * java-tree.h (build_primtype_type_ref): Remove prototype.
1728         * parse.y (maybe_build_primttype_type_ref): Removed.
1729         (complete_function_arguments): Don't special-case references to
1730         java.lang.PRIMTYPE.TYPE.
1731         (patch_assignment): Likewise.
1732         (array_constructor_check_entry): Likewise.
1733
1734 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
1735
1736         * mangle.c (static tree compression_table): Fixed leading comment.
1737         * parse.h (struct parser_ctxt): Fixed field comment.
1738         * parse.y (check_pkg_class_access): New prototype, fixed leading
1739         comment, new parameter used to emit error only if passed as true.
1740         (parse_check_super): Pass extra argument to check_pkg_class_access.
1741         (do_resolve_class): Likewise.
1742         (process_imports): Likewise.
1743         (read_import_dir): Fixed indentation.
1744         (find_in_imports_on_demand): New local class_type_name. Local
1745         node_to_use deleted. while loop changed into for loop. Report
1746         multiple definition only for accessible classes. Improved error
1747         message.
1748         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
1749         assigned to parameter list, fixed indentation. while loop changed
1750         into for loop, restore TREE_CHAIN on local `tem' before the next
1751         iteration.
1752
1753 Tue Oct 23 14:02:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1754
1755         * lang.c (lang_get_alias_set): Deleted.
1756
1757 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1758
1759         * gjavah.c (jni_print_char): Fix thinko in last change.
1760
1761         * gjavah.c (jni_print_char, decode_signature_piece): Use
1762         safe-ctype macros and/or fold extra calls into fewer ones.
1763         * lex.c (java_read_unicode, java_lex): Likewise.
1764         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
1765         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
1766         * mangle_name.c (append_unicode_mangled_name,
1767         unicode_mangling_length): Likewise.
1768
1769 2001-10-17  Richard Henderson  <rth@redhat.com>
1770
1771         * Make-lang.in (java/lang.o): Depend on langhooks.h.
1772
1773 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
1774
1775         * lang.c (langhooks.h): Included.
1776         (LANG_HOOKS_INIT): Redefined.
1777         (LANG_HOOKS_INIT_OPTIONS): Likewise.
1778         (LANG_HOOKS_DECODE_OPTION): Likewise.
1779         (struct lang_hooks lang_hooks): New initialization.
1780
1781 2001-10-11  Per Bothner  <per@bothner.com>
1782
1783         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
1784         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
1785         The former is simpler, and jcf-write.c handles it better.
1786         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
1787         or WITH_CLEANUP_EXPR.
1788         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
1789         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
1790
1791         * parse.y (patch_if_else_statement):  If the condition is constant,
1792         optimize away the test.
1793
1794 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
1795
1796         * parse.y (patch_cast): Call patch_string on the first operand of
1797         the incoming node, update it if necessary. Fixes PR java/4510.
1798
1799 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1800
1801         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
1802         when name qualifier matches a package name.
1803
1804 2001-10-08  Tom Tromey  <tromey@redhat.com>
1805
1806         Fix for PR java/4489:
1807         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
1808         force a new label when computing `body_block'.
1809
1810 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1811
1812         * jcf-io.c (format_uint): Const-ify.
1813         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
1814         * lex.c (java_get_line_col): Likewise.
1815         * parse.y (build_incdec): Likewise.
1816
1817 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
1818
1819         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
1820         a NULL enclosing context if appropriate. Fixes PR java/4466.
1821
1822 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
1823
1824         * parse.y (patch_assignment): Use lvalue's original TYPE when
1825         building the final COMPOUND_EXPR.
1826         (try_reference_assignconv): Fixed leading comment.
1827
1828 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
1829
1830         * parse.y (check_final_variable_indirect_assignment): For
1831         COMPOUND_EXPR, return only if finals were found initialized
1832         properly, if not, keep on checking.
1833         (check_final_variable_global_assignment_flag): New local
1834         error_found, set when appropriate and used to decide whether to
1835         report uninitialized finals. Fixed typo in comment.
1836
1837 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
1838
1839         * decl.c (init_decl_processing): Fixed typo in predef_filenames
1840         last three initializations. Fixes PR java/4360.
1841
1842 2001-09-21  Richard Henderson  <rth@redhat.com>
1843
1844         * class.c (get_dispatch_table): Handle function descriptors.
1845         (build_dtable_decl): Likewise.
1846         * expr.c (build_invokevirtual): Likewise.
1847
1848 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
1849
1850         * parse.y (patch_method_invocation): Build class initialization
1851         when static finals are used to qualify method invocation.
1852         Fixes PR java/4366.
1853
1854 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
1855
1856         * parse.h: (WFL_STRIP_BRACKET): Re-written using
1857         build_type_name_from_array_name.
1858         (STRING_STRIP_BRACKETS): New macro.
1859         * parse.y (build_type_name_from_array_name): New function.
1860         (array_creation_expression:): Accumulate []s instead of [s.
1861         (cast_expression:): Accumulate []s instead of [s after cast type
1862         name.
1863         (build_array_from_name): Local string deleted, use
1864         build_type_name_from_array_name.
1865         (build_unresolved_array_type): Accumulate []s instead of [s after
1866         type name.
1867         (register_fields): Fixed comment.
1868         (resolve_class): Local name, base deleted, new locals tname and
1869         array_dims. Use build_type_name_from_array_name. Use array_dims to
1870         build array type.
1871         (purify_type_name): Use STRING_STRIP_BRACKETS.
1872
1873 2001-09-18  Andreas Jaeger  <aj@suse.de>
1874
1875         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
1876         * jv-scan.c: Likewise.
1877
1878 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
1879
1880         * parse.y (patch_method_invocation): Inner class creation context
1881         check not enforced within constructors. Fixes PR java/1873.
1882
1883 2001-09-16  Tom Tromey  <tromey@redhat.com>
1884
1885         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
1886         NOTE_PUSH for single-case push.  Fixes PR java/4189.
1887
1888 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
1889
1890         * java-tree.h (TYPE_IMPORT_LIST): New macro.
1891         (TYPE_IMPORT_DEMAND_LIST): Likewise.
1892         (struct lang_type): New fields import_list and import_demand_list.
1893         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
1894         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
1895         (do_resolve_class): New local saved_enclosing_type, initialized,
1896         passed as parameter to find_in_imports and find_in_imports_on_demand.
1897         (find_in_imports): Added paramater enclosing_type, use its
1898         TYPE_IMPORT_LIST when applicable.
1899         (find_in_imports_on_demand): Added parameter enclosing_type, use
1900         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
1901         declaration and initialization.
1902         (fold_constant_for_init): Switch/restore current_class to the
1903         appropriate context.
1904
1905 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
1906
1907         * verify.c (verify_jvm_instructions): Fix typo.
1908
1909 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1910
1911         * expr.c (expand_invoke): Const-ification.
1912         * parse.y (patch_method_invocation): Likewise.
1913
1914 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1915
1916         * gjavah.c (cxx_keywords): Const-ification.
1917         * keyword.gperf (java_keyword): Likewise.
1918         * lang.c (java_tree_code_name): Likewise.
1919         * lex.c (cxx_keywords): Likewise.
1920         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
1921
1922 2001-09-11  Richard Henderson  <rth@redhat.com>
1923
1924         * parse.h (ctxp_for_generation): Mark extern.
1925
1926 2001-09-10  Richard Henderson  <rth@redhat.com>
1927
1928         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
1929
1930 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
1931
1932         * typeck.c (java_array_type_length, build_prim_array_type):
1933         Represent empty arrays by NULL index.
1934
1935 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
1936
1937         * java-tree.h (compile_resource_file): Grouped with other prototypes.
1938         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
1939
1940 2001-09-06  Anthony Green  <green@redhat.com>
1941
1942         * class.c (O_BINARY): Define if necessary.
1943         (registerResource_libfunc): Declare.
1944         (init_class_processing): Initilize registerResource_libfunc.
1945         (compile_resource_file): New function.
1946         * java-tree.h (resource_name): Declare.
1947         (compile_resource_file): Declare.
1948         * jcf-parse.c (yyparse): Handle compiling java resource files.
1949         * lang.c (java_decode_option): Handle -fcompile-resource option.
1950         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
1951         resource files.
1952         * gcj.texi (Code Generation): Add documentation for -R flag.
1953
1954 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
1955
1956         * jcf-write.c (generate_classfile): Issue an error in case of
1957         field/initial value mismatch.
1958         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
1959         being initialized and we're generating bytecode.
1960         (java_complete_lhs): In MODIFY_EXPR section: added comments,
1961         set DECL_INITIAL properly when appropriate.
1962         Fixes PR java/4230
1963         Fixes PR java/4204
1964
1965 2001-09-01  Per Bothner  <per@bothner.com>
1966
1967         * parse.y (maybe_yank_clinit):  A field without an initializer is not
1968         relevant.  All initializers except static final and constant require
1969         <clinit>, regardless of flag_emit_class_files.
1970
1971 2001-08-31  Per Bothner  <per@bothner.com>
1972
1973         * class.c (set_constant_value):  When not emiting class files, then a
1974         String ConstantValue is a utf8const_ptr_type.
1975
1976 2001-08-30  Per Bothner  <per@bothner.com>
1977
1978         * jcf-write.c (generate_classfile):  Check that field is primitive
1979         or string before emitting ConstantValue attribute.
1980
1981 2001-08-30  Per Bothner  <per@bothner.com>
1982
1983         * parse.y (resolve_qualified_expression_name):  If creating a
1984         COMPOUND_EXPR, set it's type correctly.
1985
1986 2001-08-30  Per Bothner  <per@bothner.com>
1987
1988         * jcf-io.c (open_class):  Set filename field.
1989
1990         * jcf-parse,c (parse_class_file):  Set current_function_decl
1991         for better error message when Code attribute is missing.
1992
1993         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
1994         better diagnostics, especially for constructors.
1995
1996 2001-08-30  Per Bothner  <per@bothner.com>
1997
1998         * jcf-write.c (generate_classfile):  Don't write ConstantValue
1999         attribute if field is not final, for compatibility with jdk.
2000
2001         * jcf-write.c (generate_classfile):  Convert ConstantValue values
2002         to correct type.  Work-around for front-end bug.
2003         * class.c (set_constant_value):  Error if constant has wrong type.
2004
2005 2001-08-30  Per Bothner  <per@bothner.com>
2006
2007         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
2008         "Double" are printed at verbosity 1.
2009
2010         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
2011
2012         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
2013
2014 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
2015
2016         * parse.y (patch_assignment): Don't verify final re-assignment here.
2017         (java_complete_lhs): Verify assignments to finals calling
2018         patch_assignment. Verify re-assignments to finals before calling
2019         patch_assignment.
2020
2021 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
2022
2023         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
2024         Fixes PR java/1413
2025
2026 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2027
2028         * lex.c (java_lex): new local found_hex_digits. Set and then used
2029         in test to reject invalid hexadecimal numbers.
2030         * parse.y (java_complete_tree): Prevent unwanted cast with
2031         initialized floating point finals.
2032         (patch_binop): Emit a warning when detecting a division by zero,
2033         mark result not constant, don't simplify non integer division.
2034
2035 2001-08-28  Per Bothner  <per@bothner.com>
2036
2037         * jcf-write.c  (generate_bytecode_insns):  For increments and
2038         decrements just recurse to push constant.  Improvement on Mark's patch.
2039
2040 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
2041
2042         * jcf-write.c (generate_bytecode_insns): Generate an integer to
2043         real conversion for increments and decrements of reals.
2044
2045 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2046
2047         * parse.y (resolve_qualified_expression_name): Handle unresolved
2048         qualified expressions, prevent numerical qualifiers, fixed typo.
2049         Fixes PR java/4141
2050
2051 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
2052
2053         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
2054         don't report anything but deprecated class when marked so. Handle
2055         VAR_DECL.
2056         (patch_method_invocation): Check deprecation on methods and types.
2057         (patch_binop): code becomes an enum tree_code, added default: to
2058         switch to handle that. Detect division by zero, try to fold and
2059         return before using a subroutine.
2060
2061 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
2062
2063         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
2064         file smaller than 4 bytes.
2065         * parse.y (check_inner_circular_reference): New function.
2066         (check_circular_reference): Likewise.
2067         (array_initializer:): Accept {,}.
2068         (java_check_circular_reference): Rewritten using
2069         check_circular_reference and check_inner_circular_reference.
2070         (java_complete_expand_method): Unconditionally save and restore
2071         the unpurged exception list.
2072         (build_dot_class_method_invocation): Unmangle signature parameter.
2073
2074 2001-08-21  Tom Tromey  <tromey@redhat.com>
2075
2076         * decl.c (init_decl_processing): Add `throws' field to method
2077         descriptor.
2078         * class.c (make_method_value): Compute `throws' field for method.
2079
2080 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2081
2082         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
2083         circularity is detected.
2084         (ctors_unchecked_throws_clause_p): Fixed leading comment.
2085
2086 2001-08-17  Richard Henderson  <rth@redhat.com>
2087
2088         * class.c (emit_register_classes): Add align parameter to
2089         call to assemble_integer.
2090
2091 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
2092
2093         * jcf-parse.c (load_class): New locals saved and class_loaded. If
2094         loading a class_or_name fails, try considering an innerclass name
2095         and load the enclosing context.
2096         * parse.y (resolve_inner_class): New function.
2097         (find_as_inner_class): Added leading comment.
2098         (register_incomplete_type): Keep the current context as enclosing
2099         context for JDEP_FIELD dependencies.
2100         (do_resolve_class): Locals new_class_decl and super initialized to
2101         NULL. Call resolve_inner_class, explore the enclosing context
2102         superclass if necessary.
2103         Fixes PR java/4007
2104
2105 2001-08-16  Tom Tromey  <tromey@redhat.com>
2106
2107         * jcf-dump.c (main): Updated for change to jcf_path_seal.
2108         * gjavah.c (main): Updated for change to jcf_path_seal.
2109         * lang.c (version_flag): New global.
2110         (java_decode_option): Recognize `-version'.
2111         (java_init): Update for change to jcf_path_seal.
2112         * jcf.h (jcf_path_seal): Added `print' argument.
2113         * jcf-path.c (jcf_path_seal): Added `print' argument.
2114
2115 2001-08-13  Zack Weinberg  <zackw@panix.com>
2116
2117         * Make-lang.in (java/decl.o): Update dependencies.
2118         * decl.c: Include libfuncs.h, don't include toplev.h.
2119
2120 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2121
2122         * decl.c (init_decl_processing): exception_type_node,
2123         class_not_found_type_node, and no_class_def_found_type_node
2124         initialized. predef_filenames augmented accordingly.
2125         instinit_identifier_node initialized.
2126         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
2127         * java-tree.h (enum java_tree_index): New entries
2128         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
2129         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
2130         (exception_type_node): New macro.
2131         (class_not_found_type_node): Likewise.
2132         (no_class_def_found_type_node): Likewise.
2133         (instinit_identifier_node): Likewise.
2134         (PREDEF_FILENAMES_SIZE): Adjusted.
2135         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
2136         (struct lang_type): Fixed typo in bitfield name.
2137         (DECL_INSTINIT_P): New macro.
2138         (ID_INSTINIT_P): Likewise.
2139         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
2140         attribute.
2141         * parse.y (encapsulate_with_try_catch): New function.
2142         (generate_instinit): Likewise.
2143         (build_instinit_invocation): Likewise.
2144         (ctors_unchecked_throws_clause_p): Likewise.
2145         (add_instance_initializer): Deleted.
2146         (build_instance_initializer): Likewise.
2147         (in_instance_initializer): Likewise.
2148         (check_method_redefinition): instinit$ not to be verified.
2149         (java_complete_expand_methods): Generate instinit$, simplified code.
2150         (build_dot_class_method): Eliminated unnecessary locals. Use
2151         encapsulate_with_try_catch, removed unnecessary code.
2152         (fix_constructors): New local iii. Use build_instinit_invocation.
2153         (patch_method_invocation): Added comment.
2154         (maybe_use_access_method): Don't consider instinit$.
2155         (find_applicable_accessible_methods_list): Shorten the search for
2156         instinit$ too.
2157         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
2158         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
2159         (patch_throw_statement): Likewise. Fixed typo.
2160
2161 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
2162
2163         Revert:
2164         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2165         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2166         ASM_FINAL_SPEC.
2167         (lang_specific_pre_link): Use set_input to set input_filename.
2168         Append `main' here.
2169         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2170         (main): Fix definition.
2171         Strip `main' from classname.
2172         Fixes PR java/227.
2173
2174 2001-08-11  Zack Weinberg  <zackw@panix.com>
2175
2176         * lex.h: Don't include setjmp.h.  Don't define
2177         SET_FLOAT_HANDLER or prototype set_float_handler.
2178
2179 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2180
2181         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
2182         `poplevel' in the right order.
2183
2184 2001-08-09  Richard Henderson  <rth@redhat.com>
2185
2186         * Make-lang.in (class.o): Depend on TARGET_H.
2187         * class.c (emit_register_classes): Use target hooks instead of
2188         assemble_constructor and assemble_destructor.
2189
2190 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
2191
2192         * check-init.c (flags.h): Include
2193         (check_init): Don't report uninitialized static class
2194         initialization flags, don't free bit index when doing static class
2195         initialization optimization.
2196         (check_for_initialization): Return type changed to `unsigned int.'
2197         (attach_initialized_static_class): New function.
2198         * class.c (add_method_1): Create the initialized static class
2199         table if necessary.
2200         (finish_class): Always emit deferred inline methods.
2201         * decl.c (emit_init_test_initialization): Moved to expr.c
2202         (complete_start_java_method): Don't traverse
2203         DECL_FUNCTION_INIT_TEST_TABLE.
2204         (lang_mark_tree): Mark hash tables in function decls.
2205         * expr.c (emit_init_test_initialization): Moved from decl.c.
2206         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
2207         initialization flag, set DECL_CONTEXT and
2208         LOCAL_CLASS_INITIALIZATION_FLAG.
2209         (java_lang_expand_expr): Emit initialization code for static class
2210         initialized flags when entering block, if necessary.
2211         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
2212         * java-tree.h (flag_optimize_sci): New global variable declaration.
2213         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
2214         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
2215         (LOCAL_FINAL_P): Fixed typo in comment.
2216         (FINAL_VARIABLE_P): Likewise.
2217         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
2218         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
2219         (struct lang_decl): New fields `ict', `smic' and `cif.'
2220         (check_for_initialization): New returned value for global.
2221         (attach_initialized_static_class): New global function.
2222         (STATIC_CLASS_INIT_OPT_P): New macro.
2223         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
2224         * lang.c (java_decode_option): Handle
2225         `-fno-optimize-static-class-initialization'
2226         * parse.y (start_complete_expand_method): New function.
2227         (java_expand_method_bodies): Likewise.
2228         (attach_init_test_initialization_flags): Likewise.
2229         (adjust_init_test_initialization): Likewise.
2230         (emit_test_initialization): Likewise.
2231         (java_complete_expand_methods): Nullify abstract and native method
2232         bodies.
2233         (java_complete_expand_method): New locals `fbody', `block_body'
2234         and `exception_copy.' Reorganized: directly return on empty method
2235         bodies, call `start_complete_expand_method', remember definitely
2236         initialized static class in function, don't expand method bodies.
2237         (java_expand_classes): Call `java_expand_method_bodies' before
2238         `finish_class' when compiling to native.
2239         (resolve_expression_name): Use `orig' after building outer class
2240         field access.
2241         (patch_invoke): Remember static method invokations.
2242
2243 2001-08-06  Richard Henderson  <rth@redhat.com>
2244
2245         * class.c (emit_register_classes): Pass a symbol_ref and priority
2246         to assemble_constructor.
2247
2248 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
2249
2250         * java-tree.h (all_class_filename): New macro.
2251         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
2252         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
2253         newly created IDENTIFIER_NODE to `all_class_filename.'
2254
2255 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
2256
2257         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
2258         Use ggc_add_tree_root to register roots.
2259
2260 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2261
2262         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
2263         second operand calling check_init.
2264         * decl.c (complete_start_java_method): Swaped second and third
2265         arguments while creating WITH_CLEANUP_EXPR node.
2266         * jcf-write.c (generate_bytecode_insns): Use second operand
2267         instead of third when handling WITH_CLEANUP_EXPR.
2268         * parse.y (java_complete_lhs): Expand second operand of
2269         WITH_CLEANUP_EXPR nodes.
2270         (patch_synchronized_statement): Swaped second and third arguments
2271         while creating WITH_CLEANUP_EXPR node.
2272
2273 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
2274
2275         * parse.y (create_interface): Avoid cyclic inheritance report when
2276         syntax error encountered during class definition.
2277         Fixes PR java/2956
2278
2279 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2280
2281         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2282         ASM_FINAL_SPEC.
2283         (lang_specific_pre_link): Use set_input to set input_filename.
2284         Append `main' here.
2285         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2286         (main): Fix definition.
2287         Strip `main' from classname.
2288         Fixes PR java/227.
2289
2290 2001-07-18  Tom Tromey  <tromey@redhat.com>
2291
2292         For PR java/2812:
2293         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
2294         * lex.c (java_new_lexer): Use ICONV_CONST.
2295         (java_read_char): Likewise.
2296         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
2297         (jv-scan$(exeext)): Likewise.
2298
2299 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2300
2301         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
2302         * parse.y (check_class_interface_creation): Allow `private' if the
2303         enclosing is not an interface.
2304         (create_interface): Interface tagged public if the enclosing
2305         context is an interface.
2306         (create_class): Class tagged public if the enclosing context
2307         is an interface.
2308         Fixes PR java/2959
2309
2310 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2311
2312         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
2313         Fixes PR java/2665
2314
2315 2001-07-14  Tim Josling  <tej@melbpc.org.au>
2316
2317         * check-init.c (check_init): Remove references to EXPON_EXPR.
2318
2319 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2320
2321         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
2322         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
2323         Fixes PR java/3602
2324
2325 2001-07-13  Tom Tromey  <tromey@redhat.com>
2326
2327         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
2328         invocation.
2329
2330 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2331
2332         * parse.y (patch_method_invocation): Don't override primary if one
2333         is already provided, but let this$<n> be built. Fixed comment.
2334
2335 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2336
2337         * parse.y (empty_statement:): Report empty statement error only
2338         when found at class declaration level.
2339         Fixes PR java/3635
2340
2341 2001-07-12  Tom Tromey  <tromey@redhat.com>
2342
2343         * expr.c (expand_load_internal): New function.
2344         (LOAD_INTERNAL): Use it.
2345
2346 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
2347
2348         * parse.y (verify_constructor_super): Compare anonymous class ctor
2349         args with `valid_method_invocation_conversion_p.'
2350         Fixes PR java/3285
2351
2352 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2353
2354         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
2355         `-fsyntax-only.' Fixes PR java/3248
2356
2357 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2358
2359         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2360
2361 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2362
2363         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
2364         current function is static. Fixes PR java/1970
2365
2366 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2367
2368         * parse.y (patch_method_invocation): Add enclosing context to ctor
2369         calls if necessary. Fixes PR java/2953
2370
2371 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2372
2373         * parse.y (resolve_package): Abort if qualified expression member
2374         isn't right.
2375         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
2376         Fixes PR java/1391
2377
2378 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
2379
2380         * verify.c: Don't use // comments.
2381
2382 2001-07-05  Tom Tromey  <tromey@redhat.com>
2383
2384         * lang.c (flag_assume_compiled): Removed.
2385         * java-tree.h (flag_assume_compiled): Removed.
2386         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
2387         -fhash-synchronization, -fuse-divide-subroutine,
2388         -fcheck-references, -femit-class-file, -femit-class-files,
2389         -fassume-compiled.  Updated --encoding information.  Changed
2390         -foutput-class-dir to `-d'.
2391
2392 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
2393
2394         * jcf-parse.c (parse_class_file): Add lineno parameter to
2395         debug_start_source_file call.
2396
2397 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2398
2399         * gcj.texi: Use gpl.texi.
2400         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
2401         dependencies and use doc/include in search path.
2402
2403 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
2404
2405         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
2406         `this'.  If so, don't build instance initializers.
2407
2408 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
2409
2410         * parse.y (resolve_expression_name): Improved error message for
2411         inner class cases. Fixes PR java/1958
2412
2413 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2414
2415         * lang.c: #include diagnostic.h
2416         (lang_print_error): Add a `diagnostic_context *' parameter.
2417         (java_dummy_print): Likewise.
2418         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
2419
2420 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2421
2422         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
2423         * jcf.h (typedef struct JCF): New bitfield `finished.'
2424         (JCF_FINISH): Set `finished.'
2425         (JCF_ZERO): Reset `finished.'
2426         Fixes PR java/2633
2427
2428 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2429
2430         * parse.y (class_body_declaration:): Don't install empty instance
2431         initializers.
2432         Fixes PR java/1314
2433
2434 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2435
2436         * class.c (set_super_info): Call `set_class_decl_access_flags.'
2437         (set_class_decl_access_flags): New function.
2438         * java-tree.h (set_class_decl_access_flags): New prototype.
2439         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
2440         (parse_class_file): New local `decl_max_locals.' Take wide types
2441         into account to compute DECL_MAX_LOCALS.
2442         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
2443         imports on demand.
2444
2445 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
2446
2447         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
2448
2449 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
2450
2451         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
2452         * parse.y (do_resolve_class): Moved comments out to leading comment
2453         section. Removed local `start', New local `_ht' and
2454         `circularity_hash.'  Record `enclosing' in hash table and search
2455         it to detect circularity.  Use `enclosing' as an argument to
2456         `lookup_cl.' Free the hash table when done.
2457
2458 2001-06-19  Tom Tromey  <tromey@redhat.com>
2459
2460         * lex.c (java_read_char): Disallow invalid and overlong
2461         sequences.  Fixes PR java/2319.
2462
2463 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
2464
2465         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
2466
2467 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2468
2469         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
2470         arguments accordingly.
2471
2472 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2473
2474         * gcj.texi: Move contents to just after title page.
2475
2476 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
2477
2478         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
2479         builtin type.
2480         (patch_incomplete_class_ref): Build the class ref, build the class
2481         init if necessary, complete the tree.
2482         Fixes PR java/2605
2483
2484 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2485
2486         * parse.y (lookup_field_wrapper): Test `name' code.
2487         (resolve_qualified_expression_name): Test `qual_wfl' code.
2488         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
2489         handle `qual_wfl' by code.
2490         (maybe_build_primttype_type_ref): Test `wfl' code.
2491
2492 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
2493
2494         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
2495         fdl.texi.
2496         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
2497         the dvi file in the java directory.
2498
2499 2001-05-25  Sam TH  <sam@uchicago.edu>
2500
2501         * gen-table.pl javaop.h jcf.h lex.h,
2502         parse.h: Fix header include guards.
2503
2504 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
2505
2506         * jv-scan.c (version): Update copyright year.
2507
2508 2001-05-21  Per Bothner  <per@bothner.com>
2509
2510         * jcf-parse.c (read_class):  If class is from .class or .zip file
2511         and it's already been read, don't push/pop parser context.
2512
2513 2001-05-18  Per Bothner  <per@bothner.com>
2514
2515         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
2516         command line so the jvgenmain-generated main program comes first.
2517
2518 2001-05-15  Tom Tromey  <tromey@redhat.com>
2519
2520         * class.c (build_utf8_ref): Don't generate identifier based on
2521         utf8const contents.
2522
2523 2001-05-12  Richard Henderson  <rth@redhat.com>
2524
2525         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
2526         * expr.c (java_lang_expand_expr): Expand it.
2527         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
2528         calling build_exception_object_ref.
2529         * parse.y (catch_clause_parameter): Likewise.
2530         (build_dot_class_method): Likewise.
2531         (try_reference_assignconv): Likewise.
2532         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
2533         * jcf-write.c (generate_bytecode_insns): Likewise.
2534
2535 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2536
2537         * parse.y (build_unresolved_array_type): Set
2538         EXPR_WFL_QUALIFICATION on the newly created wfl.
2539         Fixes PR java/2538. Fixes PR java/2535.
2540
2541 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2542
2543         * parse.y (fix_constructors): Removed unnecessary assignment to
2544         local. Moved assignment to `this$<n>', fixed comments and
2545         indentation.
2546         (build_wfl_wrap): Fixed indentation.
2547         Fixes PR java/2598, java/2579 and java/2658.
2548
2549 2001-05-03  Mo DeJong  <mdejong@redhat.com>
2550
2551         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
2552         check for byte swap.
2553
2554 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
2555
2556         * expr.c (build_class_init): Move MODIFY_EXPR
2557         outside of COND_EXPR.  Remove variable `call'.
2558
2559 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2560
2561         * decl.c: NULL_PTR -> NULL.
2562         * jcf-write.c: Likewise.
2563
2564 2001-05-01  Tom Tromey  <tromey@redhat.com>
2565
2566         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
2567         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
2568         * gcj.texi: Updated copyright text.  Include fdl.texi.
2569         (Top): Link to new node.
2570
2571 2001-05-01  Per Bothner  <per@bothner.com>
2572
2573         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
2574
2575 2001-05-01  Per Bothner  <per@bothner.com>
2576
2577         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
2578         import_list contains the name, not the TREE_PURPOSE.
2579
2580 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2581
2582         * jcf-io.c (read_zip_member): Cast to long in comparison with
2583         signed value.
2584
2585         * jvspec.c (lang_specific_driver): Initialize variables.
2586
2587         * mangle.c (find_compression_record_match): Likewise.
2588
2589         * typeck.c (build_null_signature): Provide static prototype.  Mark
2590         parameter with ATTRIBUTE_UNUSED.
2591
2592         * verify.c (verify_jvm_instructions): Initialize variable.
2593
2594 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2595
2596         * parse.y (do_resolve_class): Check for cyclic inheritance during
2597         inner class resolution.
2598
2599 2001-04-27  Per Bothner  <per@bothner.com>
2600
2601         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
2602         while iterating, since that could cause gc to lose stuff.
2603
2604 2001-04-26  Per Bothner  <per@bothner.com>
2605
2606         Fix method search wrt scope of inner classes to match JLS2.
2607         * typeck.c (build_null_signature):  New static function.
2608         (has_method):  New function.  Uses build_null_signature and lookup_do.
2609         * java-tree.h (has_method):  New declaration.
2610         * parse.y (find_applicable_accessible_methods_list):  Do not search
2611         context of inner classes here.
2612         (patch_method_invocation):  Search scope, ie. current and outer clases,
2613         for method matching simple name, to find class.
2614
2615 2001-04-26  Per Bothner  <per@bothner.com>
2616
2617         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
2618         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
2619
2620         * constants.c (find_methodref_with_class_index):  New function.
2621         (find_methodref_index):  Use find_methodref_with_class_index.
2622         * java-tree.h (find_methodref_with_class_index):  New declaration.
2623         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
2624         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
2625         If context changed from interface to class, don't use invokeinterface.
2626
2627 2001-04-25  Per Bothner  <per@bothner.com>
2628
2629         * verify.c (verify_jvm_instructions):  For field instructions,
2630         check that field index is valid.  For invoke instructions, check that
2631         method index is valid.
2632
2633 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
2634
2635         * config-lang.in (target_libs): Copy from $libgcj_saved.
2636
2637 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2638
2639         * decl.c (init_decl_processing): Add new class "protectionDomain"
2640         field.
2641         * class.c (make_class_data): Set initial value for "protectionDomain".
2642
2643 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2644
2645         * jvspec.c (lang_specific_driver): Fix memory allocation
2646         deficit, by using concat in lieu of xmalloc/sprintf.
2647
2648 2001-04-20  Per Bothner  <per@bothner.com>
2649
2650         Fixes to compile multiple .class files at once.
2651         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
2652         * java-tree.h (CLASS_PARSED_P):  New macro.
2653         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
2654         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
2655         (read_class):  Avoid some code duplication.
2656         Don't call JCF_FINISH for a .class file - might be needed later.
2657         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
2658         rather than CLASS_LOADED_P, since latter implies class laid out.
2659         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
2660         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
2661
2662 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2663
2664         * Make-lang.in (java/boehm.o): Depend on toplev.h.
2665
2666         * boehm.c: Include toplev.h.
2667
2668 2001-04-06  Tom Tromey  <tromey@redhat.com>
2669             Alexandre Petit-Bianco  <apbianco@redhat.com>
2670
2671         Fix for PR gcj/1404 and PR gcj/2332:
2672         * parse.y (build_array_from_name): If we use the type_wfl then
2673         accumulate dimensions from the original type as well.
2674         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
2675
2676 2001-04-06  Tom Tromey  <tromey@redhat.com>
2677
2678         * parse.y (analyze_clinit_body): Return true if the second operand
2679         of a METHOD_EXPR is nonzero.
2680
2681 2001-04-06  Tom Tromey  <tromey@redhat.com>
2682
2683         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
2684         directory.
2685         ($(srcdir)/java/parse.c): Likewise.
2686
2687 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
2688
2689         * gcj.texi: Use `which-gcj' instead of `which-g77.'
2690         (version-gcc): Initialized.
2691         (which-gcj): Likewise.
2692
2693 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2694
2695         * java-tree.h (struct lang_decl): New macro
2696         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
2697         * parse.y (build_instance_initializer): New function.
2698         (add_instance_initializer): Use it.
2699         (java_fix_constructors): Set `current_class' before fix pass.
2700         (fix_constructors): Just return if already fixed. Move `super()'
2701         invokation ahead. Use `build_instance_initializer.'
2702         Fixes PR java/1315.
2703
2704 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2705
2706         * parse.y (resolve_qualified_expression_name): Pass field's
2707         DECL_CONTEXT to `not_accessible_p.'
2708         (not_accessible_p): Changed parameters order in `inherits_from_p'
2709         invokation.
2710
2711 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
2712
2713         * lang-options.h: Add flag_check_references.
2714
2715 2001-04-04  Per Bothner  <per@bothner.com>
2716
2717         * java-tree.h (CONSTANT_VALUE_P):  New macro.
2718         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
2719         * parse.y (maybe_build_class_init_for_field):  New static function.
2720         (resolve_expression_name, resolve_field_access):  Use
2721         maybe_build_class_init_for_field instead of build_class_init
2722         This does not do the init if the field is compile-time-constant.
2723         (resolve_field_access):  Simplify.
2724
2725         * parse.y (fold_constant_for_init):  Merge test into switch.
2726
2727 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
2728
2729         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
2730         on gansidecl.h.
2731         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
2732
2733 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
2734
2735         * expr.c (pop_type_0): Save the result of the first
2736         lang_printable_name call in a scratch buffer, so it
2737         won't be clobbered by the second call.
2738
2739 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
2740
2741         * parse-scan.y (array_type:): Rewritten.
2742         (type_declaration:): `empty_statement' replaces `SC_TK.'
2743         (class_member_declaration:): `empty statement' added.
2744         (method_body:): Simplified.
2745         (static_initializer:): Likewise.
2746         (primary_no_new_array:): Use `type_literals.'
2747         (type_literals:): New rule.
2748         (dims:): Set and update `bracket_count.'
2749         Fixes PR java/1074. Fixes PR java/2412.
2750
2751 2001-03-28  Hans Boehm  <boehm@acm.org>
2752
2753         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
2754         (get_boehm_type_descriptor): Set type on returned value to be a
2755         pointer length integer.
2756
2757 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2758
2759         * expr.c (pop_type_0): Call `concat' rather than building the
2760         string manually.
2761         (pop_type): Add format specifier in call to `error'.
2762
2763         * parse.y (patch_method_invocation): Avoid casting away
2764         const-ness.
2765
2766 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
2767
2768         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
2769
2770 2001-03-28  Richard Henderson  <rth@redhat.com>
2771
2772         IA-64 ABI Exception Handling:
2773         * Make-lang.in (except.o): Don't depend on eh-common.h.
2774         * check-init.c (check_init): Handle EXC_PTR_EXPR.
2775         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
2776         [soft_exceptioninfo_call_node]: Remove.
2777         [eh_personality_libfunc, lang_eh_runtime_type]: New.
2778         (end_java_method): No emit_handlers.
2779         * except.c (java_set_exception_lang_code): Remove.
2780         (method_init_exceptions): Don't call it.
2781         (prepare_eh_table_type): No CATCH_ALL_TYPE.
2782         (build_exception_object_ref): New.
2783         (expand_end_java_handler): Update for except.h name changes.
2784         (emit_handlers, expand_resume_after_catch): Remove.
2785         * expr.c (java_lang_expand_expr): Update for except.h name changes.
2786         (process_jvm_instruction): Use build_exception_object_ref.
2787         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
2788         (soft_exceptioninfo_call_node): Remove.
2789         (build_exception_object_ref): Declare.
2790         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
2791         soft_exceptioninfo_call_node.  Move processing ...
2792         [EXC_PTR_EXPR]: ... here.
2793         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
2794         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
2795         (source_end_java_method): No java_set_exception_lang_code or
2796         emit_handlers.
2797         (build_dot_class_method): Use build_exception_object_ref.
2798         (try_reference_assignconv): Check EXC_PTR_EXPR not
2799         soft_exceptioninfo_call_node.
2800
2801 2001-03-28  Richard Henderson  <rth@redhat.com>
2802
2803         * java-tree.h (throw_node): Define as a single member of
2804         java_global_trees instead of a separate array.
2805         (JTI_THROW_NODE): New.
2806         * decl.c (throw_node): Don't declare.
2807         (init_decl_processing): Init a scalar throw_node.
2808         Don't register it for gc.
2809         * check-init.c (check_init): Reference scalar throw_node.
2810         * expr.c (build_java_athrow): Likewise.
2811         * jcf-write.c (generate_bytecode_insns): Likewise.
2812         * parse.h (BUILD_THROW): Likewise.
2813
2814 2001-03-28  Richard Henderson  <rth@redhat.com>
2815
2816         * decl.c (end_java_method): Do not save and restore
2817         flag_non_call_exceptions.
2818         * parse.y (source_end_java_method): Likewise.
2819         * lang.c (flag_exceptions): Don't declare.
2820         (java_init_options): Set flag_non_call_exceptions.  Set
2821         flag_exceptions here ...
2822         (java_init): ... not here.
2823
2824 2001-03-27  Richard Henderson  <rth@redhat.com>
2825
2826         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
2827         exceptions_via_longjmp.
2828
2829         * lang.c (flag_new_exceptions): Don't declare it.
2830         (java_init_options): Or set it.
2831
2832 2001-03-27  Richard Henderson  <rth@redhat.com>
2833
2834         * decl.c (end_java_method): Rename asynchronous_exceptions to
2835         flag_non_call_exceptions.
2836         * parse.y (source_end_java_method): Likewise.
2837
2838 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2839
2840         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2841
2842 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
2843
2844         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
2845
2846 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
2847
2848         * parse.y (find_as_inner_class): Follow current package
2849         indications not to mistakingly load an unrelated class.
2850
2851 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2852
2853         * constants.c (PUTN): Use memcpy, not bcopy.
2854
2855         * lex.c (java_read_char): Use memmove, not bcopy.
2856
2857         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
2858
2859 2001-03-23  Per Bothner  <per@bothner.com>
2860
2861         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
2862         macro for better error pin-pointing.
2863         * java-tree.h:  Fix typo in comment.
2864
2865         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
2866         Don't include jsr/goto in exception range.
2867         Check if start and end of exception range are the same (also TRY_EXPR).
2868         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
2869         However, do emit the following goto even if try_block is empty.
2870         Defer freeing exception_decl until after the finalizer, to make
2871         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
2872
2873         * parse.y (java_complete_lhs):  If the try-clause is empty, just
2874         return the finally-clause and vice versa.
2875
2876 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
2877
2878         * gcj.texi (Input Options): documented the check for attribute
2879         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
2880         * java-tree.h (flag_force_classes_archive_check): Declared extern.
2881         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
2882         (jcf_parse): Check for the right classes archive if necessary.
2883         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
2884         (jcf_parse_fields): Fixed indentation.
2885         * jcf-write.c (append_gcj_attribute): New function.
2886         (generate_classfile): Compute the attribute count, invoke
2887         `append_gcj_attribute'.
2888         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
2889         turned into bit-fields. New bit-field `right_zip.'
2890         (JCF_ZERO): Set `right_zip' to zero.
2891         * lang-options.h (-fforce-classes-archive-check): Added flag.
2892         * lang.c (flag_force_classes_archive_check): New flag.
2893         (lang_f_options): New entry `force-classes-archive-check.'
2894         Fixes PR java/1213.
2895
2896 2001-02-07  Andrew Haley  <aph@redhat.com>
2897
2898         * gcj.texi (Configure-time Options): Add -fcheck-references.
2899         * expr.c (build_java_indirect_ref): New function.
2900         (java_check_reference): New function.
2901         (build_java_array_length_access): Use build_java_indirect_ref to
2902         check for null references.
2903         (build_java_arrayaccess): Likewise.
2904         (build_get_class): Likewise.
2905         (build_field_ref): Likewise.
2906         (invoke_build_dtable): Likewise.
2907         (build_invokeinterface): Likewise.
2908         * lang.c (lang_f_options): Add flag_check_references.
2909         * jvspec.c (jvgenmain_spec): Add flag_check_references.
2910         * java-tree.h (flag_check_references): New variable.
2911         * lang.c (flag_check_references): Likewise.
2912         * parse.y (patch_invoke): Use java_check_reference.
2913         (patch_assignment): Allow for extra nesting in
2914         _Jv_CheckArrayStore.
2915
2916 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
2917
2918         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
2919         * lex.c (cxx_keywords): Likewise.
2920
2921 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
2922
2923         * parse.y (qualify_ambiguous_name): Broaden `length'
2924         recognition. Help MODIFY_EXPR be resolved as expression names.
2925         Fixes PR java/2066. Fixes PR java/2400.
2926
2927 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
2928
2929         * gjavah.c (process_file): Mark interface definitions with
2930         "__attribute__ ((java_interface))".
2931
2932 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
2933
2934         * class.c (layout_class): Fixed push_super_field's second
2935         argument. Fixes PR java/2333.
2936         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
2937         too early to lay innerclasses out.
2938
2939 2001-03-20  Tom Tromey  <tromey@redhat.com>
2940             Alexandre Petit-Bianco <apbianco@redhat.com>
2941
2942         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
2943         inside an array reference. Insertion of the array store check
2944         rewritten. Fixes PR java/2299.
2945
2946 2001-03-20  Tom Tromey  <tromey@redhat.com>
2947
2948         * lex.c (java_read_unicode): Only accept leading `u's.
2949
2950 2001-03-20  Tom Tromey  <tromey@redhat.com>
2951
2952         * jcf-parse.c (read_class): Initialize `class'.
2953
2954 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
2955
2956         * jcf_parse.c (jcf_parse): Eliminate unused variable.
2957
2958 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
2959
2960         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
2961         (layout_class): Likewise.
2962         (layout_class_method): Likewise.
2963         (emit_register_classes): Likewise.
2964         * decl.c (builtin_function): Likewise.
2965         (give_name_to_locals): Likewise.
2966
2967 2001-03-19  Per Bothner  <per@bothner.com>
2968
2969         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
2970         before trying to load an inner class.
2971
2972         Fixes to process to command-line .class files in two passes.
2973         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
2974         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
2975         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
2976         * class.c (is_compiled_class):  Fix for renamed flag.
2977         * parse.y (maybe_create_class_interface_decl):  Likewise.
2978         * jcf-parse.c (yyparse):  Also set if compiling .class files.
2979         * jcf-parse.c (read_class);  Read current_class.
2980         (jcf_parse):  Make static.
2981         (load_inner_classes):  New function, with code moved from jcf_parse,
2982         because we need to inner classes after the command-line files are read.
2983         (yyparse):  Set finput to NULL when it doesn't need to be closed.
2984         Reduce use of main_jcf (basically only for archive) and
2985         use finput instead of main_jcf->read_state.
2986         Inline jcf_figure_file_type into yyparse.
2987         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
2988         Defer load_inner_classes and parse_class_file to a second pass,
2989         after we've correctly mapped command-line .clas fiels to classes.
2990         (jcf_figure_file_type):  Removed.
2991         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
2992         (JCF_ZERO):  Also clear zipd field.
2993         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
2994
2995 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
2996
2997         * jcf-parse.c (yyparse): Change ch from char * to char.
2998
2999 2001-03-19  Per Bothner  <per@bothner.com>
3000
3001         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
3002         Add constructed filelist-file at end, following -xjava.  Thus any .o
3003         and library files are not affected by the -xjava.  Also wrap
3004         explicit @FILE with -xjava and -xnone.
3005
3006 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
3007
3008         * class.c (build_static_field_ref): Call make_decl_rtl() after
3009         setting the DECL_EXTERNAL flag.
3010
3011 2001-03-17  Per Bothner  <per@bothner.com>
3012
3013         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
3014
3015         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
3016         when result is is needed (target is STACK_TARGET).
3017
3018         * parse.h (JDEP_SOLV):  Removed.
3019         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
3020
3021         * parse.y (incomplete_class_list): Removed.
3022         (obtain_incomplete_type): Don't use or set incomplete_class_list.
3023         It doesn't work if resolve_class changes the name of an array type
3024         that is on the list and then someone else looks for the modified name.
3025         Also, seems liable to break when compiling multiple source files at
3026         once.  So the simplest is to just remove incomplete_class_list -
3027         it is only a minor space win and it is not even clear it saves time.
3028
3029         * parse.y (resolve_class):  Remove unneeded promote_type.
3030
3031 2001-03-15  Per Bothner  <per@bothner.com>
3032
3033         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
3034         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
3035         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
3036         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
3037
3038         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
3039         * parse.y (java_expand_classes):  Likewise.
3040
3041         * parse.y (expand_start_java_method):  Was only called once and had a
3042         misleading name, so inline in caller java_complete_expand_method.
3043         (enter_a_block):  Likewise inline in enter_block and remove.
3044
3045         Remove junk from when gcc/java was created (by copying from C/C++).
3046         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
3047         (struct binding_level):  Remove fields keep, keep_if_subblocks,
3048         more_cleanups_ok, have_cleanups (which have never been used).
3049         (pushlevel, poplevel):  Remove related useless code.
3050
3051         * class.c (make_class_data):  The class_dtable_decl (i.e. the
3052         vtable for Class) should be external, except when compiling Class.
3053
3054         * jvspec.c (lang_specific_driver):  Fix -C handling.
3055         Check -save-temps to see if temp @FILE should be deleted.
3056         Follow-up to/fix for February 16 patch.
3057
3058         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
3059         (type_stack_dup):  Remove no-longer neded error check.
3060
3061 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
3062
3063         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
3064         to 'for_pointer'. If this type is for a pointer (argument) mangling,
3065         don't surround the element with 'N..E' if the type name is
3066         unqualified.
3067
3068 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
3069
3070         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
3071         DECL_RTL_SET_P, etc.
3072         (make_method_value): Likewise.
3073         (get_dispatch_table): Likewise.
3074
3075         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3076
3077 2001-03-07  Tom Tromey  <tromey@redhat.com>
3078
3079         * config-lang.in (lang_requires): Define.
3080
3081 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
3082
3083         * typeck.c (convert): Check flag_unsafe_math_optimizations,
3084         not flag_fast_math.
3085
3086 2001-03-05  Per Bothner  <per@bothner.com>
3087
3088         Fix a problem where rest_of_decl_compilation applied to
3089         class_dtable_decl causes problems because it was done too early,
3090         before output file was opened.
3091         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
3092         * class.c (class_dtable_decl):  Add macro - element of class_roots.
3093         (make_class_data):  Define class_dtable_decl.
3094         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
3095
3096 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3097
3098         * java/class.c, java/decl.c, java/java-tree.h: Replace all
3099         uses of 'boolean' with 'bool'.
3100
3101 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3102
3103         * lang-specs.h: Add zero initializer for cpp_spec field to all
3104         array elements.
3105
3106 2001-02-16  Per Bothner  <per@bothner.com>
3107
3108         Handle compiling multiple input files at once, and @FILE syntax.
3109         * gcj.texi:  Updated documentation to match.
3110         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
3111         * jcf-parse.c (parse_source_file):  Split into ...
3112         (parse_source_file_1):  New function - and:
3113         (parse_source_file_2):  New function.
3114         (yyparse):  On -ffilelist-file, open and scan named file.
3115         On first pass over files, only do parse_source_file_1.
3116         A new second pass calls parse_source_file_2 for each file to compile.
3117         (init_jcf_parse):  Call init_src_parse.
3118         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
3119         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
3120         as multiple input file combined in one compilation.
3121         * lang-options.h:  Add -ffilelist-file
3122         * lang.c (flag_filelist_file):  New flag variable.
3123         (lang_f_options):  Handle -ffilelist-file.
3124         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
3125         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
3126         gclass_list - use global fields of src_parse_roots instead.
3127         * parse.y (src_parse_roots):  New array.
3128         (incomplete_class_list, gclass_list):  New macros.
3129         (push_parser_context, java_pop_parser_context,
3130         java_parser_context_resume):  Don't fiddle with deleted fields.
3131         (various):  Use incomplete_class gclass_list and global macros
3132         instead of parse_ctxt fields - the lists are global.
3133         (init_src_parse):  New function.
3134
3135 Fri Feb 23 15:28:39 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3136
3137         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
3138
3139 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
3140
3141         * parse.y (check_inner_class_access): Moved declaration of local
3142         `enclosing_decl_type' to the right location.
3143
3144 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
3145
3146         * parse.y (parser_check_super_interface): Don't call
3147         check_pkg_class_access for an inner interface.
3148         (parser_check_super): Don't call check_pkg_class_access for inner
3149         class.
3150         (do_resolve_class): Simplify enclosing type loop. Don't call
3151         check_pkg_class_access if CL and DECL are not set.
3152         (find_in_imports_on_demand): Set DECL if class_type needed to be
3153         loaded. Don't call check_pkg_class_access for an inner class.
3154         (check_inner_class_access): Rewritten to implement member access
3155         rules as per spec 6.6.1.
3156         (check_pkg_class_access): Handle the empty package correctly.
3157         (in_same_package): New function. Determine if two classes are in the
3158         same package.
3159
3160 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
3161
3162         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
3163         method into array types.
3164         * parse.y (patch_method_invocation): Bypass access check on clone call
3165         to array instance.
3166
3167 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
3168
3169         * expr.c (build_instanceof): Check for arrays when trying fold to
3170         false.
3171
3172 2001-02-15  Jim Meyering  <meyering@lucent.com>
3173
3174         * Make-lang.in (java.install-common): Depend on `installdirs'.
3175         (java.install-info): Likewise.
3176
3177 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
3178
3179         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
3180
3181 2001-02-14  Tom Tromey  <tromey@redhat.com>
3182             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3183
3184         Fix for PR java/1261.
3185         * typeck.c (build_java_array_type): Add public `clone' method to
3186         arrays.
3187         * parse.y (resolve_qualified_expression_name): Use current_class
3188         when checking for inaccessibility.
3189         (patch_method_invocation): Fixed error message when accessibility
3190         denied.  Added `from_super' argument.
3191
3192 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3193
3194         * parse.y (resolve_class): Don't build a fake decl. Use the one
3195         already built.
3196         * typeck.c (build_java_array_type): Build and assign decl to array
3197         type.
3198
3199 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3200
3201         * parse.y (not_accessible_p): Changed leading comment. Added extra
3202         `where' argument. Use it to enforce protected access rules.
3203         (resolve_qualified_expression_name): Added extra argument to
3204         not_accessible_p.
3205         (patch_method_invocation): Use argument `primary' to provide
3206         not_accessible_p with an extra argument.
3207         (lookup_method_invoke): Added extra argument to not_accessible_p.
3208         (search_applicable_method_list): Likewise.
3209
3210 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3211
3212         * parse.y (resolve_qualified_expression_name): Try to resolve as
3213         an inner class access only if `decl' is a TYPE_DECL.
3214
3215 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3216
3217         * decl.c (classdollar_identifier_node): Initialize.
3218         * java-tree.h (enum java_tree_index): New entry
3219         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
3220         (classdollar_identifier_node): New macro.
3221         (ID_CLASSDOLLAR_P): Likewise.
3222         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
3223         (build_dot_class_method_invocation): Likewise.
3224         (find_applicable_accessible_methods_list): `class$' can't be
3225         inherited.
3226
3227 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
3228
3229         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
3230
3231 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3232
3233         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
3234         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
3235         gone.
3236
3237 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3238
3239         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
3240         outside of the `__U' sequence too.
3241         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
3242         sequence too.
3243
3244 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3245
3246         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
3247
3248 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3249
3250         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
3251         (JVGENMAIN_OBJS): Likewise.
3252         * java-tree.h (append_gpp_mangled_name): New prototype.
3253         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
3254         Removed cast calling `gcc_add_root.'
3255         * jvgenmain.c (mangle_obstack): New global, initialized.
3256         (main): Use it.
3257         (do_mangle_class): Constify local `ptr.'
3258         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
3259         append_gpp_mangle_name and update `count' if necessary.
3260         Use `mangle_obstack.'
3261         * mangle.c (append_unicode_mangled_name): Removed.
3262         (append_gpp_mangled_name): Likewise.
3263         (unicode_mangling_length): Likewise.
3264         (mangle_member_name): Return type set to `void.'
3265         (mangle_field_decl): Don't append `U' in escaped names.
3266         (mangle_method_decl): Likewise.
3267         (mangle_member_name): Just use `append_gpp_mangled_name.'
3268         * mangle_name.c: New file.
3269
3270 2001-02-07  Per Bothner  <per@bothner.com>
3271
3272         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
3273
3274         * check-init.c (check_init):  Don't call done_alternative after
3275         processing loop code, as a LOOP_EXPR never terminates normally.
3276
3277 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3278
3279         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
3280
3281 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3282
3283         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
3284         DECLs.
3285
3286 2001-02-06  Tom Tromey  <tromey@redhat.com>
3287
3288         * lex.c (java_new_lexer): Longer error message.
3289
3290 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
3291             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3292
3293         * typeck.c (build_prim_array_type): Added leading comment.
3294         (build_java_array_type): Moved locals out of
3295         block. Always create the `data' field, fixed alignment to match
3296         C++.
3297
3298 2001-02-04  Tom Tromey  <tromey@redhat.com>
3299
3300         * expr.c (java_lang_expand_expr): Don't bother recomputing
3301         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
3302         Fixes PR java/1866.
3303
3304 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3305
3306         * parse.y (process_imports): Save the original name of the import
3307         for better error report.
3308
3309 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
3310
3311         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
3312         of macros used when compiling jvspec.c.
3313         * jvspec.c (lang_specific_driver): Link with the shared
3314         libgcc by default.
3315
3316 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3317
3318         * check-init.c (check_init): Call internal_error instead of fatal.
3319         * expr.c (java_lang_expand_expr): Likewise.
3320         * jcf-parse.c (get_constant): Likewise.
3321         * mangle.c (java_mangle_decl): Likewise.
3322         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
3323         (operator_string): Likewise.
3324         * check-init.c (check_init): Call abort instead of fatal.
3325         * class.c (build_class_ref): Likewise.
3326         * constants.c (write_constant_pool): Likewise.
3327         * decl.c (start_java_method): Likewise.
3328         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
3329         (java_stack_dup, encode_newarray_type): Likewise.
3330         (build_java_array_length_access): Likewise.
3331         (build_java_check_indexed_type, expand_java_pushc): Likewise.
3332         (build_java_soft_divmod, build_invokeinterface): Likewise.
3333         * java-tree.h (INNER_CLASS_P): Likewise.
3334         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
3335         (give_name_to_class, get_class_constant): Likewise.
3336         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
3337         (find_constant_index, generate_bytecode_conditional): Likewise.
3338         (generate_bytecode_insns, perform_relocations): Likewise.
3339         * lex.c (java_unget_unicode, java_lex): Likewise.
3340         * mangle.c (mangle_type, mangle_record_type): Likewise.
3341         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
3342         (finish_mangling): Likewise.
3343         * parse.h (MARK_FINAL_PARMS): Likewise.
3344         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
3345         (obtain_incomplete_type, java_complete_class): Likewise.
3346         (java_check_regular_methods, java_complete_expand_method): Likewise.
3347         (cut_identifier_in_qualified, check_deprecation): Likewise.
3348         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
3349         (java_complete_lhs, lookup_name_in_blocks): Likewise.
3350         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
3351         * typeck.c (set_local_type, parse_signature_type): Likewise.
3352         (parse_signature_string, build_java_signature): Likewise;
3353         (set_java_signature): Likewise.
3354         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
3355         * class.c (add_method): Call fatal_error instead of fatal.
3356         (build_static_field_ref): Likewise.
3357         * expr.c (build_known_method_ref, expand_invoke): Likewise.
3358         * jcf-parse.c (get_constant, jcf_parse): Likewise.
3359         * lex.c (java_new_new_lexer): Likewise.
3360         * jv-scan.c (main): Likewise.
3361         (fatal_error): Renamed from fatal.
3362         * jcf-parse.c (yyparse): Call fatal_io_error instead of
3363         pfatal_with_name.
3364         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
3365         (yyparse): Likewise.
3366         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
3367         * lex.c (java_get_line_col): Likewise.
3368         * jcf-parse.c (load_class): Make errors non-fatal.
3369         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
3370
3371 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
3372
3373         * jvgenmain.c (class_mangling_suffix): Remove unused string.
3374         (error): Remove unused function.
3375         (main): Don't use "__attribute__ alias" on generated class symbol.
3376
3377 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3378
3379         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
3380         argument.
3381         * parse.y (finish_method_declaration): Code accounting for WFLed
3382         method DECL_NAMEs deleted.
3383         (check_abstract_method_definitions): Likewise.
3384         (resolve_type_during_patch): Layout resolved type.
3385         * typeck.c (lookup_do): Removed unused local.
3386
3387 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
3388
3389         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
3390         * decl.c (init_decl_processing): Use integer_minus_one_node, not
3391         integer_negative_one_node.
3392         * expr.c (build_java_binop): Likewise.
3393
3394 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
3395
3396         * zextract.c (read_zip_archive): Read file_offset before writing
3397         zipd and consequently clobbering the header contents.
3398
3399 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3400
3401         * Make-lang.in: Remove all dependencies on defaults.h.
3402         * decl.c: Don't include defaults.h.
3403         * expr.c: Likewise.
3404         * parse.y: Likewise.
3405
3406 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3407
3408         * ChangeLog (2001-01-21): Fixed typo.
3409         * class.c (layout_class_method): Code accounting for WFLed
3410         method DECL_NAMEs deleted.
3411         * constant.c (find_methodref_index): Likewise.
3412         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
3413         * java-tree.h (DECL_FUNCTION_WFL): New macro.
3414         (struct lang_decl): New field `wfl'.
3415         (java_get_real_method_name): Prototype deleted.
3416         * mangle.c (mangle_method_decl): Code accounting for WFLed
3417         method DECL_NAMEs deleted.
3418         * parse.h (GET_METHOD_NAME): Macro deleted.
3419         * parse.y (reset_method_name): Deleted.
3420         (method_header): Set DECL_FUNCTION_WFL.
3421         (check_abstract_method_header): Code accounting for WFLed method
3422         DECL_NAMEs deleted.
3423         (java_get_real_method_name): Deleted.
3424         (check_method_redefinition): Code accounting for WFLed method
3425         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
3426         (java_check_regular_methods): Likewise.
3427         (java_check_abstract_methods): Likewise.
3428         (java_expand_classes): Don't call `reset_method_name.'
3429         (search_applicable_method_list): Use DECL_NAMEs instead of
3430         GET_METHOD_NAME.
3431         * typeck.c (lookup_do): Code accounting for WFLed method
3432         DECL_NAMEs deleted.
3433
3434 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
3435
3436         * lex.c (java_read_char): Check for EOF from getc first.
3437
3438 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3439
3440         * class.c (layout_class): Don't lay the superclass out if it's
3441         already being laid out.
3442         * jcf-parse.c (handle_innerclass_attribute): New function.
3443         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
3444         handle_innerclasses_attribute.
3445         (jcf_parse): Don't load an innerclasses if it's already being
3446         laid out.
3447         * jcf-write.c (append_innerclass_attribute_entry): Static
3448         `anonymous_name' and its initialization deleted. `ocii' and `ini'
3449         to be zero for anonymous classes.
3450
3451 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3452
3453         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
3454         necessary.
3455         * jcf-parse.c (set_source_filename): Use
3456         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
3457
3458 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3459
3460         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
3461         gets a unique asm name.
3462
3463 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3464
3465         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
3466         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3467         if necessary.
3468         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
3469         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
3470         * parse.y (lookup_package_type_and_set_next): Deleted.
3471         (resolve_package): Removed unnecessary code.
3472         (find_applicable_accessible_methods_list): `finit$' can't be
3473         inherited.
3474         * verify.c (pop_argument_types): Added missing prototype.
3475
3476 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
3477
3478         * config-lang.in: Disable java by default.
3479
3480 2001-01-23  Tom Tromey  <tromey@redhat.com>
3481
3482         * gcj.texi (Copying): New node.
3483         Added copyright information.
3484
3485 2001-01-21  Per Bothner  <per@bothner.com>
3486
3487         Various fixes to allow compiling a compressed .jar/.zip archive.
3488         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
3489         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
3490         (struct ZipDirectory):  New field zipf points to owning ZipFile.
3491         * jcf.h (struct ZipDirectory):  Add forward declaration.
3492         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
3493         Remove seen_in_zip and zip_offset fields.
3494         (JCF_SEEN_IN_ZIP):  New macro.
3495         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
3496         * jcf-io.c:  Change all ZipFileCache to ZipFile.
3497         (read_zip_member):  New function.
3498         (open_in_zip):  Call read_zip_member.
3499         * jcf-parse.c (find_in_current_zip):  Remove function.
3500         (read_class):  Merge in find_in_current_zip functionality.
3501         Call read_zip_member if needed.
3502         (parse_zip_file_entries):  Use read_zip_member.
3503         (process_zip_dir):  Update for removed and added JCF fields.
3504         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
3505
3506 2001-01-21  Per Bothner  <per@bothner.com>
3507
3508         Minor optimization of static ggc roots.
3509         * jcf-parse.c (parse_roots):  New static field.
3510         (current_field, current_method, current_file_list):  Replace by macros
3511         naming fields of parse_roots.
3512         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
3513         * class.c (class_roots):  New static field.
3514         (registered_class, fields_ident, info_ident, class_list):
3515         New macros naming fields of parse_roots.
3516         (build_static_field_ref):  Don't register roots here.
3517         (layout_class):  Static field list replaced by macro class_list.
3518         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
3519         Initialize fields_ident and info_ident here.
3520
3521 2001-01-21  Per Bothner  <per@bothner.com>
3522
3523         * jcf-parse.c (ggc_mark_jcf):  New function.
3524         (init_jcf_parse):  Register current_jcf as ggc root.
3525
3526 2001-01-21  Per Bothner  <per@bothner.com>
3527
3528         * lang.c (put_decl_node):  Print method's name.
3529
3530 2001-01-21  Per Bothner  <per@bothner.com>
3531
3532         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
3533         (verify_jvm_instructions):  Use it, for better error messages on loads.
3534
3535 2001-01-21  Per Bothner  <per@bothner.com>
3536
3537         * verify.c (merge_type_state):  Still may have to merge even if
3538         LABEL_VERIFIED (label).
3539
3540 2001-01-21  Per Bothner  <per@bothner.com>
3541
3542         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
3543         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
3544
3545 2001-01-19  Per Bothner  <per@bothner.com>
3546
3547         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
3548         if expeting an interface type.  Refines Tom's change of 2000-09-12.
3549
3550 2001-01-18  Per Bothner  <per@bothner.com>
3551
3552         * gcj.texi (Input Options): Mention .java files.
3553
3554 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3555
3556         * lang-options.h (-Wunsupported-jdk11): Removed.
3557         * lang.c (flag_not_overriding): Deleted.
3558         (flag_static_local_jdk1_1): Likewise.
3559         (lang_W_options): Removed "unsupported-jdk11" entry.
3560         * parse.y (java_check_methods): Removed dead code.
3561
3562 2001-01-17  Tom Tromey  <tromey@redhat.com>
3563
3564         Changes suggested by Per Bothner:
3565         * gcj.texi (Input Options): Don't mention input files.
3566         (Code Generation): Updated --main information.
3567         (Invoking jcf-dump): Mention that --javap is incomplete.
3568         From Alexandre Petit-Bianco:
3569         (Warnings): Don't mention -Wunsupported-jdk11.
3570         My stuff:
3571         (Compatibility): Mention JDK 1.2-ness of libraries.
3572         (Resources): Mention resources used when writing gcj.
3573
3574 2001-01-17  Tom Tromey  <tromey@redhat.com>
3575
3576         * gcj.texi: New file.
3577         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
3578         (java.info): Depend on gcj.info.
3579         (java/gcj.dvi): New target.
3580         (java.dvi): Depend on gcj.dvi.
3581         (java.install-info): Wrote.
3582
3583 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
3584
3585         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
3586         having called make_decl_rtl.
3587
3588 2001-01-14  Per Bothner  <per@bothner.com>
3589
3590         Various patches to emit better messages on verification errors.
3591         * expr.c (push_type_0):  Return error indication on stack overflow,
3592         instead of callinfg fatal.
3593         (push_type):  Now just call push_type_0 (nd fatal on overflow).
3594         (pop_type_0):  Return detailed error message (in a char** argument).
3595         (pop_type):  If pop_type_0 fails, print error message.
3596         (pop_argument_types):  Moved to verify.c.
3597         * verify.c (pop_argument_types):  Moved from expr.c.
3598         Return a (possible) error message, rather than void.
3599         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
3600         (verify_jvm_instruction):  Use new macros, improving error messages.
3601         For case OPCODE_astore use object_ptr_type_node.
3602         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
3603         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
3604
3605         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
3606         constant, return body without wrapper.  (Improves constant folding.)
3607         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
3608
3609 2001-01-13  Per Bothner  <per@bothner.com>
3610
3611         * expr.c (expand_java_field_op):  Assigning to a final field outside
3612         an initializer does not violate JVM spec, so should be warning, not
3613         error.  (Sun's verifier does not complain - though MicroSoft's does.)
3614
3615 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
3616
3617         * gjavah.c (version), jcf-dump.c (version): Update copyright year
3618         to 2001.
3619
3620 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
3621
3622         * parse.y (resolve_expression_name): Permit instance variables from
3623         enclosing context in super constructor call.
3624         (resolve_qualified_expression_name): Permit enclosing class's qualified
3625         "this" in super constructor call.
3626
3627 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
3628
3629         * class.c (build_utf8_ref): Remove last argument in call to
3630         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3631         (build_class_ref): Likewise.
3632         (build_static_field_ref): Likewise.
3633         (get_dispatch_table): Likewise.
3634         (layout_class_method): Likewise.
3635         (emit_register_classes): Likewise.
3636         * constants.c (build_constant_data_ref): Likewise.
3637         * decl.c (builtin_function): Likewise.
3638         (create_primitive_vtable): Likewise.
3639         * expr.c (build_known_method_def): Likewise.
3640         (build_jni_stub): Likewise.
3641         (java_lang_expand_expr): Likewise.
3642
3643 2001-01-10  Tom Tromey  <tromey@redhat.com>
3644
3645         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
3646
3647 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3648
3649         * java-tree.h (lang_printable_name_wls): New prototype.
3650         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
3651         rather than `current_class' to print type name. Don't prepend type
3652         names when printing constructor names.
3653         (lang_printable_name_wls): New function.
3654         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
3655         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
3656         * parse.y (patch_method_invocation): Message tuned for constructors.
3657         (not_accessible_p): Grant `private' access from within
3658         enclosing contexts.
3659
3660 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3661
3662         All files with updated copyright when applicable.
3663         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
3664         * class.c (mangle_class_field): Function removed.
3665         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
3666         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
3667         (build_class_ref): Call `java_mangle_class_field' instead of
3668         `mangle_class_field.'
3669         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
3670         (layout_class): Call `java_mangle_decl' instead of
3671         `mangle_static_field.'
3672         (cxx_keywords): Initialized static array moved to `lex.c.'
3673         (layout_class_method): Changed leading comment. Simplified to
3674         call `java_mangle_decl.' Local `ptr' moved in for loop body.
3675         * decl.c (lang_mark_tree): Mark field `package_list.'
3676         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
3677         (struct lang_type): New field `package_list.'
3678         (unicode_mangling_length): Prototype removed.
3679         (append_gpp_mangled_name, append_gpp_mangled_classtype,
3680         emit_unicode_mangled_name): Likewise.
3681         (cxx_keyword_p): New prototype.
3682         (java_mangle_decl, java_mangle_class_field,
3683         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
3684         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
3685         `build_expr_wfl.'
3686         * jvgenmain.c (main_method_prefix): Global variable removed.
3687         (main_method_suffix): Likewise.
3688         (do_mangle_classname): New function.
3689         (main): Call it. Format changed to accommodate new mangling scheme.
3690         * lex.c: (utf8_cmp): Conditionally prototyped.
3691         (cxx_keywords): Moved from class.c, conditionally defined.
3692         (utf8_cmp, cxx_keyword_p): Likewise.
3693         * mangle.c (obstack.h, ggc.h): Included.
3694         (mangle_field_decl): New function.
3695         (mangle_method_decl, mangle_type, mangle_pointer_type,
3696         mangle_array_type, mangle_record_type,
3697         find_compression_pointer_match, find_compression_array_match,
3698         find_compression_record_match,
3699         find_compression_array_template_match, set_type_package_list,
3700         entry_match_pointer_p, emit_compression_string, init_mangling,
3701         finish_mangling, compression_table_add, mangle_member_name): Likewise.
3702         (mangle_obstack): New global.
3703         (MANGLE_RAW_STRING): New macro.
3704         (unicode_mangling_length): Turned static.
3705         (append_unicode_mangled_name): Renamed from
3706         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
3707         replaces `obstack', removed from the parameter list.
3708         (append_gpp_mangled_name): Turned static. `mangle_obstack'
3709         replaces parameter `obstack', removed from the parameter list. Call
3710         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
3711         (append_gpp_mangled_classtype): Removed.
3712         (compression_table, compression_next): New static variables.
3713         * parse.y (temporary_obstack): Extern declaration removed.
3714
3715 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3716
3717         * parse.y (patch_binop): Compute missing type in error situations.
3718
3719 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
3720
3721         * class.c (make_class_data): Push initial value for "arrayclass".
3722         * decl.c (init_decl_processing): Add new class field "arrayclass".
3723
3724 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
3725
3726         From patha@softlab.ericsson.se:
3727         * parse.y (switch_label): Use build, not build1, to construct
3728         DEFAULT_EXPR.
3729
3730 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3731
3732         * lang.c (lang_decode_option): Change -MA to -MP.
3733         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
3734         Update to new prototype; do quote targets.
3735         (jcf_dependency_write): Update.
3736
3737 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
3738
3739         Shorten primitive array allocation path:
3740         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
3741         to create new primitive arrays.
3742         * expr.c (build_newarray): If generating native code, call
3743         soft_newarray_node with a reference to the primitive TYPE identifier
3744         instead of type_value.
3745
3746 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
3747
3748         Fix for PRs gcj/312 and gcj/253:
3749         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
3750         dest if they arn't already.
3751         * class.c (layout_class): Call maybe_layout_super_class on
3752         superinterfaces also, but only if compiling from bytecode.
3753
3754         Fix for PR gcj/373:
3755         * parse.y (create_class): Set ACC_STATIC if class is declared in an
3756         interface.
3757
3758 2000-12-15  Tom Tromey  <tromey@redhat.com>
3759
3760         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
3761         set.
3762
3763 2000-12-14  Andrew Haley  <aph@redhat.com>
3764
3765         * boehm.c (mark_reference_fields): Change test to correctly detect
3766         bitmap overflow.
3767
3768 2000-12-15  Andreas Jaeger  <aj@suse.de>
3769
3770         * config-lang.in (lang_dirs): Added.
3771
3772 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3773
3774         * parse.y (end_artificial_method_body): Fixed undefined behavior.
3775         Credits go to rth for finding it.
3776
3777 2000-12-13  Mike Stump  <mrs@wrs.com>
3778
3779         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
3780
3781 2000-11-07  Tom Tromey  <tromey@cygnus.com>
3782
3783         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
3784         * lex.c (java_ignorable_control_p): Removed.
3785         (java_letter_or_digit_p): Removed.
3786         (java_start_char_p): New function.
3787         (java_read_char): Return `int', not `unicode_t'.  Changed
3788         callers.
3789         (java_read_unicode): Likewise.
3790         (java_read_unicode_collapsing_terminators): Likewise.
3791         (java_get_unicode): Likewise.
3792         (java_new_lexer): Initialize hit_eof.
3793         (java_parse_end_comment): Take `int' argument.
3794         (java_parse_doc_section): Likewise.
3795         (java_parse_escape_sequence): Don't allow backlash-newline.
3796         Return `int'.
3797         * lex.h (JAVA_DIGIT_P): Removed.
3798         (_JAVA_LETTER_OR_DIGIT_P): Removed.
3799         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
3800         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
3801         (JAVA_PART_CHAR_P): New macro.
3802         (UEOF): Now -1.
3803         (JAVA_CHAR_ERROR): Now -2.
3804         (java_lexer): New field `hit_eof'.
3805         * chartables.h: New file.
3806         * gen-table.pl: new file.
3807
3808 2000-11-20  Tom Tromey  <tromey@cygnus.com>
3809             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3810
3811         * parse.y (java_complete_lhs): Only allow compound assignment of
3812         reference type if type is String.
3813
3814 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3815
3816         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
3817         jcf-path.c: Likewise.
3818
3819 2000-12-09  Anthony Green  <green@redhat.com>
3820
3821         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
3822         filestart and filename_length as int values.
3823
3824 2000-12-07  Mo DeJong  <mdejong@redhat.com>
3825
3826         * jcf-io.c (find_class): Correct the logic that tests to see if a
3827         .java file is newer than its .class file. The compiler was
3828         incorrectly printing a warning when file mod times were equal.
3829
3830 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
3831
3832         * jvgenmain.c: Use ISPRINT not isascii.
3833
3834 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3835
3836         * parse.y (end_artificial_method_body): Fixed typo.
3837
3838 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3839
3840         * parse.y (patch_method_invocation): Pick the correct enclosing
3841         context when creating inner class instances.
3842         Fixes gcj/332.
3843
3844 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
3845
3846         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3847         Update copyright year to 2000.
3848
3849 2000-11-23  Anthony Green  <green@redhat.com>
3850
3851         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
3852         Move current_file_list out of yyparse and make it static.
3853
3854         * expr.c: Declare quick_stack and tree_list_free_list as static
3855         (init_expr_processing): Register quick_stack and
3856         tree_list_free_list roots.
3857
3858 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3859
3860         * parse.y (build_outer_field_access): New local `decl_ctx', use
3861         it. Check for field's context and current class immediate outer
3862         context inheritance.
3863         (outer_field_access_p): Consider fields inherited from the last
3864         enclosing context.
3865         (build_access_to_thisn): Stop at the last enclosing context if
3866         necessary.
3867         Fixes gcj/367.
3868
3869 Thu Nov 23 02:19:14 2000  J"orn Rennecke <amylaar@redhat.com>
3870
3871         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
3872
3873 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
3874
3875         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
3876         scratch buffer.
3877
3878 2000-11-20  Tom Tromey  <tromey@cygnus.com>
3879
3880         * jv-scan.c (help): Document --complexity.
3881         (options): Added --complexity.
3882         (flag_complexity): New global.
3883         (main): Call `report'.
3884         * parse-scan.y (complexity): New global.
3885         (if_then_statement, if_then_else_statement,
3886         if_then_else_statement_nsi, switch_block_statement_group,
3887         while_expression, do_statement, for_begin, continue_statement,
3888         throw_statement, catch_clause, finally, method_invocation,
3889         conditional_and_expression, conditional_or_expression,
3890         conditional_expression): Update complexity.
3891         (reset_report): Reset complexity.
3892         (report): New function.
3893
3894 2000-11-20  Tom Tromey  <tromey@cygnus.com>
3895
3896         * lex.c (yylex): Added STRICT_TK case.
3897         * parse.y (STRICT_TK): Added.
3898         * parse-scan.y (STRICT_TK): Added.
3899         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
3900         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
3901         file.
3902         * keyword.h: Rebuilt.
3903         * keyword.gperf (strictfp): Added.
3904
3905 2000-11-20  Tom Tromey  <tromey@cygnus.com>
3906
3907         * lex.c (yylex): Recognize floating point constants with leading
3908         0.
3909
3910 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3911
3912         * java-tree.h (cyclic_inheritance_report): Constify.
3913         * parse.y (cyclic_inheritance_report): Likewise.
3914
3915 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
3916
3917         * parse.y (goal): Remove call to ggc_add_string_root.
3918
3919 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
3920
3921         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
3922         Create string in scratch buffer, then pass to build_string.
3923
3924 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3925
3926         * parse.y (issue_warning_error_from_context): Add
3927         ATTRIBUTE_PRINTF.
3928
3929 2000-11-11  Anthony Green  <green@redhat.com>
3930
3931         * jcf-parse.c (process_zip_dir): Add finput parameter.
3932         (jcf_figure_file_type): Call process_zip_dir with appropriate
3933         argument.
3934
3935 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3936
3937         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
3938         * jcf-parse.c (jcf_figure_file_type): Likewise.
3939
3940 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
3941
3942         * parse.y (create_new_parser_context): Use memset () instead of
3943         bzero ().
3944
3945 2000-11-08  Tom Tromey  <tromey@cygnus.com>
3946
3947         * gjavah.c (process_file): Only include gcj/cni.h when generating
3948         CNI stubs.
3949
3950 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
3951
3952         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
3953         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
3954         instead of bzero ().
3955
3956 2000-11-05  Tom Tromey  <tromey@cygnus.com>
3957
3958         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
3959         * lex.c (IS_ZERO): New define.
3960         (java_perform_atof): Error on floating point underflow.
3961
3962 2000-11-04  Tom Tromey  <tromey@cygnus.com>
3963
3964         * lex.c (java_parse_escape_sequence): Only read two octal
3965         characters if the first one is greater than 3.  Don't allow
3966         "octal" numbers to include the digits 8 or 9.
3967
3968 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
3969
3970         * Make-lang.in (java.distdir): Remove.
3971
3972 2000-11-03  Tom Tromey  <tromey@cygnus.com>
3973
3974         * Make-lang.in (java.dvi): New target.
3975         Partial fix for PR other/567.
3976
3977         * lang-options.h: Mention -Wout-of-date.
3978         * jcf-dump.c (flag_newer): New global.
3979         * gjavah.c (flag_newer): New global.
3980         * jcf-io.c (find_class): Only warn when flag_newer set.
3981         * lang.c (flag_newer): New global.
3982         (struct string_option): New declaration.
3983         (lang_W_options): New global.
3984         (process_option_with_no): New function.
3985         (lang_decode_option): Use it.
3986
3987         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
3988         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
3989         `$'.
3990
3991         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
3992         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
3993         * lex.c (java_read_unicode): Removed `term_context' argument.
3994         Recognize any number of `u' in `\u'.
3995         (java_read_unicode_collapsing_terminators): New function.
3996         (java_get_unicode): Use it.
3997         (java_lineterminator): Removed.
3998         (yylex): Produce error if character literal is newline or single
3999         quote.  Return if eof found in middle of `//' comment.  EOF in
4000         `//' comment is only an error if pedantic.
4001         (java_ignorable_control_p): New function.
4002         (java_parse_end_comment): Return if eof found in middle of
4003         comment.
4004         Include flags.h.
4005         * jv-scan.c (pedantic): New global.
4006
4007 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4008
4009         * parse.y (outer_field_access_p): Inherited fields aren't
4010         consider outer fields.
4011         (maybe_build_thisn_access_method): Use
4012         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
4013         (resolve_expression_name): Trigger an error if a static field
4014         is being accessed as an outer field.
4015
4016 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4017
4018         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
4019         Fixes gcj/365.
4020
4021 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
4022
4023         * Make-lang.in: Move all build rules here from Makefile.in,
4024         adapt to new context.  Wrap all rules that change the current
4025         directory in parentheses.  Expunge all references to $(P).
4026         When one command depends on another and they're run all at
4027         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
4028         all object-file generation rules.  Delete obsolete variables.
4029
4030         * Makefile.in: Delete.
4031         * config-lang.in: Delete outputs= line.
4032
4033 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4034
4035         * parse.y (patch_method_invocation): NULLify this_arg when already
4036         inserted.
4037         (maybe_use_access_method): Handle call to methods unrelated to the
4038         current class. Fixed comment.
4039         Fixes gcj/361.
4040
4041 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4042
4043        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
4044        scope.
4045
4046 2000-10-24  Tom Tromey  <tromey@cygnus.com>
4047
4048         * lex.c (java_new_lexer): Initialize new fields.  Work around
4049         broken iconv() implementations.
4050         (java_read_char): Swap bytes if required.  Use fallback decoder if
4051         required.
4052         (byteswap_init, need_byteswap): New globals.
4053         (java_destroy_lexer): Only close iconv handle if it is in use.
4054         * lex.h (java_lexer): New fields read_anything, byte_swap,
4055         use_fallback.
4056         Made out_buffer unsigned.
4057
4058 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4059
4060         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
4061         where an enclosing context can be set on the jdep.
4062         (do_resolve_class): Fixed identation.
4063
4064 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4065
4066         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
4067
4068         * jcf-reader.c (peek_attribute, skip_attribute): Only define
4069         when requested.
4070
4071         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
4072
4073         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
4074
4075 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4076
4077         * jcf-write.c (OP1): Update `last_bc'.
4078         (struct jcf_block): Fixed indentation and typo in comments.  New
4079         field `last_bc'.
4080         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
4081         follows `monitorenter'.
4082         * parse.y (patch_synchronized_statement): New local `tmp'. Call
4083         `patch_string'.
4084         Fixes gcj/232.
4085
4086 2000-10-16  Tom Tromey  <tromey@cygnus.com>
4087
4088         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
4089         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
4090         * lang-options.h: Added -MA, -MT, -MF..
4091         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
4092         (DEPEND_TARGET_SET): New macro.
4093         (DEPEND_FILE_ALREADY_SET): Likewise.
4094         (init_parse): Handle new flags.
4095         * jcf.h (jcf_dependency_print_dummies): Declare.
4096         * Make-lang.in (s-java): Added mkdeps.o.
4097         * Makefile.in (BACKEND): Added mkdeps.o.
4098         (../gcjh$(exeext)): Added mkdeps.o.
4099         (../jcf-dump$(exeext)): Added mkdeps.o.
4100         * jcf-depend.c: Include mkdeps.h.
4101         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
4102         add_entry): Removed.
4103         (jcf_dependency_reset): Rewrote.
4104         (dependencies): New global.
4105         (jcf_dependency_set_target): Rewrote.
4106         (jcf_dependency_add_target): Likewise.
4107         (jcf_dependency_add_file): Likewise.
4108         (munge): Removed.
4109         (print_ents): Removed.
4110         (jcf_dependency_write): Rewrote.
4111         (print_dummies): New global.
4112         (jcf_dependency_print_dummies): New function
4113         (jcf_dependency_write): Call deps_dummy_targets if required.
4114
4115 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4116
4117         * gjavah.c (add_class_decl): Removed unused variables `tname',
4118         `tlen' and `name_index'.
4119         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
4120         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
4121         in `wfl_operator' with value.
4122         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
4123         (jcf_figure_file_type): Fixed identation.
4124         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
4125         * parse.y (analyze_clinit_body): New function.
4126         (static_initializer:): Reset `current_static_block'.
4127         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
4128         `wfl_operator' with new value.
4129         (lookup_cl): Use EXPR_WFL_FILENAME.
4130         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
4131         analyze_clinit_body.
4132         (build_outer_field_access): Access to this$<n> built from
4133         current_class, not its outer context.
4134         (build_access_to_thisn): Fixed leading comment. Tidied things up.
4135         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
4136         (patch_method_invocation): Use `is_static_flag' when already
4137         initialized.
4138         (patch_newarray): Removed assignment in ternary operator.
4139
4140 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4141
4142         * except.c (free_eh_ranges): Don't free `whole_range'.
4143
4144 2000-10-15  Anthony Green  <green@redhat.com>
4145
4146         * decl.c (init_decl_processing): Call init_class_processing before
4147         anything else.
4148
4149 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4150
4151         * check-init.c (check_init): Fixed leading comment. Use
4152         LOCAL_FINAL_P.
4153         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4154         (give_name_to_locals): Likewise.
4155         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
4156         fields in lang_decl_var.
4157         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
4158         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
4159         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
4160         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
4161         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
4162         (LOCAL_FINAL): Rewritten.
4163         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
4164         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
4165         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
4166         `init_final' fields.
4167         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
4168         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
4169         (TYPE_HAS_FINAL_VARIABLE): New macro.
4170         (struct lang_type): Added `afv' field.
4171         * parse.y (check_static_final_variable_assignment_flag): New function.
4172         (reset_static_final_variable_assignment_flag): Likewise.
4173         (check_final_variable_local_assignment_flag): Likewise.
4174         (reset_final_variable_local_assignment_flag): Likewise.
4175         (check_final_variable_indirect_assignment): Likewise.
4176         (check_final_variable_global_assignment_flag): Likewise.
4177         (add_inner_class_fields): Use LOCAL_FINAL_P.
4178         (register_fields): Handle local finals and final variables.
4179         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
4180         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4181         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
4182         on local finals.
4183         (java_complete_expand_methods): Loop to set
4184         TYPE_HAS_FINAL_VARIABLE. Call
4185         `reset_final_variable_local_assignment_flag' and
4186         `check_final_variable_local_assignment_flag' accordingly before
4187         and after constructor expansion. Call
4188         `reset_static_final_variable_assignment_flag'
4189         before expanding <clinit> and after call
4190         `check_static_final_variable_assignment_flag' if the
4191         current_class isn't an interface. After all methods have been
4192         expanded, call `check_final_variable_global_assignment_flag' and
4193         `check_static_final_variable_assignment_flag' if the current class
4194         is an interface.
4195         (maybe_yank_clinit): Fixed typo in comment.
4196         (build_outer_field_access_methods): Removed old sanity check. Use
4197         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4198         Don't create access methods for finals.
4199         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
4200         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
4201         existing DECL_INIT has been processed.
4202         (java_complete_lhs): Likewise.
4203         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
4204         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
4205         logic.
4206         (patch_assignment): Use LOCAL_FINAL_P.
4207         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
4208         DECL_INITIAL is nullified.
4209         Fixes gcj/163.
4210
4211 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4212
4213         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
4214
4215         * Makefile.in (parse.c, parse-scan.c): Likewise.
4216
4217 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
4218
4219         * class.c (temporary_obstack): Remove.
4220         (make_class): Don't mess with obstascks.
4221         (push_class): Likewise.
4222         (set_super_info): Likewise.
4223         (add_method_1): Likewise.
4224         (add_method): Likewise.
4225         (add_field): Likewise.
4226         (build_utf8_ref): Likewise.
4227         (build_class_ref): Likewise.
4228         (build_static_field_ref): Likewise.
4229         (finish_class): Likewise.
4230         (push_super_field): Likewise.
4231         (layout_class): Likewise.
4232         (layout_class_methods): Likewise.
4233         (init_class_processing): Likewise.
4234         * constants.c (get_tag_node): Likewise.
4235         (build_constant_data_ref): Likewise.
4236         * decl.c (ggc_p): Remove.
4237         (copy_lang_decl): Use ggc_alloc.
4238         (complete_start_java_method): Don't mess with obstacks.
4239         (start_java_method): Likewise.
4240         (end_java_method): Likewise.
4241         * except.c (link_handler): Use xmalloc.
4242         (free_eh_ranges): New function.
4243         (method_init_exceptions): Use it.
4244         (add_handler): Use xmalloc.
4245         (expand_start_java_handler): Don't mess with obstacks.
4246         (prepare_eh_table_type): Likewise.
4247         (expand_end_java_handler): Likewise.
4248         * expr.c (push_value): Likewise.
4249         (create_label_decl): Likewise.
4250         (build_jni_stub): Likewise.
4251         (java_lang_expand_expr): Likewise.
4252         (note_instructions): Use xrealloc.
4253         (java_push_constant_from_pool): Don't mess with obstacks.
4254         (process_jvm_instruction): Likewise.
4255         * java-tree.h (cyclic_inheritance_report): Remove duplicate
4256         declaration.
4257         * jcf-parse.c (get_constant): Don't mess with obstacks.
4258         (read_class): Likewise.
4259         (jcf_parse): Likewise.
4260         * lex.c (expression_obstack): Remove.
4261         (java_lex): Don't use obstack_free.
4262         * parse.h (exit_java_complete_class): Don't mess with obstacks.
4263         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
4264         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
4265         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
4266         * parse.y (gaol): Add more GC roots.
4267         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
4268         (lookup_field_wrapper): Likewise.
4269         (obtain_incomplete_type): Don't mess with obstacks.
4270         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
4271         macros.
4272         (craft_constructor): Don't mess with obstacks.
4273         (safe_layout_class): Likewise.
4274         (java_complete_class): Likewise.
4275         (source_end_java_method): Likewise.
4276         (build_outer_field_access_methods): Likewise.
4277         (build_outer_method_access_method): Likewise.
4278         (maybe_build_thisn_access_method): Likewise.
4279         (build_dot_class_method_invocation): Likewise.
4280         (java_complete_tree): Likewise.
4281         (java_complete_lhs): Likewise.
4282         (do_merge_string_cste): Likewise.
4283         (patch_string_cst): Likewise.
4284         (array_constructor_check_entry): Likewise.
4285         * typeck.c (build_java_array_type): Likewise.
4286         (parse_signature_string): Likewise.
4287         (build_java_signature): Likewise.
4288
4289 2000-10-12  Tom Tromey  <tromey@cygnus.com>
4290
4291         Fix for PR gcj/356:
4292         * gjavah.c (add_class_decl): Don't special-case inner classes.
4293         (add_namelet): Likewise.
4294
4295 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
4296
4297         * java-tree.h: Constify current_encoding.
4298         * lang.c: Constify current_encoding.
4299
4300 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
4301
4302         * jvgenmain.c (class_mangling_suffix): Omit `.'.
4303         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
4304
4305 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4306
4307         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
4308         patch. Fixes gcj/340.
4309
4310 2000-10-10  Tom Tromey  <tromey@cygnus.com>
4311
4312         * lex.c (java_new_lexer): Initialize out_first and out_last
4313         fields.
4314         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
4315
4316 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4317
4318         * parse.y (pop_current_osb): New function.
4319         (array_type:): Use `dims:', changed actions
4320         accordingly. Suggested by Anthony Green.
4321         (array_creation_expression:): Used pop_current_osb.
4322         (cast_expression:): Likewise.
4323         (search_applicable_method_list): Fixed indentation.
4324
4325 2000-10-08  Anthony Green  <green@redhat.com>
4326
4327         * parse.y (array_type_literal): Remove production.
4328         (type_literals): Refer to array_type, not array_type_literal.
4329
4330 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4331
4332         Patch contributed by Corey Minyard.
4333         * decl.c (check_local_named_variable): New function.
4334         (tree check_local_unnamed_variable): Likewise.
4335         (find_local_variable): Splitted. Call check_local_{un}named_variable.
4336
4337 2000-10-07  Anthony Green  <green@redhat.com>
4338
4339         * class.c (layout_class): Handle case where superclass can't be
4340         layed out yet.
4341
4342 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4343
4344         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
4345         gperf.
4346
4347 2000-10-05  Tom Tromey  <tromey@cygnus.com>
4348
4349         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
4350         * jvgenmain.c (class_mangling_prefix): Removed.
4351         (class_mangling_suffix): New global.
4352         (main): Use it.
4353         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
4354         `$'.
4355         (print_method_info): Handle overrides for static and final
4356         methods.
4357         (process_file): Generate declaration for class object field.
4358         * class.c (cxx_keywords): New array.
4359         (utf8_cmp): New function.
4360         (cxx_keyword_p): New function.
4361         (layout_class_method): Mangle C++ keywords by appending `$'.
4362         (mangle_field): New function.
4363         (mangle_class_field): Use mangle_field.  Mangle class name as
4364         `class$'.
4365         (mangle_static_field): Use mangle_field.
4366
4367 Tue Oct  3 13:44:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4368
4369         * decl.c (find_local_variable): Removed uncessary type check and
4370         fixed range check typo. From Corey Minyard.
4371
4372 Wed Sep 13 16:06:52 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4373
4374         * decl.c (give_name_to_locals): New local `code_offset'. Call
4375         `maybe_adjust_start_pc'.
4376         * expr.c (note_instructions): New function.
4377         (expand_byte_code): Don't collect insn starts here.
4378         (peek_opcode_at_pc): New function.
4379         (maybe_adjust_start_pc): Likewise.
4380         * java-tree.h (maybe_adjust_start_pc): Declare.
4381         (note_instructions): Likewise.
4382         * jcf-parse.c (parse_class_file): Call `note_instructions'.
4383
4384 Wed Sep 13 11:50:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4385
4386         * parse.y (field_access:): Fixed indentation.
4387         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
4388
4389 2000-09-07  Tom Tromey  <tromey@cygnus.com>
4390
4391         Fix for PR gcj/307:
4392         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
4393         JPRIMITIVE_TYPE_P, for arithmetic operators.
4394         (patch_method_invocation): Indentation fix.
4395         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
4396         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
4397         (do_unary_numeric_promotion): Cleaned up code.
4398         (valid_cast_to_p): Handle boolean correctly.
4399
4400 2000-09-27  Tom Tromey  <tromey@cygnus.com>
4401
4402         * lex.c (java_read_unicode): Reset bs_count when finished with
4403         `\u' sequence.
4404
4405 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
4406
4407         Convert to GC.
4408         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
4409         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
4410         (typeck.o): Depend on ggc.h.
4411         * class.c (add_method_1): Use GC functions for allocation.
4412         (init_class_processing): Register roots.
4413         * decl.c (ggc_p): Set to 1.
4414         (pending_local_decls): Make it static.
4415         (push_jvm_slot): Use GC functions for allocation.
4416         (init_decl_processing): Register roots.
4417         (give_name_to_locals): Use GC functions for allocation.
4418         (lang_mark_tree): New function.
4419         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
4420         functions for allocation.
4421         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
4422         * lex.c (java_lex): Use build_string, rather than replicating it
4423         inline.
4424         * parse.y (goal): Add more roots.
4425         (mark_parser_ctxt): New function.
4426         * typeck.c: Include ggc.h.
4427
4428 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4429
4430         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
4431         contains something else than MODIFY_EXPR.
4432
4433 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
4434
4435         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
4436         * Makefile.in (parse.o): Depend on ggc.h.
4437         (class.o): Likewise.
4438         (constants.o): Likewise.
4439         (decl.o): Likewise.
4440         (expr.o): Likewise.
4441         (jcf-parse.o): Likewise.
4442         (jcf-write.o): Likewise.
4443         (mangle.o): Likewise.
4444         * class.c: Include ggc.h.
4445         (build_static_field_ref): Register GC roots.
4446         (layout_class): Likewise.
4447         (init_class_processing): Likewise.
4448         * constants.c: Include ggc.h.
4449         (current_constant_pool_data_ref): Remove.
4450         (tag_nodes): Move it to ...
4451         (get_tag_node): ... here.  Register GC roots.
4452         * decl.c: Include ggc.h.  Remove many global tree definitions.
4453         (throw_node): Define.
4454         (java_global_trees): Likewise.
4455         (predef_filenames): Make the size a constant.
4456         (init_decl_processing): Adjust accordingly.
4457         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
4458         * expr.c: Include ggc.h.
4459         (init_expr_processing): Register GC roots.
4460         (build_invokeinterface): Likewise.
4461         * java-tree.h: Replace extern tree declarations with macros.
4462         (java_global_trees): New variable.
4463         (java_tree_index): New enumeration.
4464         (init_jcf_parse): Declare.
4465         * jcf-parse.c: Include ggc.h.
4466         (current_class): Remove declaration.
4467         (main_class): Likewise.
4468         (all_class_list): Likewise.
4469         (predefined_filename_p): Adjust for constant size of
4470         predef_filenames.
4471         (init_jcf_parse): New function.
4472         * jcf-write.c: Include ggc.h.
4473         (generate_classfile): Register GC roots.
4474         (append_synthetic_attribute): Likewise.
4475         (append_innerclass_attribute_entry): Likewise.
4476         * lang.c: Include ggc.h.
4477         (lang_print_error): Register GC roots.
4478         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
4479         with macros.
4480         * parse.y: Include ggc.h.
4481         (wfl_operator): Remove.
4482         (goal): Register GC roots.
4483         (java_pop_parser_context): Adjust for new field names.
4484         (java_parser_context_save_global): Likewse.
4485         (java_parser_context_restore_global): Likewise.
4486         (java_parser_context_suspend): Likewise.
4487         (java_parser_context_resume): Likewise.
4488         (verify_constructor_circularity): Register GC roots.
4489         (lookup_cl): Likewise.
4490         (java_reorder_fields): Likewise.
4491         (build_current_this): Likewise.
4492         (class_in_current_package): Likewise.
4493         (argument_types_convertible): Likewise.
4494         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
4495
4496 2000-09-14  Tom Tromey  <tromey@cygnus.com>
4497
4498         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
4499
4500 2000-09-13  Tom Tromey  <tromey@cygnus.com>
4501
4502         * jcf-parse.c: Include <locale.h>.
4503         * jv-scan.c: Include <locale.h>.
4504
4505 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4506
4507         * expr.c (pop_type_0): Return `Object' if trying to merge two
4508         interface types.
4509         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
4510         interface types; `Object' is always a valid supertype.
4511
4512 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4513
4514         Fix for PR gcj/33:
4515         * jv-scan.c (help): Document --encoding.
4516         (options): Added `encoding' entry.
4517         (OPT_ENCODING): New define.
4518         (main): Handle --encoding.
4519         Include <langinfo.h> if nl_langinfo exists.
4520         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
4521         --encoding.
4522         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
4523         (parse_source_file): Correctly call java_init_lex.  Added `finput'
4524         argument.  Use nl_langinfo to determine default encoding.
4525         * java-tree.h (current_encoding): Declare.
4526         * parse.y (java_parser_context_restore_global): Don't restore
4527         `finput'.
4528         (java_parser_context_save_global): Don't set `finput' field.
4529         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
4530         if required.
4531         * lang.c (current_encoding): New global.
4532         (lang_decode_option): Recognize `-fencoding='.
4533         (finish_parse): Don't close finput.
4534         * parse.h (struct parser_ctxt): Removed `finput' and
4535         `unget_utf8_value' fields.  Added `lexer' field.
4536         (java_init_lex): Fixed declaration.
4537         * lex.c (java_new_lexer): New function.
4538         (java_destroy_lexer): Likewise.
4539         (java_read_char): Added `lex' argument.  Handle iconv case.
4540         (java_read_unicode): Added `lex' argument.  Count backslashes in
4541         lexer structure.
4542         (java_init_lex): Added `finput' and `encoding' arguments.  Set
4543         `lexer' field in ctxp.
4544         (BAD_UTF8_VALUE): Removed.
4545         (java_lex): Handle seeing UEOF in the middle of a string literal.
4546         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
4547         (java_lexer): New structure.
4548         (UNGETC): Removed.
4549         (GETC): Removed.
4550         (DEFAULT_ENCODING): New define.
4551         (java_destroy_lexer): Declare.
4552
4553 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4554
4555         Fix for PR gcj/343:
4556         * lex.c (java_init_lex): Initialize java_io_serializable.
4557         * parse.y (java_io_serializable): New global.
4558         (valid_ref_assignconv_cast_p): An array can be cast to
4559         serializable.
4560
4561 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
4562
4563         * decl.c, expr.c: Include defaults.h if not already included.
4564         Don't define the *_TYPE_SIZE macros.
4565
4566 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
4567
4568         * typeck.c (build_java_array_type): Correct first parameter
4569         in ADJUST_FIELD_ALIGN invocation.
4570
4571 2000-09-06  Tom Tromey  <tromey@cygnus.com>
4572
4573         * lang-specs.h: Also recognize `-femit-class-files'.
4574
4575 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4576
4577         * verify.c (merge_types): Load the types to merge if necessary.
4578
4579 2000-09-02  Anthony Green  <green@redhat.com>
4580
4581         * jcf-io.c: Include zlib.h.
4582         (open_in_zip): Read compressed class file archives.
4583         * zipfile.h (ZipDirectory): Add uncompressed_size and
4584         compression_method fields.
4585         * zextract.c (read_zip_archive): Collect file compression info.
4586
4587 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
4588
4589         * parse.y (do_resolve_class): Also explore superclasses of
4590         intermediate enclosing contexts when searching for inner classes.
4591
4592 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4593
4594         * parse.y (variable_declarator_id:): Better error message.
4595         (expression_statement:): Use YYNOT_TWICE.
4596         (cast_expression:): Likewise.
4597         (assignment:): Likewise.
4598
4599 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4600
4601         * parse.y (do_merge_string_cste): New locals. Create new
4602         STRING_CSTs each time, use memcpy. Fixes gcj/311.
4603
4604 2000-08-07  Hans Boehm  <boehm@acm.org>
4605
4606         * boehm.c (mark_reference_fields): Set marking bits for all words in
4607         a multiple-word record.
4608         (get_boehm_type_descriptor): Use the procedure marking descriptor for
4609         java.lang.Class.
4610
4611 2000-08-31  Mike Stump  <mrs@wrs.com>
4612
4613         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
4614         jcf-dump$(exeext)): Make parallel safe.
4615
4616 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4617
4618         * jcf-parse.c (set_source_filename): Constify a char *.
4619         * jcf-write.c (append_innerclasses_attribute,
4620         make_class_file_name): Constify a char *.  Don't recycle a
4621         variable for an unrelated purpose.
4622         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
4623         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
4624
4625 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4626
4627         * expr.c (can_widen_reference_to): Fixed indentation.
4628         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
4629         * parse.y: `finit$' replaces `$finit$' in comments.
4630         (try_builtin_assignconv): Fixed leading comment.
4631
4632 2000-08-25  Greg McGary  <greg@mcgary.org>
4633
4634         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
4635
4636 2000-08-24  Greg McGary  <greg@mcgary.org>
4637
4638         * lang.c (lang_decode_option): Use ARRAY_SIZE.
4639         * parse.y (BINOP_LOOKUP): Likewise.
4640
4641 2000-08-22  Andrew Haley  <aph@cygnus.com>
4642
4643         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
4644         sign extending. Fixes gcj/321.
4645         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
4646         combining to make a jlong. Fixes gcj/321.
4647
4648 2000-08-21  Nix  <nix@esperi.demon.co.uk>
4649
4650         * lang-specs.h: Do not process -o or run the assembler if
4651         -fsyntax-only.
4652
4653 2000-08-16  Andrew Haley  <aph@cygnus.com>
4654
4655         * typeck.c (build_java_array_type): Rewrite code to do array
4656         alignment.  Take into account back-end macros when aligning array
4657         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
4658         user to set alignment. Fixes gcj/252 and 160.
4659
4660 2000-08-09  Tom Tromey  <tromey@cygnus.com>
4661
4662         * parse.y (check_abstract_method_definitions): Now return `int'.
4663         Check implemented interfaces.  Fixes PR gcj/305.
4664
4665         * parse.y (patch_switch_statement): Disallow `long' in switch
4666         expressions.  Fixes PR gcj/310.
4667
4668 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4669
4670         * decl.c (finit_leg_identifier_node): New global.
4671         (init_decl_processing): Use `finit$' to initialize
4672         finit_identifier_node. Use `$finit$' to initialize
4673         finit_leg_identifier_node.
4674         * expr.c (expand_java_field_op): Use ID_FINIT_P.
4675         * java-tree.h (finit_identifier_node): Changed attached comment.
4676         (finit_leg_identifier_node): New declaration.
4677         (ID_FINIT_P): Take finit_identifier_node and
4678         finit_leg_identifier_node into account. This is a backward
4679         compatibility hack.
4680
4681 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4682
4683         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
4684         Jan 6 2000 patch.
4685         (generate_bytecode_insns): Check `nargs' before emitting it.
4686         * verify.c (merge_type_state): Fixed typo.
4687         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
4688         generate_bytecode_{conditional,insns}.
4689
4690 Sun Aug 13 09:41:49 2000  Anthony Green  <green@redhat.com>
4691
4692         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
4693         for -pg builds).
4694
4695 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4696
4697         * class.c (maybe_layout_super_class): Fixed indentation.
4698         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
4699         (java_check_methods): New function declaration.
4700         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
4701         instead of `str_ptr'.
4702         * jcf-write.c (generate_bytecode_insns): Emit number the of args
4703         of a `invokeinterface' at the right time.
4704         * parse.h (WFL_STRIP_BRACKET): New macro.
4705         (SET_TYPE_FOR_RESOLUTION): Use it.
4706         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
4707         (check_class_interface_creation): Don't check for cross package
4708         innerclass name clashes.
4709         (method_header): Behave properly if MDECL is `error_mark_node'.
4710         (method_declarator): Return `error_mark_node' if bogus current
4711         class.
4712         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
4713         (resolve_and_layout): New local `decl_type', set and used. Call
4714         java_check_methods.
4715         (java_check_methods): New method.
4716         (java_layout_classes): Use it.
4717         (resolve_qualified_expression_name): No EH check necessary in
4718         access$<n>.
4719         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
4720         `case' statement.
4721         (patch_assignment): Set DECL_INITIAL on integral final local.
4722
4723 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4724
4725         * java-tree.h (flag_extraneous_semicolon): New extern.
4726         * lang-options.h: (-Wextraneous-semicolon): New option.
4727         * lang.c (flag_redundant): Fixed typo in leading comment.
4728         (flag_extraneous_semicolon): New global.
4729         (lang_decode_option): Set `flag_extraneous_semicolon' when
4730         -Wall. Decode `-Wextraneous-semicolon'.
4731         * parse.y (type_declaration:): Removed `SC_TK' hack, added
4732         `empty_statement' rule.
4733         (class_body_declaration): Likewise.
4734         (method_body:): Accept `;' as a method body.
4735         (static_initializer:): Removed `SC_TK' hack.
4736         (constructor_block_end:): Likewise.
4737         (empty_statement:): Report deprecated empty declaration. Fixes
4738         gcj/295
4739
4740 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4741
4742         * parse.y (build_dot_class_method_invocation): Changed parameter
4743         name to `type'. Build signature from `type' and convert it to a
4744         STRING_CST if it's an array.
4745         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
4746         to use `ref_type' directly.
4747
4748 Sun Aug  6 00:47:24 2000  Ovidiu Predescu  <ovidiu@cup.hp.com>
4749
4750         * lang-options.h: Added a comma after the last element to avoid
4751         syntax errors when other languages define additional options.
4752
4753 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
4754
4755         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
4756         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
4757         (jc1): Link with $(BACKEND).
4758         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
4759
4760 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
4761
4762         * jvspec.c: Adjust type of second argument to
4763         lang_specific_driver, and update code as necessary.
4764
4765         * class.c (build_dtable_decl): Initialize dummy.
4766
4767 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4768
4769         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
4770         method bodies not to rule out discarding `<clinit>'; don't use
4771         <clinit> to initialize static fields with constant initializers.
4772
4773 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4774
4775         * gjavah.c (print_method_info): Added `synth' parameter. Skip
4776         synthetic methods.
4777         (method_synthetic): New global.
4778         (HANDLE_METHOD): Recognize synthetic method and tell
4779         `print_method_info' about it.
4780         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
4781         processing a synthetic method.
4782         * jcf-reader.c (skip_attribute): New function.
4783         ( skip_attribute): Likewise.
4784
4785 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4786
4787         * parse.y (build_outer_field_access): Fixed comments.
4788         (fix_constructors): Emit the initialization of this$<n> before
4789         calling $finit$.
4790         (resolve_qualified_expression_name): Build an access to `decl' if
4791         necessary.
4792
4793 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4794
4795         * parse-scan.y (curent_class): Non longer const.
4796         (inner_qualifier, inner_qualifier_length): Deleted.
4797         (current_class_length): New global.
4798         (bracket_count): Fixed typo in leading comment.
4799         (anonymous_count): New global.
4800         (class_instance_creation_expression:): Handle anonymous classes.
4801         (anonymous_class_creation:): New rule.
4802         (push_class_context): Rewritten.
4803         (pop_class_context): Likewise.
4804         (INNER_QUALIFIER): Macro deleted.
4805         (report_class_declaration): call `push_class_context' when
4806         entering the function. `fprintf' format modified not to use
4807         INNER_QUALIFIER.
4808         (report_class_declaration): Assign `package_name' and
4809         `current_class' to NULL separately.
4810
4811 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4812
4813         * expr.c (build_invokeinterface): Call layout_class_methods on
4814         target interface.
4815
4816 2000-07-27  Tom Tromey  <tromey@cygnus.com>
4817             Anthony Green  <green@cygnus.com>
4818             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4819
4820         * class.c (make_class_data): Create vtable for abstract classes.
4821         (get_dispatch_table): Changed to cope with abstract classes.
4822
4823 2000-07-27  Tom Tromey  <tromey@cygnus.com>
4824
4825         * parse.y (patch_method_invocation): Don't reverse the argument
4826         list when dealing with anonymous class constructors. Fixed typo in
4827         comment.
4828
4829 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4830
4831         * parse.y (build_alias_initializer_parameter_list): Reverse
4832         crafted list when building aliases for anonymous class
4833         constructors.
4834
4835 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4836
4837         * parse.y (jdep_resolve_class): Don't bother checking potential
4838         innerclass access if `decl' is NULL.
4839         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
4840         WFL.
4841
4842 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4843
4844         * parse.c: Remove (again.)
4845
4846 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4847
4848         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
4849         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
4850         outside the `if' statement, alias to innerclass removed, `decl'
4851         used to mark the class complete.
4852
4853 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4854
4855         * parse.y (simple_name:): Fixed typo in error message.
4856
4857 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4858
4859         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
4860         or its first operand can be error marks.
4861
4862 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4863
4864         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
4865         * parse.y (method_header): Likewise.
4866
4867 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4868
4869         * parse.y (process_imports): Consider that one might be trying to
4870         import an innerclass. Fixes gcj/254
4871
4872 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4873
4874         * parse.y (find_as_inner_class): Handle the case where the
4875         enclosing context of an innerclass has been loaded as bytecode.
4876
4877 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4878
4879         * parse.y (simple_name:): Reject `$' in type names.
4880         (resolve_type_during_patch): Use `type' as a second
4881         argument to resolve_no_layout. Fixes gcj/257.
4882
4883 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
4884
4885         * parse.y (find_most_specific_methods_list): Select the only
4886         non-abstract method even if max has been set.
4887         Fixes gcj/285, gcj/298.
4888
4889 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
4890
4891         * lang-specs.h: Added %(jc1) to java compiler options.
4892
4893 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
4894
4895         * .cvsignore: New file.
4896
4897 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4898
4899         * parse.y (not_accessible_p): Access granted to innerclasses
4900         (indirectly) extending the reference type. Fixes gcj/249.
4901
4902 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4903
4904         * parse.y (patch_method_invocation): Fixed comment.
4905         (maybe_use_access_method): Build this$<n>s to the context of the
4906         target method, or a type that extends it. Fixes gcj/242.
4907
4908 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
4909
4910         * parse.c: Remove.
4911
4912 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4913
4914         * parse.y (fold_constant_for_init): Avoid bullish conversion.
4915
4916 2000-07-13  Tom Tromey  <tromey@cygnus.com>
4917
4918         * lang-specs.h: Added %{I*}.
4919
4920 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
4921
4922         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
4923
4924 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
4925
4926         * parse-scan.c: Remove.
4927
4928 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4929
4930         * class.c (set_super_info): Handled protected inner classes.
4931         (common_enclosing_context_p): Bail early if arguments aren't both
4932         inner classes.
4933         (get_access_flags_from_decl): Handle private and protected inner
4934         classes.
4935         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
4936         (CLASS_PROTECTED): Likewise.
4937         (struct lang_type): New bitfield `poic'.
4938         * parse.y (jdep_resolve_class): Call check_inner_class_access on
4939         inner classes only.
4940         (check_inner_class_access): Renamed arguments, added
4941         comments. Handles protected inner classes (fixes gcj/225)
4942         (not_accessible_p): Fixed comments. Avoid handling inner classes.
4943
4944 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4945
4946         * parse.y (resolve_qualified_expression_name): Verify qualified
4947         access to `this'. Fixes gcj/239.
4948
4949 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4950
4951         * jcf-write.c (generate_classfile): Don't install ConstantValue
4952         for null pointers.
4953
4954 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4955
4956         * parse.y (resolve_qualified_expression_name): Handle inner class
4957         access. Fixes gcj/256.
4958
4959 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4960
4961         * jcf-write.c (generate_classfile): Properly install the
4962         ConstantValue attribute and the initial value constant pool index
4963         on string constants.
4964         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
4965         class files.
4966
4967 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4968
4969         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
4970         construct.
4971         * parse.y (find_as_inner_class): Fixed typo.
4972         (do_resolve_class): Explore enclosing contexts when searching for
4973         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
4974         (check_inner_class_access): Check `decl' which can be null in case
4975         of previous errors.
4976
4977 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4978
4979         * java-tree.h (java_debug_context): Declared `extern'.
4980         (safe_layout_class): Likewise.
4981         * parse.y (resolve_field_access): Field must be `static' in order
4982         to be replaced by its initial value. Added comments.
4983         (find_applicable_accessible_methods_list): Fixed typo.
4984         (find_most_specific_methods_list): Methods found in innerclasses
4985         take over methods founds in the enclosing contexts.
4986         (java_complete_tree): Loosen restrictions on the type of DECLs
4987         that can be replaced by their initialization values.
4988         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
4989
4990 2000-07-05  Tom Tromey  <tromey@cygnus.com>
4991
4992         * Make-lang.in (PARSE_DIR): New macro.
4993         (PARSE_RELDIR): Likewise.
4994         (PARSE_C): Likewise.
4995         (PARSE_SCAN_C): Likewise.
4996         ($(PARSE_C)): New target.
4997         ($(PARSE_SCAN_C)): Likewise.
4998         (SET_BISON): New macro.
4999         (BISONFLAGS): Likewise.
5000         (JAVABISONFLAGS): Likewise.
5001
5002 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
5003
5004         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
5005         argument on the first pass for CNI as well as JNI.
5006         (print_method_info): Set up method name on the first pass only.
5007
5008 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5009
5010         * parse.y (parser_qualified_classname): Removed parameter
5011         `is_static'.
5012         (create_interface): Removed first passed parameter to
5013         parser_qualified_classname.
5014         (create_class): Likewise. Don't install alias on static
5015         innerclasses. Fixes gcj/275.
5016
5017 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5018
5019         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
5020         debugable statement with empty_stmt_node. Fixes gcj/272
5021
5022 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5023
5024         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
5025         gcj/271.
5026
5027 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5028
5029         * jcf-write.c (push_long_const): Appropriately cast short negative
5030         constant to jword.
5031
5032 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5033
5034         * parse.y (verify_constructor_super): Use loop variable
5035         `m_arg_type' initialized with `mdecl_arg_type'.
5036
5037 2000-06-29  Tom Tromey  <tromey@cygnus.com>
5038
5039         * parse.y (resolve_field_access): Handle case where `type_found'
5040         is NULL.
5041
5042 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5043
5044         * expr.c (lookup_field): The same field can be found through two
5045         different interface. Don't declare it ambiguous in that case.
5046
5047 2000-06-27  Tom Tromey  <tromey@cygnus.com>
5048
5049         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
5050         follows \r, then unget it at a lower level.
5051
5052 2000-06-26  Tom Tromey  <tromey@cygnus.com>
5053
5054         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
5055         java_complete_tree.
5056
5057 2000-06-25  Tom Tromey  <tromey@cygnus.com>
5058
5059         * parse.y (for_statement): Wrap expression in a WFL if it is a
5060         constant.  For PR gcj/268.
5061
5062 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5063
5064         * parse.y (do_resolve_class): Minor optimiztion in the package
5065         list search. Removed unnecessary test and return statement.
5066         (valid_ref_assignconv_cast_p): Order of arguments to
5067         enclosing_context_p fixed.
5068
5069 2000-06-24  Tom Tromey  <tromey@cygnus.com>
5070
5071         * expr.c (lookup_field): Print error and return error_mark_node if
5072         field reference is ambiguous.
5073
5074         * parse.y (check_abstract_method_definitions): Also check if
5075         `other_method' is abstract.
5076
5077 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5078
5079         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
5080         classes.
5081         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
5082         (struct lang_type): New field `pic'.
5083         (CLASS_PRIVATE): New macro.
5084         * parse.y (check_inner_class_access): New function.
5085         (jdep_resolve_class): Call it.
5086
5087 2000-06-23  Tom Tromey  <tromey@cygnus.com>
5088
5089         * parse.y (patch_incomplete_class_ref): Initialize the returned
5090         class.  For PR gcj/260.
5091
5092 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5093
5094         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
5095
5096 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5097
5098         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5099         Java specific checks.
5100         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
5101         screened by DECL_P.
5102         * java-tree.def (CASE_EXPR): Marked 'e'.
5103         (DEFAULT_EXPR): Likewise.
5104         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
5105         screened by DECL_P.
5106         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5107         Java specific checks.
5108         (generate_bytecode_insns): Test try_block for BLOCK before using
5109         BLOCK_EXPR_BODY.
5110         * parse.y (build_wfl_wrap): Added `location' argument. Set
5111         EXPR_WFL_LINECOL accordingly.
5112         (dim_expr:): Wrap constants with WFLs.
5113         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
5114         (resolve_package): Check for `stmt' not being a BLOCK before
5115         building a debuggable statement with it.
5116         (make_qualified_primary): Added extra parameter to build_wfl_wrap
5117         invocation.
5118         (resolve_field_access): Make sure `decl' is a DECL before treating
5119         it as such.
5120         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
5121         IDENTIFIER_NODE before treating it as such.
5122         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
5123         treating it as such.
5124         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
5125         to be applied only on non array types.
5126
5127 2000-06-16  Per Bothner  <per@bothner.com>
5128
5129         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
5130         define in terms of DECL_RESULT, as that fails when --enable-checking.
5131
5132 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5133
5134         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
5135         types the same in comparison.
5136         (CHECK_OP): Add static prototype.
5137
5138 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
5139
5140         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
5141         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
5142         * parse.c: Rebuilt.
5143
5144 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5145
5146         * decl.c (create_primitive_vtable): Prototype.
5147
5148         * jcf-write.c (generate_bytecode_insns): Initialize variable
5149         `saved_context'.
5150
5151         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
5152
5153 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5154
5155         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
5156         to track searched classes, and do not search the same class more than
5157         once. Call find_applicable_accessible_methods_list on immediate
5158         superclass, instead of search_applicable_method_list on all ancestors.
5159         Fix for PR gcj/238.
5160
5161 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5162
5163         * parse.y (register_fields): Permit static fields in inner classes
5164         if they are final. Fix for PR gcj/255.
5165
5166 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5167
5168         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
5169         * parse.y (find_in_imports): Returned type changed to void,
5170         leading comment fixed.
5171         (register_package): New function.
5172         (qualify_and_find): Likewise.
5173         (package_declaration:): Use `register_package'.
5174         (single_type_import_declaration:): Removed local variable
5175         `node'. Added missing `;' for consistency.
5176         (type_import_on_demand_declaration:): Use `chainon' to link new
5177         entries.
5178         (lookup_field_wrapper): Lookup local variables defined in outer
5179         contexts first.
5180         (java_complete_class): Don't reverse the list of imported on demand.
5181         (do_resolve_class): Reorganized. Removed local variable
5182         `original_name'. Call `qualify_and_find' with the current package
5183         name, invoke `find_in_imports_on_demand' right after. Call
5184         `qualify_and_find' with the packages we've seen so far. Fixed
5185         operations numbering in comments.
5186         (java_expand_class): Don't reverse `package_list'.
5187         (find_most_specific_methods_list): New local variables `abstract'
5188         and `candidates'. Use them to pick the right method.
5189
5190 Tue Jun  6 11:39:05 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
5191
5192         * parse.y (check_modifiers_consistency): Don't subtract out
5193         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
5194
5195 2000-06-04  Philipp Thomas  <pthomas@suse.de>
5196
5197         * Makefile.in (INTLLIBS): New.
5198         (LIBS): Add above.
5199         (DEPLIBS): Ditto.
5200
5201 Fri Jun  2 16:48:55 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5202
5203         * class.c (get_dispatch_table): Build the vtable dummy entry list
5204         element with a null purpose. Fixed leading comment.
5205         (build_dtable_decl): Build an accurate dtable type when appropriate
5206         and use it.
5207
5208 2000-06-02  Richard Henderson  <rth@cygnus.com>
5209
5210         * lang.c (lang_get_alias_set): New.
5211
5212 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5213
5214         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
5215         before using it as the accessed field.
5216
5217 2000-05-31  Tom Tromey  <tromey@cygnus.com>
5218
5219         * java-tree.h (boolean_array_vtable, byte_array_vtable,
5220         char_array_vtable, short_array_vtable, int_array_vtable,
5221         long_array_vtable, float_array_vtable, double_array_vtable):
5222         Declare.
5223         * expr.c (get_primitive_array_vtable): New function.
5224         (create_primitive_vtable): New function.
5225         (java_lang_expand_expr): Enable code to statically generate
5226         arrays.
5227         * decl.c (init_decl_processing): Create primitive vtables.
5228         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
5229         short_array_vtable, int_array_vtable, long_array_vtable,
5230         float_array_vtable, double_array_vtable): Define.
5231
5232 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
5233
5234         * java/parse.y (find_applicable_accessible_methods_list):
5235         Don't add an uninitialized value to the list.
5236
5237 2000-05-25  Tom Tromey  <tromey@cygnus.com>
5238
5239         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
5240         when trying to see if field's class should be initialized.  Always
5241         initialize field's declaring class, not qualified class.
5242         For PR gcj/162.
5243
5244         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
5245         `wfl_operator', to maybe_build_primttype_type_ref.
5246         Fixes PR gcj/235.
5247
5248 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
5249
5250        * parse.y (patch_method_invocation): Don't try to lookup methods
5251        in primitive types.
5252
5253 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5254
5255         * parse.y (resolve_field_access): Call the appropriate <clinit>
5256         before accessing the length of a static array. Craft a decl for
5257         the field while its time. Fixes PR gcj/129.
5258
5259 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5260
5261         * parse.y (resolve_package): Correctly set `*next' (was off by
5262         one.)
5263         (resolve_qualified_expression_name): Fixed comment.
5264
5265 Thu Apr 27 17:47:34 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5266
5267         * jcf-parse.c (jcf_parse_source): Reset current_class and
5268         current_function_decl to NULL before parsing a new file.
5269
5270 Thu Apr 27 17:25:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5271
5272         * parse.y (block_end:): If the collected block doesn't feature a
5273         statement, insert an empty statement.
5274
5275 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5276
5277         * parse.y (maybe_yank_clinit): New function.
5278         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
5279         end of the list of methods belonging to a class.
5280         (java_complete_expand_method): Check whether <clinit> is really
5281         necessary and expand it accordingly.
5282
5283 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5284
5285         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
5286         processed by the method's switch statement.
5287
5288 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5289
5290         * java-tree.h: Added init state enum.
5291         * decl.c (emit_init_test_initialization): Initialize class
5292         initialization check variable by looking at class' state.
5293
5294 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5295
5296         * java-tree.h (build_instanceof): Declare.
5297         (build_get_class): Declare.
5298         * parse.y (patch_binop): Use build_instanceof.
5299         * expr.c (build_instanceof): New function.  If class is final,
5300         don't make a function call.
5301         (expand_java_INSTANCEOF): Use it.
5302         (build_get_class): New function.
5303
5304 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5305
5306         * jcf-write.c (generate_classfile): Scan the source_file for
5307         slashes with the right pointer variable.
5308
5309 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5310
5311         * lang.c (lang_decode_option): Update -Wunused flags by calling
5312         set_Wunused.
5313         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
5314
5315 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
5316
5317         * check_init.c (check_init): Constify local char *.
5318         * class.c (push_class): Constify local char *.
5319         * java_tree.h: Update prototypes.
5320         * jcf-io.c (open_class): Constify filename parameter and
5321         return value.
5322         (find_class): Remove redundant string copy.  Cast return from
5323         open_class.
5324         * jcf-parse.c (read_class, parse_class_file, yyparse):
5325         Constify local char *.
5326         * jcf-write.c (generate_bytecode_insns, generate_classfile):
5327         Constify local char *.
5328         * jcf.h (JCF): Constify filename and classname.
5329         (JCF_FINISH): Cast args to FREE to char * when appropriate.
5330         * lang.c (init_parse): Constify parameter and return value.
5331         * lex.c (java_get_line_col): Constify filename parameter.
5332         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
5333         * parse.y (java_parser_context_suspend,
5334         issue_warning_error_from_context, safe_layout_class): Constify
5335         local char *.
5336         * parse.c: Regenerate.
5337
5338 2000-05-08  Tom Tromey  <tromey@cygnus.com>
5339
5340         * expr.c (build_jni_stub): Cache the result of
5341         _Jv_LookupJNIMethod.
5342
5343 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5344
5345         * decl.c (predef_filenames_size): Now 7.
5346         (predef_filenames): New seventh entry.
5347
5348 2000-05-04  Tom Tromey  <tromey@cygnus.com>
5349
5350         * boehm.c (mark_reference_fields): Don't mark RawData fields.
5351         Keep track of when we've seen a reference field after a
5352         non-reference field.
5353         (get_boehm_type_descriptor): Handle case where we see
5354         non-reference fields but no trailing reference field.
5355         * decl.c (rawdata_ptr_type_node): Define.
5356         (init_decl_processing): Initialize rawdata_ptr_type_node.
5357         * java-tree.h (rawdata_ptr_type_node): Declare.
5358
5359 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5360
5361         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
5362         specifiers in calls to fprintf.
5363
5364 2000-05-03  Andrew Haley  <aph@cygnus.com>
5365
5366         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
5367
5368         * javaop.h (WORD_TO_INT): New function.
5369         (IMMEDIATE_s4): Use WORD_TO_INT.
5370         * jcf.h (JPOOL_INT): Ditto.
5371
5372         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
5373         separator.
5374
5375 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5376
5377         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
5378         on native function.
5379         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
5380         JNI methods.
5381         * expr.c (build_jni_stub): New function.
5382         * lang-specs.h: -fjni and -femit-class-file are incompatible.
5383         * parse.c: Rebuilt.
5384         * parse.y (java_complete_expand_methods): Expand a native method
5385         and call build_jni_stub if -fjni given.
5386         * lang-options.h: Document -fjni.
5387         * lang.c (flag_jni): New global.
5388         (lang_f_options): Added `jni' entry.
5389         * java-tree.h (soft_lookupjnimethod_node,
5390         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
5391         Declare.
5392         (flag_jni): Declare.
5393         (build_jni_stub): Declare.
5394         (struct lang_decl): Added `native' flag.
5395         (METHOD_NATIVE): Redefined to use `native' field of lang specific
5396         structure.
5397         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
5398         soft_jnipopsystemframe_node): New globals.
5399         (init_decl_processing): Set them.  _Jv_InitClass only takes one
5400         argument.
5401
5402         * java-tree.def: Put into `C' mode.
5403
5404 2000-04-27  Tom Tromey  <tromey@cygnus.com>
5405
5406         Fix for PR gcj/2:
5407         * expr.c (expand_invoke): Generate check to see if object pointer
5408         is null in nonvirtual invocation case.
5409         * java-tree.h (soft_nullpointer_node): Declare.
5410         * decl.c (soft_nullpointer_node): New global.
5411         (init_decl_processing): Initialize soft_nullpointer_node.
5412         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5413         or `private' methods.
5414         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5415
5416 Wed Apr 26 14:29:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5417
5418         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
5419         from <clinit>
5420
5421 2000-04-26  Tom Tromey  <tromey@cygnus.com>
5422
5423         * zextract.c (find_zip_file_start): New function.
5424         (read_zip_archive): Use it.
5425
5426 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5427
5428         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
5429
5430 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5431
5432         * class.c (common_enclosing_context_p): New function.
5433         * java-tree.h (common_enclosing_context_p): Added prototype.
5434         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
5435         classes sharing an outer context with the current instance.
5436         * parse.y (build_access_to_thisn): Fixed leading comment.
5437         (verify_constructor_super): New local `supper_inner'. Skip
5438         enclosing context argument in the case of inner class constructors.
5439         (patch_method_invocation): Insert proper context as second
5440         parameter to pure inner class constructor super invocations.
5441
5442 Mon Apr 24 14:59:36 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5443
5444         * parse.y (end_class_declaration): Reset the interface number
5445         counter.
5446
5447 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5448
5449         * parse.y (source_start_java_method): Deleted unnecessary code.
5450         (patch_method_invocation): Fixed comment.
5451
5452 2000-04-24  Robert Lipe <robertlipe@usa.net>
5453
5454         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
5455
5456 2000-04-23  Tom Tromey  <tromey@cygnus.com>
5457
5458         * boehm.c (mark_reference_fields): Use int_byte_position.
5459
5460 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5461
5462         * boehm.c (mark_reference_fields): Only call byte_position on
5463         non-static fields.
5464
5465 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5466
5467         * boehm.c (mark_reference_fields): Added `last_view_index'
5468         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
5469
5470 Thu Apr 20 17:41:28 2000  Mo DeJong  <mdejong@cygnus.com>
5471
5472         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
5473         * parse.y (check_class_interface_creation): Fixed comments. Select
5474         permitted modifiers for (inner) interfaces. Changed error message
5475         to report rejected modifiers used with local classes.
5476
5477 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5478
5479         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
5480         of directly inherited type considered in scope.
5481         * parse.y (do_resolve_class): Search inherited classes for inner
5482         classes.
5483
5484 2000-04-20  Tom Tromey  <tromey@cygnus.com>
5485
5486         * parse.y (not_accessible_p): Use member's class, not current
5487         class, when doing inheritance check for protected reference.
5488         Fixes PR gcj/124.
5489
5490 Thu Apr 20 18:20:58 2000  Jason Schroeder  <shrode@subnature.com>
5491
5492         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
5493
5494 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5495
5496         * parse.y (lookup_field_wrapper): Search for final local aliases.
5497         (resolve_expression_name): Let lookup_field_wrapper search for
5498         final local aliases. Force the value of `name' if one is found.
5499         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
5500         an expression name. Fixed comments.
5501
5502 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5503
5504         * parse.y (yyerror): `msg' can be null, don't use it in that case.
5505
5506 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5507
5508         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
5509
5510 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5511
5512         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
5513
5514 2000-04-18  Tom Tromey  <tromey@cygnus.com>
5515
5516         PR gcj/211:
5517         * gjavah.c (utf8_cmp): Changed return value.
5518         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
5519         result.
5520         (cxx_keywords): New global.
5521         (get_field_name): Handle new result of cxx_keyword_subst.
5522         (print_method_info): Likewise.
5523
5524 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
5525
5526         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
5527         with a newline, for CNI.
5528         (print_stub_or_jni): Print a space or newline before method name for
5529         CNI as well as JNI.
5530         (print_cxx_classname): Don't write leading "::" in CNI stub method.
5531         (process_file): Include gcj/cni.h if generating CNI stubs.
5532
5533 2000-04-16  Tom Tromey  <tromey@cygnus.com>
5534
5535         * gjavah.c (decompile_method): Use print_field_name.
5536         Fixes PR gcj/205.
5537
5538 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5539
5540         * parse.y (java_expand_classes): Reverse the package list once.
5541         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
5542         reduction.
5543         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
5544         the `==' and `!=' operators.
5545
5546 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5547
5548         * jcf-write.c (generate_bytecode_insns): At invokation time,
5549         always relate an interface method to the type of its selector.
5550
5551 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5552
5553         Fix for PR gcj/2:
5554         * expr.c (expand_invoke): Generate check to see if object pointer
5555         is null in nonvirtual invocation case.
5556         * java-tree.h (soft_nullpointer_node): Declare.
5557         * decl.c (soft_nullpointer_node): New global.
5558         (init_decl_processing): Initialize soft_nullpointer_node.
5559         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5560         or `private' methods.
5561         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5562
5563 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5564
5565         Fix for PR gcj/140:
5566         * parse.y (check_final_assignment): Recognize assignments to the
5567         `length' field of an array when generating class files.
5568
5569 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5570
5571         * class.c (decl_hash): Prototype removed.
5572         (decl_compare): Likewise.
5573
5574 2000-04-05  Tom Tromey  <tromey@cygnus.com>
5575
5576         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
5577         * parse.y (check_modifiers_consistency): Check for final/volatile
5578         clash.  Fixes PR gcj/164.
5579
5580 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5581
5582         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
5583         made global.
5584         (java_hash_compare_tree_node): Renamed from `decl_compare, made
5585         global.
5586         (add_method_1): Use `java_hash_hash_tree_node' and
5587         `java_hash_compare_tree_node'.
5588         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
5589         (java_hash_compare_tree_node): Likewise.
5590         * parse.y (find_applicable_accessible_methods_list): Create,
5591         delete and use a hash table to remember already searched interfaces.
5592
5593 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
5594
5595         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
5596         with latest entry.
5597
5598 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5599
5600         * boehm.c (mark_reference_fields, set_bit): Prototype.
5601         (set_bit): Un-ANSI-fy definition.
5602
5603         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
5604         Prototype.
5605
5606         * decl.c (emit_init_test_initialization): Likewise.
5607
5608         * gjavah.c (jni_print_char): Likewise.
5609
5610         * parse.y (create_new_parser_context): Likewise.
5611
5612 Thu Mar 30 15:26:56 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5613
5614         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
5615         patch missing hunk. Fixed indentation.
5616
5617 2000-03-30  Tom Tromey  <tromey@cygnus.com>
5618
5619         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
5620         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
5621
5622 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5623
5624         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5625         when negative *before* using it as an array index.
5626         * ChangeLog: Fixed typo.
5627
5628 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5629
5630         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5631         to 0 when it reaches -1.
5632
5633 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5634
5635         * jcf-parse.c (get_constant): Properly cast `num' during the
5636         invocation of `add_double'.
5637         * jcf-write.c (push_long_const): Properly cast `lo' before
5638         comparing it to short bounds.
5639         * parse-scan.y (interface_declaration:): Rule re-arrange so that
5640         `interface_body:' is reduced after the current interface is
5641         pushed.
5642
5643 2000-03-26  Tom Tromey  <tromey@cygnus.com>
5644
5645         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
5646         Java-specific `-f' option.
5647
5648 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5649
5650         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
5651         Adjust order of making types.
5652         Make bitsize_*_node values.
5653
5654 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5655
5656         * class.c (make_field_value): Use byte_position.
5657         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
5658         (java_array_data_offset): Likewise.
5659         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
5660         bzero call.
5661
5662 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5663
5664         * parse.y (check_abstract_method_definitions): New local
5665         `end_type_reached'. Make sure we also consider `end_type'.
5666         (java_check_abstract_method_definitions): Make sure we eventually
5667         consider `java.lang.Object'.
5668         (maybe_use_access_method): Don't use access method if not in the
5669         context of a pure inner class or if the method's context is right.
5670         (find_applicable_accessible_methods_list): New static flag
5671         `object_done'. Don't search abstract classes as interfaces. Fixed
5672         indentation. Fixed the `java.lang.Object' only search. Search
5673         class interface(s) first, then fully search enclosing contexts.
5674         (find_most_specific_methods_list): Pick the closest candidate when
5675         they're all abstract.
5676
5677 Mon Mar 20 08:58:51 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5678
5679         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
5680         properly initialize `finished_label'. Don't emit gotos for empty
5681         try statements.
5682
5683 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5684
5685         * except.c (emit_handlers): Clear catch_clauses_last.
5686
5687 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5688
5689         * parse.y (check_method_types_complete): New function.
5690         (create_class): Reset anonymous class counter only when seeing an
5691         non inner classe.
5692         (java_complete_class): JDEP_METHOD: Don't recompute signature
5693         if incomplete.
5694
5695 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5696
5697         * class.c (build_static_ref): Fixed indentation in comment.
5698         * java-tree.def (TRY_EXPR): Fixed typo in name.
5699         (CLASS_LITERAL): Likewise.
5700         * java-tree.h: (TYPE_DOT_CLASS): New macro.
5701         (struct lang_type): New field `dot_class'.
5702         * jcf-write.c (generate_bytecode_insns): Fixed error message.
5703         (generate_classfile): Method `class$' is synthetic.
5704         * parse.y (build_do_class_method): New function.
5705         (build_dot_class_method_invocation): Likewise.
5706         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
5707         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
5708         (qualify_ambiguous_name): Likewise.
5709         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
5710         (build_try_statement): Fixed leading comment.
5711
5712 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5713
5714         * class.c (make_field_value): Properly handle sizes.
5715         (get_dispatch_vector): Use tree_low_cst and host_integerp.
5716         (layout_class_method): Count using trees.
5717         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
5718         * expr.c (java_array_data_offset): Use int_bit_position.
5719         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
5720         (build_invokevirtual): Use tree_low_cst and do computations with trees.
5721
5722 2000-03-16  Tom Tromey  <tromey@cygnus.com>
5723
5724         * lang.c (flag_hash_synchronization): New global.
5725         (lang_f_options): Added `hash-synchronization'.
5726         * lang-options.h: Mention -fhash-synchronization.
5727         * java-tree.h (flag_hash_synchronization): Declare.
5728         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
5729         hash table synchronization is disabled.
5730         * decl.c (init_decl_processing): Only push `sync_info' value when
5731         hash table synchronization is disabled.
5732         * class.c (make_class_data): Only push `sync_info' field when hash
5733         table synchronization is disabled.  Removed dead code.
5734
5735 2000-03-16  Tom Tromey  <tromey@cygnus.com>
5736
5737         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
5738
5739 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5740
5741         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
5742         classes.
5743         * parse.y (patch_method_invocation): Handle anonymous classes
5744         creation in static context.
5745
5746 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5747
5748         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
5749         * parse.y (resolve_qualified_expression_name): Use it.
5750         (patch_method_invocation): Likewise.
5751
5752 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5753
5754         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
5755         depending on the type of dependency which dictates what the
5756         current class is.
5757         (unresolved_type_p): Resolved types limited to the current class.
5758
5759 2000-03-15  Tom Tromey  <tromey@cygnus.com>
5760
5761         * decl.c (init_decl_processing): Set type of `sync_info' to be
5762         pointer to Object.
5763
5764         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
5765         Correctly compute bit number for current slot.  Zero `high' and
5766         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
5767         mark_reference_fields.
5768         (mark_reference_fields): New function.
5769
5770 Tue Mar 14 17:15:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5771
5772         * parse.y (register_incomplete_type): Fixed initialization of
5773         JDEP_ENCLOSING.
5774
5775 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5776
5777         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
5778         static globals.
5779         (push_class_context, pop_class_context): New function.
5780         (class_body:): Call pop_class_context.
5781         (interface_body:): Likewise.
5782         (INNER_QUALIFIER): New macro.
5783         (report_class_declaration): Changed output format and use
5784         INNER_QUALIFIER. Call push_class_context.
5785
5786 2000-02-14  Andrew Haley  <aph@cygnus.com>
5787
5788         * check-init.c (check_init): Add new cases for unary and binary
5789         tree nodes.
5790
5791 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5792
5793         * parse.y (resolve_package): Set `next' once a type name has been
5794         progressively discovered.
5795         (resolve_qualified_expression_name): Propagate resolution only if
5796         there are remaining qualifiers. Take into account `q' might have
5797         been cleared after re-qualification.
5798         * parse.y (patch_method_invocation): New local `resolved'.
5799         Section dealing with qualified expression rewritten to use
5800         resolve_field_access.
5801
5802 Mon Mar 13 12:21:13 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5803
5804         * parse.h (PUSH_CPC): Fixed indentation.
5805         (DEBUG_CPC): New macro.
5806         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
5807         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
5808         * parse.y (class_body_declaration:): Use
5809         SET_CPC_INSTANCE_INITIALIZER_STMT.
5810         (method_declaration:): Check for null current_function_decl.
5811         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
5812         (java_parser_context_pop_initialized_field): Better handling of
5813         empty lists.
5814         (maybe_make_nested_class_name): Mark nested class name as
5815         qualified when necessary.
5816         (end_class_declaration): Don't call java_parse_context_resume when
5817         one or more error occurred.
5818         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
5819         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
5820         SET_CPC_INITIALIZER_STMT.
5821         (method_header): Check for inner classes declaring static methods.
5822         (resolve_qualified_expression_name): Handle situation where `this'
5823         is implied.
5824
5825 Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
5826
5827         * typeck.c (build_prim_array_type): Correctly set the high word too.
5828
5829 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5830
5831         * parse.y (java_complete_expand_methods): Leave <clinit> out of
5832         ordinary methods.
5833         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
5834         list of methods for interfaces.
5835
5836 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5837
5838         * parse.y (qualify_ambiguous_name): Properly handle expressions
5839         using `null'.
5840
5841 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5842
5843         * parse.y (check_final_assignment): Extended to process
5844         COMPOUND_EXPR.
5845         (patch_assignment): Have check_final_assignment called only once.
5846
5847 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5848
5849         * java-tree.h (IS_INIT_CHECKED): New flag.
5850         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
5851         * parse.y (patch_string): Call force_evaluation_order on the
5852         completed string concatenation tree.
5853         * expr.c (force_evaluation_order): Call force_evaluation_order on
5854         function's arguments too.
5855
5856 Mon Mar  6 18:07:07 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5857
5858         * decl.c (emit_init_test_initialization): Mark KEY as unused.
5859         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5860         (build_anewarray): Likewise.
5861         * parse.y (patch_newarray): Likewise.
5862         * parse.c: Regenerated.
5863
5864 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
5865
5866         * decl.c (init_decl_processing): Added new class fields `depth',
5867         `ancestors', and `idt' to class_type_node. Use
5868         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
5869         * class.c (make_class_data): Push initial values for new fields.
5870         * java-tree.h: Updated prototype for `build_invokeinterface'.
5871         * expr.c (build_invokeinterface): Changed parameters to accept
5872         `method' tree. Calculate index of `method' in its declaring
5873         interface. Build call to _Jv_LookupInterfaceMethodIdx.
5874         (expand_invoke): Call `build_invokeinterface' with new parameters.
5875         * parse.y (patch_invoke): Call `build_invokeinterface' with new
5876         parameters.
5877
5878 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
5879
5880         * typeck.c (lookup_do): Search superinterfaces first
5881         when looking up an interface method. From Godmar Back
5882         <gback@cs.utah.edu>
5883
5884 2000-03-06  Tom Tromey  <tromey@cygnus.com>
5885
5886         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
5887
5888 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5889
5890         * java-tree.h (lookup_argument_method2): Declared.
5891         (safe_layout_class): Prototype moved from parse.h.
5892         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
5893         * parse.y (java_check_regular_methods): Local `super_class' gone.
5894         Call lookup_argument_method2 instead of lookup_argument_method.
5895         Perform modifier match for methods found declared in implemented
5896         interfaces. Fixed indentation problem. Overriding/hiding error
5897         report to take place only for methods found in classes.
5898         * typeck.c (lookup_argument_method): Changed leading
5899         comment. Re-written by calling lookup_do.
5900         (lookup_argument_method2): New function.
5901         (lookup_java_method): Re-written by calling lookup_do.
5902         (lookup_do): New function.
5903
5904 Thu Mar  2 15:18:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5905
5906         * check-init.c (check_init): Removed dead code. Handle (blank)
5907         final variables.
5908         * parse.y (declare_local_variables): New local `final_p', set it
5909         and use it to initialize LOCAL_FINAL.
5910         (check_final_assignment): Only check FIELD_DECLs.
5911
5912 2000-02-17  Tom Tromey  <tromey@cygnus.com>
5913
5914         * Makefile.in (JAVA_OBJS): Added boehm.o.
5915         (boehm.o): New target.
5916         * Make-lang.in (JAVA_SRCS): Added boehm.c.
5917         * java-tree.h (flag_use_boehm_gc): Declare.
5918         (get_boehm_type_descriptor): Declare.
5919         * lang.c (lang_f_options): Added `use-boehm-gc'.
5920         (flag_use_boehm_gc): New global.
5921         * lang-options.h: Added -fuse-boehm-gc.
5922         * boehm.c: New file.
5923         * class.c (get_dispatch_table): If class uses a Boehm type
5924         descriptor, put it in the vtable.
5925         (make_class_data): Removed dead code.
5926
5927 2000-03-03  Per Bothner  <per@bothner.com>
5928
5929         * decl.c (init_decl_processing):  Initialize sizetype properly.
5930
5931 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5932
5933         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
5934         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
5935         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5936         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
5937         (jcf_parse): New local `current'. Load innerclasses seen in outer
5938         context being processed.
5939         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5940         * jcf-write.c (append_innerclasses_attribute): New function.
5941         (append_innerclasses_attribute_entry): Likewise.
5942         (get_access_flags): Handle static classes. Set anonymous and local
5943         classes to be private.
5944         (generate_classfile): Attribute count adjusted. Call
5945         append_innerclasses_attribute.
5946         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
5947         PURE_INNER_CLASS_TYPE_P.
5948         * parse.y (parser_qualified_classname): New parameter `is_static',
5949         produce non qualified name accordingly.
5950         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
5951         (create_interface): Added argument to parser_qualified_classname.
5952         (create_class): Added argument to parser_qualified_classname. Setup
5953         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
5954         (add_inner_class_fields): Fixed indentation.
5955         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
5956         (method_declarator): Fixed typo in comment.
5957         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
5958         (build_current_thisn): Likewise.
5959         (patch_method_invocation): Likewise.
5960
5961 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5962
5963         * decl.c (current_function_decl): Move to toplev.c.
5964
5965 Mon Feb 28 08:20:42 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5966
5967         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
5968         (DECL_BIT_INDEX): Use underlying representation.
5969         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
5970
5971 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5972
5973         * expr.c (build_java_ret): Pass proper type to size_binop.
5974
5975 2000-02-25  Anthony Green  <green@cygnus.com>
5976
5977         * expr.c (build_class_init): Mark the decl to be ignored by
5978         check_init.
5979         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
5980         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
5981         * class.c (init_test_hash_newfunc): New function.
5982         (decl_hash): New function.
5983         (decl_compare): New function.
5984         * decl.c (emit_init_test_initialization): New function.
5985         (complete_start_java_method): Traverse the init test hashtable,
5986         calling emit_init_test_initialization.
5987         (always_initialize_class_p): Define.
5988         * expr.c (build_class_init): Use initialization tests when
5989         emitting class initialization code.
5990         (always_initialize_class_p): Declare.
5991         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
5992         1.
5993         * java-tree.h: Include hash.h.
5994         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
5995         (struct lang_decl): Add init_test_table field.
5996         (init_test_hash_entry): Define.
5997
5998 Fri Feb 25 18:41:31 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5999
6000         * gjavah.c (main): Avoid using `argi' to report unimplemented
6001         options.
6002
6003 Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6004
6005         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
6006         initialize locals to avoid warnings. Local `exception_type' moved
6007         into if statement.
6008
6009 Fri Feb 25 18:00:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6010
6011         * parse.y (resolve_expression_name): Use `orig' as a second
6012         argument to resolve_field_access.
6013         (resolve_field_access): Removed unnecessary code when dealing with
6014         static fields.
6015
6016 Wed Feb 23 17:41:50 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6017
6018         * class.c (push_super_field): Don't push the field twice.
6019         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
6020         * parse.h (java_reorder_fields): Prototyped.
6021         * parse.y (java_reorder_fields): New function.
6022         (java_layout_class): Simplified not to worry about re-ordering.
6023
6024 2000-02-23  Tom Tromey  <tromey@cygnus.com>
6025
6026         * gjavah.c (print_name): In JNI case, correctly quote string.
6027         (print_method_info): Don't handle overrides in JNI mode.
6028
6029 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6030
6031         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
6032         value type set to `boolean_type_node'.
6033
6034 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6035
6036         * jcf-dump.c (main): Test for correct condition after
6037         output file creation.
6038
6039 2000-02-19  Anthony Green  <green@cygnus.com>
6040
6041         * jcf-depend.c (add_entry): Fix test for first list entry.
6042
6043 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6044
6045         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
6046         * constants.c (build_constants_constructor): Likewise.
6047
6048 2000-02-19  Anthony Green  <green@cygnus.com>
6049
6050         * jcf-depend.c (add_entry): Add entries to the end of the list.
6051
6052 Wed Nov 03 02:16:00 PST 1999  Pekka Nikander  <pekka.nikander@hut.fi>
6053
6054         * decl.c (INT_TYPE_SIZE): Define if necessary.
6055         (expand_java_return): Handle the case of a native integer smaller
6056         than a JVM integer.
6057
6058 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6059
6060         * gjavah.c (help): Use GCCBUGURL.
6061         * jv-scan.c (help): Likewise.
6062         * jcf-dump.c (help): Likewise.
6063
6064 Thu Feb 17 14:30:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6065
6066         * jcf-write.c (generate_bytecode_insns): Don't generate empty
6067         `finally' clauses.
6068
6069 Thu Feb 17 13:20:58 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6070
6071         * jcf-parse.c (load_class): Call `fatal' if no file containing
6072         the target class are found.
6073
6074 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
6075
6076         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
6077         lex.c, lex.h, and PARSE_H to...
6078         (parse.o, parse-scan.o): ...here, respectively.
6079
6080         * lex.c: Split out code that may trigger SIGFPE from yylex()
6081         to its own function.
6082         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
6083
6084 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6085
6086         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
6087
6088 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6089
6090         * parse.y (outer_field_access_p): Stop in time when outer contexts
6091         are exhausted.
6092         (resolve_qualified_expression_name): Properly qualify *everything*
6093         after a package.type to be resoled as expression names.
6094         (find_applicable_accessible_methods_list): Save/restore `class' to
6095         isolate it from a possible outer context search.
6096
6097 2000-02-15  Tom Tromey  <tromey@cygnus.com>
6098
6099         * gjavah.c (jni_print_char): New function.
6100         (print_full_cxx_name): Use it.
6101         (decode_signature_piece): Likewise.
6102         (print_cxx_classname): Likewise.
6103
6104 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6105
6106         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
6107         version.o.
6108         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
6109
6110         * gjavah.c: Include version.h.
6111
6112         * jcf-dump.c: Likewise.
6113
6114         * jv-scan.c: Likewise.
6115
6116 Sat Feb 12 04:34:04 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6117
6118         * parse.y (outer_field_access_fix): First parameter now a tree
6119         node. Check for assignement to final. First argument to
6120         build_outer_field_access_fix modified to accommodate prototype.
6121         (build_outer_field_access): Don't check for assignment to final
6122         here.
6123         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
6124         possibly returned by outer_field_access_fix. Changed
6125         outer_field_access_fix's first argument.
6126         (check_final_assignment): $finit$'s context is OK.
6127         (patch_unaryop): Use node instead of its line/column value when
6128         calling outer_field_access_fix.
6129
6130 Fri Feb 11 17:38:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6131
6132         * parse.y (interface_declaration:): No longer tagged
6133         <node>. Re-installed default action.
6134         (class_member_declaration:): Handle inner interfaces.
6135         (interface_member_declaration): Handle inner interfaces and
6136         classes.
6137         (create_interface): Push error if one seen. Suspend parsing
6138         context when processing an inner interface.
6139         (register_fields): Inner class static field limitations not to
6140         apply to inner interfaces.
6141
6142 Thu Feb 10 22:07:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6143
6144         * jcf-parse.c (load_class): Update `java_error_count' when a
6145         class' file can't be found.
6146         (parse.y): Avoid (byte)code generation when errors seen.
6147
6148 Thu Feb 10 20:10:43 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6149
6150         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
6151         decodes a valid node.
6152         (patch_binop): Handle TRUNC_DIV_EXPR.
6153
6154 Thu Feb 10 16:04:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6155
6156         * parse.y (resolve_package): New local `acc'. Try to progressively
6157         build and guess a package and type name.
6158
6159 Thu Feb 10 12:52:09 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6160
6161         * parse.y (find_applicable_accessible_methods_list): Load and
6162         layout the search class if necessary.
6163         (java_complete_tree): Keep to original type of the folded initial
6164         value.
6165
6166 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6167
6168         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
6169         Generate error message if circularity is detected. New static
6170         local `list'.
6171         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
6172         * jcf-write.c (generate_bytecode_insns): Very simply handle
6173         SAVE_EXPR.
6174         * parse.y (java_check_circular_reference): Use
6175         `cyclic_inheritance_report' during report, if necessary.
6176         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
6177         walking NEW_ARRAY_INIT twice.
6178
6179 2000-02-09  Tom Tromey  <tromey@cygnus.com>
6180
6181         * parse.y (check_class_interface_creation): Allow inner classes to
6182         be `private' or `protected', check modifiers' consistency. Prevent
6183         block local classes from bearing any modifiers.
6184
6185 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6186
6187         * except.c (check_start_handlers): Re-add prototype lost in last
6188         patch.
6189         (maybe_start_try): Remove excess argument to `check_start_handlers'.
6190
6191 2000-02-09  Andrew Haley  <aph@cygnus.com>
6192
6193         * decl.c (clear_binding_level): Remove excess initializer.
6194         (maybe_poplevels): Remove unused variable.
6195         (force_poplevels): Ditto.
6196         (struct binding_level): Add comment.
6197
6198 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6199
6200         * jcf-write.c (generate_classfile): Don't consider
6201         pre-initialization with reference value (use <clinit> instead.)
6202         * parse.y (java_fix_constructors): No generated constructor for
6203         interfaces.
6204         (build_outer_field_access): Removed debug message.
6205         (outer_field_expanded_access_p): Adapted to bytecode generation.
6206         (build_outer_field_access_method): Use fix_method_argument_names.
6207         (build_outer_method_access_method): Fixed indentation. Added
6208         comment. Handle access method generation for static and also void
6209         methods.
6210         (build_access_to_thisn): Inserted debug message.
6211         (maybe_build_thisn_access_method): Use fix_method_argument_names.
6212         (resolve_qualified_expression_name): Fixed comment.
6213         (not_accessible_p): Adapted to bytecode generation. Added comment.
6214         (patch_method_invocation): Added comment.
6215         (maybe_use_access_method): Fixed leading comment. Handle static
6216         methods.
6217         (java_complete_lhs): Don't shortcut handling of initialized upon
6218         declaration String type static fields when generating bytecode.
6219         (patch_unaryop): Handle outer field access when generating
6220         bytecode.
6221
6222 Thu Feb  3 20:23:19 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6223
6224         * java-tree.h (FIELD_THISN): New macro.
6225         * jcf-write.c (append_synthetic_attribute): New function.
6226         (generate_classfile): Set "Synthetic" attribute on this$<n>,
6227         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
6228         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
6229         this$<n> fields.
6230         (build_outer_field_access): Turned on access functions usage and
6231         generation when compiling to bytecode.
6232         (maybe_use_access_method): Likewise.
6233
6234 2000-01-25  Andrew Haley  <aph@cygnus.com>
6235
6236         * java-except.h (struct eh_range): Add `expanded' field.
6237         (maybe_start_try): Add end_pc arg.
6238         (maybe_end_try): Ditto.
6239         * java-tree.h (force_poplevels): new function.
6240         * expr.c (expand_byte_code): Don't call maybe_start_try or
6241         maybe_end_try.
6242         * except.c (add_handler): Reset expanded.
6243         (expand_start_java_handler): Set expanded.
6244         (check_start_handlers): Don't expand a start handler that's
6245         already been expanded.
6246         (maybe_start_try): Add end_pc arg.  Only expand a handler which
6247         ends after end_pc.
6248         (expand_end_java_handler): call force_poplevels.
6249         (force_poplevels): new function.
6250         * decl.c (binding_level): Add start_pc of binding level.
6251         (maybe_pushlevels): Call maybe_start_try when pushing binding
6252         levels.
6253         (maybe_poplevels): Call maybe_end_try when popping binding levels.
6254         (LARGEST_PC): Define.
6255         (clear_binding_level): Use LARGEST_PC.
6256
6257         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
6258         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
6259         (binding_depth, is_class_level, current_pc): new variables.
6260         (struct binding_level): ditto.
6261         (indent): new function.
6262         (push_jvm_slot): add debugging info.
6263         (maybe_pushlevels): ditto.
6264         (maybe_poplevels): ditto.
6265         (pushlevel): ditto.
6266         (poplevel): ditto.
6267         (start_java_method): ditto.
6268         (give_name_to_locals): comment only.
6269         * except.c (binding_depth, is_class_level, current_pc):
6270         new variables.
6271         (expand_start_java_handler): add debugging info.
6272         (expand_end_java_handler): ditto.
6273
6274 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6275
6276         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
6277         (print_name_for_stub_or_jni, process_file): Constify a char*.
6278
6279 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6280
6281         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
6282
6283 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6284
6285         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
6286         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
6287         defined to be 1.
6288
6289 Wed Feb  2 18:43:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6290
6291         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
6292         * java-tree.h (TYPE_II_STMT_LIST): New macro.
6293         (struct lang_type): New field `ii_block'.
6294         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
6295         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
6296         * parse.h (struct parser_ctxt): New field `instance_initializers'.
6297         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
6298         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
6299         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
6300         macros.
6301         * parse.y (add_instance_initializer): New function.
6302         (in_instance_initializer): New static global.
6303         (class_body_declaration:): Link instance initializer block.
6304         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
6305         (array_creation_expression:): Remove unused local.
6306         (java_parser_context_push_initialized_field): Fixed leading
6307         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
6308         CPC_INSTANCE_INITIALIZER_LIST.
6309         (java_parser_context_pop_initialized_field): Likewise.
6310         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
6311         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
6312         CPC_INITIALIZER_STMT.
6313         (fix_constructors): New local `class_type'. Use it. Call
6314         add_instance_initializer.
6315         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
6316         (patch_return): Forbid return in instance initializers.
6317         (patch_throw_statement): Enforce exception handling in the context
6318         of instance initializers.
6319
6320 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6321
6322         * Make-lang.in (java.mostlyclean): Remove executables in
6323         `mostlyclean'.
6324
6325 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6326
6327         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
6328         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
6329         (java_float_finite): Convert to use union Word from javaop.h.
6330         (java_double_finite): Convert to use union DWord from javaop.h.
6331
6332 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6333
6334         * gjavah.c (options): Added `jni' entry.
6335         (help): Document -jni.
6336         (flag_jni): New global.
6337         (process_file): Handle JNI output.  Don't print text from
6338         -prepend, -add, etc, when generating stubs.  Only remove `.class'
6339         suffix if it actually exists.
6340         (main): Create a `.c' file when run with `--jni --stubs'.  Create
6341         correct output file name with `--jni'.
6342         (print_include): Mangle header name differently in JNI case.
6343         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
6344         method list.
6345         (print_method_info): Handle JNI case.  Put signature info into
6346         method name.  Handle case when STREAM is NULL.
6347         (print_name_for_stub_or_jni): New function.
6348         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
6349         (print_cxx_classname): Handle JNI.
6350         (print_full_cxx_name): Likewise.
6351         (decode_signature_piece): Likewise.
6352         (overloaded_jni_method_exists_p): New function.
6353         (struct method_name): Added `signature' and `sig_length' fields.
6354         (HANDLE_END_FIELD): Do nothing in JNI mode.
6355
6356 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6357
6358         * jv-scan.c: Include version.c, <getopt.h>.
6359         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
6360         (options): New array.
6361         (usage): New function.
6362         (version): New function.
6363         (main): Use getopt_long to parse command line.
6364         * jcf-dump.c: Include version.c, <getopt.h>.
6365         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
6366         OPT_JAVAP): New macros.
6367         (options): New array.
6368         (usage): Return `void'.  Changed message.
6369         (help): New function.
6370         (version): New function.
6371         (main): Use getopt_long_only to parse command line.
6372         * gjavah.c: Include <getopt.h>.
6373         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
6374         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
6375         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
6376         (options): New array.
6377         (java_no_argument): Removed.
6378         (help): Updated with missing options.
6379         (main): Use getopt_long_only to parse command line.
6380         (usage): Changed message.
6381
6382 Tue Feb  1 22:23:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6383
6384         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
6385         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
6386         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
6387         * parse.y (array_creation_expression:): Handle anonymous arrays.
6388         (build_array_from_name): Don't set `ret_name' if null.
6389         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
6390         (qualify_ambiguous_name): Likewise.
6391         (java_complete_expand_class): Likewise.
6392
6393 Tue Feb  1 14:59:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6394
6395         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
6396         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
6397         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
6398         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
6399         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
6400         AIPL_FUNCTION_COMPLETED_INVOCATION.
6401         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
6402         AIPL_FUNCTION_INVOCATION_READY.
6403         (AIPL_FUNCTION_DECLARATION): New enum entry.
6404         * parse.y (reorder_static_initialized): New function.
6405         (java_parser_context_pop_initialized_field): Use it.
6406         (add_inner_class_fields): Use
6407         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
6408         augmented. Install marker after last alias initializer, if any.
6409         (generate_finit): Fixed typo. Don't try to retain only the used
6410         fields.
6411         (method_header): Compute and set DECL_FUNCTION_NAP.
6412         (method_declarator): Fixed comment. Insert alias initializer in
6413         parameter list.
6414         (build_alias_initializer_parameter_list): Fixed leading
6415         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
6416         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
6417         (java_complete_expand_class): Code to retain only used aliases
6418         removed.
6419         (java_complete_expand_methods): New local `first_decl'. Generate
6420         $finit$ first, then expand the constructors, regular methods and
6421         <clinit>.
6422         (java_complete_expand_method): Don't report error on missing
6423         return statement if previously detected bogus.
6424         (fix_constructors): Don't patch constructor parameters list.
6425         (patch_method_invocation): Use new AIPL enum values. Reverse
6426         alias initializer list for anonymous classes.
6427
6428 2000-01-30  Anthony Green  <green@redhat.com>
6429
6430         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
6431         determine how many stack slots to pop.
6432
6433 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6434
6435         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
6436         error handling/recovery.
6437         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
6438
6439 Fri Jan 28 20:10:57 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6440
6441         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
6442         FIELD_LOCAL_ALIAS_USED): New macros.
6443         (DECL_FUNCTION_NAP): New macro.
6444         (struct lang_decl): New field `nap'.
6445         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
6446         (struct lang_type): New fields `finit_stmt_list' and
6447         `clinit_stmt_list'.
6448         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
6449         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
6450         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
6451         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
6452         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
6453         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
6454         (BUILD_THROW): Macro line separator re-indented.
6455         * parse.y (end_class_declaration): New function.
6456         (maybe_generate_pre_expand_clinit): New name for
6457         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
6458         pre-expand static fields.
6459         (maybe_generate_clinit): Function deleted.
6460         (check_for_static_method_reference): Prototype's parameter list
6461         indented.
6462         (generate_finit): New name for maybe_generate_finit. Changed
6463         leading comment. Function rewritten to use
6464         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
6465         (build_alias_initializer_parameter_list): New function.
6466         (java_parser_context_pop_initialized_field): Likewise.
6467         (add_inner_class_fields): Likewise.
6468         (type_declaration:): Call end_class_declaration.
6469         (class_member_declaration:): Likewise.
6470         (formal_parameter_list:): Fixed typos.
6471         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
6472         element. Improved error handling.
6473         (block_statement:): Call end_class_declaration.
6474         (anonymous_class_creation:): Likewise.
6475         (create_anonymous_class): Fixed comments.
6476         (create_class): Call add_inner_class_fields.
6477         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
6478         (method_header): Use MARK_FINAL_PARMS.
6479         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
6480         (method_declarator): Propagate final argument flag.
6481         (craft_constructor): New local `artificial'. Call
6482         build_alias_initializer_parameter_list. Use
6483         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
6484         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
6485         necessary.
6486         (complete_expand_class): Get rid of unused outer context local
6487         alias fields.
6488         (java_complete_expand_methods): Fixed leading
6489         comment. Generate/pre-expand <clinit> first. Changed method
6490         expansion order to regular, $finit$, constructors, <clinit>.
6491         (java_complete_expand_method): Set current_function_decl.
6492         (fix_constructors): Fix constructor parameter list to account for
6493         outer context local alias initializers.
6494         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6495         (resolve_expression_name): Lookup outer context local aliases. New
6496         local `access', use it.
6497         (patch_method_invocation): Patch inner class ctor invocation with
6498         outer context local aliases initialization values. $finit$
6499         invocation patching now includes things generated with
6500         build_alias_initializer_parameter_list.
6501         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6502         (build_super_invocation): Likewise.
6503         (patch_assignment): Changed comment.
6504
6505 2000-01-27  Andrew Haley  <aph@cygnus.com>
6506
6507         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
6508         (emit_if): Ditto.
6509         (emit_jsr): Ditto.
6510
6511 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6512
6513         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
6514         concatenation.
6515         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
6516
6517         * parse.y (register_fields): Don't pass a format specifier to
6518         OBSOLETE_MODIFIER_WARNING.
6519         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
6520         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
6521         specifier.
6522         (check_modifiers): Change function into a macro.
6523         (check_class_interface_creation): Pass a literal format string.
6524
6525 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6526
6527         * buffer.h: PROTO -> PARAMS.
6528         * check-init.c: Likewise.
6529         * class.c: Likewise.
6530         * constants.c: Likewise.
6531         * convert.h: Likewise.
6532         * decl.c: Likewise.
6533         * except.c: Likewise.
6534         * expr.c: Likewise.
6535         * gjavah.c: Likewise.
6536         * java-except.h: Likewise.
6537         * java-tree.h: Likewise.
6538         * jcf-depend.c: Likewise.
6539         * jcf-dump.c: Likewise.
6540         * jcf-parse.c: Likewise.
6541         * jcf-path.c: Likewise.
6542         * jcf-reader.c: Likewise.
6543         * jcf-write.c: Likewise.
6544         * jcf.h: Likewise.
6545         * jv-scan.c: Likewise.
6546         * jvgenmain.c: Likewise.
6547         * jvspec.c: Likewise.
6548         * lang.c: Likewise.
6549         * lex.c: Likewise.
6550         * lex.h: Likewise.
6551         * parse-scan.y: Likewise.
6552         * parse.h: Likewise.
6553         * parse.y: Likewise.
6554         * typeck.c: Likewise.
6555         * verify.c: Likewise.
6556         * xref.c: Likewise.
6557         * xref.h: Likewise.
6558         * zextract.c: Likewise.
6559         * zipfile.h: Likewise.
6560
6561 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6562
6563         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
6564         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
6565         * constants.c (build_constant_data_ref): Check for cached
6566         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
6567         in TYPE_CPOOL_DATE_REF.
6568         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
6569         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
6570         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
6571         (LOCAL_FINAL): New macro.
6572         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
6573         constant pool -- don't try to reuse.
6574         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
6575         TYPE_LANG_SPECIFIC.
6576         (find_in_current_zip): Use TYPE_JCF.
6577         * parse.h (java_check_final): Prototype removed.
6578         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
6579         (maybe_create_class_interface_decl,
6580         check_class_interface_creation): Likewise.
6581         (java_expand_finals): Function removed.
6582         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
6583         (block_statement:): Fixed comment.
6584         (anonymous_class_creation:): Likewise.
6585         (check_class_interface_creation): Reversed Jan 12, 2000 extra
6586         argument patch.
6587         (check_class_interface_creation): Loosened error report on (inner)
6588         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
6589         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
6590         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
6591         argument patch.
6592         (create_interface): Likewise.
6593         (anonymous_class_counter): New static global.
6594         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
6595         patch. Fixed comments.
6596         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
6597         anonymous_class_counter when declaring a toplevel class.
6598         (craft_constructor): Fixed constructor name when handling
6599         anonymous classes. Anonymous class constructors to feature hidden
6600         this$<n> parameter.
6601         (java_fix_constructors): Added comment.
6602         (java_check_final): Function removed.
6603         (java_complete_expand_methods): Fixed comment. Don't generate
6604         class data, save its outgoing constant pool instead.
6605         (verify_constructor_super): Skip anonymous class constructor
6606         hidden this$<n> parameter.
6607         (java_expand_classes): New local `saved_ctxp'. Removed call to
6608         java_expand_finals and java_check_final. Expand anonymous class
6609         constructors. Generate class data.
6610         (build_super_invocation): Skip anonymous class hidden this$<n>
6611         parameter.
6612         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
6613         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
6614         (set_java_signature): Likewise.
6615
6616 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6617
6618         * gjavah.c: Delete ACC_VISIBILITY define.
6619         * jcf.h: Add ACC_VISIBILITY define.
6620         * parse.y: final: rule tagged <value>.
6621         (java_check_regular_methods): Use ACC_VISIBILITY define for
6622         default package access check.
6623         (local_variable_declaration_statement): Use final: rule.
6624
6625 Mon Jan 17 11:58:17 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6626
6627         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
6628         (final:): New rule.
6629
6630 2000-01-17  Tom Tromey  <tromey@cygnus.com>
6631
6632         * gjavah.c (print_field_info): Allow non-static final fields.
6633
6634 Fri Jan 14 18:03:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6635
6636         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
6637         * parse.y (patch_anonymous_class): New function.
6638         (create_anonymous_class): Register incomplete type when the
6639         class/interface to extends/implement isn't known yet.
6640         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
6641         (verify_constructor_super): Tuned error message.
6642
6643 Fri Jan 14 00:14:24 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6644
6645         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
6646         (ANONYMOUS_CLASS_P): New macro.
6647         (TYPE_SIGNATURE, TYPE_JCF): New macros.
6648         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
6649         * parse.y (create_class): Added leading argument.
6650         (maybe_create_class_interface_decl,
6651         check_class_interface_creation): Likewise.
6652         (craft_constructor): New function.
6653         (verify_constructor_super): Added argument in prototype.
6654         (class_declaration:): Inserted leading argument.
6655         (for_begin:): Use FOR_LOOP_P.
6656         (anonymous_class_creation): Create WFL of the anonymous class to
6657         instantiate. Call build_new_invocation. Added comments.
6658         (check_class_interface_creation): Handle parameter `anonymous' in
6659         verbose mode class creation announce.
6660         (link_nested_class_to_enclosing): Exclude anonymous classes.
6661         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
6662         anonymous class, even though they appear to have an enclosing
6663         context.
6664         (create_interface): Pass extra argument to
6665         check_class_interface_creation.
6666         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
6667         (create_class): Call check_class_interface_creation and
6668         maybe_create_class_interface_decl with extra new argument. Don't
6669         add private this$<n> to anonymous classes.
6670         (method_declarator): Insert hidden this$<n> to anonymous class
6671         constructors.
6672         (java_fix_constructors): Deleted code creating default
6673         constructor. Call craft_constructor instead.
6674         (java_check_regular_methods): Set `saw_constructor' to 1 for
6675         anonymous classes.
6676         (fix_constructors): Pass extra argument to verify_constructor_super.
6677         (verify_constructor_super): New local `sdecl', use it. Search for
6678         matching constructor (possibly featuring arguments) in super
6679         class.
6680         (lookup_method_invoke): Craft constructor according to arguments
6681         list when dealing with anonymous class constructors.
6682         (build_super_invocation): Pass arguments to anonymous class super
6683         constructors.
6684         (search_loop): Use FOR_LOOP_P.
6685         (labeled_block_contains_loop_p): Likewise.
6686
6687 Wed Jan 12 00:38:47 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6688
6689         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
6690         (enclosing_context_p): New function.
6691         (get_access_flags_from_decl): Handle CLASS_STATIC.
6692         (maybe_layout_super_class): Extra first argument passed to
6693         do_resolve_class.
6694         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
6695         ID_INIT_P.
6696         * decl.c (access0_identifier_node): New global.
6697         (init_decl_processing): access0_identifier_node initialized.
6698         (pushdecl): Set DECL_CONTEXT only on non type decls.
6699         * expr.c (lookup_field): Lookup inner class fields in enclosing
6700         contexts.
6701         (expand_invoke): Use ID_INIT_P.
6702         (expand_java_field_op): Use DECL_CLINIT_P.
6703         * java-tree.def (CLASS_LITERAL): New tree code.
6704         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
6705         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
6706         (struct lang_decl): New field `inner_access'.
6707         (enclosing_context_p): Prototyped.
6708         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
6709         ID_CLINIT_P): New macros.
6710         (CLASS_STATIC): New macro.
6711         (CLASS_ACCESS0_GENERATED_P): New macro.
6712         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
6713         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
6714         INNER_CLASS_P): New macros.
6715         (DECL_INNER_CLASS_LIST): New macro.
6716         * jcf-parse.c (yyparse): Avoid the use of ANSI string
6717         concatenation.
6718         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
6719         the shift value to int. Fixed typo in comment.
6720         * lex.c (inst_id, wpv_id): Initialize.
6721         * mangle.c (unicode_mangling_length): Take `$' into account.
6722         * parse.h (DRECOVER, RECOVER): Terminate properly.
6723         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
6724         (typedef struct _jdep): New field `enclosing'.
6725         (JDEP_ENCLOSING): New macro.
6726         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
6727         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
6728         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
6729         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
6730         GET_ENCLOSING_CPC_CONTEXT): New macros.
6731         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
6732         (do_resolve_class): Added extra argument in prototype.
6733         * parse.y (resolve_class): Added extra argument in prototype.
6734         (maybe_create_class_interface_decl): Likewise.
6735         (maybe_use_access_method, build_wfl_wrap): New functions.
6736         (java_complete_expand_classes, java_complete_expand_class):
6737         Likewise.
6738         (java_parser_context_push_initialized_field,
6739         java_parser_context_suspend, java_parser_context_resume):
6740         Likewise.
6741         (maybe_make_nested_class_name, make_nested_class_name,
6742         set_nested_class_simple_name_value,
6743         link_nested_class_to_enclosing, find_as_inner_class,
6744         find_as_inner_class_do, check_inner_class_redefinition,
6745         build_thisn_assign, build_current_thisn, build_access_to_thisn,
6746         maybe_build_thisn_access_method, build_outer_field_access,
6747         build_outer_field_access_methods, build_outer_field_access_expr,
6748         build_outer_method_access_method, build_new_access_id,
6749         build_outer_field_access_method, outer_field_access_p,
6750         outer_field_expanded_access_p, outer_field_access_fix,
6751         build_incomplete_class_ref, patch_incomplete_class_ref,
6752         create_anonymous_class): Likewise.
6753         (inst_id, wpv_id): New static global variables.
6754         (synchronized:): New rule, tagged <node>.
6755         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
6756         rules.
6757         (anonymous_class_creation:): New rule, tagged <node>.
6758         (NEW_TK): Tagged <node>.
6759         (type_literals, array_type_literal): New rules, tagged <node>.
6760         (class_declaration:): Removed action when reducing by class_body:
6761         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
6762         using GET_CPC in sub-rules.
6763         (class_member_declaration): Handle inner classes.
6764         (method_declaration): When reducing method_header:, reset
6765         current_function_decl when appropriate.
6766         (method_declarator:): Set the number of formal parameter to 0 for
6767         method declared without arguments.
6768         (constructor_declarator:): Likewise.
6769         (static_initializer:): List of elements kept in a list.
6770         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
6771         use of the keyword `static' for type declarations.
6772         (block_statement:): Handle inner class declarations.
6773         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
6774         type qualified `this'.
6775         (class_instance_creation_expression): Use anonymous_class_creation:
6776         to handle inner class instances creation. Handle qualified `new'.
6777         (something_dot_new): Added appropriate actions.
6778         (create_new_parser_context): New function.
6779         (java_push_parser_context, java_parser_context_save_global,
6780         java_parser_context_suspend): Use create_new_parser_context.
6781         (check_modifiers): Changed leading comment.
6782         (check_class_interface_creation): Handle interclasses.
6783         (add_superinterfaces): Fixed comment.
6784         (create_interface): Build qualified name from the raw_name instead
6785         of its matching WFL. Push the initialized fields list. raw_name added
6786         as an extra argument to maybe_create_class_interface_decl.
6787         (create_class): Build qualified name from the raw_name instead of
6788         its matching WFL. Removed assignment to current_parsed_class_un.
6789         Call PUSH_ERROR before returning an error. Suspend the current
6790         parser context when processing an inner class. Push the
6791         initialized fields list. raw_name added as an extra argument to
6792         maybe_create_class_interface_decl. Add the private this$<n>
6793         field.
6794         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
6795         (register_fields): Get the class type from GET_CPC and handle
6796         previous errors.  Added code to handle the creation of static
6797         fields in inner classes. Initialized fields initialization
6798         statements kept in a list of lists.
6799         (maybe_generate_finit): Initialized fields initialization
6800         statements kept in a list of lists. Use GET_CPC.
6801         (maybe_generate_clinit): Likewise.
6802         (method_header): Use GET_CPC and GET_CPC_UN.
6803         (parser_qualified_classname): Handle inner classes.
6804         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
6805         (java_fix_constructors): Hide pointer to enclosing context
6806         instance in constructor list when dealing with inner classes.
6807         (jdep_resolve_class): Call resolve_class with extra first argument
6808         JDEP_ENCLOSING.
6809         (resolve_class): Add enclosing context as a first extra argument
6810         to do_resolve_class.
6811         (do_resolve_class): Call find_as_inner_class. Handle WFLs
6812         properly.
6813         (resolve_no_layout): Extra argument added to resolve_class
6814         invocation.
6815         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
6816         (java_get_real_method_name): Use GET_CPC_UN.
6817         (check_abstract_method_definitions): Use DECL_CLINIT_P.
6818         (java_check_abstract_methods): Handle static method declared in
6819         inner classes by an error.
6820         (java_check_regular_methods): Use DECL_CLINIT_P.
6821         (source_start_java_method): Also set DECL_MAX_LOCALS.
6822         (create_artificial_method): Call java_parser_context_save_global
6823         and java_parser_context_restore_global instead of saving/restoring
6824         the context by hand.
6825         (expand_start_java_method): Improved verbose mode message.
6826         (java_complete_expand_methods): Fixed leading comment. Use
6827         DECL_CLINIT_P.
6828         (fix_constructors): Added assignment to this$<n> if necessary.
6829         (java_expand_classes): Call java_complete_expand_classes instead
6830         of java_complete_expand_methods.
6831         (make_qualified_primary): Simplified.
6832         (merge_qualified_name): Optimized for missing left or right parts.
6833         (resolve_expression_name): Handle access to outer class fields from
6834         interclasses.
6835         (resolve_qualified_expression_name): New macro
6836         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
6837         classes. Report error on non appropriate qualification of
6838         `new'. Handle qualified `this'.
6839         (not_accessible_p): Allow access to outer class private fields from
6840         inner classes.
6841         (patch_method_invocation): Handle method invocations through
6842         access methods and inner class constructor invocations.
6843         (find_applicable_accessible_methods_list): Search enclosing
6844         contexts of an inner class.
6845         (search_applicable_methods_list): Fixed typo.
6846         (argument_types_convertible): Handle inner class constructors'
6847         hidden outer context reference argument.
6848         (qualify_ambiguous_name): Handle qualified `this'.
6849         (java_complete_lhs): Handle use of field accessed through
6850         artificial access methods in various cases of assignments. Handle
6851         CLASS_LITERAL node.
6852         (check_final_assignment): Use DECL_CLINIT_P.
6853         (valid_ref_assignconv_cast_p): Handle the destination being an
6854         enclosing context of the source.
6855         (patch_unaryop): Handle use of field accessed through artificial
6856         access methods.
6857         (patch_return): Use DECL_CLINIT_P.
6858         (patch_throw_statement): Use DECL_CLINIT_P.
6859         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
6860         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
6861         ID_INIT_P.
6862
6863 2000-01-16  Anthony Green  <green@cygnus.com>
6864
6865         * parse.y (build_string_concatenation): Only use
6866         StringBuffer(String) shortcut if String arg is constant.
6867
6868 Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6869
6870         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
6871         the shift value to int. Fixed typo in comment.
6872
6873 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
6874
6875         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
6876         * jcf-write.c: Likewise.
6877         * parse.y: Likewise.
6878         * parse.c: Regenerate.
6879
6880 2000-01-09  Anthony Green  <green@cygnus.com>
6881
6882         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
6883         bytecodes in the correct order.
6884
6885 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6886
6887         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
6888
6889 Thu Jan  6 16:31:28 2000  Anthony Green  <green@cygnus.com>
6890
6891         * expr.c (java_lang_expand_expr): Switch to permanent obstack
6892         before building constant array decl.
6893
6894 Thu Jan  6 00:54:10 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6895
6896         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
6897         method invocation and typo in conditional expression.
6898         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
6899         the appropriate NOTE_POP.
6900         * parse.y (patch_binop): Shift value mask to feature the right
6901         type.
6902
6903 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6904
6905         * class.c (assume_compiled, assume_compiled_node): Add static
6906         prototype.
6907         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
6908
6909         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
6910
6911         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
6912
6913         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
6914         to `__modifier' to avoid stringifying it.
6915
6916         * parse.y (verify_constructor_circularity): Don't call a variadic
6917         function with a non-literal format string.
6918         (java_check_abstract_methods): Move unreachable code inside
6919         `continue' statement.
6920         (lookup_method_invoke): Call xstrdup, not strdup.
6921
6922         * expr.c (expand_java_field_op): Avoid the use of ANSI string
6923         concatenation.
6924
6925         * jcf-parse.c (yyparse): Likewise.
6926
6927         * jv-scan.c (main): Likewise.
6928
6929 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6930
6931         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
6932         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
6933         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
6934         concatenation.
6935
6936         * parse.y (synchronized, variable_redefinition_error,
6937         check_class_interface_creation, create_interface, create_class,
6938         method_header, finish_method_declaration,
6939         check_modifiers_consistency, method_declarator,
6940         complete_class_report_errors, check_abstract_method_definitions,
6941         java_check_regular_methods, check_throws_clauses,
6942         java_check_abstract_methods, read_import_dir,
6943         check_pkg_class_access, declare_local_variables, fix_constructors,
6944         cut_identifier_in_qualified, resolve_expression_name,
6945         resolve_qualified_expression_name, patch_method_invocation,
6946         java_complete_lhs, patch_assignment, try_builtin_assignconv,
6947         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
6948         patch_exit_expr, patch_exit_expr, patch_switch_statement,
6949         patch_try_statement, patch_synchronized_statement,
6950         patch_throw_statement, check_thrown_exceptions,
6951         patch_conditional_expr): Likewise.
6952
6953 Fri Dec 24 00:25:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6954
6955         * Makefile.in (LIBDEPS): Added gcc's errors.o
6956         (../jcf-dump$(exeext):): Link with gcc's errors.o
6957         (../gcjh$(exeext):): Likewise.
6958         * expr.c (expand_java_NEW): Layout the entire target type instead of
6959         laying out its methods only.
6960         (lookup_field): Layout the class after having loaded it.
6961         * java-tree.h (java_debug_context): Declared.
6962         * jcf-io.c (toplev.h): Included.
6963         (find_class): Removed assignment to jcf's outofsynch
6964         field. Force source file to be read if newer than its matching
6965         class file. Tweaked debug messages.
6966         * jcf-parse.c (jcf_out_of_synch): Deleted.
6967         (read_class): Call to jcf_out_of_synch removed.
6968         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
6969         (jcf_out_of_synch): Prototype deleted.
6970         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
6971         `deprecated' and `class_err': integer turned into bit-fields.
6972         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
6973         * parse.y (package_list): New global.
6974         (package_declaration:): Record newly parsed package name.
6975         (extra_ctxp_pushed_p): Static global deleted.
6976         (java_parser_context_save_global): Create buffer context for the
6977         purpose of saving globals, if necessary.
6978         (java_parser_context_restore_global): Pop context pushed for the
6979         purpose of saving globals, if necessary.
6980         (java_debug_context_do): New prototype and function.
6981         (java_debug_context): Likewise.
6982         (do_resolve_class): Use already parsed package names to qualify
6983         and lookup class candidate.
6984         (java_pre_expand_clinit): Removed unnecessary local variable.
6985
6986 1999-12-17  Tom Tromey  <tromey@cygnus.com>
6987
6988         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
6989         fixes PR gcj/119.
6990         (process_file): Use `\n\' at end of each line in string.
6991
6992 Thu Dec 16 00:09:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6993
6994         * expr.c (expand_invoke): Layout the loaded class before
6995         attempting to use it.
6996         (expand_java_field_op): Allow final field assignments to take
6997         place in $finit$.
6998         * typeck.c (convert): Return error_mark_node if expr is null.
6999
7000 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7001
7002         * class.c (class_depth): Return -1 if the class doesn't load
7003         properly.
7004         * expr.c (can_widen_reference_to): Check for errors during depth
7005         computation and return 0 accordingly.
7006         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
7007         create default constructors and add an other error check.
7008         * parse.h (java_fix_constructors): Prototyped.
7009         * parse.y (java_pre_expand_clinit): Likewise.
7010         (build_super_invocation): Re-prototyped to feature one argument.
7011         (java_check_circular_reference): Directly use `current'.
7012         (java_fix_constructors): New function.
7013         (java_check_regular_methods): Don't create default constructors
7014         here, but abort if none were found.
7015         (java_complete_expand_methods): Pre-process <clinit> calling
7016         java_pre_expand_clinit.
7017         (java_pre_expand_clinit): New function.
7018         (fix_constructors): build_super_invocation invoked with the
7019         current method declaration as an argument.
7020         (build_super_invocation): Use the context of the processed method
7021         decl argument instead of current_class.
7022         * typeck.c (lookup_java_method): Take WFLs in method names into
7023         account.
7024
7025 Tue Dec 14 14:20:16 1999  Per Bothner  <per@bothner.com>
7026
7027         * class.c (make_class_data): flag_keep_inline_functions to keep
7028         private methods in the method array.
7029
7030 1999-12-15  Anthony Green  <green@cygnus.com>
7031
7032         * check-init.c (check_init): Take into account both types of
7033         `throw's when checking for uninitialized variables.
7034
7035 Fri Dec 10 21:53:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7036
7037         * parse.y (java_complete_lhs): Force convertion of array
7038         dimensions to int_type_node, that's what runtime's ABI expects.
7039
7040 Fri Dec 10 16:13:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7041
7042         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
7043         operand of a WFL, until the Java front-end gets fixed with regard
7044         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
7045
7046 1999-12-10  Andrew Haley  <aph@cygnus.com>
7047
7048         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
7049         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
7050         expr.c (build_java_athrow): Add support for sjlj-exceptions.
7051         java-tree.h: Ditto.
7052         jcf-write.c: Ditto.
7053
7054 Wed Dec  8 15:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7055
7056         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7057         before calling expand_eh_region_start and expand_start_all_catch.
7058         * except.c (expand_start_java_handler): Switch to permanent
7059         obstack before calling expand_eh_region_start.
7060         (expand_end_java_handler): Switch to permanent obstack before
7061         calling expand_start_all_catch.
7062
7063 1999-12-5  Anthony Green  <green@cygnus.com>
7064
7065         * decl.c (init_decl_processing): Mark throw_node as a noreturn
7066         function with side effects.
7067         (init_decl_processing): Mark all memory allocating DECLs with
7068         DECL_IS_MALLOC.
7069
7070 Wed Dec  1 04:25:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7071
7072         * except.c (expand_end_java_handler): Call
7073         expand_resume_after_catch and end_catch_handler.
7074
7075 Tue Nov 30 12:36:15 1999  Anthony Green  <green@cygnus.com>
7076
7077         * verify.c (verify_jvm_instructions): Create new return label
7078         chain if non existent (don't rely on the verified state of the jsr
7079         target.)
7080
7081 Tue Nov 30 12:28:34 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7082
7083         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
7084         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
7085
7086         * parse.y (patch_assignment): Removed bogus final class test on
7087         lhs when checking on whether to emit an ArrayStoreException runtime
7088         check.
7089         * expr.c (expand_java_arraystore): Likewise.
7090
7091 1999-11-28 Anthony Green <green@cygnus.com>
7092
7093         * decl.c (find_local_variable): Reuse single slot decls when
7094           appropriate.
7095
7096 Wed Nov 24 17:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7097
7098         * jcf-parse.c (saw_java_source): Global variable removed.
7099         (read_class): Don't use `saw_java_source'. Added extra braces.
7100         (yyparse): Code setting `saw_java_source' removed.
7101
7102 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
7103
7104         * except.c (emit_handlers): Zero catch_clauses after emitting them.
7105
7106 Tue Nov 23 17:29:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7107
7108         * verify.c (merge_type_state): Non verified subroutines being
7109         considered more than once to trigger passive type merge.
7110
7111 Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7112
7113         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
7114         in case of error. Error message tuned.
7115
7116 1999-11-21  Anthony Green  <green@cygnus.com>
7117
7118         * constants.c (find_methodref_index): Unwrap method names before
7119         inserting them in the constant pool.
7120
7121         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
7122
7123         * class.c (assume_compiled_node): New typedef.
7124         (assume_compiled_tree): New static data.
7125         (find_assume_compiled_node): New function.
7126         (add_assume_compiled): New function.
7127         (assume_compiled): New function.
7128         * class.c (make_class_data): Use assume_compiled.
7129         (is_compiled_class): Use assume_compiled.
7130
7131         * java-tree.h (add_assume_compiled): Declare.
7132
7133         * lang.c (lang_decode_option): Parse new options.
7134
7135 Wed Nov 17 21:09:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7136
7137         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
7138         int_type_node: that's what `_Jv_AllocObject' expects.
7139
7140 Thu Nov 11 01:57:14 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7141
7142         * parse.y (lookup_method_invoke): Use lang_printable_name to
7143         reliably build the type name during error report. Fixes PR gcj/97.
7144
7145 1999-11-09  Tom Tromey  <tromey@cygnus.com>
7146
7147         * jcf-path.c: Include <sys/stat.h>.
7148         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
7149         (DIR_UP): New macro.
7150
7151 Tue Nov  9 12:12:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7152
7153         * parse.y (source_end_java_method): Resume permanent allocation,
7154         reversing Apr 27 1998 patch.
7155         (patch_string_cst): Pop obstacks after having pushed the permanent
7156         ones.
7157
7158 1999-11-05  Tom Tromey  <tromey@cygnus.com>
7159
7160         * class.c (finish_class): Emit inlined methods if any native
7161         methods exist in the class.  Fixes PR gcj/85.
7162
7163 Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7164
7165         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
7166         (qualify_ambiguous_name): Likewise.
7167
7168 Wed Nov  3 15:20:02 MST 1999  Godmar Back <gback@cs.utah.edu>
7169
7170         * typeck.c: (lookup_java_method):  search all inherited
7171         interfaces when looking up interface method.
7172
7173 Mon Nov  1 23:42:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7174
7175         * parse.y (method_header:): Issue error message for rule `type
7176         error'.
7177         (synchronized:): Error report when not using synchronized.
7178
7179 Mon Nov  1 01:32:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7180
7181         * parse.y (resolve_qualified_expression_name): Prevent `this' from
7182         being used before the superclass constructor has been called.
7183         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
7184         instead of `CALL_THIS_CONSTRUCTOR_P'.
7185
7186 Sat Oct 30 21:35:13 1999  Todd T. Fries <todd@lighthouse.fries.net>
7187
7188         * check-init.c: Fix typo in comment.
7189
7190 Fri Oct 29 14:35:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7191
7192         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
7193         and final method.
7194
7195 Fri Oct 29 14:23:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7196
7197         * parse.y (expression_statement:): Call function to report
7198         improper invocation of a constructor.
7199         (parse_ctor_invocation_error): New function.
7200
7201 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
7202
7203         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
7204         remember_end_note.
7205
7206 1999-10-21  Tom Tromey  <tromey@cygnus.com>
7207
7208         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
7209         in generated `main'.
7210
7211 Thu Oct 21 01:27:31 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7212
7213         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
7214         (qualify_ambiguous_name): Likewise.
7215
7216 Wed Oct 20 01:41:47 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7217
7218         * parse.y (java_complete_tree): fold_constant_for_init to work on
7219         permanent_obstack.
7220         (java_complete_lhs): Likewise.
7221         (array_constructor_check_entry): Complete an initializer element
7222         on permanent_obstack.
7223
7224 1999-10-19  Tom Tromey  <tromey@cygnus.com>
7225
7226         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
7227         From Mike Moreton <mike@pillim.demon.co.uk>.
7228
7229 1999-10-15  Greg McGary  <gkm@gnu.org>
7230
7231         * java-tree.h (flag_bounds_check): Remove extern decl.
7232         * lang.c (flag_bounds_check): Remove global variable.
7233         (lang_f_options): Remove "bounds-check" entry.
7234         (lang_init_options): Default flag_bounds_check to "on".
7235
7236 1999-10-14  Tom Tromey  <tromey@cygnus.com>
7237
7238         * jvgenmain.c (usage): New function.
7239         (main): Use it.  Also, handle `-D' options.
7240         * jvspec.c (lang_specific_driver): Recognize -D.
7241         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
7242
7243         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
7244
7245 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7246
7247         * jcf-dump.c (print_constant, disassemble_method): Don't call a
7248         variadic function with a non-literal format string.
7249
7250         * parse-scan.y (report_main_declaration): Likewise.
7251
7252         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
7253
7254         * parse.y (read_import_dir, patch_assignment, patch_binop,
7255         patch_array_ref): Likewise.
7256
7257         * typeck.c (build_java_array_type): Likewise.
7258
7259         * verify.c (verify_jvm_instructions): Likewise.
7260
7261 Tue Oct 12 22:28:10 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7262
7263         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
7264
7265 1999-10-07  Anthony Green  <green@cygnus.com>
7266
7267         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
7268         where CHECK_PUT may fail for valid reasons.
7269
7270         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
7271         UNSAFE_PUTN): New macros.
7272
7273 1999-10-04  Tom Tromey  <tromey@cygnus.com>
7274
7275         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
7276         well.  Fixes Java PR gcj/59.
7277         * parse-scan.y (yyerror): Report errors.
7278
7279 Fri Sep 24 12:23:05 1999  Glenn Chambers  <GChambers@provsol.com>
7280
7281         * decl.c (insert_block): Remove unconditional `abort'.
7282
7283 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7284
7285         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
7286         FUNCTION_CODE now of type int.  All callers changed.
7287         Set the builtin's DECL_BUILT_IN_CLASS.
7288
7289 1999-09-23  Tom Tromey  <tromey@cygnus.com>
7290
7291         * jvspec.c (lang_specific_driver): Don't read spec file if
7292         -fsyntax-only given.
7293
7294 1999-09-22  Tom Tromey  <tromey@cygnus.com>
7295
7296         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
7297
7298         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
7299         (WORDS_TO_LONG): Likewise.
7300         (WORDS_TO_DOUBLE): Likewise.
7301
7302 Tue Sep 14 16:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7303
7304         * jcf-write.c (RELOCATION_VALUE_0): New macro.
7305         (RELOCATION_VALUE_1): Likewise.
7306         (emit_iinc, emit_reloc, push_constant1, push_constant2,
7307         push_in_const, push_long_const): Prototyped.
7308         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
7309         (push_constant2): Likewise.
7310         (push_int_const): Cast find_constant1's integer arguments to `jword'.
7311         (find_constant_wide): Cast find_constant2's integer arguments to
7312         `jword'.
7313         (find_constant_index): Cast find_constant2's and find_constant2's
7314         integer arguments to `jword'.
7315         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
7316         (emit_switch_reloc): Use RELOCATION_VALUE_0.
7317         (emit_if): Use RELOCATION_VALUE_1.
7318         (emit_goto): Likewise.
7319         (emit_jsr): Likewise.
7320         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
7321         argument to push_long_const to HOST_WIDE_INT.
7322
7323 1999-09-15  Andreas Schwab  <schwab@suse.de>
7324
7325         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
7326
7327 1999-09-20  Nick Clifton  <nickc@cygnus.com>
7328
7329         * lang.c (lang_decode_option): Extend comment.
7330
7331 Thu Sep 16 15:42:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7332
7333         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
7334         instead of fndecl.
7335
7336 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7337
7338         * gjavah.c (get_field_name, print_method_info, print_include,
7339         add_namelet): Use xmalloc, not malloc.
7340
7341         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
7342         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
7343         NULL pointer.
7344
7345         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
7346
7347         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
7348
7349         * jcf-path.c (add_entry): Likewise.
7350
7351         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
7352
7353         * jv-scan.c (xmalloc): Remove definition.
7354
7355         * jvgenmain.c (xmalloc): Likewise.
7356
7357         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
7358
7359         * lex.c (java_store_unicode): Use xrealloc, not realloc.
7360
7361         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
7362         concat, not xmalloc/sprintf.
7363         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
7364         (xstrdup): Remove definition.
7365
7366         * parse.y (duplicate_declaration_error_p,
7367         constructor_circularity_msg, verify_constructor_circularity,
7368         check_abstract_method_definitions, java_check_regular_methods,
7369         java_check_abstract_methods, patch_method_invocation,
7370         check_for_static_method_reference, patch_assignment, patch_binop,
7371         patch_cast, array_constructor_check_entry, patch_return,
7372         patch_conditional_expr): Use xstrdup, not strdup.
7373
7374         * zextract.c (ALLOC): Use xmalloc, not malloc.
7375
7376 Sun Sep 12 23:30:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7377
7378         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
7379
7380         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
7381         (do_spec, lang_specific_pre_link, lang_specific_driver,
7382         input_filename, input_filename_length): Don't declare.
7383         (main_class_name, jvgenmain_spec, lang_specific_driver):
7384         Constify a char*.
7385         (lang_specific_driver): All calls to the function pointer
7386         parameter now explicitly call `fatal'.
7387
7388 Sat Sep 11 16:46:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7389
7390         * parse.y (find_applicable_accessible_methods_list): Search
7391         abstract classes as interfaces.
7392
7393 Thu Sep  9 17:33:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7394
7395         * class.c (finish_class): We're now outside a valid method
7396         declaration. Tell the rest of gcc so.
7397
7398 1999-09-08  Bruce Korb  autogen@linuxbox.com
7399
7400         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
7401
7402 1999-09-07  Tom Tromey  <tromey@cygnus.com>
7403
7404         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
7405         java-array.h.
7406         (decode_signature_piece): Don't emit "::" in JArray<>.
7407         (print_namelet): Only print trailing `;' when printing a class.
7408
7409 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7410
7411         * java-tree.h: Delete declarations for all tree nodes now moved to
7412         global_trees.
7413         * decl.c: Delete their definitions.
7414
7415 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
7416
7417         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
7418         * Makefile.in (OBJS): Add ggc-callbacks.o.
7419         (OBJDEPS): Likewise.
7420
7421 1999-09-03  Tom Tromey  <tromey@cygnus.com>
7422
7423         * parse.y (strip_out_static_field_access_decl): Return operand if
7424         it satisfies JDECL_P.
7425
7426 1999-09-02  Tom Tromey  <tromey@cygnus.com>
7427
7428         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
7429         Handle nested arrays, like `[[I'.
7430
7431 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7432
7433         * class.c (finish_class): Remove unused parameter, all callers
7434         changed.
7435
7436         * expr.c (build_java_athrow): Change return type to void.
7437         (java_lang_expand_expr): Make sure each case in switch returns a
7438         value.
7439
7440         * java-tree.h (finish_class): Fix prototype to take void args.
7441
7442         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
7443         (main): Issue return from main, not exit.
7444
7445         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
7446
7447         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
7448
7449         * jv-scan.c (main): Issue return from main, not exit.
7450
7451         * parse.y (check_abstract_method_definitions,
7452         java_check_abstract_method_definitions): Add static prototypes.
7453         (java_complete_expand_methods): Fix call to `finish_class'.
7454
7455         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
7456         and `prevpc'.
7457
7458 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7459
7460         * lang.c (language_string): Constify.
7461
7462 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7463
7464         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
7465         Remove hacks for stuff which comes from libiberty.
7466
7467         * Make-lang.in: Likewise.
7468
7469 Mon Aug 30 16:41:41 1999  Hans-Peter Nilsson  <hp@axis.se>
7470
7471         * Makefile.in (xref.o): Depend on xref.c explicitly.
7472
7473 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7474
7475         * java-tree.h (lang_printable_name): Constify a char*.
7476
7477         * lang.c (lang_printable_name): Likewise.
7478
7479 Fri Aug 27 23:31:57 1999  Jeffrey A Law  (law@cygnus.com)
7480
7481         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
7482         comments in C code.
7483
7484 1999-08-26  Tom Tromey  <tromey@cygnus.com>
7485
7486         * gjavah.c (print_cxx_classname): Print "::" before qualified
7487         name.
7488
7489 Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7490
7491         * parse.y (lookup_cl): Changed leading comment. Now does its best
7492         to set the column number.
7493         (qualify_ambiguous_name): Take WFL wrappers into account.
7494
7495 Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
7496
7497         * verify.c (verify_jvm_instructions): Don't check instruction
7498         validity beyond end of method.
7499
7500 1999-08-25  Tom Tromey  <tromey@cygnus.com>
7501
7502         * jvspec.c (lang_specific_driver): Correctly handle --help again.
7503
7504 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7505
7506         * gjavah.c (print_name, print_base_classname, utf8_cmp,
7507         cxx_keyword_subst, generate_access, name_is_method_p,
7508         get_field_name, print_field_name, super_class_name, print_include,
7509         decode_signature_piece, print_class_decls, usage, help,
7510         java_no_argument, version, add_namelet, print_namelet): Add static
7511         prototype.
7512         (print_base_classname, utf8_cmp, cxx_keyword_subst,
7513         name_is_method_p): Constify a char*.
7514         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
7515         Provide a final else clause in an if-else-if.
7516         (print_field_info): Add missing final arg in function call to
7517         `print_field_name'.
7518         (print_method_info, decompile_method, decode_signature_piece,
7519         print_c_decl, print_full_cxx_name, print_stub,
7520         print_mangled_classname, super_class_name, print_include,
7521         add_namelet, add_class_decl, print_class_decls, process_file,
7522         help): Constify a char*.
7523
7524         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
7525         push_int_const, find_constant_wide, find_constant_index,
7526         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
7527         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
7528         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
7529         emit_if, emit_goto, emit_jsr, call_cleanups,
7530         make_class_file_name): Add static prototypes.
7531         (generate_bytecode_return, generate_bytecode_insns): Pass a
7532         NULL_PTR, not a NULL_TREE.
7533
7534         * jv-scan.c: Include "jcf.h".
7535         (main): Declare using DEFUN macro.
7536
7537         * jvspec.c (find_spec_file, lang_specific_pre_link,
7538         lang_specific_driver): Add prototypes.
7539         (find_spec_file): Constify a char*.
7540
7541         * keyword.gperf (hash, java_keyword): Add prototypes.
7542
7543         * lang.c (lang_print_error): Add static prototype.
7544         (lang_init): Prefer memcpy over bcopy to avoid casts.
7545
7546         * lex.c (yylex): Add static prototype.
7547
7548         * parse-scan.y: Include "lex.c" earlier.
7549
7550         * parse.h: Remove redundant declaration for `yylex'.
7551
7552         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
7553         labeled_block_contains_loop_p): Add static prototypes.
7554         (not_accessible_p): Make static to match prototype.
7555
7556         * verify.c (start_pc_cmp): Don't needlessly cast away const.
7557
7558 Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7559
7560         * parse.y (check_method_redefinition): Changed leading comment.
7561         (check_abstract_method_definitions): New function.
7562         (java_check_abstract_method_definitions): New function.
7563         (java_check_regular_methods): Call it.
7564         (verify_constructor_super): Fixed indentation.
7565         (lookup_method_invoke): Likewise.
7566
7567 Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7568
7569         * parse.y (method_header): Return a null pointer if the current
7570         class node is null.
7571         (finish_method_declaration): Return if the current function decl
7572         is null.
7573         (source_start_java_method): Likewise.
7574         (java_method_add_stmt): Likewise.
7575
7576 Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7577
7578         * class.c (emit_register_class): Removed unnecessary call to
7579         start_sequence.
7580         * parse.y (labeled_block_contains_loop_p): Removed unused local
7581         variable.
7582
7583 Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7584
7585         * parse.y (java_refold): Added prototype.
7586
7587 Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7588
7589         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
7590         (java_stabilize_reference): Removed unnecessary `else'.
7591         (java_complete_lhs): Set flag to remember boolean. Call
7592         java_refold. Added comments.
7593         (java_decl_equiv): New function.
7594         (binop_compound_p): Likewise.
7595         (java_refold): Likewise.
7596         (patch_unaryop): Striped static field access assigned to decl and
7597         op. Changed promotion scheme for ++/-- operators.
7598         (search_loop): New function.
7599         (labeled_block_contains_loop_p): Likewise.
7600         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
7601         comment.
7602         (patch_bc_statement): Call search_loop. Fixed comment.
7603
7604 1999-08-14  Anthony Green  <green@cygnus.com>
7605
7606         * expr.c (java_lang_expand_expr): Mark static array data as
7607         referenced.
7608
7609 Tue Aug 10 00:28:31 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7610
7611         * jvgenmain.c (main): NUL-terminate name_obstack.
7612
7613 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7614
7615         * check-init.c (check_bool2_init, done_alternative): Add static
7616         prototypes.
7617
7618         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
7619         (add_method, build_utf8_ref, build_class_ref,
7620         append_gpp_mangled_type, layout_class_method): Constify a char*.
7621
7622         * decl.c (push_promoted_type, make_binding_level): Add static
7623         prototypes.
7624         (push_promoted_type, pushdecl): Constify a char*.
7625
7626         * except.c (find_handler_in_range, link_handler,
7627         check_start_handlers): Add static prototypes.
7628
7629         * expr.c (process_jvm_instruction): Constify a char*.
7630
7631         * gjavah.c (main): Constify a char*.
7632
7633         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
7634         Constify a char*.
7635
7636         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
7637         static prototypes.
7638         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
7639         munge, print_ents): Constify a char*.
7640
7641         * jcf-dump.c (disassemble_method): Constify a char*.
7642         (print_constant_pool, print_exception_table): Add static prototypes.
7643         (print_constant, print_exception_table, main, disassemble_method):
7644         Constify a char*.
7645
7646         * jcf-io.c (find_classfile, find_class): Likewise.
7647
7648         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
7649         (set_source_filename, predefined_filename_p): Add static prototypes.
7650         (set_source_filename, get_constant, get_class_constant,
7651         find_in_current_zip): Constify a char*.
7652
7653         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
7654         static prototypes.
7655         (add_entry, add_path, jcf_path_classpath_arg,
7656         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
7657
7658         * jcf-reader.c (get_attribute, jcf_parse_preamble,
7659         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
7660         jcf_parse_one_method, jcf_parse_methods,
7661         jcf_parse_final_attributes): Add static prototypes.
7662         (get_attribute): Constify a char*.
7663
7664         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
7665         jcf_dependency_add_target, jcf_path_classpath_arg,
7666         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
7667
7668         * jv-scan.c (main): Constify a char*.
7669         (gcc_obstack_init): Add prototype arguments.
7670
7671         * jvgenmain.c (gcc_obstack_init): Likewise.
7672         (main): Constify a char*.
7673
7674         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
7675         static prototypes.
7676         (put_decl_string, lang_print_error): Constify a char*.
7677         (lang_init): Remove redundant extern prototype.
7678
7679         * mangle.c (emit_unicode_mangled_name): Constify a char*.
7680
7681         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
7682         Add static prototypes.
7683         (get_type_from_signature): Constify a char*.
7684
7685         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
7686         Add static prototypes.
7687         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
7688         (verify_jvm_instructions): Constify a char*.
7689
7690         * xref.c (xref_flag_value): Likewise.
7691
7692         * xref.h (xref_flag_value): Likewise.
7693
7694         * zextract.c (makeword, makelong): Add static prototypes.
7695         (makeword, makelong): Constify a uch*.
7696
7697 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7698
7699         * lang.c (java_dummy_print): Constify a char*.
7700         (lang_print_error): Likewise.
7701         (lang_init): Remove redundant prototype for `print_error_function'.
7702         (lang_init_source): Likewise.
7703         (lang_identify): Constify a char*.
7704
7705 1999-08-09  Tom Tromey  <tromey@cygnus.com>
7706
7707         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
7708         (WORDS_TO_LONG): Likewise.
7709         (WORDS_TO_DOUBLE): Likewise.
7710
7711 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7712
7713         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
7714
7715         * expr.c (java_stack_pop, java_array_data_offset,
7716         build_java_throw_out_of_bounds_exception, case_identity,
7717         build_java_check_indexed_type): Add static prototypes.
7718         (linenumber_table, expand_invoke, expand_java_field_op,
7719         build_primtype_type_ref, expand_byte_code): Constify a char*.
7720
7721         * java-tree.h (build_primtype_type_ref, linenumber_table):
7722         Constify a char*.
7723         (java_lang_expand_expr): Add prototype.
7724
7725         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
7726         `java_lang_expand_expr'.
7727
7728         * lex.c (java_lex_error): Constify a char*.
7729         (java_get_unicode, java_read_char, java_allocate_new_line,
7730         java_unget_unicode, java_sneak_unicode): Prototype.
7731
7732         * parse-scan.y (current_class, package_name, method_declarator,
7733         report_class_declaration, yyerror): Constify a char*.
7734
7735         * parse.h (java_report_errors): Prototype.
7736         (yyerror): Constify a char*.
7737
7738         * parse.y (classitf_redefinition_error, check_modifiers,
7739         parse_jdk1_1_error, lookup_package_type,
7740         lookup_package_type_and_set_next, get_printable_method_name,
7741         purify_type_name): Constify a char*.
7742         (build_super_invocation, maybe_generate_finit,
7743         verify_constructor_super, parser_add_interface,
7744         add_superinterfaces, jdep_resolve_class, note_possible_classname,
7745         java_complete_expand_methods, java_expand_finals,
7746         cut_identifier_in_qualified, java_stabilize_reference,
7747         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
7748         merge_string_cste): Prototype.
7749         (single_type_import_declaration, yyerror,
7750         variable_redefinition_error, build_array_from_name,
7751         build_unresolved_array_type, check_class_interface_creation,
7752         resolve_class, complete_class_report_errors,
7753         note_possible_classname, read_import_dir,
7754         find_in_imports_on_demand, resolve_package, fix_constructors,
7755         check_deprecation, lookup_method_invoke,
7756         maybe_build_primttype_type_ref, array_constructor_check_entry):
7757         Constify a char*.
7758         (java_complete_expand_methods, java_expand_finals): Make static.
7759         (convert_narrow): Remove static prototype.
7760
7761 Tue Aug  3 20:21:20 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
7762
7763         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
7764
7765 1999-08-02  Richard Henderson  <rth@cygnus.com>
7766
7767         * decl.c: Include defaults.h instead of expr.h.
7768         * parse.y: Likewise.
7769
7770 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
7771
7772         * java/decl.c (start_java_method): Change all uses of
7773         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7774         Ensure expr.h is included.
7775         * java/expr.c (pop_arguments): Ditto.
7776         * java/parse.y (expand_start_java_method): Ditto.
7777
7778 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7779
7780         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
7781
7782 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
7783
7784         * decl.c: Include "function.h".
7785         * except.c: Likewise.
7786         * parse.y: Likewise.
7787         * Makefile.in: Update dependencies.
7788
7789 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7790
7791         * expr.c (build_java_soft_divmod): Provide a default case in switch.
7792         (java_lang_expand_expr): Mark parameters `target', `tmode' and
7793         `modifier' with ATTRIBUTE_UNUSED.
7794
7795         * gjavah.c (process_file): Add braces around ambiguous `else'.
7796
7797         * jcf-dump.c (print_access_flags, localvar_free): Change return
7798         type to void.
7799
7800         * parse.y (java_complete_expand_method): Initialize variable
7801         `exception_copy'.
7802         (resolve_qualified_expression_name): Likewise for `field_decl'.
7803         (patch_method_invocation): Likewise for `class_to_search'.
7804         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
7805         (patch_assignment): Likewise for `lhs_type'.
7806
7807         * verify.c (verify_jvm_instructions): Remove unused variable
7808         `caller'.
7809
7810 1999-07-25  Richard Henderson  <rth@cygnus.com>
7811
7812         * decl.c (va_list_type_node): New.
7813
7814 1999-07-25  Anthony Green  <green@cygnus.com>
7815
7816         * gjavah.c (print_stub): New function.
7817         (METHOD_IS_NATIVE): New macro.
7818         (print_mangled_classname): Make static.
7819         (HANDLE_END_FIELD): Don't emit fields during stub generation.
7820         (process_file): Perform stub generation.
7821         (HANDLE_METHOD): Don't emit class decls during stub
7822         generation.
7823         (HANDLE_END_METHOD): Take into account stub generation.
7824         (print_method_info): Handle stub generation.
7825         (print_stub): New function.
7826         (print_cxx_classname): Make signature consistant with others.
7827         (help): Describe -stubs option.
7828         (main): Create stub file.
7829         (version): Use version.c.
7830         (print_full_cxx_name): New function.
7831         (print_c_decl): Use print_full_cxx_name.
7832
7833 Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7834
7835         * check-init.c (check_init): Handle MAX_EXPR.
7836
7837 1999-07-15  Andrew Haley  <aph@cygnus.com>
7838
7839         * lang.c (flag_use_divide_subroutine): New variable.
7840         * typeck.c: (convert_ieee_real_to_integer): Bounds check
7841         fp-to-integer conversion.
7842         (convert): Call convert_ieee_real_to_integer when flag_fast_math
7843         is not set.
7844
7845         * expr.c (build_java_soft_divmod): New function.
7846         (build_java_binop): Call build_java_soft_divmod if
7847         flag_use_divide_subroutine is set.
7848         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
7849         soft_lrem_node: new builtin functions.
7850         (init_decl_processing) Initialize the new builtins.
7851         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
7852         soft_lrem_node: new builtin functions.
7853         (build_java_soft_divmod): New function.
7854         * parse.y: Call build_java_soft_divmod if
7855         flag_use_divide_subroutine is set.
7856         * parse.c: Rebuilt.
7857
7858         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
7859         a --specs= arg) even if not linking.
7860         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
7861         -fuse-divide-subroutine
7862
7863 Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7864
7865         * parse.y (resolve_and_layout): Check methods only once.
7866         (resolve_qualified_expression_name): Verify thrown exceptions
7867         compatibility.
7868         (check_thrown_exceptions): Reject exceptions thrown in
7869         initializer. Error message tuned.
7870
7871 1999-07-14  Andrew Haley  <aph@cygnus.com>
7872
7873         * expr.c (expand_expr): Do not return the last statement in a
7874         block as the block's value.
7875
7876 Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7877
7878         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
7879         CALL_EXPR, to avoid order of evaluation changes.
7880
7881 Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7882
7883         * parse.y (qualify_ambiguous_name): Do not use
7884         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
7885
7886 Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7887
7888         * check-init.c (check_init): Handle MAX_EXPR.
7889         * expr.c (force_evaluation_order): Force method call arguments to
7890         be evaluated in left-to-right order.
7891         * parse.y (qualify_ambiguous_name): Loop again to qualify
7892         NEW_ARRAY_EXPR properly.
7893
7894 Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7895
7896         * parse.y (patch_invoke): Resolve unresolved invoked method
7897         returned type.
7898         (qualify_ambiguous_name): STRING_CST to qualify expression for
7899         type name resolution.
7900
7901 1999-06-24  Andrew Haley  <aph@cygnus.com>
7902
7903         * class.c (finish_class): Whenever a deferred method is
7904         output, rescan the list of methods to see if a new candidate for
7905         output can be found.
7906
7907 1999-06-28  Tom Tromey  <tromey@cygnus.com>
7908
7909         * jvspec.c (lang_specific_driver): Recognize --help.
7910
7911 Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7912
7913         * parse.y (resolve_package): Fixed bogus return statement.
7914         (patch_method_invocation): Resolve method invocation beginning with
7915         a package name qualifier.
7916
7917 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7918
7919         * Make-lang.in (java.stage1): Depend on stage1-start.
7920         (java.stage2): Likewise for stage2-start.
7921         (java.stage3): Likewise for stage3-start.
7922         (java.stage4): Likewise for stage4-start.
7923
7924 Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7925
7926         * parse.y (java_complete_lhs): When doing cross referencing, don't
7927         try to keep file location on a WFL expanded as a CALL_EXPR.
7928
7929 Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7930
7931         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
7932         compiling to class file a void method with an empty method body.
7933         As a side effect, the bytecode backend will generate the
7934         appropriate `return' instruction.
7935
7936 Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7937
7938         * parse.y (lookup_package_type_and_set_next): New function prototype.
7939         (resolve_package): Search current and imported packages.
7940         (lookup_package_type_and_set_next): New function.
7941
7942 1999-06-22  Andrew Haley  <aph@cygnus.com>
7943
7944         * verify.c (verify_jvm_instructions): Check for pending blocks
7945         before invalid PC test and opcode switch, not after.
7946
7947 1999-06-21  Andrew Haley  <aph@cygnus.com>
7948
7949         * except.c (find_handler_in_range): The upper limit for exception
7950         ranges is exclusive, not inclusive: (start <= pc < end).
7951         (link_handler): find child pointer which points to outer by
7952         searching sibling list: previous code incorrectly assumed that
7953         outer->outer->first_child must point to outer.
7954         * verify.c (verify_jvm_instructions): FIXME added to code for
7955         `athrow'.
7956         (verify_jvm_instructions): Do not assume that the last block
7957         processed in a subroutine is a block which ends with a `ret'
7958         instruction.  With some control flows it is possible that the last
7959         block ends with an `athrow'.
7960
7961 Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7962
7963         * parse.y (qualify_ambiguous_name): Reorganized the post
7964         evaluation of non WFL leading expression nodes.
7965
7966 Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7967
7968         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
7969         CONVERT_EXPR.
7970
7971 Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7972
7973         * parse.y (qualify_ambiguous_name): Handle qualified expression
7974         beginning with a STRING_CST.
7975
7976 Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7977
7978         * parse.y (register_fields): Set DECL_INITIAL on both
7979         pre-initialized static and public fields.
7980         (resolve_field_access): Static field access expressions to always
7981         use pointer types.
7982         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
7983         qualification. CONVERT_EXPR to be resolved as an expression name.
7984         (java_complete_lhs): Identify and access qualified final
7985         initialized field in switch statement case expression.
7986         (fold_constant_for_init): Pre-initialized field decl constant to
7987         be folded.
7988
7989 Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7990
7991         * parse.y (note_possible_classname): Mark returned node with
7992         QUALIFIED_P only if the original class name contained a '/'.
7993
7994 Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
7995
7996         * Make-lang.in (gcjh): More parallel build fixes.
7997
7998 1999-06-03  Mike Stump  <mrs@wrs.com>
7999
8000         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
8001
8002 Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
8003
8004         * except.c (link_handler): Chain exception handlers in order.
8005
8006 Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
8007
8008         * expr.c (expand_byte_code): Fill unreachable bytecode regions
8009         with nops and process as usual in order to always set correct EH
8010         ranges.  Emit detailed warnings about unreachable bytecodes.
8011
8012 Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
8013
8014         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
8015         constant.
8016
8017 Fri May 28 18:22:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8018
8019         * parse.y (lookup_field_wrapper): Unified returned value to NULL
8020           or the searched field decl.
8021
8022 Fri May 28 11:34:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8023
8024         * parse.y (fold_constant_for_init): Convert numerical constant
8025         values to the type of the assigned field.
8026
8027 Thu May 27 19:57:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8028
8029         * expr.c (lookup_field): Relaxed the test on class loading error
8030         detection.
8031         * parse.y (fold_constant_for_init): Enabeled old code.
8032
8033 Wed May 26 18:06:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8034
8035         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
8036         decide the validity of the cast of a java.lang.Cloneable reference
8037         to an array.
8038         (patch_conditional_expr): Fixed first argument passed to
8039         binary_numeric_promotion.
8040
8041 Wed May 26 15:33:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8042
8043         * parse.y (qualify_ambiguous_name): Take into account that a
8044         CONVERT_EXPR might specify a type as a WFL.
8045
8046 Tue May 25 15:06:13 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8047
8048         * parse.y (patch_assignment): Save the rhs before using it as an
8049         argument to _Jv_CheckArrayStore.
8050
8051 Tue May 25 11:23:59 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8052
8053         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
8054
8055 Mon May 24 13:26:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8056
8057         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
8058         floating point litteral only when the exponent indicator has been
8059         parsed.
8060
8061 Sat May 22 13:54:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8062
8063         * parse.y (formal_parameter:): Construct argument tree list
8064         element even if a yet unsupported final parameter was encountered.
8065
8066 Tue May 18 00:28:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8067
8068         * parse.y (finish_method_declaration): Issue errors for native or
8069         abstract methods declared with a method body, as well as for non
8070         native or non abstract methods with no method body.
8071
8072 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8073
8074         * class.c (build_utf8_ref): Initialize variable `field'.
8075
8076         * decl.c (init_decl_processing): Initialize variable `field'.
8077
8078         * expr.c (build_known_method_ref): Mark parameters `method_type',
8079         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
8080         (process_jvm_instruction): Likewise for parameter `length'.
8081
8082         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
8083         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
8084         ATTRIBUTE_UNUSED.
8085
8086         * parse.y (maybe_generate_clinit): Remove unused variable
8087         `has_non_primitive_fields'.
8088         (find_in_imports_on_demand): Initialize variables `node_to_use'
8089         and `cl'.
8090         (patch_binop): Likewise for variable `prom_type'.
8091         (patch_unaryop): Likewise for variable `prom_type'.
8092
8093         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
8094
8095         * xref.c (xref_table): Add missing initializer.
8096
8097 1999-05-14  Tom Tromey  <tromey@cygnus.com>
8098
8099         * java-except.h (struct eh_range): Removed unused `next' member.
8100         * verify.c (verify_jvm_instructions): Call check_nested_ranges
8101         after adding all exception handlers.  Sort exception ranges in
8102         order of start PC.
8103         (struct pc_index): New structure.
8104         (start_pc_cmp): New function.
8105         * except.c (add_handler): Return `void'.  Don't call link_handler;
8106         instead construct an ordinary linked list and do range
8107         coalescing.
8108         (check_nested_ranges): New function.
8109         (link_handler): Changed interface to allow merging of eh_ranges.
8110         Split overlapping ranges.  Return `void'.
8111
8112 Mon May 17 19:20:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8113
8114         * parse.y (constructor_block_end:): New rule, tagged <node>.
8115         (constructor_body:): Use `constructor_block_end' instead of
8116         `block_end'.
8117
8118 Mon May 17 18:01:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8119
8120         * parse.y (statement_nsi:): Pop `for' statement block.
8121         (java_complete_lhs): Labeled blocks containing no statement are
8122         marked as completing normally.
8123
8124 Fri May 14 12:31:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8125
8126         * xref.c (xref_set_current_fp): New function, defined.
8127         * xref.h (xref_set_current_fp): New function, prototyped.
8128
8129 Fri May 14 11:57:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8130
8131         * check-init.c (check_init): Take into account that
8132         LABELED_BLOCK_STMT can be empty.
8133
8134 Thu May 13 18:30:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8135
8136         * parse.y (java_check_regular_methods): Warning check on not
8137         overriding methods with default access in other packages does not
8138         apply to `<clinit>'.
8139         (java_complete_lhs): If block body is an empty_stmt_node, replace
8140         it by NULL_TREE. This prevents gcc from generating an irrelevant
8141         warning.
8142
8143 Thu May 13 13:23:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8144
8145         * check-init.c (check_init): Removed code accepting to see things
8146         falling through default:, when doing xrefs.
8147         * java-tree.h (do_not_fold): New global variable, declared.
8148         * parse.y (do_not_fold): New global variable, defined.
8149         (java_complete_expand_method): Set `do_not_fold' to the value of
8150         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
8151         and reinstall them after them have been purged; do not check for
8152         initializations; do not issue missing return errors.
8153         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
8154         when doing xrefs.
8155         (patch_binop): Skip the fold part when doing xrefs.
8156         (build_string_concatenation): Skip the concatenation part when
8157         doing xrefs.
8158         (patch_synchronized_statement): Do not generate a try-finally when
8159         doing xrefs.
8160         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
8161         and keep the location where the throw was seen.
8162         * typeck.c (convert): When `do_not_fold' is set, do not attempt
8163         any treatment on the converted node an simply return a NOP_EXPR of
8164         the targeted type.
8165         * xref.c (xref_get_data): New function, defined.
8166         * xref.h (xref_get_data): New function, declared.
8167         (XREF_GET_DATA): Use xref_get_data.
8168
8169 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8170
8171         * gjavah.c (print_include): Cast the result of `strlen' to int
8172         when comparing against a signed value.
8173         (add_namelet): Likewise.
8174
8175 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8176
8177         * expr.c (expand_invoke): Mark parameter `nargs' with
8178         ATTRIBUTE_UNUSED.
8179         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
8180
8181         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
8182         ATTRIBUTE_UNUSED.
8183
8184         * jcf-reader.c (get_attribute): Cast a value to long
8185         when comparing against a signed expression.  Likewise.
8186
8187         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
8188         HOST_BITS_PER_CHAR.
8189
8190 1999-05-11  Andrew Haley  <aph@cygnus.com>
8191
8192         * parse.y (source_end_java_method): If the current method contains
8193         any exception handlers, force asynchronous_exceptions: this is
8194         necessary because signal handlers in libjava may throw exceptions.
8195         * decl.c (end_java_method): Ditto.
8196
8197 1999-05-11  Tom Tromey  <tromey@cygnus.com>
8198
8199         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
8200         flags.
8201         * jvspec.c (THREAD_NAME): Removed.
8202         (GC_NAME): Likewise.
8203         (MATHLIB): Likewise.
8204         (WITHLIBC): Likewise.
8205         (GCLIB): Likewise.
8206         (THREADLIB): Likewise.
8207         (MATH_LIBRARY): Likewise.
8208         (lang_specific_driver): Don't add `-l' options to command line.
8209         Instead, add a single --specs option.  Recognize `-L' options and
8210         use them to search for spec file.
8211         (find_spec_file): New function.
8212         (SPEC_FILE): New define.
8213
8214 Tue May 11 11:46:36 1999  Dave Brolley  <brolley@cygnus.com>
8215
8216         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
8217         cpplib-enabled build.
8218
8219 1999-05-05  Per Bothner  <bothner@cygnus.com>
8220
8221         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
8222         temporarily zero it while calling rest_of_decl_compilation.
8223
8224         * java-tree.h (string_ptr_type_node):  Add declaration.
8225         * decl.c:  Define and initialize string_ptr_type_node.
8226         * parse.y (patch_string_cst):  Use string_ptr_type_node.
8227
8228         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
8229         * parse.y (for_statement):  Now unconditionally exit_block.
8230         (finish_labeled_statement):  No longer exit_block if for-loop.
8231         (patch_loop_statement):  Check harder if the loop is already labeled.
8232
8233         * parse.y (patch_initialized_static_field):  Removed function.
8234         (maybe_generate_clinit):  Removed special handling for interfaces.
8235         (java_complete_expand_methods):  Do a preliminary java_complete_tree
8236         on <clinit> to determine if it can be removed.
8237         (java_complete_expand_method):  Remove special handling for <clinit>.
8238         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
8239         optimize if we get back empty_stmt_node.
8240         For MODIFY_EXPR, re-do checking of static initializers.
8241         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
8242         For VAR_DECL, pass correct context.
8243
8244         * verify.c (verify_jvm_instructions):  Better error messages.
8245
8246 1999-05-03  Tom Tromey  <tromey@cygnus.com>
8247
8248         * parse-scan.y (interface_declaration): Call
8249         report_class_declaration for interfaces.
8250
8251 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
8252
8253         * Makefile.in: Remove -v from bison command lines.
8254
8255 Fri Apr 30 17:54:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8256
8257         * check-init.c (check_init): Exclude a case of error when doing
8258         xrefs.
8259         * class.c (layout_class_method): Don't generate the error message
8260         twice when compiling from source.
8261         * lang-options.h: Added `-Wredundant-modifers' and
8262         `-Wunusupported-jdk11' flags and help text.
8263         * lang.c (lang_decode_option): Added support for
8264         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
8265         flag_static_local_jdk11 and flag_redundant set accordingly.
8266         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
8267         * parse.h (EXPR_WFL_ADD_COL): New macro.
8268         (DECL_END_SOURCE_LINE): Likewise.
8269         (DECL_INHERITED_SOURCE_LINE): Likewise.
8270         * parse.y (static_ref_err): New function, prototyped.
8271         (CCB_TK): Now tagged <operator>.
8272         (class_body:): Remember the location of the closing '}' of a class
8273         definition when doing xrefs.
8274         (block:): Likewise.
8275         (block_end:): Likewise.
8276         (create_class): Remember the location of the inherited class
8277         identifier when doing xrefs.
8278         (register_fields): Added test on first operand of `init' before
8279         testing it TREE_CODE.
8280         (method_header): Store the location of the class identifier in the
8281         class decl when doing xrefs.
8282         (finish_method_declaration): Don't combine first/last method line
8283         when doing xref.
8284         (java_check_regular_methods): Warning check on not overriding
8285         methods with default access on other packages move before check on
8286         static methods. Initialization of `aflags' also moved up.
8287         (resolve_expression_name): Call static_ref_err to report the error.
8288         (static_ref_err): New function, implemented.
8289         (resolve_field_access): Returned simplified static field access
8290         when doing xrefs.
8291         (resolve_qualified_expression_name): Check for illegal use of
8292         static fields in a non static context. Call static_ref_err to
8293         report error in various places.
8294         (java_complete_tree): Do not fold initialized static fields when
8295         doing xrefs.
8296         (java_complete_lhs): Likewise.
8297
8298 1999-04-29  Anthony Green  <green@cygnus.com>
8299
8300         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
8301         create internal labels.
8302         (lookup_label): Ditto.
8303
8304 Sat Apr 24 16:50:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8305
8306         * class.c (layout_class_method): Generate <clinit>'s rtl for
8307         interfaces.
8308         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8309         for interfaces' <clinit>.
8310         * expr.c (lookup_field): Search for fields in interfaces.
8311         (expand_invoke): Fixed indentation.
8312         (expand_java_field_op): Likewise. Use IS_CLINIT.
8313         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
8314         (IS_CLINIT): New macro.
8315         * parse.y (type_declaration:): Call maybe_generate_clinit after an
8316         interface was parsed.
8317         (maybe_generate_clinit): Don't generate if the current class is an
8318         interface with only fields of primitive types.
8319         (reset_method_name): Use IS_CLINIT.
8320         (java_complete_expand_method): Expand <clinit> when it exists for
8321         interfaces. Use IS_CLINIT.
8322         (resolve_expression_name): Use DECL_CONTEXT instead of
8323         current_class to build static field references.
8324         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
8325         ARRAY_REF when doing xreferencing.
8326         (check_final_assignment): Fixed typo in leading comment. Use
8327         IS_CLINIT.
8328         (patch_array_ref): Don't fully expand array references when
8329         xreferencing.
8330         (patch_return): Use IS_CLINIT.
8331         (patch_throw_statement): Likewise.
8332
8333 1999-04-22  Tom Tromey  <tromey@cygnus.com>
8334
8335         * Make-lang.in (JAVA_SRCS): Added check-init.c.
8336
8337 Wed Apr 21 11:13:36 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8338
8339         * decl.c (predef_filenames, predef_filenames_size): New globals
8340         (init_decl_processing): predef_filenames and predef_filenames_size
8341         initialized.
8342         * java-tree.h (predef_filenames, predef_filenames_size): Declared
8343         extern.
8344         * jcf-parse.c (predefined_filename_p): New function.
8345         (yyparse): Check that files on the command line are specified only
8346         once and issue a warning otherwise.
8347         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
8348         * parse.y (source_end_java_method): Nullify NOP method bodies, to
8349         avoid a gcc warning with -W -Wall turned on.
8350         (java_expand_classes): Abort if errors were encountered.
8351         (java_complete_lhs): If the cross reference flag is set, wrap
8352         field DECL node around a WFL when resolving expression name.
8353
8354 Mon Apr 19 14:44:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8355
8356         * lang.c (lang_decode_option): Fixed returned value when parsing
8357         `-fxref=...' and `-Wall'.
8358         * parse.y (source_end_java_method): Do not generate code when
8359         flag_emit_xref is set.
8360         (resolve_expression_name): Do not build static field access when
8361         flag_emit_xref is set.
8362         (resolve_field_access): No special treatment on `length' when
8363         flag_emit_xref is set. Do not build qualified static field access
8364         when flag_emit_xref is set.
8365         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
8366         when flag_emit_xref is set.
8367         (patch_assignment): Do not generate array store runtime check when
8368         flag_emit_xref is set.
8369         * xref.c (xref_flag_value): Fixed function declaration
8370         indentation.
8371         (xset_set_data): New function.
8372         * xref.h (xref_set_data): Added prototype for new function.
8373         (typedef struct xref_flag_table): New field data.
8374         (XREF_GET_DATA): New macro.
8375
8376 1999-04-19  Tom Tromey  <tromey@cygnus.com>
8377
8378         * xref.h (enum): Removed trailing comma.
8379
8380         * parse.y (resolve_qualified_expression_name): Added missing
8381         `break'.
8382
8383 Thu Apr 15 13:08:03 1999  Anthony Green  <green@cygnus.com>
8384
8385         * gjavah.c: New prototypes for java_float_finite and
8386         java_double_finite.
8387
8388 Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8389
8390         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
8391         references.
8392
8393 Tue Apr  6 23:15:52 1999  Jeffrey A Law  (law@cygnus.com)
8394
8395         * Makefile.in (TREE_H): Add tree-check.h.
8396         (RTL_H): Add genrtl.h.
8397
8398 Tue Apr  6 15:15:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8399
8400         * parse.y (patch_assignment): Added ArrayStoreException runtime
8401         check.
8402
8403 1999-04-06  Per Bothner  <bothner@cygnus.com>
8404
8405         * expr.c (pop_type_0):  New function.
8406         (pop_type):  Use pop_type_0.
8407         * java-tree.h (pop_type_0):  New declaration.
8408         * verify.c (verify_jvm_instructions):  Check return instructions.
8409
8410         * parse.y (patch_binop):  Don't fold if non-constant and emiting
8411         class files.
8412
8413 Mon Apr  5 16:06:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8414
8415         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
8416
8417         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
8418         (main_jcf): Don't define.
8419         (process_file): Don't set `main_jcf'.
8420
8421         * java-tree.h (main_jcf): Don't declare.
8422
8423         * jcf-parse.c (main_jcf): Add static definition.
8424
8425         * lang.c (main_jcf): Don't define.
8426
8427 Mon Apr  5 15:43:51 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8428
8429         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
8430
8431         * decl.c (copy_lang_decl): Likewise for `bcopy'.
8432
8433         * jcf-depend.c: Include "config.h", not <config.h>.
8434
8435         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
8436         `bcopy' to PTR.
8437
8438         * jcf-path.c: Include "config.h", not <config.h>.
8439
8440         * lex.c: Don't include various system header files.
8441         (java_init_lex): Cast the argument of `bzero' to PTR
8442
8443         * parse-scan.y (java_push_parser_context): Likewise.
8444
8445         * parse.y (java_push_parser_context): Likewise.
8446         (patch_bc_statement): Match format specifier to variable argument.
8447
8448         * xref.c: Don't include <stdio.h>.
8449
8450 Mon Apr  5 11:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8451
8452         * parse.y (struct parser_ctxt *ctxp): Now global.
8453         (declare_local_variables): Use WFL compound value for the
8454         declaration source line value, when doing cross-referencing.
8455
8456 1999-03-31  Tom Tromey  <tromey@cygnus.com>
8457
8458         * gjavah.c (print_field_info): Allow constants of other types.
8459         (print_include): Generate include when new name is proper prefix
8460         of already printed name.
8461         (add_namelet): Likewise.
8462         (cxx_keyword_subst): New function.
8463         (print_method_info): Use it.
8464         (print_field_name): New function.
8465         (get_field_name): New function.
8466         (print_field_info): Use get_field_name and print_field_name.
8467
8468 Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8469
8470         * Makefile.in (keyword.h): Generate using gperf language 'C', not
8471         'KR-C', so gperf uses the `const' keyword on strings.
8472
8473         * keyword.gperf (java_keyword): Const-ify a char*.
8474
8475 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8476
8477         * parse.y (patch_bc_statement): Fixed identation and a bogus
8478         `printf' format.
8479
8480 Tue Mar 30 11:29:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8481
8482         * parse.y (patch_assignment): Allow static variables in other
8483         classes to be assigned.
8484
8485 Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8486
8487         * class.c (maybe_add_interface): Remove unused variable
8488         `interface_binfo'.
8489         (make_class_data): Use = for assignment, not ==.  Likewise.
8490         (emit_register_classes): Remove unused variable `decl'.
8491
8492         * lex.c: Fix comment so as not to contain an embedded `/*'.
8493
8494         * verify.c (verify_jvm_instructions): Remove unused variable
8495         `self_type'.
8496
8497 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
8498
8499         * parse.y (complete_loop_body):  Rename to finish_loop_body.
8500         (complete_labeled_statement):  Rename to finish_labeled_statement.
8501         (complete_for_loop):  Rename to finish_for_loop.
8502         (complete_method_declaration):  Rename to finish_method_declaration.
8503
8504         * java-tree.h (continue_identifier_node):  New global node.
8505         * decl.c:  Define and initialize continue_identifier_node.
8506         * parse.y (generate_labeled_block):  Remove - no longer needed.
8507         (build_loop_body):  Use continue_identifier_node for continue block.
8508         (finish_labeled_statement):  Also do pop_labeled_block actions.
8509         (java_complete_lhs):  POP_LOOP even if error.
8510         (build_labeled_block):  Special handling for continue_identifier_node.
8511         (patch_loop_statement):  Re-organize.
8512         (patch_bc_statement):  Re-write.
8513
8514 Sat Mar 27 15:13:21 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8515
8516         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
8517         using a WFL compound value.
8518         * parse.y (xref.h): Include.
8519         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
8520         WFL compound value.
8521         (register_fields): Set WFL compound value to lineno if doing
8522         xrefs.
8523         (java_complete_expand_method): Call expand_xref if flag_emit_xref
8524         is set.
8525         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
8526         * xref.h (expand_xref): Prototype renamed from xref_generate.
8527
8528 Sat Mar 27 14:16:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8529
8530         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
8531         (GET_CURRENT_BLOCK): New macro.
8532         * parse.y (current_static_block): New global variable.
8533         (method_body:): Define action.
8534         (complete_method_declaration): Set current_function_decl to NULL
8535         when work on the current method is done.
8536         (declare_local_variables): Use GET_CURRENT_BLOCK.
8537         (java_method_add_stmt): Likewise.
8538         (java_complete_expand_method): Disable the use of `this' when
8539         expanding <clinit>.
8540         (enter_a_block): If no current method exist, use
8541         current_static_block to link static initializer blocks.
8542         (exit_block): Rewritten to use current_static_block when no current
8543         method decl exists.
8544         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
8545         (patch_return): Forbid the use of `return' in static initializers.
8546         (patch_throw_statement): Fixed indentation. Issue specific error
8547         for uncaught thrown checked exception in static initializer
8548         blocks. Removed FIXME.
8549
8550 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
8551
8552         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
8553         Link gcj from gcc.o.
8554
8555 Tue Mar 23 10:48:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8556
8557         * parse.y (find_applicable_accessible_methods_list): When dealing
8558         with interface: ensure that a given interface or java.lang.Object
8559         are searched only once.
8560
8561 Tue Mar 23 10:05:27 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8562
8563         * gjavah.c (print_c_decl): Remove unused argument `flags'.
8564
8565         * jcf-dump.c (print_access_flags): Add braces around if-else.
8566
8567         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
8568         COMBINE_INPUTS.
8569
8570         * lex.c (build_wfl_node): Add static prototype.
8571
8572         * lex.h (build_wfl_node): Remove static prototype.
8573
8574         * parse.y: Include lex.c early enough to declare everything needed.
8575         Ensure calls to `build_wfl_node' pass the proper arguments.
8576         (create_class): Remove unused variable `super_decl'.
8577         (get_printable_method_name): Initialize variable `name'.
8578
8579 Mon Mar 22 20:14:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8580
8581         * Changelog: Fixed 1999-03-22 typos.
8582         * lang.c (lang_decode_option): Fixed typo in error string in the
8583         XARG section.
8584
8585 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8586
8587         * Makefile.in (JAVA_OBJS): Added entry xref.o.
8588         (xref.o): New rule.
8589         * java-tree.h (flag_emit_xref): Declared extern.
8590         * lang.c (xref.h): Included.
8591         (flag_emit_xref): New global variable.
8592         (lang_decode_option): Added support for -fxref.
8593         * xref.c: Created.
8594         * xref.h: Likewise.
8595
8596 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
8597
8598         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
8599         linked with.
8600
8601 Sun Mar 21 08:30:30 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8602
8603         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
8604         $(srcdir)/../system.h and $(JAVA_TREE_H).
8605         (jcf-io.o): Depend on $(JAVA_TREE_H).
8606         (mangle.o): Likewise.
8607
8608         * check-init.c (check_cond_init): Add static prototype.
8609
8610         * class.c (build_java_method_type, hashUtf8String,
8611         make_field_value, get_dispatch_vector, get_dispatch_table,
8612         append_gpp_mangled_type, mangle_static_field): Likewise.
8613         (strLengthUtf8): Hide unused definition.
8614         (hashUtf8String): Const-ify.
8615         (make_field_value): Un-ANSI-fy.
8616
8617         * constants.c: Move inclusion of jcf.h above java-tree.h.
8618         (set_constant_entry, find_class_or_string_constant,
8619         find_name_and_type_constant, get_tag_node,
8620         build_constant_data_ref): Add static prototype.
8621
8622         * decl.c (push_jvm_slot, builtin_function,
8623         lookup_name_current_level): Likewise.
8624         (builtin_function): Const-ify.
8625
8626         * except.c (expand_start_java_handler, expand_end_java_handler):
8627         Add static prototype.
8628
8629         * expr.c (flush_quick_stack, push_value, pop_value,
8630         java_stack_swap, java_stack_dup, build_java_athrow,
8631         build_java_jsr, build_java_ret, expand_java_multianewarray,
8632         expand_java_arraystore, expand_java_arrayload,
8633         expand_java_array_length, build_java_monitor, expand_java_pushc,
8634         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
8635         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
8636         expand_compare, expand_test, expand_cond, expand_java_goto,
8637         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
8638         expand_java_field_op, java_push_constant_from_pool): Likewise.
8639
8640         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
8641         (build_java_arraynull_check): Mark parameters `node' and `type'
8642         with ATTRIBUTE_UNUSED.
8643         (note_label): Likewise for parameter `current_pc'.
8644         (expand_java_call, expand_java_ret): Hide unused definition.
8645
8646         * java-tree.h (make_class, build_constants_constructor,
8647         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
8648         init_outgoing_cpool, register_class, emit_register_classes,
8649         java_layout_seen_class_methods): Prototype.
8650         (unicode_mangling_length): Const-ify.
8651         (append_gpp_mangled_name, append_gpp_mangled_classtype,
8652         emit_unicode_mangled_name, format_int, format_uint,
8653         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
8654         jcf_print_utf8_replace, open_class): Prototype.
8655
8656         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
8657         <stdio.h>.  Include tree.h/java-tree.h.
8658         (utf8_equal_string usage, process_class): Add static prototype.
8659         (open_class): Don't prototype this here.
8660         (utf8_equal_string): Match arguments to format specifiers.
8661         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
8662         TABLE_SWITCH, disassemble_method): Likewise.
8663
8664         * jcf-io.c: Include tree.h/java-tree.h.
8665         (open_class, find_classfile, jcf_print_utf8,
8666         jcf_print_utf8_replace): Const-ify.
8667
8668         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
8669         parse_class_file): Add static prototype.
8670         (find_in_current_zip): Match definition to existing static
8671         prototype.
8672
8673         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
8674         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
8675         finish_jcf_block, define_jcf_label, get_jcf_label_here,
8676         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
8677         write_chunks, adjust_typed_op, generate_bytecode_conditional,
8678         generate_bytecode_return, perform_relocations, init_jcf_state,
8679         init_jcf_method, release_jcf_state, generate_classfile):
8680         Add static prototype.
8681         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
8682         (make_class_file_name): Const-ify.
8683
8684         * jcf.h (find_classfile): Const-ify.
8685
8686         * jv-scan.c (reset_report): Remove prototype.
8687
8688         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
8689         (error): Rewrite to allow varargs.
8690
8691         * lang.c (lang_f_options): Const-ify.
8692
8693         * lex.c (java_parse_escape_sequence): Add static prototype.
8694         (java_allocate_new_line): Match definition to existing static
8695         prototype.
8696
8697         * mangle.c Include tree.h/java-tree.h.
8698         (unicode_mangling_length, emit_unicode_mangled_name,
8699         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
8700
8701         * parse.h (jdep_code): Remove trailing comma in enumeration.
8702         (java_get_line_col): Move prototype outside of !JC1_LITE test.
8703         (reset_report): Add prototype.
8704
8705         * verify.c (push_pending_label, merge_types): Add static
8706         prototypes.
8707
8708         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
8709
8710 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8711
8712         * parse.y (find_applicable_accessible_methods_list): Extend the
8713         search to superinterfaces when relevant.
8714         (search_applicable_methods_list): New function.
8715
8716 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8717
8718         * class.c (unmangle_classname): Implemented stricter testing
8719         before setting the QUALIFIED_P flag on an identifier.
8720
8721 Tue Mar 16 15:15:41 1999  Per Bothner  <bothner@cygnus.com>
8722
8723         * parse.y (java_complete_lhs):  Call force_evaluation_order
8724         after patch_newarray.
8725         (patch_binop):  Don't call fold if there are side effects.
8726
8727 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8728
8729         * parse.y (java_stabilize_reference): Use save_expr instead of
8730         building a SAVE_EXPR node.
8731         (java_complete_lhs): Patch the resulting string of the `+='
8732         operator (if necessary) and complete the RHS after having built
8733         the cast.
8734
8735 Mon Mar 15 12:18:29 1999  Per Bothner  <bothner@cygnus.com>
8736
8737         * class.c (make_class):  Don't set CLASS_P here (because
8738         this function is also called by build_java_array_type).
8739         (push_class):  Set CLASS_P here instead.
8740         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
8741
8742         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
8743         context.  If the context is class, perfer "super" over "synchronized".
8744         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
8745
8746         * parse.y (create_class):  Don't call parser_check_super here;
8747         it is not robust.  Always wait until later.
8748
8749         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
8750         match what JDK 1.2 does), but don't set ACC_PUBLIC.
8751
8752 Sat Mar 13 18:16:34 1999  Per Bothner  <bothner@cygnus.com>
8753
8754         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
8755         * lex.h (UNGETC):  Change misleading macro.
8756
8757 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8758
8759         * parse.y (java_stabilize_reference): Return NODE when patching a
8760         COMPOUND_EXPR.
8761         (java_complete_lhs): Put parenthesis around truth values.
8762
8763 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8764
8765         * class.c (layout_class_method): Don't make rtl for interface
8766         methods.
8767         * parse.h (GET_TYPE_NAME): New macro.
8768         * parse.y (if_then_statement:): Fixed indentation.
8769         (if_then_else_statement:): Likewise.
8770         (for_statement:): Fixed spacing.
8771         (try_statement:): Fixed indentation.
8772         (create_interface): Don't force interfaces to be abstract.
8773         (method_header): Abstract methods are OK in interfaces.
8774         (declare_local_variables): Fixed typo in comment.
8775         (java_complete_expand_method): Fixed indentation.
8776         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
8777         non accessible fields.
8778         (java_stabilize_reference): New function.
8779         (java_complete_lhs): Fixed indentation. Use
8780         java_stabilize_reference in compound assignement. Insert the
8781         cast. If not processing `+' fix string constants before processing
8782         binop.
8783
8784 Fri Mar 12 19:42:55 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8785
8786         * constants.c (find_class_or_string_constant): Cast variable `j'
8787         to a `jword' when comparing against one.
8788
8789         * expr.c (java_lang_expand_expr): Remove unused variables
8790         `has_finally_p' and `op0'.
8791
8792         * gjavah.c (print_field_info): Cast a value to jint when comparing
8793         against one.  Likewise for a jlong.
8794         (add_namelet): Likewise cast a `sizeof' to an int when comparing
8795         against a signed quantity.
8796
8797         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
8798         (print_signature): Don't needlessly dereference variable `str'
8799
8800         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
8801         `max_locals' with ATTRIBUTE_UNUSED.
8802         (jcf_parse_class): Likewise for variable `index'.
8803
8804         * parse.h (reverse_jdep_list): Remove static prototype.
8805
8806         * parse.y (build_jump_to_finally): Remove prototype and definition.
8807         (reverse_jdep_list): Add static prototype.
8808
8809         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
8810         `assignment' and `expr_decl'.
8811
8812         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
8813
8814 1999-03-12  Andrew Haley  <aph@cygnus.com>
8815
8816         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
8817         we'll need a directory separator and a null character.
8818
8819 Wed Mar 10 23:20:11 1999  Per Bothner  <bothner@cygnus.com>
8820
8821         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
8822
8823   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8824
8825         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
8826         interfaces.
8827
8828 Fri Mar  5 15:17:29 1999  Per Bothner  <bothner@cygnus.com>
8829
8830         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
8831
8832         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
8833
8834         * class.c (layout_class_method):  A static method in a base class
8835         is never overridden, so treat it like it doesn't exist.
8836         However, do complain about private non-static method overriding
8837         public static method.
8838
8839         * parse.y:  Don't set unused INITIALIZED_P flag.
8840         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
8841
8842         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
8843         (build_array_from_name):  Re-order &index[string] to &string[index].
8844
8845         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
8846         error_mark (it might catch more errors, but it is more likely to lose).
8847
8848 Sat Mar  6 11:17:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8849
8850         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
8851         (parse-scan.o): Depend on toplev.h.
8852
8853         * class.c (make_method_value): Add prototype.  Make it static.
8854         Remove unused second argument, caller changed.
8855
8856         * expr.c (java_lang_expand_expr): Remove unused variable
8857         `return_label'.
8858
8859         * java-tree.h: Don't prototype find_in_current_zip.
8860         Add prototypes for verify_constant_pool, start_java_method,
8861         end_java_method, give_name_to_locals, expand_byte_code,
8862         open_in_zip, set_constant_value, find_constant1, find_constant2,
8863         find_utf8_constant, find_string_constant, find_class_constant,
8864         find_fieldref_index, find_methodref_index, write_constant_pool,
8865         count_constant_pool_bytes and encode_newarray_type.
8866
8867         * jcf-dump.c: Remove unused variable `LONG_temp'.
8868
8869         * jcf-parse.c: Include parse.h.
8870         (jcf_parse_source): Remove unused parameter, all callers changed.
8871         (jcf_figure_file_type): Add static prototype.
8872         (find_in_current_zip): Likewise.  Also remove unused parameter,
8873         all callers changed.
8874         (read_class): Initialize variable `saved_pos'.
8875
8876         * jcf-reader.c (jcf_parse_preamble): Mark variables
8877         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
8878
8879         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
8880         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
8881         (java_parse_doc_section): Initialize variable `seen_star'.
8882         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
8883         (java_lex_error): Mark parameters `msg' and `forward' with
8884         ATTRIBUTE_UNUSED.
8885         (java_get_line_col): Mark parameters `filename' and `line' with
8886         ATTRIBUTE_UNUSED.
8887
8888         * parse-scan.y: Include toplev.h.
8889         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
8890
8891         * parse.h: use `struct JCF', not plain `JCF'.
8892         (java_parser_context_save_global, java_expand_classes
8893         java_parser_context_restore_global, java_parse): Add prototypes.
8894
8895         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
8896         `node'.
8897
8898 Wed Feb 24 16:13:59 1999  Per Bothner  <bothner@deneb.cygnus.com>
8899
8900         *  check-init.c (check_init):  COPYN takes word count, not bit count.
8901
8902 Fri Feb 26 14:06:21 1999  Per Bothner  <bothner@cygnus.com>
8903
8904         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
8905         explicit build_decl.  (Avoids crash in reload when optimizing.)
8906
8907 Thu Feb 25 21:05:04 1999  Per Bothner  <bothner@cygnus.com>
8908
8909         * decl.c (complete_start_java_method):  Handle synchronized method
8910         even when compiling from bytecode.
8911
8912 1999-02-26  Tom Tromey  <tromey@cygnus.com>
8913
8914         * gjavah.c (add_class_decl): Only generate `#include' if outer
8915         class is not the name of the class we are processing.  Correctly
8916         append `.h' in #include.
8917         (process_file): Clean up newlines around generated `#include's.
8918         (decode_signature_piece): Correctly handle inner classes.
8919         (struct include): New structure.
8920         (all_includes): New global.
8921         (print_include): New function.
8922         (add_class_decl): Use it.
8923         (process_file): Likewise.
8924         (add_class_decl): Generate include for java-array.h if array
8925         seen.
8926         (process_file): Don't generate java-array.h include.
8927
8928         * gjavah.c (add_namelet): Check for standard package names here.
8929         (add_class_decl): Don't check for standard package names here.
8930
8931 1999-02-25  Tom Tromey  <tromey@cygnus.com>
8932
8933         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
8934         When reading a zip file, only use strncmp if both strings are
8935         bigger than the buffer length.  Initialize `k' when looping
8936         through zip file.
8937
8938 1999-02-24  Tom Tromey  <tromey@cygnus.com>
8939
8940         * gjavah.c (struct namelet): New structure.
8941         (add_namelet): New function.
8942         (print_namelet): New function.
8943         (print_class_decls): Use add_namelet and print_namelet to generate
8944         namespaces and not classes.
8945         (method_printed): New global.
8946         (HANDLE_END_METHOD): Examine method_printed.
8947         (print_method_info): Set method_printed when required.  Print
8948         error if function to be ignored is marked virtual.  Handle $finit$
8949         method.
8950         (METHOD_IS_FINAL): New macro.
8951         (print_field_info): Use it.
8952         (HANDLE_METHOD): Clear method_printed.
8953         (method_pass): New global.
8954         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
8955         (process_file): Do two passes over both fields and methods.
8956         (HANDLE_METHOD): Examine method_pass.
8957         (root): New global.
8958         (add_class_decl): New function.
8959         (print_class_decls): Don't scan over entire constant pool.
8960
8961 1999-02-23  Tom Tromey  <tromey@cygnus.com>
8962
8963         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
8964         disable linking in that case.
8965
8966 1999-02-20  Tom Tromey  <tromey@cygnus.com>
8967
8968         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
8969         not 0x1f.
8970
8971 Sun Feb 21 14:56:11 1999  Per Bothner  <bothner@cygnus.com>
8972
8973         * decl.c (build_result_decl), java-tree.h:  New method.
8974         (complete_start_java_method):  Handle synchronized methods.
8975         Don't build DECL_RESULT here.  (Ordering dependency problem.)
8976         (start_java_method):  Call build_result_decl here instead  ...
8977         * parse.y (java_complete_expand_method):  ... and here.
8978         (expand_start_java_method): Don't call complete_start_java_method here.
8979         (java_complete_expand_method):  Call it here instead.
8980         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
8981         * java-tree.h:  ... here.
8982
8983         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
8984         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
8985         for ARRAY_REF - it doesn't work when array bounds are checked.
8986         (patch_array_ref):  Handle it here instead.
8987
8988         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
8989
8990 Fri Feb 19 15:35:01 1999  Per Bothner  <bothner@cygnus.com>
8991
8992         Force left-to-right evaluation of binary operations etc.
8993         * expr.c (force_evaluation_order), java-tree.h:  New function.
8994         * parse.y (java_complete_lhs):  Pass binary operations, procedure
8995         calls, and ARRAY_REFs to force_evaluation_order.
8996         (various):  Set TREE_SIDE_EFFECTS more carefully.
8997
8998         Tolerate random (non-UTF8) encoding in comments without complaining.
8999         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
9000         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
9001
9002         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
9003         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
9004
9005         * parse.y (java_complete_lhs):  Ignore an empty statement in a
9006         COMPOUND_EXPR.  Don't complain about empty statement after return.
9007
9008 Fri Feb 19 13:00:56 1999  Per Bothner  <bothner@cygnus.com>
9009
9010         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
9011         in TREE_LIST - just chain the POINTER_TYPEs together.
9012         (resolve_class):  If type already resolved, return decl.
9013         After resolving, update TREE_TYPE(class_type), and name (if array).
9014         * parse.h (do_resolve_class), parse.y:  Make non-static.
9015         * class.c (maybe_layout_super_class):  Take this_class argument.
9016         Do do_resolve_class if necessary.
9017         (layout_class, layout_class_methods): Adjust calls appropriately.
9018         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
9019         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
9020         * typeck.c (build_java_array_type):  Don't call layout_class.
9021
9022 Wed Feb 17 15:47:20 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9023
9024         * parse.y (check_pkg_class_access): Allow private class access
9025         within the same package.
9026         (strip_out_static_field_access_decl): New function.
9027         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
9028         operator argument before testing its nature.
9029
9030 Wed Feb  3 12:38:43 1999  Per Bothner  <bothner@cygnus.com>
9031
9032         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
9033         (TRY_EXPR):  Simplify - it no longer has a finally clause.
9034         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
9035         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9036         * expr.c (java_lang_expand_expr):  Likewise.
9037         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
9038         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
9039         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
9040         (build_try_statement):  Remove finally parameter and handling.
9041         (build_try_finally_statement):  New function.
9042         (patch_try_statement):   No longer need to support finally clause.
9043         (try_statement):  Update grammar action rules.
9044         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
9045         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9046
9047 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
9048
9049         * jcf-parse.c (get_constant): Add braces around computation of 'd'
9050         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
9051
9052 1999-02-17  Andrew Haley  <aph@cygnus.com>
9053
9054         * class.c (build_utf8_ref): Back out broken patch which was
9055         intended to to output signatures using '.' as a separator.
9056
9057         * class.c (make_class_data): Output signatures using '.' as a
9058         separator, rather than '/'.
9059         (mangled_classname): Likewise.
9060         (make_field_value): Likewise.
9061         (make_method_value): Likewise.
9062         * constants.c (alloc_class_constant): Likewise.
9063         * expr.c (build_invokeinterface): Likewise.
9064
9065 Thu Feb 11 21:25:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9066
9067         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
9068         of an ancient workaround.
9069
9070 Wed Feb 10 23:27:33 1999  Jeffrey A Law  (law@cygnus.com)
9071
9072         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
9073         here anymore.
9074
9075 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9076
9077         * lex.c (yylex): Encode \0 as UTF8.
9078
9079 1999-02-10  Tom Tromey  <tromey@cygnus.com>
9080
9081         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
9082         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
9083         (libgcj_zip): Renamed.
9084         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
9085         LIBJAVA_ZIP_FILE.
9086         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
9087
9088         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
9089         (GC_NAME): Renamed -lgc to -lgcjgc.
9090
9091 Tue Feb  9 19:31:09 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9092
9093         * lex.c (java_lang_cloneable): Initialize.
9094         * parse.y (java_lang_cloneable): New static variable.
9095         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
9096         doing one more qualification round.
9097         (valid_ref_assignconv_cast_p): Reject null source or
9098         destination. Allow an array to be cast into java.lang.Cloneable.
9099         (patch_cast): Swapped two first arguments to first call to
9100         valid_ref_assignconv_cast_p.
9101
9102 Mon Feb  8 11:50:50 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9103
9104         * parse.h: DECL_P renamed JDECL_P.
9105         * parse.y: DECL_P replaced by JDECL_P.
9106         (build_array_from_name): Always use pointer's type.
9107         (patch_bc_statement): Extra code to search continue target in a
9108         for loop. Fixed comments. Continue target is current loop when
9109         unlabeled.
9110
9111 1999-02-05  Andrew Haley  <aph@cygnus.com>
9112
9113         * class.c (make_class_data): The superclass of an interface should
9114         be null, not class Object.
9115
9116         * lex.c (java_lex): Sign extend hex literals.
9117
9118 1999-02-04  Andrew Haley  <aph@cygnus.com>
9119
9120         * class.c (build_utf8_ref): Output signatures using '.' as a
9121         separator, rather than '/'.
9122         (make_class_data): Likewise.
9123
9124 Wed Feb  3 22:50:17 1999  Marc Espie <Marc.Espie@liafa.jussieu.fr>
9125
9126         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
9127         mkstemp.o.  Get them from libiberty now.
9128
9129 Tue Feb  2 19:49:12 1999  Jeffrey A Law  (law@cygnus.com)
9130
9131         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
9132
9133 Tue Feb  2 20:04:50 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9134
9135         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
9136         from libiberty.h
9137
9138 Tue Feb  2 10:39:47 1999  Per Bothner  <bothner@cygnus.com>
9139
9140         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
9141         * jcf-write.c (generate_bytecode_return):  New function.
9142         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
9143
9144         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
9145         generate special [fd]const_[01] instructions.
9146
9147         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
9148
9149         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
9150         handling OPCODE_lookupswitch or OPCODE_tableswitch.
9151
9152 Mon Feb  1 20:44:47 1999  Per Bothner  <bothner@cygnus.com>
9153
9154         * parse.y (patch_method_invocation):  Handle calling static methods,
9155         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
9156
9157         * parse.y (java_complete_lhs):  Don't complain about unreachable
9158         exit condition in a do-while statement.
9159
9160 Fri Jan 29 18:19:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9161
9162         * lex.c (java_read_char): Fixed utf8 decoding.
9163         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
9164         range.
9165         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
9166         comments. Local variable `all_primitive' is gone. Broadened
9167         acceptance of `0' to floating point targets. `long' can now be
9168         widened to `double' or `float'.
9169         (valid_method_invocation_conversion_p): Added leading
9170         comment. Fixed tabulation.
9171         (build_string_concatenation): Optimize out left or right empty
9172         string constants.
9173
9174 Thu Jan 28 18:51:26 1999  Per Bothner  <bothner@cygnus.com>
9175
9176         * jcf-write.c (localvar_alloc):  Only emit entry for
9177         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
9178         (generate_bytecode_insns):  Only call put_linenumber if
9179         debug_info_level > DINFO_LEVEL_NONE.
9180         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
9181         is specified, add -g1 (for compatibility wih javac).
9182
9183 Thu Jan 28 09:17:51 1999  Hans-Peter Nilsson  <hp@axis.se>
9184
9185         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
9186         gjavah.o, check-init.o, jv-scan.o
9187
9188 Mon Feb  1 09:50:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9189
9190         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
9191
9192         * gjavah.c: Include config.h and system.h.
9193
9194         * javaop.h (inline): Don't define, its handled by system.h.
9195         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
9196         from `inline' to `static inline'.
9197
9198         * jcf.h (inline): Don't define, its handled by system.h.
9199
9200         * lex.c (inline): Likewise.
9201
9202 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
9203
9204         * lang-specs.h: Map -Qn to -fno-ident.
9205
9206 Fri Jan 29 16:51:56 1999  Richard Henderson  <rth@cygnus.com>
9207
9208         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
9209
9210 1999-01-29  Tom Tromey  <tromey@cygnus.com>
9211
9212         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
9213         then cast it to Object before calling `append' method.
9214
9215 Thu Jan 28 14:45:39 1999  Per Bothner  <bothner@cygnus.com>
9216
9217         * check-init.c (check_bool2_init, check_bool_init, check_init):
9218         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
9219         * jcf-write.c (generate_bytecode_insns):  Likewise.
9220
9221 Thu Jan 28 11:50:11 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9222
9223         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
9224         * parse.y (patch_cast): Allow a boolean to be cast into a
9225         boolean.
9226
9227 Wed Jan 27 10:19:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9228
9229         * parse.y: (class_declaration:): Fixed indentation.
9230         (class_member_declaration:): Extra `;' after field declaration now
9231         accepted.
9232         (interface_declaration:): Removed debug messages in error reports.
9233         (patch_binop): Nodes created and returned inherit the orignal
9234         node's COMPOUND_ASSIGN_P flag value.
9235         (patch_cast): Fix cast from char to floating point.
9236
9237 Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
9238
9239         * except.c, java-except.h (expand_resume_after_catch): new
9240         function.
9241         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
9242         to branch back to main flow of control after a catch block.
9243
9244 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9245
9246         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
9247         $(srcdir)/../system.h.
9248         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
9249         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
9250         (jcf-write.o): Likewise.
9251         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9252         (mangle.o): Depend on $(srcdir)/../toplev.h.
9253         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9254         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9255
9256         * class.c: Include output.h and parse.h.
9257         (mangled_classname): Add the `const' keyword to a char*.
9258         (find_named_method): Hide unused function definition.
9259         (build_utf8_ref): Change type of variable `c' to unsigned char.
9260         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
9261         (build_class_ref): Add the `const' keyword to a char*.
9262         (layout_class_method): Remove unused variable `buf'.
9263
9264         * decl.c (find_local_variable): Remove unused variable `rtl'.
9265         (pushdecl): Likewise for variables `different_binding_level' and
9266         `oldglobal'.
9267         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
9268         (maybe_build_cleanup): Likewise for parameter `decl'.
9269
9270         * except.c (expand_start_java_handler): Mark parameter `range'
9271         with ATTRIBUTE_UNUSED.
9272
9273         * expr.c: Include except.h.
9274         (pop_type): Remove unused variable `i'.
9275         (pop_value): Likewise for variables `n_words' and `i'.
9276         (expand_java_arrayload): Likewise for variable `convert'.
9277         (java_lang_expand_expr): Likewise for variables `op0', `type',
9278         `mode', `unsignedp', `node' and `elements'.
9279         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
9280         `eh_ranges'.
9281         (process_jvm_instruction): Add a `const' qualifier to a char*.
9282
9283         * gjavah.c (output_directory): Add the `const' keyword to a char*.
9284         (temp_directory): Likewise.
9285         (print_c_decl): Likewise.
9286         (print_method_info): Likewise.
9287         (decode_signature_piece): Likewise.
9288         (print_mangled_classname): Likewise.
9289
9290         * java-except.h: Provide prototypes for maybe_start_try,
9291         maybe_end_try and add_handler.
9292
9293         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
9294         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
9295         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
9296         init_expr_processing, push_super_field, init_class_processing,
9297         can_widen_reference_to, class_depth, verify_jvm_instructions,
9298         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
9299         set_local_type, merge_type_state, push_type, load_type_state,
9300         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
9301         emit_unicode_mangled_name): Add prototypes.
9302
9303         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
9304         (print_signature_type): Use ISDIGIT, not isdigit.
9305         (print_signature): Remove unused variable `j'.
9306
9307         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
9308         int when comparing against one.
9309
9310         * jcf-parse.c: Include toplev.h.
9311
9312         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
9313         (localvar_free): Remove unused variable `i'.
9314         (generate_bytecode_conditional): Likewise for variable `kind'.
9315
9316         * jv-scan.c: Include config.h and system.h.  Remove redundant
9317         OS header and gansidecl.h includes.
9318         (warning): Add the `const' keyword to a char*.  Also add
9319         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
9320         __STDC__, when determining whether to use ANSI-isms.
9321         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
9322         (xmalloc): Don't redundantly prototype here.
9323         (main): Remove unused parameter `envp'.  Also fix the arguments
9324         passed to function `fatal' to match the format specifier.
9325
9326         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
9327
9328         * mangle.c: Include toplev.h.
9329         (emit_unicode_mangled_name): Declare parameter `len'.
9330
9331         * parse.y (parse_warning_context): Add the `const' keyword to a
9332         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
9333         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
9334         (issue_warning_error_from_context): Add the `const' keyword to
9335         a char*.
9336         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
9337         not `__STDC__' for whether to use ANSI-isms.
9338
9339         * typeck.c (incomplete_type_error): Mark parameters `value' and
9340         `type' with ATTRIBUTE_UNUSED.
9341         (parse_signature_type): Use ISDIGIT, not isdigit.
9342
9343         * verify.c (check_pending_block): Add the `const' keyword to a char*.
9344         (verify_jvm_instructions): Likewise.  Remove unused variables
9345         `field_name' and `default_val'.
9346
9347         * zextract.c: Include config.h and system.h.  Remove redundant
9348         OS header includes.
9349
9350         * zipfile.h: Prototype `read_zip_archive'.
9351
9352 Thu Jan 21 16:00:06 1999  Andrew Haley  <aph@cygnus.com>
9353
9354         * typeck.c (convert): Allow conversions to void type: some
9355         optimizations in gcc do this.
9356
9357 Thu Jan 21 15:21:49 1999  Andrew Haley  <aph@cygnus.com>
9358
9359         * typeck.c (convert_ieee_real_to_integer): New function.
9360         (convert): When not using fast-math and using hardware fp, convert
9361         an IEEE NaN to zero.
9362
9363 1999-01-18  Andrew Haley  <aph@cygnus.com>
9364
9365         * parse.y (patch_binop): Do a type conversion from signed to
9366         unsigned and then back to signed when a ">>>" is found.
9367
9368 Sun Jan 17 22:34:22 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9369
9370         * java-tree.h: (check_for_initialization): Added prototype.
9371         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
9372         * parse.y (do_resolve_class): Removed unused locals.
9373         (read_import_dir): Likewise.
9374         (resolve_qualified_expression_name): Array creation
9375         expressions are valid primary expressions.
9376         (qualify_ambiguous_name): Likewise.
9377         (patch_synchronized_statement): Removed unused local.
9378
9379 Sun Jan 17 21:55:42 1999  Jeffrey A Law  (law@cygnus.com)
9380
9381         * Makefile.in (zextract.o): Add dependencies.
9382
9383         * Makefile.in: Do not put ^Ls at the start of a line.
9384
9385 Fri Jan 15 20:16:20 1999  Per Bothner  <bothner@cygnus.com>
9386
9387         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
9388         sub-type the result of the call that gets the exception value.
9389
9390         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
9391         don't call finish_class.
9392
9393         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
9394         clear found before continuing.
9395
9396         * verify.c (verify_jvm_instructions):  On an array load, allow
9397         and handle top of stack to be TYPE_NULL.
9398
9399         * gjavah.c (generate_access):  Translate Java package private or
9400         protected access to C++ public, but with a comment.
9401
9402 1999-01-13  Andrew Haley  <aph@cygnus.com>
9403
9404         * expr.c (generate_name): Name prefix changed to avoid clashes
9405         with assembler temp labels.
9406
9407         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
9408         MODIFY_EXPR.  Without this, code for the assignement may not be
9409         generated at all and the synchronized statement will read an
9410         uninitialized variable.
9411
9412 Wed Jan 13 01:24:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9413
9414         * class.c (maybe_layout_super_class): Fixed returned value.
9415         * lex.c: Added 1999 to the copyright.
9416         (java_init_lex): Initialize java_lang_imported.
9417         * lex.h: Added 1999 to the copyright.
9418         * parse.h: Added 1999 to the copyright.
9419         (REGISTER_IMPORT): Fixed typo in trailing macro.
9420         (CURRENT_OSB): New macro.
9421         (struct parser_ctxt): New fields osb_depth, osb_limit.
9422         * parse.y (java_lang_id): New global variable.
9423         (type_import_on_demand_declaration): Don't import java.lang.* twice.
9424         (array_creation_expression:): Use CURRENT_OSB.
9425         (dims:): Uses a stack to keep track of array dimensions.
9426         (cast_expression:): Use CURRENT_OSB.
9427         (find_expr_with_wfl): Return NULL if node found doesn't meet the
9428         conditions.
9429         (register_fields): Fixed typos in comment.
9430         (check_method_redefinition): Fixed comment indentation.
9431         (java_check_regular_methods): Set saved found wfl to NULL after
9432         having reinstalled it in the previously found DECL_NAME.
9433
9434 Sun Jan 10 13:36:14 1999  Richard Henderson  <rth@cygnus.com>
9435
9436         * gjavah.c (java_float_finite): Use a union to do type punning.
9437         (java_double_finite): Likewise.
9438
9439 Sat Jan  9 11:25:00 1999  Per Bothner  <bothner@cygnus.com>
9440
9441         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
9442         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
9443         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
9444         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
9445         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
9446         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
9447
9448 Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
9449
9450         * check-init.c (check_init):  If compiling to native, we don't
9451         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
9452
9453 1999-01-08  Tom Tromey  <tromey@cygnus.com>
9454
9455         * parse-scan.y (variable_declarator_id): Set or increment
9456         bracket_count.
9457         (bracket_count): New global.
9458         (formal_parameter): Handle case where bracket pairs trail variable
9459         declarator id.
9460
9461 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
9462
9463         * jcf-parse.c (yyparse): variable len changed from a char to an
9464         int to prevent overflow.
9465
9466 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
9467
9468         * java-tree.h:  Declare read_class.
9469         * jcf-parse.c (read_class):  New function.
9470         (load_class):  Now just call read_class.
9471
9472         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
9473         * jcf-parse.c (parse_source_file):  Declare save_error_count,
9474         which is needed by java_parse_abort_on_error macro,
9475         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
9476
9477         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
9478         constructor, if initializing a static field.
9479         (patch_new_array_init):  Set TREE_CONSTANT if it is.
9480         * expr.c (java_lang_expand_expr):  For a static array constructor
9481         of primitive elements, allocate the array itself statically.
9482         Disabled until we can set the vtable field statically.
9483
9484         * check-init.c:  New file.  Checks for definite assignment.
9485         * Makefile.in (JAVA_OBJS):  Add check-init.o.
9486         * parse.y (java_complete_expand_method): Call check_for_initialization.
9487         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
9488
9489 Wed Jan  6 14:53:10 1999  Graham <grahams@rcp.co.uk>
9490
9491         * parse.y : include system.h instead of including
9492         standard headers directly with the exception of <dirent.h>.
9493
9494 Wed Jan  6 16:20:06 1999  Per Bothner  <bothner@cygnus.com>
9495
9496         * lex.h:  Moved static function declarations to lex.c,
9497         to shut up some -Wall warnings.
9498         * lex.c:  Static function declarations moved here.
9499         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
9500
9501 Tue Jan  5 22:15:40 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9502
9503         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
9504
9505 Tue Dec 22 11:25:19 1998  Per Bothner  <bothner@cygnus.com>
9506
9507         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
9508         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
9509
9510         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
9511         (localvar_alloc):  Change return type to void,
9512         (emit_unop):  Remove unused variable size.
9513
9514         * jcf-write.c (struct jcf_block):  Add new union.
9515         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
9516         (call_cleanups):  New functions.
9517         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
9518         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
9519         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
9520         * lang.c (lang_init):  Call using_eh_for_cleanups.
9521         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
9522         completing operands to patch_synchronized_statement.
9523         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
9524         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
9525         WITH_CLEANUP_EXPR instead of TRY_EXPR.
9526
9527 Sun Dec 20 16:15:44 1998  John F. Carr  <jfc@mit.edu>
9528
9529         * Make-lang.in: Comment out control-Ls; they upset some makes.
9530
9531 1998-12-18  Tom Tromey  <tromey@cygnus.com>
9532
9533         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
9534         consistently.
9535
9536 1998-12-17  Tom Tromey  <tromey@cygnus.com>
9537
9538         * parse.y (DIR_SEPARATOR): New define.
9539         (check_class_interface_creation): Use it.
9540
9541         * parse-scan.y (report_main_declaration): Recognize
9542         `java.lang.String' in argument to main.
9543
9544 Wed Dec 16 16:18:59 1998  Per Bothner  <bothner@cygnus.com>
9545
9546         * parse.y (create_interface):  Remove bogus test.
9547
9548 Wed Dec 16 14:42:19 1998  Per Bothner  <bothner@cygnus.com>
9549
9550         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
9551         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
9552
9553 1998-12-16  Tom Tromey  <tromey@cygnus.com>
9554
9555         * parse-scan.y (qualified_name): Use correct sprintf format.
9556
9557 1998-12-15  Tom Tromey  <tromey@cygnus.com>
9558
9559         * gjavah.c (print_field_info): Changed how most negative number is
9560         printed.
9561
9562 Mon Dec 14 18:49:29 1998  Per Bothner  <bothner@cygnus.com>
9563
9564         * parse.y (fold_constant_for_init):  New function.
9565         (resolve_expression_name):  Don't replace static final
9566         constant-initialized fields by its value.
9567         (java_complete_lhs):  New.  Same as java_complete_tree, except does
9568         not replace static final constant-initialized fields by their values.
9569         (register_fields):  If there is an initializer, set DECL_INITIAL and
9570         MODIFY_EXPR_FROM_INITIALIZATION_P.
9571         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
9572         Only call patch_initialized_static_field if
9573         MODIFY_EXPR_FROM_INITIALIZATION_P.
9574         (patch_initialized_static_field):  If not valid constant, clear
9575         DECL_INITIAL.
9576
9577         * parse.y (lookup_field_wrapper):  Fix thinko.
9578
9579         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
9580         set and restore global lineno.
9581
9582 1998-12-14  Tom Tromey  <tromey@cygnus.com>
9583
9584         * gjavah.c (print_field_info): If value to print is the smallest
9585         value of its size, then print as hex to avoid later warnings from
9586         C++ compiler.
9587
9588 1998-12-14  Tom Tromey  <tromey@cygnus.com>
9589
9590         * gjavah.c (decompile_method): Decompile `return null'.
9591         (process_file): Generate `#pragma interface'.
9592         (method_declared): New global.
9593         (print_method_info): Set it.
9594         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
9595         (print_method_info): Handle abstract methods.
9596
9597 Sun Dec 13 17:31:40 1998  Per Bothner  <bothner@cygnus.com>
9598
9599         * parse.y (patch_method_invocation):  If class_decl is null
9600         (e.g. an array type), use original type.
9601
9602         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
9603         errors about uncaught exception from clone (of array, specifically).
9604
9605 1998-12-13  Tom Tromey  <tromey@cygnus.com>
9606
9607         * gjavah.c (decompile_method): Handle all types of `return'
9608         opcode.  Decompile `return this' and `return'.
9609         (method_access): New global.
9610         (print_method_info): Set it.
9611         (decompile_method): Don't decompile a synchronized method.
9612
9613 1998-12-13  Tom Tromey  <tromey@cygnus.com>
9614
9615         * jcf-reader.c (jcf_parse_one_method): Recognize
9616         HANDLE_END_METHOD.
9617         * gjavah.c (HANDLE_END_METHOD): New macro.
9618         (HANDLE_CODE_ATTRIBUTE): New macro.
9619         (decompile_method): New function.
9620         (print_method_info): Don't print `;\n' at end of function decl.
9621         Include java-opcodes.h.
9622         (decompiled): New global.
9623
9624 Sat Dec 12 20:13:19 1998  Per Bothner  <bothner@cygnus.com>
9625
9626         * class.c (build_class_ref):  Handle PRIMTYPE.class if
9627         flag_emit_class_files.
9628         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
9629         if flag_emit_class_files.
9630         * parse.y (java_complete_tree):  Pre-liminary support for
9631         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
9632
9633         * parse.y (patch_synchronized_statement):   Don't call monitorexit
9634         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
9635
9636         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
9637
9638         * zipfile.h (opendir_in_zip):  New declaration.
9639         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
9640         (opendir_in_zip):  New function, using code from open_in_zip.
9641         (open_in_zip):  Call opendir_in_zip.
9642         (find_class):  Remove no-longer-used do_class_file parameter,
9643         but add source_ok parameter.  Change logic so if we find a .java file,
9644         we don't look for .class in later classpath emtries.
9645         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
9646         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
9647         * gjavah.c: Update call to find_class.
9648         * jcf-dump.c:  Likewise.
9649
9650         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
9651         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
9652         nothing if body is empty_stmt_node.
9653         Various little fixes so SP gets correctly adjusted.
9654         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
9655         For CALL_EXPR, test if static first.
9656         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
9657         such as the ones we create for Object and Class.
9658         Set and restore current_function_decl.
9659         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
9660         (note_possible_classname):  New function.
9661         (read_import_entry):  Removed.  Merged with read_import_dir.
9662         (read_import_dir):  Don't call find_class - that only gives us
9663         the first classpath entry having the needed package.
9664         Use the struct buffer data structure from buffer.h.
9665         (read_import_dir, find_in_imports_on_demand):  The remembered
9666         class names now use '.' (not '/') as package separator.
9667
9668         * parse.y (java_complete_expand_methods):  Call write_classfile
9669         here, and not in java_expand_classes (which only gets first class).
9670
9671 Sat Dec 12 19:46:04 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9672
9673         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
9674         (register_fields):  If a static fields has an initializer, just
9675         chain it on ctxp->static_initialized, and handle later.
9676         (java_complete_expand_methods):  Force <clinit> first.
9677         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
9678         - it's already been completed.
9679         (patch_initialized_static_field):  New function.
9680         (java_complete_field):  Call it.
9681
9682 Sat Dec 12 19:21:11 1998  Per Bothner  <bothner@cygnus.com>
9683
9684         * expr.c (encode_newarray_type, build_new_array):  New functions.
9685         * java-tree.h:  Declare build_new_array.
9686         * jcf-write.c (patch_newarray):  Use build_new_array.
9687
9688         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
9689         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
9690
9691         * parse.y (patch_new_array_init):  Re-organize.
9692         Now is passed the actual array (pointer) type of the value.
9693         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
9694         (patch_array_constructor):  Removed - merged into patch_new_array_init.
9695         (java_complete_tree):  Update patch_new_array_init.
9696
9697         * jcf-write.c (find_constant_index):  New function.
9698         (generate_bytecode_insns):  Use find_constant_index.
9699         (generate_classfile):  Use find_constant_index for ConstantValue.
9700
9701 1998-12-11  Tom Tromey  <tromey@cygnus.com>
9702
9703         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
9704         * decl.c (init_decl_processing): Renamed dtable -> vtable.
9705         * class.c (make_class_data): Renamed dtable -> vtable, and
9706         dtable_method_count -> vtable_method_count.
9707
9708 Thu Dec 10 20:00:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9709
9710         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
9711         global variables, initialized.
9712         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
9713         Declared new global variables.
9714         * lex.c (java_lex): Return long_zero_node, float_zero_node,
9715         double_zero_node, integer_zero_node upon direct matching.
9716         * parse.y (purify_type_name): Added function prototype.
9717         (duplicate_declaration_error_p): Consider new_type as potentially
9718         being a incomplete type. Use purify_type_name on type string.
9719         (method_header): saved_type: unused variable removed. Don't figure
9720         return type if method name is invalid.
9721         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
9722         processed by patch_unaryop.
9723         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
9724         increment/decrement node into its original type after binary
9725         numeric promotion on its operands.
9726
9727 Thu Dec 10 11:02:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9728
9729         * parse.y (array_initializer:): Array init operand is NULL_TREE
9730         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
9731         now an error. Fixed indentation problems.
9732         (patch_string): Handle error_mark_node as an argument.
9733         (patch_new_array_init): Fixed indentation problems.
9734         (array_constructor_check_entry): Removed check on null wfl_value.
9735         Return an error if wfl_value's walk returns an error.
9736
9737 Wed Dec  9 15:37:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9738
9739         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
9740         * lex.c (java_lex): Remember column position before advancing one
9741         token. Retain location information on OCB_TK.
9742         * lex.h (typedef struct java_lc): Added new field.
9743         * parse.h (GET_SKIP_TYPE): New macro.
9744         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
9745         * parse.y (build_new_array_init, patch_new_array_init,
9746         patch_array_constructor, maybe_build_array_element_wfl,
9747         array_constructor_check_entry): New function prototypes.
9748         (switch_block:): Tagged <node>.
9749         (OCB_TK): Tagged <operator>.
9750         (array_initializer:): Installed actions.
9751         (variable_initializer): Build location information on element if
9752         necessary.
9753         (switch_statement:): Fixed indentation typo.
9754         (switch_block:): Redefined default action.
9755         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
9756         (patch_assignment): Removed duplicate code.
9757         (maybe_build_array_element_wfl, build_new_array_init,
9758         patch_new_array_init, patch_array_constructor,
9759         array_constructor_check_entry): New functions.
9760
9761 Mon Dec  7 15:13:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9762
9763         * parse.y (array_initializer): Tagged <node>.
9764         (variable_initializer:): Use default rule.
9765         (array_initializer:): Defined actions.
9766         (variable_initializers:): Likewise.
9767         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
9768         non-static field accesses.
9769         (patch_invoke): Fixed indentation typo.
9770         (java_complete_tree): Likewise.
9771         (build_labeled_block): Changed leading comment. Generate an error
9772         in case of duplicate loop labels.
9773         (patch_conditional_expr): Patch results of string concatenation
9774         operations.
9775
9776 Sun Dec  6 13:45:00 1998  Per Bothner  <bothner@cygnus.com>
9777
9778         * constants.c (find_methodref_index):  When the class is an interface,
9779         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
9780
9781         * decl.c (finit_identifier_node):  Use "$finit$", rather than
9782         "<finit>" (which Sun's verifier rejects).
9783         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
9784         (generate_field_initialization_code):  Removed.
9785         (fix_constructors)  Don't add call to $finit$ here (wrong order).
9786         (patch_method_invocation):  Add $finit$ call here.
9787
9788         * java-tree.h (CALL_USING_SUPER):  New macro.
9789         * parse.y (patch_invoke):  Remove im local variable.
9790         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
9791         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
9792         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
9793
9794         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
9795
9796         * parse.y (java_complete_tree):  Don't complain about unreachable
9797         statement if it is empty_stmt_node.
9798
9799         * jcf-write.c (find_constant_wide):  New function.
9800         (push_long_const):  Use find_constant_wide.
9801
9802         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
9803         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
9804         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
9805         Emit invokeinterface when calling an interface method.
9806         Emit invokespecial also when calling super or private methods.
9807
9808         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
9809
9810 Sun Dec  6 13:21:18 1998  Per Bothner  <bothner@cygnus.com>
9811
9812         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
9813
9814 Thu Dec  3 17:11:12 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9815
9816         * java-tree.h (java_layout_seen_class_methods): New function
9817         prototype.
9818         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
9819         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
9820         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
9821         * parse.y (method_declarator:): Defined action.
9822         (issue_warning_error_from_context): input_filename saved, set to
9823         the appropriate value and restored after java_error is called.
9824         (build_unresolved_array_type): Fixed comment.
9825         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
9826         (method_header): Deal with return type the same way type are
9827         handled for fields and method's parameters and local variables
9828         types are handled.
9829         (check_method_redefinition): Removed extra CR.
9830         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
9831         (java_layout_seen_class_methods): New function.
9832         (java_layout_classes): Call java_layout_seen_class_methods.
9833
9834 Thu Dec  3 15:56:50 1998  Per Bothner  <bothner@cygnus.com>
9835
9836         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
9837
9838 Thu Dec  3 15:08:30 1998  Per Bothner  <bothner@cygnus.com>
9839
9840         * jcf-dump.c (main):  Fix error message.
9841         * jcf-path.c (add_entry):  Style fix.
9842
9843 Wed Dec  2 15:52:25 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9844
9845         * class.c (layout_class_method): Call build_java_argument_signature
9846         on constructors too.
9847         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
9848         (patch_method_invocation): Define a primary when resolving an
9849         expression name. Augmented comment on code checking illegal `this'
9850         usage. Loosened it test by accepting NEW_CLASS_EXPR.
9851
9852 Tue Dec  1 13:53:24 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9853
9854         * class.c (layout_class_method): Don't report error on non-static
9855         overriding static if the method is private.
9856         * java-tree.h (finish_class): Prototype added.
9857         * lex.c (java_get_line_col): Handle col argument -2 value.
9858         * parse.h: All static method declarations moved to parse.y.
9859         * parse.y: Now contains all static method declarations previously
9860         found in parse.h.
9861         (find_expr_with_wfl, missing_return_error,
9862         unreachable_stmt_error): New functions.
9863         (java_get_real_method_name): Identify constructors bearing class
9864         names in source code compiled classes only.
9865         (java_complete_expand_methods): Call missing_return_error.
9866         (invocation_mode): Private methods invoked as static methods.
9867         (java_complete_tree): Call unreachable_stmt_error.
9868
9869 1998-12-01  Tom Tromey  <tromey@cygnus.com>
9870
9871         * Makefile.in (+target): Removed.
9872         (+xmake_file): Likewise.
9873         (+tmake_file): Likewise.
9874         (.NOEXPORT): Removed duplicate.
9875
9876 Fri Nov 27 13:20:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9877
9878         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
9879
9880         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
9881
9882         * jvgenmain.c: Remove the xmalloc prototype, we get it from
9883         libiberty.h.  Provide an xmalloc definition.
9884
9885         * jvspec.c: Remove the xmalloc prototype.
9886
9887         * parse-scan.y: Include config.h and system.h.  Don't include
9888         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
9889         Provide an xstrdup definition.
9890
9891 Thu Nov 26 22:03:58 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
9892
9893         * jcf-path.c (add_entry): Recognize ".jar" too.
9894         * lang-specs.h: Likewise.
9895
9896 Thu Nov 26 12:44:07 1998  Per Bothner  <bothner@cygnus.com>
9897
9898         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
9899         soft_monitorenter_node, soft_monitorexit_node, throw_node.
9900
9901         * jcf-write.c (generate_bytecode_insns):
9902         Handle pre/post-increment/decrement of long.
9903
9904         * jcf-write.c (generate_bytecode_insns):
9905         Handle missing exception handler (finally for synchronized).
9906
9907 Wed Nov 25 09:47:15 1998  Per Bothner  <bothner@cygnus.com>
9908
9909         * java-tree.h (end_params_node):  Declare global.
9910         * decl.c (end_params_node):  New global.
9911         (init_decl_processing, start_java_method):  Use end_params_node for
9912         end of list of parameter types.  Follows correct gcc conventions.
9913         * expr.c (pop_argument_types, pop_arguments):  Likewise.
9914         * lang.c (put_decl_node):  Likewise.
9915         * typeck.c (various places):  Likewise.
9916         * class.y (various places):  Likewise.
9917         * parse.y (various places):  Likewise.
9918
9919         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
9920         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
9921
9922         * class.c:  Add #include flags.h, remove no-longer needed declaration.
9923
9924         * class.c (layout_class_method):  Remove commented-out code, re-format.
9925         Don't add vtable entry (or index) for private methods.
9926         * expr.c (expand_invoke):  A private method is implicitly final.
9927         * class.c (make_class_data):  If inlining or optimizing,
9928         skip private methods.
9929
9930         * class.c (finish_class):  New function.  Calls existing methods,
9931         but alls emits deferred inline functions.
9932         * jcf-parse.c (parse_class_file):  Call finish_class.
9933         * parse.y (java_complete_expand_methods):  Likewise.
9934
9935         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
9936
9937         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
9938
9939 Wed Nov 25 00:50:58 1998  Marc Espie <espie@quatramaran.ens.fr>
9940
9941         * jcf-write.c (generate_bytecode_conditional): Fix typo.
9942
9943 Tue Nov 24 17:06:38 1998  Per Bothner  <bothner@cygnus.com>
9944
9945         * (generate_classfile): Always write class access flag with
9946         ACC_SUPER set.
9947
9948 Tue Nov 24 16:34:33 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9949
9950         * class.c (maybe_layout_super_class): New function.
9951         (layout_class): Reorganized. Loop on class methods dispatched into
9952         a new function. Call maybe_layout_super_class.
9953         (layout_class_methods, layout_class_method): New functions.
9954         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
9955         class.
9956         (expand_invoke): Likewise.
9957         * java-tree.h (all_class_list): New global variable declared.
9958         (layout_class_methods, layout_class_method): New function
9959         prototypes.
9960         (LAYOUT_SEEN_CLASS_METHODS): New macro.
9961         * jcf-parse.c (all_class_list): New global variable.
9962         (load_class): Extended what class_or_name can be. Use parser
9963         context mechanism to save globals before calling jcf_parse.
9964         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
9965         is set on the file name.
9966         (jcf_parse): Layout class methods when Object is loaded, otherwise
9967         record class in all_class_list for delayed method layout.
9968         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
9969         * lang.c (put_decl_node): Decode <init> into the decl context
9970         class name.
9971         * lex.c (java_allocate_new_line): Use xmalloc.
9972         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
9973         pointers, not TREE_LIST elements.
9974         (struct parser_ctxt): Fixed comment indentations, added comments
9975         and reordered some fields.
9976         (java_check_methods): Function prototype removed.
9977         * parse.y (java_push_parser_context): Use xmalloc.
9978         (java_parser_context_restore_global): Pop extra pushed ctxp only
9979         when there's nothing next.
9980         (maybe_create_class_interface_decl): Fixed comment, add new
9981         created class decl to all_class_list.
9982         (method_header): Use GET_REAL_TYPE on argument's types.
9983         (method_declarator): Use GET_REAL_TYPE, change type to the real
9984         type in TREE_LIST dependency node. Build argument list with the
9985         real type.
9986         (create_jdep_list): Use xmalloc. Removed allocation error message.
9987         (obtain_incomplete_type): Fixed leading comment. Broadened
9988         incoming argument meaning.
9989         (register_incomplete_type): Use xmalloc. Removed allocation error
9990         message.
9991         (safe_layout_class): Fixed leading comment.
9992         (jdep_resolve_class): Reversed if statement condition and switch
9993         if and else bodies.
9994         (resolve_and_layout): Fixed leading comment. Broadened incoming
9995         argument meaning.
9996         (complete_class_report_errors): New local variable name, for
9997         clarity. purify_type_name used for all error cases.
9998         (java_get_real_method_name): Stricter check on constructors.
9999         (java_check_regular_methods): Reverse methods list only if not
10000         already laid out. Layout artificial constructor.
10001         (java_check_methods): Deleted.
10002         (source_start_java_method): Obtain incomplete type for patchable
10003         method arguments.
10004         (java_layout_classes): Fixed leading comment. Use
10005         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
10006         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
10007         before returning. Fixed comments.
10008         (java_expand_classes): Check for errors up front.
10009         (patch_method_invocation): Class to search is resolved and laid
10010         out.
10011
10012 Tue Nov 24 12:57:13 1998  Per Bothner  <bothner@cygnus.com>
10013
10014         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
10015
10016         * javaop.h (int8):  Removed - not used.
10017         (jbyte):  Redefine portably with correct signedness.
10018
10019         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
10020
10021         * jcf-write.c (generate_bytecode_insns):  Fix typo
10022         OPCODE_getstatic to OPCODE_getfield.
10023
10024         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
10025         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
10026         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
10027
10028 Thu Nov 19 11:16:55 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10029
10030         * jcf-parse.c (jcf_parse_source): Function returned type is
10031         void. Added prototype.
10032         (jcf_parse): Function returned type is void.
10033         (yyparse): Remove call to fclose on the last parsed file.
10034
10035         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
10036
10037 Wed Nov 18 23:54:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10038
10039         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
10040         (layout_class): Cope with methods featuring WFL in decl names.
10041         * decl.c (unqualified_object_id_node): New global variable,
10042         initialized.
10043         (build_decl_no_layout): Removed.
10044         * expr.c (build_primtype_type_ref): Handle Double.
10045         (java_lang_expand_expr): Fixed indentations.
10046         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
10047         (flag_wall, flag_redundant, flag_not_overriding,
10048         flag_static_local_jdk1_1, unqualified_object_id_node): Global
10049         variable declarations.
10050         (build_decl_no_layout): Removed prototype.
10051         (java_get_real_method_name): Added prototype.
10052         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
10053         (java_parse_abort_on_error): Macro now just returns.
10054         * jcf-parse.c (jcf_parse_source): Check fclose returned
10055         value. Call emit_register_classes if java_report_errors returns
10056         zero.
10057         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
10058         flag_static_local_jdk1_1): New integer flags.
10059         (lang_decode_option): New flags set here.
10060         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
10061         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
10062         the flag_redundant variable.
10063         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
10064         when parsing java.lang.Object class.
10065         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
10066         NULL_TREE to build.
10067         (resolve_qualified_expression_name): Fixed indentation.
10068         (patch_array_ref): Changed prototype.
10069         (not_initialized_as_it_should_p): Prototype removed.
10070         (java_report_errors): Added function prototype.
10071         * parse.y (formal_parameter:): Changed error message for not yet
10072         supported final parameters.
10073         (class_type_list:): Set both PURPOSE and VALUE of created
10074         TREE_LIST to be class_type.
10075         (primary_no_new_array:): Handle class literals on primitive types.
10076         (parse_warning_context): Reinstalled correct force_error and
10077         do_warning flags setups.
10078         (java_report_errors): Changed prototype. Return java_error_count
10079         value.
10080         (variable_redefinition_error): Consider treating variable type as
10081         a fake pointer.
10082         (create_interface): Warn about redundant abstract modifier if
10083         flag_redundant is set. Changed error message.
10084         (lookup_field_wrapper): Save/restore globals before/after looking
10085         up field.
10086         (duplicate_declaration_error_p): Consider treating declaration
10087         type as a fake pointer.
10088         (register_fields): Extract real type from dependency node. Check
10089         for duplicate field declaration after type adjustment. Use
10090         DECL_INITIAL to store static final initialized values.
10091         (method_header): Extract real function type from dependency node.
10092         (check_abstract_method_header): Use GET_METHOD_NAME.
10093         (obtain_incomplete_type): Layout fake pointer type.
10094         (safe_layout_class): Don't try to check for methods before layout.
10095         (java_complete_class): Don't check for correct throws clause
10096         elements inheritance here.
10097         (resolve_and_layout): Broadened name parameter meaning.
10098         (reset_method_name): Use GET_METHOD_NAME.
10099         (java_get_real_method_name): New function.
10100         (java_check_regular_methods): Don't check methods in
10101         java.lang.Object.  Verify lineage of throws clause elements. Use
10102         flag_no_overriding in warning report.
10103         (check_throws_clauses): Don't check if class was from
10104         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
10105         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
10106         (declare_local_variables): Use flag_static_local_jdk1_1 to report
10107         warning on unsupported final local variables. Use build_decl
10108         instead of build_decl_no_layout. Get real local variable type from
10109         dependency node.
10110         (source_start_java_method): Get real parameter type from
10111         dependency node. Call build_decl instead of build_decl_no_layout.
10112         (java_layout_classes): Reverse tree and layout type and class as
10113         required. Mark class as loaded when done.
10114         (resolve_field_access): Fixed indentation. Restricted condition
10115         leading to static field access code generation. Set field_type
10116         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
10117         (resolve_qualified_expression_name): Initialize type_found to
10118         null. Handle static field resolved during qualification. Fixed
10119         layout on non primitive field decl types.
10120         (not_accessible_p): Fixed typo in comment.
10121         (patch_method_invocation): Resolve and layout class to search from
10122         type.
10123         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
10124         layout non primitive type, if necessary. Make method node only to
10125         report errors.
10126         (find_applicable_accessible_methods_list): Consider WFL'ed method
10127         decl names. Fixed indentation.
10128         (argument_types_convertible): Resolve and layout target type if
10129         necessary.
10130         (java_complete_tree): Fixed indentation problems. Rewrote
10131         CALL_EXPR thrown exceptions check. Re-installed further processing
10132         of the assignment in certain cases.
10133         (patch_assignment): Call maybe_build_primttype_type_ref to perform
10134         inlining on class literals.
10135         (valid_builtin_assignconv_identity_widening_p): Cope with constant
10136         0 literal.
10137         (valid_method_invocation_conversion_p): Likewise.
10138         (patch_string): Temporary disable forbidden use of `this' in
10139         explicit constructor invocations when doing string concatenation
10140         within their scope.
10141         (patch_unaryop): Added comment. Reinstalled code to disable
10142         further check on assignment operation with cast expression RHS.
10143         (patch_switch_statement): Fixed indentation.
10144         (build_try_statement): Call build_decl instead of
10145         build_decl_no_layout.
10146         (patch_synchronized_statement): Likewise.
10147         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
10148         IS_UNCHECKED_EXPRESSION_P.
10149         (check_thrown_exceptions_do): Changed leading comment. Resolve and
10150         layout argument exception type.
10151         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
10152         of IS_UNCHECKED_EXPRESSION_P.
10153
10154 Wed Nov 18 14:21:48 1998  Anthony Green  <green@cygnus.com>
10155
10156         * jcf-parse.c (yyparse): Open class file in binary mode.
10157
10158 Sun Nov 15 17:14:17 1998  Per Bothner  <bothner@cygnus.com>
10159
10160         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
10161
10162         * jcf-write.c (perform_relocations):  Move check out one loop.
10163
10164 Sun Nov 15 15:09:56 1998  Anthony Green  <green@hoser.cygnus.com>
10165
10166         * Make-lang.in: Fix reference to srcdir.
10167         * jv-scan.c: Add missing xmalloc prototype.
10168         * jvgenmain.c: Ditto.
10169
10170 Sun Nov 15 14:36:29 1998  Per Bothner  <bothner@cygnus.com>
10171
10172         * decl.c (error_mark_node), java-tree.h:  New global.
10173         * parse.y:  Use empty_stmt_node instead of size_zero_node.
10174         (build_if_else_statement):  If missing else, use empty_stmt_node.
10175
10176         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
10177         (java_complete_expand_method):  Complain if return is missing.
10178         (java_check_regular_methods):  Comment out incorrect error check.
10179         (not_accessible_p):  Fix incorrect handling of protected methods.
10180         (patch_method_invocation):  Pass correct context to not_accessible_p.
10181         (find_applicable_accessible_methods_list):  Likewise.
10182         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
10183         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
10184         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
10185         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
10186
10187         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
10188         (push_int_const):  Remove reundant NOTE_PUSH.
10189         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
10190         (- case SWITCH_EXPR):  Fix code generation bug.
10191         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
10192         (generate_classfile):  More robust for abstract methods.
10193
10194 Sun Nov 15 13:52:39 1998  Anthony Green  <green@cygnus.com>
10195
10196         * Makefile.in: jv-scan and jvgenmain all require libiberty.
10197         * Make-lang.in: Ditto.
10198
10199         * jv-scan.c: Remove xmalloc and xstrdup definitions.
10200         * jvgenmain: Ditto.
10201
10202 Sun Nov 15 14:10:56 1998  Per Bothner  <bothner@cygnus.com>
10203
10204         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
10205
10206         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
10207
10208 Sat Nov 14 17:19:18 1998  Per Bothner  <bothner@cygnus.com>
10209
10210         Allow uses of interface types to verify.  This is not really
10211         type-safe, but it matches what Sun does, and is OK as long as
10212         there are appropriate run-time checks.
10213         * verify.c (merge_types):  If merging two interface types,
10214         just set the result to java.lang.Object.
10215         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
10216
10217 1998-11-13  Tom Tromey  <tromey@cygnus.com>
10218
10219         * gjavah.c (main): Handle --output-class-directory argument.
10220         * jvspec.c (lang_specific_driver): Translate `-d' into
10221         -foutput-class-dir.
10222         * jcf.h (jcf_write_base_directory): Declare.
10223         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
10224         * lang-options.h: Mention -foutput-class-dir.
10225         * jcf-write.c (jcf_write_base_directory): New global.
10226         (make_class_file_name): Put generated .class file into `-d'
10227         directory, or into source directory if -d not given.  Function now
10228         static.
10229         (write_classfile): Free class file name.  Handle case where class
10230         file name is NULL.
10231         (DIR_SEPARATOR): New macro.
10232         Include <sys/stat.h>
10233
10234         * Makefile.in (prefix): New macro.
10235
10236 Thu Nov 12 14:15:07 1998  Per Bothner  <bothner@cygnus.com>
10237
10238         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
10239         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
10240         here (done in patch_invoke instead).
10241         (case_identity):  Moved here from parse.y.
10242
10243         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
10244         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
10245         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
10246         so they can be efficiently scanned without recursion.
10247         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
10248         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
10249         in BLOCK iteratively, rather than recursively.
10250
10251         * parse.y (do_unary_numeric_promotion):  New function.
10252         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
10253
10254         * parse.y (patch_newarray):  Various fixes.
10255
10256         Re-do handling of switch statements (for proper block scoping).
10257         * parse.y:  Add just a single block for the enture switch block,
10258         but don't create any "case blocks".
10259         (group_of_labels):  Rmeoved unneeded non-terminal.
10260         CASE_EXPR and DEFAULT_EXPR are added to current block.
10261         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
10262         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
10263         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
10264         * parse.y (wfl_operator, print_int_node): Make non-static.
10265         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
10266         as part of recursive scan of block.
10267         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
10268         (patch_switch_statement):  Most tests move dinto java_complete_tree.
10269
10270         * parse.y:  Make various production be non-typed (void).
10271         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
10272         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
10273         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
10274
10275         * jcf-write.c (struct jcf_handler):  New type.
10276         (struct jcf_switch_state):  New type.
10277         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
10278         (alloc_handler, emit_unop, emit_reloc):  New functions.
10279         (adjust_typed_op):  Add extra parameter ("max type" offset).
10280         (emit_switch_reloc, emit_case-reloc):  New function.
10281         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
10282         (generate_bytecode_insns):  Support REAL_CST, switch statements,
10283         exception handling, method calls, object/array creation, and more.
10284
10285         * class.c:  Remove some unused variables.
10286         * constants.c (find_string_constant):  New function.
10287         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
10288         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
10289         if flag_emit_class_files.
10290
10291 1998-11-12  Tom Tromey  <tromey@cygnus.com>
10292
10293         * jcf-io.c (find_class): Added explanatory comment.
10294
10295         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
10296         trailing slash to `.zip' entries.
10297
10298         * jvspec.c (lang_specific_driver): Correctly handle case where
10299         GC_NAME not defined.
10300
10301 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10302
10303         * jvspec.c (GC_NAME): New define.
10304         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
10305         if required.
10306         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
10307
10308 Wed Nov 11 19:08:52 1998  Per Bothner  <bothner@cygnus.com>
10309
10310         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
10311
10312 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10313
10314         * jcf-dump.c (main): Correctly recognize `--'-style long options.
10315
10316 Tue Nov 10 12:34:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10317
10318         * class.c (is_compiled_class): Call safe_layout_class for class
10319         compiled from source.
10320         * conver.h (convert_to_integer, convert_to_real,
10321         convert_to_pointer): Added prototypes.
10322         * decl.c (init_decl_processing): Non longer push the decls of
10323         `methodtable', `constants', `Class', `Field', `dispatchTable'
10324         `jexception' and `Method'.
10325         * expr.c (build_invokeinterface): New function.
10326         (expand_invoke): static variable CLASS_IDENT now in
10327         build_invokeinterface. Use build_invokeinterface.
10328         (expand_java_field_op): Moved code to inline
10329         java.lang.PRIMTYPE.TYPE into a function.
10330         (build_primtype_type_ref): New function.
10331         * java-tree.def (INSTANCEOF_EXPR): New tree code.
10332         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
10333         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
10334         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
10335         (DECL_LOCAL_STATIC_VALUE): New macro.
10336         (build_invokeinterface, build_primtype_type_ref): New function
10337         prototypes.
10338         (java_parse_abort_on_error): Macro rewritten.
10339         * jcf-parse.c (current_method): Add comment to declaration.
10340         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
10341         Function prototypes fixed.
10342         (jcf_parse_source): push/pop parser context. save/restore global.
10343         (parse_source_file): Fixed leading comment. Now take a
10344         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
10345         classes and pop the parser context anymore.
10346         (yyparse): Push parser context, save globals, parse the source
10347         file, restore globals and pop the parser context when processing a
10348         source file.
10349         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
10350         * lex.c (java_parse_doc_section): New function.
10351         (java_lex): Call java_parse_doc_section when appropriate. Build an
10352         operator around INSTANCEOF_TK.
10353         * lex.h (java_lineterminator, java_sprint_unicode,
10354         java_unicode_2_utf8, java_lex_error, java_store_unicode):
10355         Prototypes rewritten.
10356         (java_parse_escape_sequence, java_letter_or_digit_p,
10357         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
10358         java_read_unicode, java_store_unicode, java_read_char,
10359         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
10360         Added function prototypes.
10361         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
10362         define.
10363         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
10364         New macros
10365         (struct parser_ctxt): New fields: deprecated,
10366         current_parsed_class_un, gclass_list.
10367         (fix_method_argument_names, issue_warning_error_from_context,
10368         resolve_package, lookup_package_type): New function prototypes.
10369         (resolve_expression_name): Fixed function prototype.
10370         (find_applicable_accessible_methods_list): Fixed indentation, added
10371         extra argument in prototype.
10372         (check_final_assignment, build_null_of_type, check_deprecation,
10373         check_method_redefinition, reset_method_name,
10374         java_check_regular_methods, java_check_abstract_methods,
10375         maybe_build_primttype_type_ref): New function prototype.
10376         * parse.y (conver.h): Include.
10377         (INSTANCEOF_TK): Tagged <operator>.
10378         (single_type_import_declaration): Use REGISTER_IMPORT macro.
10379         (relational_expression:): Build binop for instanceof.
10380         (java_push_parser_context): Remember ctxp->gclass_list across
10381         contexts.
10382         (java_pop_parser_context): Simply return if no context
10383         exists. Remember gclass_list across contexts.
10384         (issue_warning_error_from_context): New function.
10385         (parse_error_context): Don't setup ctxp->elc here. Call
10386         issue_warning_error_from_context instead.
10387         (parse_warning_context): Likewise.
10388         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
10389         setup. Link new class/interface to ctxp->gclass_list.
10390         (add_superinterfaces): Register interface as incomplete if not
10391         loaded.
10392         (create_class): Remember class unqualified name in
10393         ctxp->current_parsed_class_un. Check class deprecation.
10394         (register_fields): Check field deprecation. Remember static final
10395         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
10396         processing INIT.
10397         (method_header): New local variable ORIG_ARG. Use unqualified
10398         current class name for check on constructor errors. Promote return
10399         type if of record type. Argument list fix moved in
10400         fix_method_argument_names, called here. Check method deprecation.
10401         (fix_method_argument_names): New function.
10402         (method_declarator): Promote record typed arguments.
10403         (safe_layout_class): Check class methods before layout.
10404         (java_complete_class): Compute field layout when patched.
10405         (do_resolve_class): Try to load class after having it renamed
10406         after the package name.
10407         (get_printable_method_name): Use DECL_CONTEXT.
10408         (reset_method_name): New function.
10409         (check_method_redefinition): Use reset_method_name.
10410         (java_check_regular_methods): New local variable
10411         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
10412         names for error report. Check for compile-time error when method
10413         found has default (package) access.
10414         (java_check_abstract_methods): Now takes an interface DECL node as
10415         an argument. Also reinstall real name on unchecked
10416         overriding/hiding methods for error report.
10417         (java_check_methods): Fixed leading comment. Get classes to verify
10418         from ctxp->gclass_list. Use CHECK_METHODS macro and set
10419         CLASS_METHOD_CHECKED_P on class verification.
10420         (lookup_java_method2): Get real method name if necessary.
10421         (find_in_imports): Don't check package class access here.
10422         (resolve_package, lookup_package_type): New functions.
10423         (java_layout_classes): Fixed leading comment. Take classes to be
10424         laid out from ctxp->gclass_list.
10425         (java_complete_expand_methods): Don't expand native and abstract
10426         methods.
10427         (java_expand_classes): New function.
10428         (resolve_expression_name): Use additional argument ORIG.  Retrieve
10429         values of static final field of primitive types.
10430         (resolve_field_access): Handles static final field of promotive
10431         type.
10432         (resolve_qualified_expression_name): Handle STRING_CST as
10433         primaries and package name resolution. Check deprecation on found
10434         decls. Set where_found and type_found on non static field resolved
10435         during qualification. Layout non primitive field decl types.
10436         (check_deprecation): New function.
10437         (maybe_access_field): Simplified.
10438         (patch_method_invocation_stmt): Local variable CLASS_TYPE
10439         removed. Reverse method's argument when primary is a type. Don't
10440         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
10441         instead. Include abstract class in the list of class searchable
10442         for constructors. Use DECL_CONTEXT of found method for access
10443         checks. Check method deprecation.
10444         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
10445         converting arguments. Handle INVOKE_INTERFACE.
10446         (lookup_method_invoke): Search constructor using existing
10447         infrastructure (don't rely on lookup_java_constructor anymore).
10448         (find_applicable_accessible_methods_list): Extra argument flag
10449         LC. Now include constructor in the search.
10450         (qualify_ambiguous_name): Conditional expression are primaries.
10451         (not_initialized_as_it_should_p): static final are always
10452         initialized.
10453         (java_complete_tree): Pass extra NULL argument to
10454         resolve_expression_name. Stricter test to carry on patching
10455         assignments. New case for INSTANCEOF_EXPR.
10456         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
10457         (check_final_assignment, maybe_build_primttype_type_ref): New
10458         functions.
10459         (patch_assignment): Detect resolved static finals and carry normal
10460         assignment error check on them. Inline PRIMTYPE.TYPE read access.
10461         (try_builtin_assignconv): Access constant 0 on all primitive
10462         types.
10463         (valid_builtin_assignconv_identity_widening_p): Accept identical
10464         types. Accept all promoted type on int type.
10465         (valid_ref_assignconv_cast_p): Accept a null pointer to be
10466         assigned to a reference.
10467         (valid_method_invocation_conversion_p): Accept to check null
10468         pointers.
10469         (build_binop): Merge declaration and initialization of local
10470         variable BINOP.
10471         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
10472         numeric types. Improved validity test for qualify operators on
10473         references.
10474         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
10475         and PREINCREMENT_EXPR. Also detect resolved static finals of a
10476         primitive type and issue the appropriate error message.
10477         (resolve_type_during_patch): Mark class loaded when resolved.
10478         (patch_cast): Allow null to be cased to reference types.
10479         (build_null_of_type): New function.
10480         (patch_array_ref): Handle array on references correctly.
10481         (patch_return): Removed unused local variable MODIFY. Force
10482         boolean to be returned as integers. Allows null to be returned by
10483         a function returning a reference.
10484         * typeck.c (convert_to_integer, convert_to_real,
10485         convert_to_pointer): Prototypes moved to convert.h
10486         (lookup_argument_method): Use method real name, if necessary.
10487
10488 1998-10-30  Tom Tromey  <tromey@cygnus.com>
10489
10490         * class.c (build_class_ref): Changed name of primitive classes to
10491         start with `_Jv_'.
10492
10493         * class.c (make_class_data): Renamed fields: nmethods to
10494         method_count, method_count to dtable_method_count.  Always set
10495         `state' field to 0.
10496         * decl.c (init_decl_processing): Likewise.
10497
10498 Wed Oct 28 08:03:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10499
10500         * class.c (layout_class): Don't mangle <finit>, produce
10501         __finit<class> instead. Don't verify artificial methods.
10502         * decl.c (finit_identifier_node): New declared global.
10503         (init_decl_processing): finit_identifier_node initialized.
10504         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
10505         * java-tree.h (finit_identifier_node): Declared as extern.
10506         (struct lang_decl): New field called_constructor.
10507         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
10508         (CLASS_HAS_FINIT_P): New macro.
10509         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
10510         explicit constructor invocation.
10511         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
10512         CALL_SUPER_CONSTRUCTOR_P): New macros.
10513         (write_classfile): Added prototype.
10514         * jcf-parse.c (jcf_parse_source): Parse and remember for
10515         generation if the file was seen on the command line.
10516         (parse_source_file): Don't write the class file here.
10517         (yyparse): Loop on files rewritten. Set current_jcf.
10518         (parse_zip_file_entries): Parse class file only if it was found.
10519         * lang.c (init_parse): Don't open command line provided filename
10520         here.
10521         (lang_parse): Don't set main_jcf anymore.
10522         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
10523         (JCONSTRUCTOR_CHECK): New macro.
10524         (JBSC_TYPE_P): New macro.
10525         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
10526         (COMPLETE_CHECK_OP_2): New macro.
10527         (struct parse_ctxt): New field explicit_constructor_p.
10528         (check_class_interface_creation): Fixed prototype indentation.
10529         (patch_method_invocation_stmt): Prototype reflects added argument.
10530         (patch_invoke): Likewise.
10531         (complete_method_declaration, build_super_invocation,
10532         verify_constructor_circularity,
10533         build_this_super_qualified_invocation, get_printable_method_name,
10534         patch_conditional_expr, maybe_generate_finit, fix_constructors,
10535         verify_constructor_super, create_artificial_method,
10536         start_artificial_method_body, end_artificial_method_body,
10537         generate_field_initialization_code): New function prototypes.
10538         * parse.y: Fixed leading comment
10539         (constructor_header:, constructor_body:, block_end:): Rules tagged
10540         <node>.
10541         (type_declaration:): Call maybe_generate_finit.
10542         (method_declaration:): Action for method_body: placed in new
10543         function complete_method_declaration, called here.
10544         (constructor_declaration:): Defined actions. Removed leading
10545         FIXME.
10546         (constructor_header:): New rule with action.
10547         (constructor_body:): Rule rewritten using block_begin: and
10548         block_end:. Defined actions.
10549         (constructor_declarator:, explicit_constructor_invocation:):
10550         Defined actions.
10551         (block:): Use new rules block_begin: block_end:.
10552         (block_begin:, block_end:): New rules and actions.
10553         (block_statements:): Fixed error message for explicit
10554         constructors.
10555         (method_invocation:): Call build_this_super_qualified_invocation
10556         if primary is `this' or `super' was seen.
10557         (conditional_expression:): Action defined.
10558         (extra_ctxp_pushed_p): New static global flag.
10559         (java_parser_context_save_global): Create parser context if
10560         necessary. Use extra_ctxp_pushed_p to remember it.
10561         (java_parser_context_restore_global): Pop extra parser context if
10562         one exists.
10563         (build_array_from_name): Array on primitive types are marked
10564         loaded.
10565         (register_fields): Restore new name in field initializer
10566         expression if type was altered. Non static fields initialized upon
10567         declaration marked initialized.
10568         (maybe_generate_finit): New function.
10569         (maybe_generate_clinit): Use create_artificial_method,
10570         start_artificial_method_body, end_artificial_method_body. Generate
10571         debug info for enclosed initialization statements.
10572         (method_header): Fixed leading comment. Check constructor
10573         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
10574         accordingly.
10575         (complete_method_declaration, constructor_circularity_msg,
10576         verify_constructor_circularity): New functions.
10577         (get_printable_method_name): New function.
10578         (check_method_redefinition): Don't rename <finit> methods. Fix
10579         declared constructor names. Error message for
10580         constructors modified.
10581         (java_check_regular_methods): Local variable seen_constructor
10582         renamed saw_constructor. Skip verification on constructors. Create
10583         default constructor with create_artificial_method.
10584         (java_check_methods): Removed unnecessary empty line.
10585         (create_artificial_method, start_artificial_method_body,
10586         end_artificial_method_body): New functions.
10587         (java_layout_classes): Changed leading comment. Reverse fields
10588         list if necessary. Always layout java.lang.Object if being
10589         defined.
10590         (java_complete_expand_methods): Verify constructor circularity.
10591         (java_complete_expand_method): Call fix_constructor on
10592         constructors.  Local variable no_ac_found removed. Restore
10593         bindings if method body expansion failed.
10594         (fix_constructors, verify_constructor_super,
10595         generate_field_initialization_code): New function.
10596         (java_expand_classes): Fixed leading comment. Write class file
10597         here.
10598         (resolve_expression_name): Check for illegal instance variable
10599         usage within the argument scope of an explicit constructor
10600         invocation.
10601         (resolve_qualified_expression_name): Pass extra from_super flag
10602         when invoking patch_method_invocation_stmt. New case for
10603         conditional expression when used as a primary. Check for error
10604         when acquiring super.
10605         (patch_method_invocation_stmt): Added extra argument super. New
10606         local variable is_static_flag. Set class_to_search according to
10607         the nature of the constructor invocation. Don't add `this'
10608         argument when expanding NEW_CLASS_EXPR. Check for illegal method
10609         invocation within the argument scope of explicit constructor
10610         invocation. Set is_static according to is_static_flag. Provide
10611         extra `super' argument to patch_invoke invocation.
10612         (patch_invoke): New argument from_super. Loop on arguments
10613         indentation fixed. Pass from_super to invocation_mode. New switch
10614         case INVOKE_SUPER. Fixed error message in switch default case.
10615         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
10616         value.
10617         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
10618         (lookup_method_invoke): Fixed prototypes in candidates list. Error
10619         message takes constructors into account.
10620         (find_applicable_accessible_methods_list): Fixed indentation.
10621         (qualify_ambiguous_name): Take explicit constructor invocation
10622         into account. Deal with a conditional expression as a primary to
10623         a method call.
10624         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
10625         case. Added extra argument to patch_method_invocation_stmt.
10626         Register calls made to explicit constructor `this'. Don't call
10627         save_expr in ARRAY_REF case when emitting class files. Check for
10628         illegal use of this when expanding explicit constructor invocation
10629         arguments.
10630         (complete_function_arguments): Set and reset parser context
10631         explicit_constructor_p field value when appropriate.
10632         (build_super_invocation, build_this_super_qualified_invocation):
10633         New functions.
10634         (patch_assignment): Fixed typo.
10635         (patch_unaryop): Check on final fields occurs only when a decl
10636         exits.
10637         (patch_return): Take constructors into account.
10638         (patch_conditional_expr): New function.
10639         * typeck.c (build_java_signature): Removed unnecessary empty line.
10640
10641 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
10642
10643         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
10644
10645 1998-10-28  Tom Tromey  <tromey@cygnus.com>
10646
10647         * decl.c (init_decl_processing): Renamed fields.
10648         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
10649         interface_len, msize fields.
10650
10651         * class.c (make_class_data): Removed subclass_head and
10652         subclass_next fields.
10653         * decl.c (init_decl_processing): Removed subclass_head and
10654         subclass_next fields.
10655
10656 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
10657
10658         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
10659         * mangle.c (emit_unicode_mangled_name): Similarly.
10660
10661 Mon Oct 26 12:17:23 1998  Nick Clifton  <nickc@cygnus.com>
10662
10663         * jcf-parse.c (get_constant): Place braces around code to compute
10664         'd' when REAL_ARITHMETIC is not defined.
10665
10666 Sun Oct 25 14:58:05 1998  H.J. Lu  (hjl@gnu.org)
10667
10668         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
10669         dependency.
10670
10671 1998-10-23  Tom Tromey  <tromey@cygnus.com>
10672
10673         * lang-specs.h: `.zip' files are input to jc1.
10674
10675 Thu Oct 22 23:01:54 1998  Per Bothner  <bothner@cygnus.com>
10676
10677         * jvspecs.c:  Add (but don't enable) support for combining multiple
10678         .class and .java input filenames to a single jc1 invocation.
10679         Add support for -C flag (copile to .class files).
10680         Translate -classpath and -CLASSPATH arguments.
10681         * lang-specs.h:  Don't set %2 spec.
10682
10683 1998-10-22  Tom Tromey  <tromey@cygnus.com>
10684
10685         * jcf-path.c (add_entry): Don't add trailing separator if entry is
10686         a .zip file.
10687         (add_path): Don't add trailing separator to non-empty path
10688         elements.
10689
10690         * lang.c (lang_decode_option): Check for -fclasspath and
10691         -fCLASSPATH before examining other `-f' options.
10692
10693         * java-tree.h (finalize_identifier_node): Don't declare.
10694         * class.c (make_class_data): Don't push "final" field.
10695         * decl.c (init_decl_processing): Don't push "final" field.
10696         (finalize_identifier_node): Removed.
10697         (init_decl_processing): Don't set finalize_identifier_node.
10698
10699         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
10700
10701 Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
10702
10703         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
10704         (JV_SCAN_SOURCES): New macro.
10705         (JCF_DUMP_SOURCES): Likewise.
10706         (jcf-dump$(exeext)): New target.
10707         (jv-scan$(exeext)): New target.
10708
10709 1998-10-22  Tom Tromey  <tromey@cygnus.com>
10710
10711         * Makefile.in (LEX): Removed.
10712         (LEXFLAGS): Likewise.
10713         (SET_BISON): New macro.
10714         (BISON): Removed.
10715         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
10716         spurious diffs in parse.c.
10717         ($(PARSE_SCAN_C)): Likewise.
10718         (PARSE_DIR): New macro.
10719         (PARSE_C): Use it.
10720         (PARSE_SCAN_C): Likewise.
10721         (PARSE_RELDIR): New macro.
10722
10723         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
10724
10725         * jcf-io.c (find_class): Use saw_java_source to determine when to
10726         look for `.java' file.
10727         * jcf-parse.c (saw_java_source): New global.
10728         (yyparse): Set it if `.java' file seen.
10729
10730         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
10731         (GCJH_SOURCES): Likewise.
10732         * Makefile.in (datadir): New macro.
10733         (libjava_zip): Likewise.
10734         (JAVA_OBJS): Added jcf-path.o.
10735         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
10736         (../gcjh$(exeext)): Likewise.
10737         (jcf-path.o): New target.
10738         * java-tree.h (fix_classpath): Removed decl.
10739         * jcf-parse.c (fix_classpath): Removed.
10740         (load_class): Don't call fix_classpath.
10741         * parse.y (read_import_dir): Don't call fix_classpath.
10742         * lex.h: Don't mention classpath.
10743         * lex.c (java_init_lex): Don't initialize classpath.
10744         * jcf-io.c (classpath): Removed global.
10745         (find_class): Use jcf_path iteration functions.  Correctly search
10746         class path for .java file.
10747         (open_in_zip): New argument `is_system'.
10748         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
10749         classpath-related options.
10750         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
10751         and -I.
10752         (lang_init): Call jcf_path_init.
10753         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
10754         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
10755         Correctly put braces around second string in each entry.
10756         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
10757         classpath-related options.
10758         (help): Updated for new options.
10759         * jcf.h: Declare functions from jcf-path.c.  Don't mention
10760         `classpath' global.
10761         * jcf-path.c: New file.
10762
10763         * jcf-depend.c: Include jcf.h.
10764
10765         * jcf-write.c (localvar_alloc): Returns `void'.
10766         (localvar_free): Removed unused variable.
10767
10768         * lang.c (OBJECT_SUFFIX): Define if not already defined.
10769         (init_parse): Use OBJECT_SUFFIX, not ".o".
10770
10771 Wed Oct 21 07:54:11 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10772
10773         * class.c (emit_register_classes): Renamed from
10774         emit_register_class.
10775         * java-tree.h (emit_register_classes): Prototype renamed from
10776         emit_register_class.
10777         * jcf-parse.c (yyparse): Call emit_register_classes once before
10778         returning.
10779         * parse.y (java_expand_classes): No longer register classes.
10780
10781 Tue Oct 20 09:15:38 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10782
10783         * class.c (is_compiled_class): New local variable
10784         seen_in_zip. Identify classes found in currently compiled source
10785         file(s).
10786         * decl.c (complete_start_java_method): Fixed typo.
10787         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
10788         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
10789         (CLASS_P): Moved around.
10790         (java_parse_abort_on_error): Macro moved from jcf-parse.c
10791         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
10792         java-parse.h
10793         (jcf_parse_source): Changed leading comment. Removed unnecessary
10794         fclose and CLASS_FROM_SOURCE_P marking.
10795         (parse_source_file): New local variables remember_for_generation
10796         and filename. Mark parsed file name identifier node. Removed block
10797         executed when parse_only was null. Set remember_for_generation.
10798         Use it as an argument to java_pop_parser_context.
10799         (yyparse): New local variables several_files, list, next node and
10800         current_file_list. Split ampersand separated file names into
10801         current_file_list. Iterate through the list and parse accordingly.
10802         * parse.h (java_pop_parser_context): New function prototype.
10803         * parse.y (ctxp_for_generation): New static global variable.
10804         (java_pop_parser_context): New argument generate. Link popped ctxp
10805         to ctxp_for_generation list accordingly.
10806         (java_complete_expand_methods): Fixed indentation.
10807         (java_expand_classes): New function.
10808
10809 Sat Oct 17 11:25:21 1998  Per Bothner  <bothner@cygnus.com>
10810
10811         * Makefile.in:  Link with libiberty.a instead of memmove.o.
10812
10813 Fri Oct 16 10:59:01 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10814
10815         * lex.c (setjmp.h): No longer included.
10816         * lex.h (setjmp.h): Included.
10817         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
10818         (duplicate_declaration_error_p): Renamed from
10819         duplicate_declaration_error.
10820         (build_array_from_name): New function prototype.
10821         * parse.y (setjmp.h): No longer included.
10822         (variable_declarator_id): Define action.
10823         (build_array_from_name): New function.
10824         (duplicate_declaration_error_p): Renamed from
10825         duplicate_declaration_error.  Fixed leading comment.
10826         (register_fields): Main `for' loop reorganized. Uses
10827         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
10828         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
10829         build_array_from_name.
10830         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
10831         types.
10832         (read_import_dir): Don't try to skip `.' and `..'.
10833         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
10834         build_array_from_name. Main `for' loop reorganized.
10835         (resolve_qualified_expression_name): When building access to a
10836         field, use the type where the field was found, not its own type.
10837         (maybe_access_field): Use field DECL_CONTEXT if the type where the
10838         field was found is null.
10839         (qualify_ambiguous_name): Sweep through all successive array
10840         dimensions.
10841
10842 Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10843
10844         * java-tree.h (pop_labeled_block, lang_printable_name,
10845         maybe_add_interface, set_super_info, get_access_flags_from_decl,
10846         interface_of_p, inherits_from_p, fix_classpath,
10847         complete_start_java_method, emit_handlers, init_outgoing_cpool,
10848         make_class_data, register_class, alloc_name_constant): New
10849         function prototypes.
10850         * lang.c (lang_decode_option): Set argc argument unused. Fixed
10851         indentation. Added cast to remove warning.
10852         (lang_printable_name): Set v argument unused.
10853         (lang_print_error): Added argument to lang_printable_name call.
10854         (java_dummy_print, print_lang_decl, print_lang_type,
10855         print_lang_identifier, lang_print_xnode): All argument marked
10856         unused.
10857         * lex.c (java_unget_unicode): Removed unnecessary argument.
10858         (java_allocate_new_line): Unused local variable is gone.
10859         (java_read_char): Added parenthesis in expressions to remove
10860         warnings.  Added final return statement.
10861         (java_read_unicode): Added parenthesis in expression to remove
10862         warning.
10863         (java_parse_end_comment): Fixed java_unget_unicode invocation.
10864         (java_parse_escape_sequence): Likewise.
10865         (java_lex): Unused local variables are gone. Fixed
10866         java_unget_unicode invocation.
10867         * lex.h (set_float_handler): Prototype added when JC1_LITE not
10868         defined.
10869         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
10870         lang_printable_name invocation in macro.
10871         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
10872         Likewise.
10873         (duplicate_declaration_error): Suppressed unused argument in
10874         prototype.
10875         (identical_subpath_p): Function declaration is gone.
10876         (patch_invoke): Suppressed unused argument in prototype.
10877         (patch_cast, build_labeled_block, check_thrown_exceptions):
10878         Likewise.
10879         * parse.y (setjmp.h): Included
10880         (toplev.h): Likewise.
10881         (field_declaration:): Suppressed unused local
10882         (label_decl:): Fixed build_labeled_block invocation.
10883         (java_pop_parser_context): Put extra parenthesis around assignment
10884         in if.
10885         (yyerror): Suppressed unused local variables.
10886         (variable_redefinition_error): Fixed lang_printable_name
10887         invocation.
10888         (create_interface): Suppressed unused local variables.
10889         (create_class): Likewise.
10890         (duplicate_declaration_error): Suppressed unused argument. Fixed
10891         lang_printable_name invocation.
10892         (register_fields): Suppressed unused local variable. Fixed
10893         duplicate_declaration_error invocation.
10894         (method_header): Suppressed unused local variable.
10895         (method_declarator, parser_check_super): Likewise.
10896         (java_complete_class): Suppressed unused local variable. Fixed
10897         fatal error message.
10898         (complete_class_report_errors): Added default: in switch.
10899         (java_check_regular_methods): Fixed lang_printable_name
10900         invocations.
10901         (check_throws_clauses): Likewise.
10902         (java_check_abstract_methods): Suppressed unused local
10903         variable. Fixed lang_printable_name invocation.
10904         (read_import_entry): Added supplemental return statement.
10905         (read_import_dir): Suppressed unused local variables.
10906         (check_pkg_class_access, declare_local_variables): Likewise.
10907         (source_start_java_method): Suppressed unused extern variable
10908         declarations
10909         (expand_start_java_method): Suppressed unused extern and local
10910         variable declarations.
10911         (java_complete_expand_methods): Likewise.
10912         (java_complete_expand_method): Suppressed unused local variables.
10913         (make_qualified_name): Likewise.
10914         (resolve_qualified_expression_name): Added default: in
10915         switch. Fixed lang_printable_name invocation.
10916         (class_instance_creation_expression): Added parenthesis around
10917         expressions.
10918         (patch_method_invocation_stmt): Fixed lang_printable_name and
10919         patch_invoke invocations.
10920         (check_for_static_method_reference): Fixed lang_printable_name
10921         invocation.
10922         (patch_invoke): Suppressed unused arguments and local variables.
10923         (lookup_method_invoke): Suppressed unused local variables.
10924         (qualify_ambiguous_name): Added default: in switch.
10925         (identical_subpath_p): Function removed.
10926         (patch_assignment): Suppressed unused local variables. Suppressed
10927         unnecessary if statement. Fixed lang_printable_name invocations.
10928         (try_builtin_assignconv): Fixed lang_printable_name invocations.
10929         (valid_ref_assignconv_cast_p): Parenthesis around
10930         expression. Suppressed unused local variables.
10931         (build_binop): Suppressed unused local variables. fixed
10932         lang_printable_name invocations.
10933         (string_constant_concatenation): Suppressed unused local
10934         variables.
10935         (patch_unaryop): Fixed lang_printable_name invocation.
10936         (patch_cast): Suppressed unnecessary argument. Fixed
10937         lang_printable_name invocation.
10938         (patch_array_ref): Fixed lang_printable_name invocation.
10939         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
10940         (build_labeled_block): Suppressed unused argument.
10941         (generate_labeled_block): Fixed build_labeled_block invocation.
10942         (build_loop_body): Suppressed unused local variables.
10943         (patch_loop_statement): Likewise.
10944         (patch_exit): Fixed lang_printable_name invocation.
10945         (patch_switch_statement): Likewise.
10946         (case_identity): First argument marked unused.
10947         (patch_try_statement): Fixed lang_printable_name invocations.
10948         (patch_synchronized_statement, patch_throw_statement): Likewise.
10949         (check_thrown_exceptions): Fixed check_thrown_exceptions and
10950         lang_printable_name invocations.
10951         (check_thrown_exceptions_do): Suppressed unused argument.
10952
10953 1998-10-14  Tom Tromey  <tromey@cygnus.com>
10954
10955         * jcf-write.c (write_classfile): Add output class file as target.
10956         * lang-options.h: Added -MD, -MMD, -M, and -MM.
10957         * jcf.h: Added declarations for dependency-tracking functions.
10958         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
10959         * lang.c (lang_decode_option): Recognize -MD and -MMD.
10960         (finish_parse): Call jcf_dependency_write.
10961         (dependency_tracking): New global.
10962         (DEPEND_SET_FILE): New define.
10963         (DEPEND_ENABLE): New define.
10964         (init_parse): Enable dependency tracking if required.
10965         Include "flags.h".
10966         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
10967         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
10968         (../gcjh$(exeext)): Likewise.
10969         (jcf-depend.o): New target.
10970         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
10971         (GCJH_SOURCES): Likewise.
10972         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
10973         dep_name argument.
10974         (find_classfile): Added dep_name argument.
10975         (find_class): Compute name of dependency.
10976         (open_in_zip): Call jcf_dependency_add_file.
10977         * gjavah.c (output_file): No longer global.
10978         (usage): Don't mention "gjavah".
10979         (help): Likewise.
10980         (java_no_argument): Likewise.
10981         (version): Likewise.
10982         (main): Recognize and handle -M family of options.
10983         (print_mangled_classname): Return is void.
10984         (process_file): Handle case where output is suppressed.
10985         (HANDLE_END_FIELD): Likewise.
10986         (HANDLE_METHOD): Likewise.
10987         * jcf-depend.c: New file.
10988
10989 Tue Oct 13 23:34:12 1998  Jeffrey A Law  (law@cygnus.com)
10990
10991         * java-tree.def: Add missing newline at EOF.
10992
10993 1998-10-13  Tom Tromey  <tromey@cygnus.com>
10994
10995         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
10996         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
10997         function.
10998         Include <config.h> and "system.h".
10999         (disassemble_method): Undefine RET to avoid clash with
11000         config/i386/i386.h.
11001
11002 Tue Oct 13 03:50:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11003
11004         * decl.c (runtime_exception_type_node, error_exception_type_node):
11005         New global variables.
11006         (init_decl_processing): Initialized.
11007         * expr.c (java_lang_expand_expr): Set caught exception type to
11008         null if catch handler argument doesn't exit.
11009         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
11010         tree codes.
11011         * java-tree.h (runtime_exception_type_node,
11012         error_exception_type_node): Global variables declared.
11013         (DECL_FUNCTION_THROWS): New macro.
11014         (DECL_FUNCTION_BODY): Modified comment.
11015         (DECL_SPECIFIC_COUNT): Likewise.
11016         (struct lang_decl): New field throws_list.
11017         (IS_UNCHECKED_EXPRESSION_P): New macro.
11018         * lex.c (java_lex): Generate location information for THROW_TK.
11019         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
11020         EXCEPTIONS_P): New macros.
11021         (enum jdep_code): New value JDEP_EXCEPTION.
11022         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
11023         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
11024         PATCH_METHOD_RETURN_ERROR): New macros.
11025         (patch_method_invocation_stmt): Added new argument to prototype.
11026         (patch_synchronized_statement, patch_throw_statement,
11027         check_thrown_exceptions, check_thrown_exceptions_do,
11028         purge_unchecked_exceptions, check_throws_clauses): New function
11029         prototypes.
11030         * parse.y Fixed typo in keyword section.
11031         (throw:): Rule tagged <node>.
11032         (THROW_TK): Keyword tagged <operator>.
11033         (method_header:): Last argument to call to method_header passed
11034         from throws: rule.
11035         (throws:, class_type_list:, throw_statement:,
11036         synchronized_statement:, synchronized:): Defined actions.
11037         (method_header): New local variable current. Register exceptions
11038         from throws clause.
11039         (java_complete_tree): Complete and verify exceptions from throws
11040         clause.
11041         (complete_class_report_errors): Error message on exceptions not
11042         found
11043         (java_check_regular_methods): Fixed typo. Shortcut on private
11044         overriding methods. Changed error message on method
11045         redefinition. Check for throws clause compatibility.
11046         (check_throws_clauses): New function.
11047         (java_check_abstract_methods): Use DECL_NAME for wfl or current
11048         method. Changed error message on method redefinition.
11049         (currently_caught_type_list): New static variable.
11050         (java_complete_expand_methods): Purge unchecked exceptions from
11051         throws clause list. Call PUSH_EXCEPTIONS before walk and
11052         POP_EXCEPTIONS after.
11053         (resolve_qualified_expression_name): Pass new argument as NULL to
11054         patch_method_invocation_stmt.
11055         (patch_method_invocation_stmt): New argument ref_decl. Invoke
11056         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
11057         argument list when appropriate. Use new argument if non null to
11058         store selected method decl.
11059         (patch_invoke): Convert if necessary args of builtin types before
11060         forming CALL_EXPR. Argument list no longer reversed here.
11061         (invocation_mode): Treat final methods as static methods.
11062         (java_complete_tree): New cases for THROW_EXPR: and
11063         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
11064         function call.
11065         (complete_function_arguments): No more RECORD_TYPE
11066         conversion. Function parameter nodes no longer saved.
11067         (valid_ref_assignconv_cast_p): Avoid handling null type.
11068         (patch_binop): Fixed null constant reference handling.
11069         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
11070         BUILD_THROW macros.
11071         (patch_try_statement): Fixed comments. Record caught types in
11072         list, push the list, expand try block and pop the list.
11073         (patch_synchronized_statement, patch_throw_statement,
11074         check_thrown_exceptions, check_thrown_exceptions_do,
11075         purge_unchecked_exceptions): New functions.
11076         * typeck.c (lookup_argument_method): Allow WFL in place of method
11077         DECL_NAME during method definition check
11078
11079 1998-10-09  Tom Tromey  <tromey@cygnus.com>
11080
11081         * gjavah.c (decode_signature_piece): New function.
11082         (print_c_decl): Use it.  Added `name_override' argument.
11083         (print_method_info): Use name_override argument to print_c_decl.
11084         (seen_fields): Removed.
11085         (print_field_info): Don't update seen_fields.
11086         (struct method_name): New structure.
11087         (method_name_list): New global.
11088         (print_method_info): Add new method to list of methods.
11089         (name_is_method_p): New function.
11090         (print_field_info): If field name has same name as method, then
11091         change field name.
11092         (process_file): Parse methods before fields.
11093         (field_pass): New global.
11094         (HANDLE_END_FIELD): Take field_pass into account.
11095
11096 Wed Oct  7 12:10:48 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11097
11098         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
11099         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11100
11101 Sat Oct  3 13:29:46 1998  Anthony Green  <green@cygnus.com>
11102
11103         * jvspec.c: Fix bug in jvgenmain_spec patch.
11104
11105 Fri Oct  2 17:22:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11106
11107         * Makefile.in (lang.o:): Install dependency on java-tree.def.
11108         * decl.c (soft_exceptioninfo_call_node): New global variable.
11109         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
11110         takes extra integer argument. soft_exceptioninfo_call_node
11111         initialized.
11112         * except.c (java_set_exception_lang_code): New function
11113         (method_init_exceptions): Called here.
11114         (prepare_eh_table_type): New function.
11115         (expand_end_java_handler): Called here.
11116         * expr.c (build_java_throw_out_of_bounds_exception): Now features
11117         one argument. Modified generation of call to
11118         soft_badarrayindex_node to use new argument.
11119         (build_java_arrayaccess): Pass faulty index value to
11120         build_java_throw_out_of_bounds_exception.
11121         (generate_name): New function.
11122         (java_lang_expand_expr): New local variables node, current,
11123         has_finally_p. Expand TRY_EXPR node.
11124         (process_jvm_instruction): Replace top of the stack with thrown
11125         object reference when entering exception handler.
11126         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
11127         specific tree codes.
11128         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
11129         global.
11130         (DECL_SPECIFIC_COUNT): New macro.
11131         (prepare_eh_table_type, java_set_exception_lang_code,
11132         generate_name): New function declarations.
11133         (match_java_method): Declaration deleted.
11134         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
11135         macros.
11136         * lex.c (TRY_TK, CATCH_TK): Generate location information.
11137         * parse.h (redefinition_error, refine_accessible_methods_list,
11138         can_cast_to_p): Function declaration removed.
11139         (classitf_redefinition_error, variable_redefinition_error,
11140         parse_jdk1_1_error, find_applicable_accessible_methods_list,
11141         find_most_specific_methods_list, argument_types_convertible,
11142         enter_a_block, valid_builtin_assignconv_identity_widening_p,
11143         valid_cast_to_p, valid_method_invocation_conversion_p,
11144         try_reference_assignconv, add_stmt_to_compound,
11145         build_jump_to_finally, build_tree_list, patch_try_statement,
11146         java_get_catch_block): New function declarations.
11147         * parse.y (string_buffer_type): Global variable deleted.
11148         (group_of_labels, catches, catch_clause, catch_clause_parameter,
11149         finally): Rules tagged <node>.
11150         (TRY_TK, CATCH_TK): Token tagged <operator>.
11151         (class_body_declaration:, class_member_declaration:,
11152         formal_parameter:, explicit_constructor_invocation:,
11153         interface_member_declaration:, constant_declaration:,
11154         primary_no_new_array:, class_instance_creation_expression:,
11155         array_creation_expression:): Issue error on unsuported JDK1.1
11156         features.
11157         (try_statement:, catches:, finally:): Define actions.
11158         (catch_clause_parameter): New rule.
11159         (catch_clause:): Use new rule catch_clause_parameter.
11160         (parse_jdk1_1_error): New function.
11161         (redefinition_error): Renamed classitf_redefinition_error.
11162         (variable_redefinition_error): New function.
11163         (check_class_interface_creation): Call
11164         classitf_redefinition_error.
11165         (java_complete_tree): Added error message on JDEP_TYPE: case.
11166         (complete_class_report_errors): Fixed indentation.
11167         (declare_local_variables): Call variable_redefinition_error.
11168         (source_end_java_method): Call java_set_exception_lang_code and
11169         emit_handlers where appropriate.
11170         (java_method_add_stmt): Call add_stmt_to_block.
11171         (add_stmt_to_block): New function.
11172         (lookup_method_invoke): Fixed outside comment. new local variable
11173         candicates.  Call find_applicable_accessible_methods_list and
11174         find_most_specific_methods_list when searching for a
11175         method. Modified error report to list possible candidates when
11176         applicable.
11177         (find_applicable_accessible_methods_list,
11178         find_most_specific_methods_list, argument_types_convertible): New
11179         function.
11180         (refine_accessible_methods_list): Function deleted.
11181         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
11182         expr (if applicable) before calling patch_array_ref.
11183         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
11184         (enter_block): Fixed comment.
11185         (enter_a_block): New function.
11186         (patch_assignment): Reorganized. Call try_reference_assignconv for
11187         references. Call valid_cast_to_p instead of can_cast_to_p.
11188         (try_reference_assignconv,
11189         valid_builtin_assignconv_identity_widening_p): New functions.
11190         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
11191         (valid_cast_to_p, valid_method_invocation_conversion_p): New
11192         functions.
11193         (build_string_concatenation): Don't resolve StringBuffer.
11194         (patch_cast): Fixed inverted arguments.
11195         (patch_array_ref): Code to save array expr deleted. Call
11196         valid_cast_to_p instead of can_cast_to_p.
11197         (generate_labeled_block): Call generate_name.
11198         (build_jump_to_finally, build_try_statement, java_get_catch_block,
11199         patch_try_statement): New functions.
11200         * typeck.c (match_java_method): Function deleted.
11201
11202 Fri Oct  2 13:48:36 1998  Anthony Green  <green@cygnus.com>
11203
11204         * jvspec.c: jvgenmain_spec uses different temporary file names.
11205
11206 Fri Oct  2 12:50:19 1998  Anthony Green  <green@cygnus.com>
11207
11208         * jvspec.c (lang_specific_driver): Fail if user specifies
11209         --main= when not linking.
11210
11211 Mon Sep 28 13:48:33 1998  Tom Tromey  <tromey@cygnus.com>
11212
11213         * class.c (make_class_data): Push value for `thread' field.
11214         * decl.c (init_decl_processing): Added `thread' field to class.
11215
11216         * class.c (add_field): Always make static fields externally
11217         visible.
11218
11219 Sat Sep 26 08:22:47 1998  Anthony Green  <green@cygnus.com>
11220
11221         * expr.c (build_java_athrow,
11222         build_java_throw_out_of_bounds_exception, expand_invoke,
11223         build_newarray, expand_java_multianewarray, build_java_monitor):
11224         Update comments to reflect _Jv_* function names.
11225
11226 Fri Sep 25 16:03:02 1998  Per Bothner  <bothner@cygnus.com>
11227
11228         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
11229         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
11230         * parse.y (expand_start_java_method):  Likewise.
11231
11232 Thu Sep 24 12:20:35 1998  Per Bothner  <bothner@cygnus.com>
11233
11234         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
11235
11236         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
11237         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
11238         * expr.c:  Remove no-longer-needed calls to promote_type.
11239         * decl.c (give_name_to_locals):  Liekwise.
11240         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
11241         * parse.y:  Add/remove promote_type calls as appropriate.
11242         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
11243         (parse_signature_string):  Likewise.
11244         (build_java_array_type):  Fix for now signature convenions.
11245
11246         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
11247
11248 Wed Sep 23 14:49:35 1998  Tom Tromey  <tromey@cygnus.com>
11249
11250         * class.c (init_class_processing): libjava function renamed to
11251         _Jv_RegisterClass.
11252
11253 Tue Sep 22 12:00:02 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11254
11255         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
11256         * java-tree.def: Fixed DEFTREECODE third argument.
11257         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
11258         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
11259         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
11260         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
11261         JAVA_THIS_EXPR): Now replaced by tree code definitions.
11262         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
11263         * lang.c (java_tree_code_type, java_tree_code_length,
11264         java_tree_code_name): New arrays.
11265         (lang_init): Append Java tree node definitions to Gcc ones.
11266         * lex.c (expression_obstack): Declared as extern when JC1_LITE
11267         defined.
11268         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
11269         wfl_to_string.
11270         (java_lex): Allow declaration of empty string constants. Retain
11271         location information on CASE_TK and DEFAULT_TK.
11272         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
11273         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
11274         Modified to be more robust.
11275         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
11276         (build_new_invocation, try_builtin_assignconv,
11277         patch_switch_statement, string_constant_concatenation,
11278         build_string_concatenation, patch_string_cst, patch_string,
11279         java_expand_switch): New function declarations.
11280         * parse.y: Rules related to switch and EH tagged <node>.
11281         (label_id): Set to NULL_TREE
11282         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
11283         tree nodes.
11284         (this_or_super:): Fixed indentation.
11285         (statement:, statement_nsi:, statement_without_trailing_substatement:,
11286         statement_expression:): Removed call to RULE on all sub-rules.
11287         (switch_expression:, switch_labels:): New rules.
11288         (switch_statement:, switch_block:, switch_block_statement_groups:,
11289         switch_block_statement_group:, switch_labels:, switch_label:):
11290         Defined actions.
11291         (throw_statement:, synchronized_statement:, try_statement:):
11292         Defined temporary actions.
11293         (class_instance_creation_expression:): Call
11294         build_new_invocation. Fixed indentation.
11295         (field_access): Fixed indentation.
11296         (method_invocation): Likewise.
11297         (make_qualified_primary): Use THIS_EXPR.
11298         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
11299         resolving from SUPER, set *type_found.
11300         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
11301         (java_complete_tree): Removed unused local variable `location'. Case
11302         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
11303         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
11304         on MODIFY_EXPR: and all binary operator tree code cases. Removed
11305         STRING_CST: case. default: checks for patchable strings.
11306         (complete_function_arguments): Transform string constant or
11307         crafted StringBuffer if necessary.
11308         (build_method_invocation): Fixed comments.
11309         (build_new_invocation): New function.
11310         (patch_assignment): Call try_builtin_assignconv to figure a valid
11311         assignment conversion between builtin types.
11312         (try_builtin_assignconv): New function.
11313         (build_binop): Use URSHIFT_EXPR directly to call build.
11314         (operator_string): Use UNARY_PLUS_EXPR.
11315         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
11316         operator.
11317         (do_merge_string_cste, merge_string_cste,
11318         string_constant_concatenation, build_string_concatenation,
11319         patch_string, patch_string_cst): New function.
11320         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
11321         (patch_unaryop): Likewise. New test of valid ++/-- operands.
11322         (build_newarray_node): Use NEW_ARRAY_EXPR.
11323         (build_this): Use THIS_EXPR.
11324         (build_return): Enable debug information on return statement.
11325         (build_if_else_statement): Likewise.
11326         (complete_labeled_statement): Fixed related comment.
11327         (build_loop_body): Fixed comment.
11328         (build_bc_statement): Enable debug information on break/continue
11329         statements.
11330         (patch_bc_statement): Fixed typos. Handle SWITCH statement
11331         context.
11332         (patch_switch_statement, case_identity, java_expand_switch): New
11333         functions.
11334
11335 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11336
11337         * buffer.h (BUFFER_INIT):  New macro.
11338         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
11339         Pass (struct jcf_partial *state) to most functions.
11340         (jcf_block, jcf_relocation):  New types.
11341         Support labels, branches, conditionals, loops.
11342
11343 Mon Sep 21 15:08:48 1998  Tom Tromey  <tromey@cygnus.com>
11344
11345         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
11346
11347 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11348
11349         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
11350         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
11351         not integer_type_node (INT_TYPE_SIZ bits).
11352
11353         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
11354
11355         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
11356         * jcf-dump.c (print_exception_table):  New function.
11357         (disassemble_method):  Better handling of wide instructions.
11358         Make more robust for bad input.
11359
11360 Wed Sep 30 20:53:51 1998  Jeffrey A Law  (law@cygnus.com)
11361
11362         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
11363         FreeBSD.
11364
11365 Thu Sep 17 19:45:01 1998  Jeffrey A Law  (law@cygnus.com)
11366
11367         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
11368
11369 Thu Sep 17 16:21:52 1998  Tom Tromey  <tromey@cygnus.com>
11370
11371         * Makefile.in ($(PARSE_H)): Removed target.
11372
11373 Thu Sep 17 01:57:07 1998  Jeffrey A Law  (law@cygnus.com)
11374
11375         * Makefile.in (JAVA_OBJS): Add memmove.o
11376         (memmove.o): New target & rules.
11377
11378 Tue Sep 15 23:21:55 1998  Tom Tromey  <tromey@cygnus.com>
11379
11380         * expr.c (expand_invoke): Don't generate a call to the class init
11381         code.
11382
11383 Mon Sep 14 10:14:47 1998  Jeffrey A Law  (law@cygnus.com)
11384
11385         * Makefile.in: Add many missing dependencies.
11386         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
11387         as appropriate.
11388         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
11389         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
11390
11391 Fri Sep 11 14:05:21 1998  Per Bothner  <bothner@cygnus.com>
11392
11393         * decl.c (complete_start_java_method):  If method is static (and
11394         not private) call _Jv_InitClass.
11395         * expr.c (expand_invoke):  Don't call build_class_init.
11396
11397         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
11398
11399 Thu Sep 10 10:33:31 1998  Jeffrey A Law  (law@cygnus.com)
11400
11401         * Make-lang.in (GCJ): Define before using.
11402
11403 Wed Sep  9 21:23:10 1998  Jeffrey A Law  (law@cygnus.com)
11404
11405         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
11406         losing due to namespace pollution in GNU getopt.h
11407
11408 Wed Sep  9 13:33:39 1998  Tom Tromey  <tromey@cygnus.com>
11409
11410         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
11411         (java.all.cross): Likewise.
11412         (java.rest.encap): Likewise.
11413
11414 Tue Sep  8 10:34:05 1998  Jeffrey A Law  (law@cygnus.com)
11415
11416         * gjavah.c (print_class_decls): Fix thinko in arglist
11417         * jcv-io.c (find_classfile): Similarly.
11418
11419 Mon Sep  7 13:59:49 1998  Jeffrey A Law  (law@cygnus.com)
11420
11421         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
11422
11423 Sat Sep  5 16:08:01 1998  Tom Tromey  <tromey@cygnus.com>
11424
11425         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
11426         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
11427         * Makefile.in (PARSE_C): New macro.
11428         (PARSE_H): Likewise.
11429         (PARSE_SCAN_C): Likewise.
11430         ($(PARSE_C)): Target renamed from parse.c.
11431         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
11432         (clean): Remove parse-scan.c as well.
11433         (parse.o): Depend on $(PARSE_C).
11434
11435 Sat Sep  5 08:48:40 1998  Anthony Green  <green@cygnus.com>
11436
11437         * README, license.terms: Removed.
11438
11439         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
11440         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
11441         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
11442         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
11443         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
11444         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
11445         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
11446         and Java trademark attribution.
11447
11448 Fri Sep  4 10:42:05 1998  Tom Tromey  <tromey@cygnus.com>
11449
11450         * Makefile.in: Use gcjh, not gjavah.
11451         * config-lang.in (stagestuff): Use gcjh, not gjavah.
11452         * Make-lang.in: Changed gjavah to gcjh everywhere.
11453
11454 Thu Sep  3 18:04:09 1998  Per Bothner  <bothner@cygnus.com>
11455
11456         * gjavah.c:  Support new -prepend -add -append flags.
11457         (print_method_info):  Method is not virtual if class is final.
11458
11459 Thu Sep  3 12:03:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11460
11461         * jv-scan.c: Fixed copyright assignment.
11462         * keyword.gperf: Likewise.
11463         * keyword.h: Likewise.
11464         * lex.c: Fixed copyright assignment.
11465         (java_lex): Push unicode back when parsing '<'.
11466         * lex.h: Fixed copyright assignment.
11467         * parse-scan.y: Likewise.
11468         * parse.h: Fixed copyright assignment.
11469         (build_debugable_stmt, complete_for_loop): New function prototypes.
11470         * parse.y: Fixed copyright assignment.
11471         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
11472         size_zero_node when completing a loop with no exit condition.
11473         (for_statement_nsi:): Define action.
11474         (for_init:, for_update:): Return size_zero_node when empty.
11475         (declare_local_variables): Call build_debugable_stmt.
11476         (build_debugable_stmt): New function.
11477         (build_loop_body): Build debugable statement around loop
11478         condition part.
11479         (complete_loop_body): Take into account the debugable statement
11480         around the EXIT_EXPR.
11481         (complete_loop_body): New function.
11482         (patch_exit_expr): Fixed condition inversion.
11483
11484 Wed Sep  2 11:53:58 1998  Tom Tromey  <tromey@cygnus.com>
11485
11486         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
11487         name of thread define.
11488         * jvspec.c (THREAD_NAME): New macro.
11489         (GCLIB): Likewise.
11490         (THREADLIB): Likewise.
11491         (lang_specific_driver): Recognize attempt to link with thread
11492         library or gc library.  Recognize -ljava on command line so it
11493         isn't linked against more than once.
11494
11495 Wed Sep  2 11:28:35 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11496
11497         * parse-scan.y (report_main_declaration): Name of the class
11498         containing `main' can be a qualified name.
11499
11500 Mon Aug 31 13:25:58 1998  Tom Tromey  <tromey@cygnus.com>
11501
11502         * config-lang.in: Changed gjavac to gjc everywhere.
11503         * Make-lang.in: Changed gjavac to gjc everywhere.
11504
11505 Thu Aug 27 02:28:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11506
11507         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
11508         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
11509         and install the files.
11510         * Makefile.in (JAVA_OBJS_LITE): New variable.
11511         (compiler:): Now include jv-scan as a dependency.
11512         (../jv-scan$(exeext), parse-scan.c): New targets.
11513         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
11514         * config-lang.in (compilers): Removed gcj, gjavah from the list.
11515         * jcf-parse.c (parse_source_file): Call java_layout_classes and
11516         check for errors even if parse_only.
11517         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
11518         defined.
11519         (yylex): New function. Uses java_lex body.
11520         (java_lex): Removed commented out statement. Remove local variable
11521         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
11522         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
11523         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
11524         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
11525         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
11526         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
11527         where appropriate.
11528         (java_lex_error): Empty if JC1_LITE is defined.
11529         (java_get_line_col): Return 0 if JC1_LITE is defined.
11530         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
11531         SET_MODIFIER_CTX): Moved into the section containing the macros
11532         conditionally defined by JC1_LITE.
11533         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
11534         argument if JC1_LITE is defined.
11535         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
11536         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
11537         is defined.
11538         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
11539         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
11540         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
11541         to different values according to JC1_LITE.
11542         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
11543         declared if JC1_LITE set.
11544         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
11545         defined if JC1_LITE not set.
11546         (struct parser_ctx): Reorganized and skip the jc1 front end part
11547         if JC1_LITE set.
11548         (java_layout_classes): New function definition.
11549         (java_push_parser_context, java_init_lex, yyparse, yylex,
11550         yyerror): Prototype always declared. All other static function
11551         prototypes declared only if JC1_LITE is not set.
11552         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
11553         declared in parse.h.
11554         (java_layout_classes): New function.
11555         (java_complete_expand_methods): No longer layout the class here.
11556         * parse-scan.y: New file.
11557         * jv-scan.c: New file.
11558
11559 Tue Aug 25 10:17:54 1998  Tom Tromey  <tromey@cygnus.com>
11560
11561         * gjavah.c (main): Handle -friend option.
11562         (friend_specs): New global.
11563         (generate_access): Handle friend_specs.
11564         (process_file): Likewise.
11565         (MAX_FRIENDS): New macro.
11566         (friend_count): New global.
11567         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
11568         Changed all callers.
11569
11570 Mon Aug 24 20:19:27 1998  Per Bothner  <bothner@cygnus.com>
11571
11572         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
11573         (main):  Handle processing all the entries of a named .zip archive.
11574         * jcf-io.c (jcf_trim_old_input):  New function.
11575         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
11576
11577 Mon Aug 24 07:35:13 1998  Per Bothner  <bothner@cygnus.com>
11578
11579         * lang.c (flag_assume_compiled):  Make default be on.
11580
11581 Fri Aug 21 17:29:04 1998  Per Bothner  <bothner@cygnus.com>
11582
11583         * jcf-dump.c:  Add bunches of flags to control output more.
11584         (process_class):  New function;  support printing more than one class.
11585         (main): Support new --print-main and --javap flags.
11586         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
11587         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
11588
11589 Thu Aug 20 14:24:47 1998  Per Bothner  <bothner@cygnus.com>
11590
11591         Change mangling of dispatch table to match C++ vtable (w/thunks).
11592         * class.c (build_dtable_decl), java-tree.h:  New function.
11593         (make_class_data):  Call it.
11594         * decl.c (init_decl_processing):  Likewise.
11595
11596 Wed Aug 19 17:57:07 1998  Warren Levy  <warrenl@cygnus.com>
11597
11598         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
11599         soft_anewarray; adjust args passed.
11600         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
11601         match _Jv_NewObjectArray.
11602
11603 Wed Aug 19 09:33:23 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11604
11605         * decl.c (push_labeled_block, pop_labeled_block): New functions.
11606         * expr.c (loopup_label): Call create_label_decl.
11607         (create_label_decl): New function.
11608         (java_lang_expand_expr): Call expand_start_bindings with argument
11609         set to zero.
11610         * java-tree.h Added space after PROTO in function declarations
11611         when necessary.
11612         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
11613         (create_label_decl, push_labeled_block): New function
11614         declarations.
11615         * lex.c (label_id): Initialize.
11616         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
11617         switch.
11618         * parse.h Added space after PROTO in function declarations when
11619         necessary.
11620         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
11621         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
11622         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
11623         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
11624         macros.
11625         (struct parser_ctxt): New fields current_loop,
11626         current_labeled_block.
11627         (build_if_else_statement, patch_if_else_statement,
11628         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
11629         generate_labeled_block, complete_labeled_statement,
11630         build_bc_statement, patch_bc_statement, patch_loop_statement,
11631         build_new_loop, build_loop_body, complete_loop_body): New function
11632         declarations.
11633         * parse.y (java_warning_count): New global variable.
11634         (label_id): New static variable.
11635         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
11636         (block:): Return size_zero_node when block is empty.
11637         (empty_statement:): Return size_zero_node.
11638         (statement:): Implement supplemental action when for_statement: is
11639         reduced.
11640         (label_decl:): New rule.
11641         (labeled_statement:): Rewritten using label_decl. Actions
11642         implemented.
11643         (labeled_statement_nsi:): Likewise.
11644         (if_then_statement): Actions implemented.
11645         (while_expression): New rule.
11646         (while_statement:): Rewritten using while_expression. Actions
11647         implemented.
11648         (while_statement_nsi:): Likewise.
11649         (do_statement_begin:): New rule.
11650         (do_statement:): Rewritten using do_statement_begin. Actions
11651         implemented.
11652         (for_statement:): Rewritten using for_begin. Actions implemented.
11653         (for_statement_nsi:): Likewise.
11654         (for_header:, for_begin:): New rules.
11655         (for_init:): Actions implemented.
11656         (statement_expression_list:, break_statement:,
11657         continue_statement:): Likewise.
11658         (yyerror): Count number of issued warning(s).
11659         (java_report_errors): Report error(s) and/or warning(s).
11660         (java_complete_class): Use build_java_argument_signature to
11661         recompute completed method signature.
11662         (java_check_regular_methods): New locals method_wfl and aflags.
11663         Use method_wfl instead of lookup_cl during error reports. Fixed
11664         indentation and modified some error messages. Use
11665         lang_printable_name in method instead of the DECL_NAME. New code
11666         to issue warnings on methods not overriding corresponding methods
11667         private to a different package.
11668         (java_method_add_stmt): Call add_stmt_to_compound.
11669         (add_stmt_to_compound): New function.
11670         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
11671         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
11672         (build_if_else_statement, patch_if_else_statement,
11673         build_labeled_block, generate_labeled_block,
11674         complete_labeled_statement, build_new_loop, build_loop_body,
11675         complete_loop_body, patch_loop_statement, build_bc_statement,
11676         patch_bc_statement, patch_exit_expr): New functions.
11677         * typeck.c (build_java_signature): Build argument signature before
11678         enclosing it in between parenthesis.
11679
11680 Mon Aug 17 17:44:24 1998  Warren Levy  <warrenl@cygnus.com>
11681
11682         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
11683         (JAVA_OBJS): Added reminder comment
11684
11685 Thu Aug 13 10:01:45 1998  Nick Clifton  <nickc@cygnus.com>
11686
11687         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
11688         be interpreted as a long long.
11689
11690 Thu Aug 13 14:34:07 1998  Warren Levy  <warrenl@cygnus.com>
11691
11692         * decl.c (init_decl_processing): Use _Jv_InitClass, not
11693         soft_initialise_class.  Use _Jv_NewMultiArray, not
11694         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
11695         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
11696         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
11697         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
11698
11699 Wed Aug 12 14:23:13 1998  Per Bothner  <bothner@cygnus.com>
11700
11701         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
11702         length_identifier_node):  New global tree node constants.
11703         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
11704         Replace uses by super_identifier_node etc.
11705         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
11706
11707         * parse.y (resolve_field_access):  Don't special-case ".length" if
11708         flag_emit_class_files.
11709         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
11710         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
11711         and ARRAY.length.
11712
11713 Tue Aug 11 11:31:55 1998  Per Bothner  <bothner@cygnus.com>
11714
11715         * decl.c (init_decl_processing): Remove unused method_type_node fields.
11716         * class.c (make_method_value):  Remove init for removed fields.
11717
11718         * class.c (layout_class):  Use build_java_argument_signature.
11719         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
11720
11721         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
11722         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
11723         (build_java_signature):  Don't use push_java_argument_signature.
11724
11725         * typeck.c (lookup_argument_method):  New function.
11726         * parse.y (java_check_regular_methods):  Use lookup_argument_method
11727         instead of lookup_java_method2 followed by lookup_java_method.
11728
11729         * parse.y (check_method_redefinition):  Minor optimization.
11730
11731         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
11732         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
11733
11734 Mon Aug 10 09:57:15 1998  Tom Tromey  <tromey@cygnus.com>
11735
11736         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
11737         c-pragma.o.
11738
11739         * gjavah.c (java_float_finite): Use K&R-style definition.
11740         (java_double_finite): Likewise.
11741         (generate_access): Now returns void.  Changed all callers.
11742         (last_access_generated): Removed.
11743         (process_file): Only make a single pass over the .class file.
11744
11745 Wed Jul 29 17:50:23 1998  Per Bothner  <bothner@cygnus.com>
11746
11747         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
11748         for compatibility for G++ (with -fvtable-thunks).
11749         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
11750
11751         * gjavah.c (process_file):  Use public inheritance for super-class.
11752
11753 Wed Jul 29 13:19:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11754
11755         * lex.c (java_init_lex): Initialize ctxp->package.
11756         * parse.h (struct parser_ctxt): package and package_len replaced
11757         by tree package, an identifier node. Field method_decl_list is
11758         gone. Fixed comments.
11759         (lookup_field_wrapper, merge_qualified_name, not_accessible,
11760         class_in_current_package): New function prototypes.
11761         * parse.y (array_type:): Set class loaded flag on primitive type
11762         arrays.
11763         (package_declaration:): Assign ctxp->package to the
11764         identifier node.
11765         (method_invocation:): Handle invocation of method qualified by
11766         `super'.
11767         (single_type_import_declaration:): Removed ambiguity check.
11768         (java_pop_parser_context): New local variable `next'. Reset and
11769         set IMPORT_CLASSFILE_NAME flags on current and previous import
11770         list.
11771         (java_accstring_lookup): Use new local macro COPY_RETURN.
11772         (lookup_field_wrapper): New function.
11773         (parser_qualified_classname): Use merge_qualified_name.
11774         (parser_check_super_interface): Broaden error message.
11775         (do_resolve_class): Check for qualified class name in the current
11776         compilation unit if appropriate.
11777         (process_imports): Check for already defined classes.
11778         (check_pkg_class_access): Got rid of call to
11779         get_access_flags_from_decl.
11780         (java_complete_expand_methods): Call safe_layout_class based on
11781         the current class size.
11782         (make_qualified_primary): Build a WFL qualification on primary if
11783         none exists.
11784         (merge_qualified_name): New function.
11785         (make_qualified_name): Use merge_qualified_name.
11786         (resolve_expression_name): Use safe_lookup_field.
11787         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
11788         (resolve_qualified_expression_name): Likewise. Check on resolved
11789         element accessibility.
11790         (not_accessible_p, class_in_current_package): New functions.
11791         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
11792         (patch_method_invocation_stmt): Merged common pieces. Check
11793         accessibility of invoked method.
11794         (check_for_static_method_reference): Add returned type in error
11795         message.
11796         (invocation_mode): Get rid of bogus check on PRIVATE methods.
11797         (refine_accessible_methods_list): Merged two conditions in test.
11798         (java_complete_class): Sanity check on stabilize_ref gone.
11799         * zextract.c (read_zip_archive): Cast lseek second argument to long.
11800
11801 Tue Jul 28 21:39:22 1998  Per Bothner  <bothner@cygnus.com>
11802
11803         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
11804
11805 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
11806
11807         * gjavah.c (F_NAN): Removed.
11808         (F_NAN_MASK): New macro.
11809         (F_POSITIVE_INFINITY): Removed.
11810         (F_NEGATIVE_INFINITY): Likewise.
11811         (java_float_finite): Rewrote.
11812         (D_NAN_MASK): Renamed.
11813         (java_double_finite): Rewrote.
11814         (D_POSITIVE_INFINITY): Removed.
11815         (D_NEGATIVE_INFINITY): Likewise.
11816
11817         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
11818         If verbose, print underlying representation of value in hex.
11819
11820 Fri Jul 24 14:14:32 1998  Per Bothner  <bothner@cygnus.com>
11821
11822         * buffer.h, buffer.c:  New files.
11823         * Makefile.in (JAVA_OBJS):  Add buffer.o.
11824
11825         Support locals variables and writing their debug entries to .class.
11826         * jcf-write.c:  Simplify some by user new buffer type.
11827         (vode_buffer_grow):  Removed.
11828         (struct localvar_info):  New type.
11829         (localsvars, localvartable):  New buffers.
11830         (localvar_alloc, localvar_free):  New functions.
11831         (generate_bytecode_insns):  Handle local variables.
11832         (generate_classfile):  Write LocalVariableTable attribute.
11833
11834 Fri Jul 24 13:46:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11835
11836         * jcf-io.c (open_in_zip): Check the zipfile magic number.
11837         * zipfile.h (ZIPMAGIC): New macro.
11838
11839 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
11840
11841         * Makefile.in (gjavah.o): Updated dependencies.
11842         (jcf-dump.o): Likewise.
11843         (all.indirect): Use ../gjavah.
11844         (../gjavah$(exeext)): Likewise.
11845         (clean): Don't remove gjavah.
11846         (clean): Remove parse.c, not java/parse.c.
11847         * Make-lang.in (java): Added gjavah.
11848         (gjavah$(exeext)): New target.
11849         (GJAVAH_SOURCES): New macro.
11850         (java.all.build): Added gjavah.
11851         (java.all.cross): Likewise.
11852         (java.rest.encap): Likewise.
11853         * config-lang.in (compilers, stagestuff): Added gjavah.
11854
11855 Thu Jul 23 18:33:56 1998  Tom Tromey  <tromey@cygnus.com>
11856
11857         * gjavah.c (java_float_finite): New function.
11858         (java_double_finite): Likewise.
11859         (F_POSITIVE_INFINITY): New macro.
11860         (F_NEGATIVE_INFINITY): Likewise.
11861         (F_NAN): Likewise.
11862         (D_POSITIVE_INFINITY): Likewise.
11863         (D_NEGATIVE_INFINITY): Likewise.
11864         (D_NAN): Likewise.
11865         (print_field_info): Use java_float_finite and java_double_finite.
11866
11867 Thu Jul 23 15:28:24 1998  Per Bothner  <bothner@cygnus.com>
11868
11869         * parse.y (method_header):  Name "this" implicit argument.
11870
11871 Wed Jul 22 15:47:30 1998  Per Bothner  <bothner@cygnus.com>
11872
11873         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
11874         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
11875         (put_linenumber):  New function.
11876         (generate_bytecode_insns, generate_classfile):  Write line numbers.
11877
11878 Wed Jul 22 14:39:00 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11879
11880         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
11881         (lookup_name, build_known_method_ref, build_class_init,
11882         build_invokevirtual, invoke_build_dtable, match_java_method,
11883         build_field_ref, pushdecl_force_head, build_java_binop,
11884         binary_numeric_promotion, build_decl_no_layout,
11885         build_java_arrayaccess, build_newarray, build_anewarray,
11886         build_java_array_length_access, build_java_arraynull_check): New
11887         extern function prototypes.
11888         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
11889         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
11890         java-tree.h.
11891         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
11892         to NULL
11893         * jcf.h (jcf_out_of_synch): New extern function prototype.
11894         * parse.h: Static/global function implemented in parse.y
11895         prototyped and declarations moved at the end of the file.
11896         (DECL_P): Check that the argument isn't null.
11897         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
11898         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
11899         (QUAL_DECL_TYPE): New macro.
11900         (PARAMS): Macro definition removed.
11901         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
11902         (return_statement:): Call build_return.
11903         (field_access:): Call make_qualified_primary in sub rule.
11904         (method_invocation:): Build method invocation and call
11905         make_qualified_primary when processing primaries.
11906         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
11907         get_type_from_signature.
11908         (java_check_regular_method): Extra integer 0 argument when calling
11909         lookup_java_method2.
11910         (lookup_java_interface_method2): Extra method DECL argument when
11911         calling lookup_java_interface_method2.
11912         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
11913         COMPOUND_EXPR node.
11914         (java_complete_expand_method): Layout current class iff not
11915         already done. Don't process interface's methods.
11916         (java_complete_expand_method): Use super class only if it
11917         exists. Use current class otherwise.
11918         (make_qualified_primary): New function.
11919         (resolve_expression_name): Process qualified expression or
11920         expression from primary the same way.
11921         (resolve_expression_name): Two last arguments to
11922         resolve_field_access are now NULL_TREEs.
11923         (resolve_field_access): New variable is_static. Local field must
11924         be DECLs. is_static computed on field DECLs only. Append code in
11925         where_found to the field access if necessary. Use QUAL_DECL_TYPE
11926         to initialize field_type.
11927         (resolve_qualified_expression_name): New local variable,
11928         previous_call_static and is_static. Handle primaries with function
11929         calls, casts, array references and `this'. `super' now handled as
11930         `(super_class)this'. Use is_static to clarify boolean expressions.
11931         Added code to handle case where a proper handle is required to
11932         access a field. Use QUAL_DECL_TYPE where applicable.
11933         (maybe_access_field): New function.
11934         (patch_method_invocation_stmt): New arguments primary, where,
11935         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
11936         deleted. Use `where' as a type to search from if specified. Check
11937         for static method reference where forbidden. Append primary or
11938         current_this to the argument list if not calling constructor nor
11939         static methods.
11940         (check_for_static_method_reference): New function.
11941         (patch_invoke): Layout the class on which new is done if
11942         necessary.
11943         (lookup_method_invoke): Changed format to report errors on
11944         methods.
11945         (qualify_ambiguous_name): New local variable this_found. Now
11946         handle things from primaries. Method call are considered
11947         expression names.
11948         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
11949         changed into NULLs.
11950         (not_initialized_as_it_should_p): Comply with the new DECL_P.
11951         (java_complete_tree): New case fo RETURN_EXPR. Process function
11952         call arguments in separate function.
11953         (complete_function_arguments): New function.
11954         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
11955         anymore.
11956         (patch_assignment): Take the return function slot into account as
11957         a RHS. Distinguish assignment from a return.
11958         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
11959         when checking methods in interfaces.
11960         (resolve_type_during_patch): NULL argument to unresolve_type_p
11961         instead of NULL_TREE.
11962         (patch_newarray): Fixed typo in comment.
11963         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
11964         (build_return, patch_return): New functions.
11965         * typeck.c (lookup_java_constructor): Fixed typo in comment.
11966
11967 Tue Jul 21 12:10:04 1998  Per Bothner  <bothner@cygnus.com>
11968
11969         * constants.c (find_name_and_type_constant, find_fieldref_index,
11970         find_methodref_index):  New methods.
11971         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
11972         just return given method.  Also, rename to build_known_method_ref.
11973         (expand_invoke):  Rename call to build_invoke_non_interface.
11974         * java-tree.h, parse.h:  Update prototype.
11975         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
11976         (such as expand_expr_stmt) if flag_emit_class_files.
11977         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
11978         STACK_TARGET, IGNORE_TARGET):  New macros.
11979         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
11980         (generate_bytecode_insn):  New function to generate method's bytecode.
11981         (generate_classfile):  Node generate Code attribute for a method.
11982         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
11983         push_long_const, field_op, adjust_typed_op, maybe_wide):
11984         New functions used by generate_bytecode_insn.
11985
11986         * typeck.c (signature_include_return):  Remove variable.
11987         (push_java_argument_signature, build_java_argument_signature):  New.
11988         (build_java_signature):  Use push_java_argument_signature.
11989         * parse.y:  Use build_java_argument_signature instead of fiddling
11990         with signature_include_return.
11991
11992 Fri Jul 17 09:48:51 1998  Tom Tromey  <tromey@cygnus.com>
11993
11994         * gjavah.c (print_c_decl): Always generate JArray<>* for array
11995         types.
11996
11997         * Makefile.in (all.indirect): Added gjavah$(exeext).
11998         (gjavah$(exeext)): Added $(exeext).
11999         (clean): Likewise.
12000
12001 Thu Jul 16 15:29:20 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12002
12003         * class.c (layout_class): Call to java_layout_parsed_class replace
12004         by safe_layout_class.
12005         * expr.c (build_java_array_length_access): Removed static storage
12006         class in the function definition.
12007         (build_java_arraynull_check): Likewise.
12008         Also fixed typos in two comments.
12009         * lex.c (java_init_lex): Initialize static global kw_length.
12010         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
12011         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
12012         java_lex_error.
12013         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
12014         * parse.h (resolve_no_layout): New static function declaration.
12015         (get_identifier_in_static): Declaration removed.
12016         (java_layout_parsed_class): Function name declaration changed to
12017         safe_layout_class.
12018         (build_newarray_node, patch_newarray, resolve_type_during_patch,
12019         not_initialized_as_it_should_p, build_this): New static function
12020         declarations.
12021         (pushdecl_force_head, build_java_binop, int_fits_type_p,
12022         binary_numeric_promotion, stabilize_reference,
12023         build_decl_no_layout, build_java_arrayaccess): Extern function
12024         declarations moved into their own section.
12025         (build_newarray, build_anewarray, build_java_array_length_access,
12026         build_java_arraynull_check): New extern function declarations.
12027         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
12028         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
12029         fake tree codes.
12030         (CALL_CONSTRUCTOR_P): New macro.
12031         * parse.y (kw_length): New static global tree node.
12032         (return_statement): Tagged <node>.
12033         (RETURN_TK): Tagged <operator>.
12034         (variable_declarator_id:): Build variable declaration with an
12035         empty initialization value if a syntax error was found in the
12036         initialization part of the variable declaration.
12037         (statement_without_trailing_substatement:): return_statement: now
12038         uses the default rule.
12039         (return_statement:): Temporarily fixed to return NULL_TREE.
12040         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
12041         (class_instance_creation_expression:): Class creation rules now
12042         call build_method_invocation upon reduction.
12043         (array_creation_expression:): Rules call build_newarray_node upon
12044         reduction.
12045         (dim_exprs:): Build a list of dimension expressions.
12046         (dim_expr:): Store location of the OSB_TK in the dimension
12047         expression node.
12048         (method_invocation:): Added a new error rule.
12049         (build_unresolved_array_type): WFL argument may also be an array
12050         on a primitive type. Name of the argument changed to reflect this.
12051         (method_declarator): Insert argument type at the beginning of the
12052         argument type list and later reverse the list.
12053         (unresolved_type_p): Argument 'returned' may be optionally
12054         NULL_TREE.
12055         (java_layout_class_from_source): Function renamed
12056         safe_layout_class.
12057         (resolve_and_layout): Now call resolve_no_layout and
12058         safe_layout_class.
12059         (resolve_no_layout): New function.
12060         (purify_type_name): New function.
12061         (complete_class_report_errors): Call purify_type_name during error
12062         report on a type not found.
12063         (process_imports): error_found local variable doesn't need to be
12064         initialized to zero.
12065         (declare_local_variables): New local type_wfl. Fixed typo in error
12066         message. type_wfl assigned to unresolved type and used to register
12067         incomplete type. Build a WFL around the variable initialization
12068         statement so that debug info can be generated on it.
12069         (source_start_java_method): Reverse argument list after they've
12070         been processed.
12071         (current_this): New static global variable.
12072         (java_complete_expand_methods): Set current_this when appropriate.
12073         (resolve_expression_name): Build correct static and non static
12074         field access bearing a simple name.
12075         (resolve_field_access): Resolve the length field of arrays. Handle
12076         f.m() cases.
12077         (patch_method_invocation_stmt): Set the type of the method
12078         invocation to error_mark_node. This value is later overridden by a
12079         valid type, if any. Don't handle qualified constructor invocation
12080         as qualified method invocation. Call lookup_method_invoke with its
12081         new flag. It's no longer necessary to access the selected method
12082         as the value of a tree list. Handle constructor invocation.
12083         (patch_invoke): Reverse argument list when invoking non interface
12084         methods. Insert call to new as the first argument of the
12085         constructor.
12086         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
12087         defined within a final class. Return INVOKE_STATIC if the invoked
12088         method is a constructor.
12089         (lookup_method_invoke): New lc argument is a flag to indicate a
12090         constructor lookup. Now handle constructor lookup. Choose the most
12091         specific method in case several were matching the invocation
12092         requirements. Return a method decl instead of a tree list featuring
12093         one single method decl element.
12094         (refine_accessible_methods_list): New lc flag argument to
12095         indicate that a constructor is being looked up.
12096         (not_initialized_as_it_should_p): New function.
12097         (java_complete_tree): Now process fake tree codes
12098         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
12099         save_expr on resolved function call arguments. Case on
12100         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
12101         (patch_assignment): LHS can be a field access expression. When
12102         dealing with reference, lhs_type is the promoted type of the
12103         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
12104         applicable.
12105         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12106         (patch_binop): Use not_initialized_as_it_should_p where
12107         applicable.
12108         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12109         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
12110         where applicable.
12111         (resolve_type_during_patch): New function.
12112         (patch_cast): Call resolve_type_during_patch to resolve type and
12113         report error accordingly.
12114         (patch_array_ref): Use not_initialized_as_it_should_p where
12115         applicable. Array base expression is saved before being
12116         used. Promote the type of an array elements if it contains non
12117         builtin types.
12118         (build_newarray_node, patch_newarray, build_this): New functions.
12119
12120 Thu Jul 16 10:46:47 1998  Tom Tromey  <tromey@cygnus.com>
12121
12122         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
12123         increment it in `for' statement.
12124         (print_field_info): If number is inf or nan, don't print it.
12125         (print_method_info): If method name is `delete', just ignore it.
12126         (print_c_decl): Special-case jstringArray.
12127
12128         * gjavah.c (help): New function.
12129         (no_argument): New function.
12130         (usage): Changed text.
12131         (main): Rewrote argument handling.  Now handles -v, --help,
12132         --version.
12133         (version): New function.
12134         (found_error): New global.
12135         (main): Return found_error.
12136         (generate_access): Set found_error.
12137         (print_c_decl): Likewise.
12138
12139 Wed Jul 15 10:36:27 1998  Tom Tromey  <tromey@cygnus.com>
12140
12141         * gjavah.c (print_c_decl): Don't print "," when examining field.
12142         Skip type name when looking at "[L" types.
12143         (process_file): Now static.
12144         (generate_access): Now returns int.
12145         (last_access_generated): New global.
12146         (process_file): Clear last_access_generated; make multiple passes
12147         over the class.
12148         (print_field_info): Just return if generate_access returns true.
12149         (print_method_info): Likewise.  Also, allow <init> functions to
12150         pass through.
12151         (print_c_decl): Added is_init argument.  Print constructors
12152         properly.
12153         (print_cxx_classname): Use UTF8_GET to extract characters from
12154         string.
12155         (print_base_classname): New function.
12156         (print_class_decls): New function.
12157         (process_file): Use it.
12158         (utf8_cmp): New function.
12159
12160 Mon Jul 13 14:21:47 1998  Nick Clifton  <nickc@cygnus.com>
12161
12162         * lang-options.h: Format changed to match changes in gcc/toplev.c
12163         to implement a --help option.
12164
12165 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
12166
12167         * decl.c (init_decl_processing): Revert change to dtable_type.
12168
12169 Thu Jul  9 18:22:12 1998  Per Bothner  <bothner@cygnus.com>
12170
12171         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
12172
12173 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
12174
12175         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
12176
12177         * lang.c (lang_init): Default flag_exceptions to 1, without
12178         checking to see if it's 2 first.
12179
12180 Wed Jul  8 03:01:32 1998  Jeffrey A Law  (law@cygnus.com)
12181
12182         * constants.c: Include "system.h".
12183         * decl.c: Likewise.
12184         * lang.c (flag_new_exceptions): Get via extern now.
12185         (lang_init_options): New functions.  Turn on flag_new_exceptions.
12186
12187 Tue Jul  7 12:56:48 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12188
12189         * lex.c (java_lex): Return 0 when we see an invalid character in
12190         the input.
12191
12192         * lex.c (java_read_char): Specify extra argument when calling
12193         java_lex_error.
12194         (java_read_unicode, java_parse_end_comment,
12195         java_parse_escape_sequence): Likewise,
12196         (java_lex): Specify extra argument when calling
12197         java_lex_error. Test that IDs are beginning with a legal character
12198         for IDs. Handle invalid characters with an error message and a
12199         call to java_lex_error.
12200         (java_lex_error): Adjust column position by new argument
12201         `forward'. Issue an error even if in the middle of reporting an
12202         other error.
12203
12204 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
12205
12206         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
12207         we don't explicitly put a null pointer when we're copying it.
12208
12209 Tue Jul  7 09:38:38 1998  Tom Tromey  <tromey@cygnus.com>
12210
12211         * gjavah.c (print_cxx_classname): New function.
12212         (super_class_name): Likewise.
12213         (print_super_fields): Removed.
12214         (in_super): Removed.
12215         (print_field_info): Never generate #defines.
12216         (print_c_decl): Changed generated types to match JNI.  No longer
12217         print class name before method name.
12218         (print_method_info): Print "static" before static methods.
12219         Print "virtual" before non-final methods.
12220         (usage): Use exit(1), not exit(-1).
12221         (main): Likewise.
12222         (print_field_info): Use %.17g to print a double.
12223         (last_access): New globals.
12224         (process_file): Initialize last_access.
12225         (usage): Now static.
12226         (ACC_VISIBILITY): New define.
12227         (generate_access): New function.
12228         (print_field_info): Call it.
12229         (print_method_info): Likewise.  Also, generate information for all
12230         methods, not just native methods.  Return void.
12231         (print_c_decl): Return void.
12232         (print_field_info): Return void.
12233
12234 Thu Jul  2 16:53:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12235
12236         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
12237         processing the jc1 grammar file. Prefix bison functions and
12238         variables with java_.
12239         (parse.c): Dependencies on parse.h and lex.h
12240         * expr.c (build_java_arrayaccess): Function now global.
12241         * java-tree.h: Comment reorganized to carry on previous
12242         classification effort.
12243         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
12244         RESOLVE_TYPE_NAME_P): New flags on WFLs.
12245         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
12246         java_parse (new prefix java_ generated by bison).
12247         (java_layout_parsed_class, java_register_parsed_class): Function
12248         call removed.
12249         (yyparse): Removed unnecessary call to init_outgoing_cpool.
12250         * lex.c (static tree wfl_op): Variable deleted.
12251         (java_init_lex): Initialize kw_super and kw_this. Initialize more
12252         ctxp fields to NULL_TREE.
12253         (java_lex): No longer create WFL for operators. Filename caching
12254         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
12255         created as STRING_CST and later expanded. Removed extra argument
12256         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
12257         and SUPER.
12258         (build_wfl_node): Removed code in comments.
12259         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
12260         store token and location data in the current bison token.
12261         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
12262         static/extern function declaration at the beginning of the file.
12263         (struct qualification): Data structure definition deleted.
12264         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
12265         (qualify_ambiguous_name): Function declaration modified. Function
12266         now returns nothing.
12267         (build_array_ref, patch_array_ref, make_qualified_name,
12268         resolve_qualified_expression_name, maybe_generate_clinit,
12269         resolve_field_access): New static function declarations.
12270         (build_java_arrayaccess): New extern function declaration.
12271         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
12272         (CALL_EXPR_PRIMARY): Macro deleted.
12273         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
12274         (struct parser_ctxt): Field initialized_final
12275         removed. non_static_initialized, static_initialized: New fields.
12276         * parse.y (static tree kw_super, static tree kw_this): New global
12277         static.
12278         (%union): tree wfl field of operator member replaced by int
12279         location. WFLs are non longer created for operators.
12280         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
12281         (qualified_name:): Now calls make_qualified_name to build the
12282         identifier.
12283         (type_declaration:): Consider generating <clinit> when class
12284         parsing completed.
12285         (variable_declarator:): Directly build an assignment node when the
12286         variable is initialized when declared.
12287         (this_or_super:): Build a WFL and set current location when THIS
12288         or SUPER are parsed.
12289         (expression_statement:): Wrap statement around a WFL.
12290         (primary_no_new_array:): Fixed typo. Changed value returned by
12291         THIS_TK because of its new type (temporary).
12292         (dim_exprs:): Temporary fix because of OSB_TK's new type.
12293         (field_access:): Build qualified name with SUPER.
12294         (method_invocation:): Fixed returned value because of SUPER's new
12295         type.
12296         (array_access:): Use OSB_TK location information.
12297         (post_increment_expression:, post_decrement_expression:,
12298         unary_expression:, pre_increment_expression:,
12299         pre_decrement_expression:, unary_expression_not_plus_minus:,
12300         cast_expression:, multiplicative_expression:,
12301         additive_expression:, shift_expression:, relational_expression:,
12302         equality_expression:, and_expression:, exclusive_or_expression:,
12303         inclusive_or_expression:, conditional_and_expression:,
12304         conditional_or_expression:, assignment:): Use new location/token
12305         information available on operators.
12306         (create_class): Set super_decl_type to NULL_TREE when processing
12307         java.lang.Object.
12308         (register_fields): Field initialization is now a MODIFY_EXPR
12309         node. Chain initialization code to the matching lists (according
12310         the the field declaration modifiers).
12311         (maybe_generate_clinit): New function.
12312         (method_header): Don't set method's DECL_NAME to a WFL when adding
12313         methods to java.lang.Object.
12314         (resolve_and_layout): Now can return NULL_TREE if the type
12315         resolution fails. Otherwise, return the class DECL instead of its
12316         TYPE.
12317         (check_method_redefinition): Don't patch method DECL_NAME if it
12318         belongs to java.lang.Object.
12319         (process_imports): Simply assign error_found to the value returned
12320         by check_pkg_class_access.
12321         (declare_local_variables): Don't use their init statements (if
12322         any) when parsing error were previously found. Reuse MODIFY_EXPR
12323         build during parsing as an init statement.
12324         (java_method_add_stmt): Now return the current method body.
12325         (java_layout_parsed_class, java_register_parsed_class): Functions
12326         removed.
12327         (java_complete_expand_methods): Initialize the constant pool on a
12328         per class basis. Layout the classes before expanding their method
12329         bodies. Don't try expand artificial constructor code if error were
12330         found. Make the classes data and register them if no error were
12331         found.
12332         (java_complete_expand_method): Retrieve an artificial constructor
12333         argument list before entering its body. Assign the top block to
12334         the artificial constructor function body and set types of declared
12335         blocks and compound statements to void. Walk method body if not an
12336         artificial constructor.
12337         (make_qualified_name, cut_identifier_in_qualified): New functions.
12338         (resolve_expression_name): Fixed comments. Save/restore the
12339         current class CLASS_LOADED_P flag value. Build non qualified
12340         static field access and handle qualified expression names.
12341         (resolve_field_access, resolve_qualified_expression_name): New
12342         functions.
12343         (patch_method_invocation_stmt): Use the new expression resolution
12344         scheme, calling resolve_field_access when the function call is
12345         resolved as an expression.
12346         (qualify_ambiguous_name): Function rewritten to work on qualified
12347         expression produced by make_qualified_name.
12348         (java_complete_tree): Promote type when function's argument are
12349         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
12350         the assignment to discover further errors if RHS is a expression
12351         name that fails to evaluate. Declare LHS initialized even though
12352         the assignment failed. Don't use the location variable and removed
12353         extra argument in patch function calls. Now handle the ARRAY_REF
12354         case and build internal string representation when STRING_CSTs are
12355         walked.
12356         (build_method_invocation): Don't wrap function call around a WFL.
12357         (build_assignment): Likewise. Use the operator location
12358         information.
12359         (patch_assignment): Handle array access LHSs. Handle error
12360         provenance, resulting in a better error report.
12361         (build_binop): Use op_location from operator as binop location
12362         information.
12363         (build_unaryop, build_incdec, build_cast): Likewise.
12364         (patch_binop): Extract location information from the node. Fixed
12365         typo in error message.
12366         (patch_unary_op): Extract location information from the node.
12367         (build_array_ref, patch_array_ref): New functions.
12368
12369 Wed Jul  1 13:11:36 1998  Tom Tromey  <tromey@cygnus.com>
12370
12371         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
12372         match _Jv_IsInstanceOf.
12373         * decl.c (init_decl_processing): Use _Jv_NewArray, not
12374         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
12375
12376 Tue Jun 30 14:12:54 1998  Tom Tromey  <tromey@cygnus.com>
12377
12378         * decl.c (init_decl_processing): Functions are now named
12379         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
12380
12381 Mon Jun 29 14:47:10 1998  Per Bothner  <bothner@cygnus.com>
12382
12383         * java-tree.h (load_class):  Add prototype.
12384         * class.c (is_compiled_class):  Add missing arg to load_class.
12385         * expr.c (expand_java_NEW):  Call load_class.
12386         * parse.y (process_import):  Removed bogus use of void return value.
12387
12388 Thu Jun 25 11:50:48 1998  Per Bothner  <bothner@cygnus.com>
12389
12390         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
12391         Function name is "_Jv_Throw" instead of "soft_athrow".
12392         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
12393         Function name is "_Jv_AllocObject" instead of "soft_new".
12394         Takes an extra parameter (object size).
12395         * expr.c:  Update calls.
12396
12397 Wed Jun 24 13:59:02 1998  Per Bothner  <bothner@cygnus.com>
12398
12399         * lex.c (java_get_line_col):  Handle end-of-file.
12400         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
12401
12402 Wed Jun 24 09:22:34 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12403
12404         * lang.c (lang_init): Make -fexceptions the default.
12405         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
12406         exception handling is not turned on.
12407
12408 Tue Jun 23 10:17:09 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12409
12410         * lang.c (flag_new_exceptions): Make this this default.
12411         * decl.c (end_java_method): Call emit_handlers.
12412         * except.c (method_init_exceptions): Set language code and version.
12413         (expand_start_java_handler): Enable exception, and call
12414         expand_eh_region_start.
12415         (expand_end_java_handler): Enable exception, and set up catch blocks.
12416         (emit_handlers): New routine to generate the saved handlers.
12417         * java-except.h (emit_handlers): Add prototype.
12418
12419 Fri Jun 12 11:31:24 1998  Per Bothner  <bothner@cygnus.com>
12420
12421         We used to have three different representations of the constant pool:
12422         the CPool structure, the tree_constant_pool, and the constructures
12423         used to build the Class object (which may need class and string
12424         constants) in compiled code.  None were appropriate for compiling
12425         to .class files, so I did a major overhaul.
12426
12427         First, the tree_constant_pool array was removed.  Things were
12428         modified to the CPool structure in the JCF could be used.
12429         Second, a "capacity" field was added to the CPool, and functions
12430         written to search for a matching constant, adding one if not found.
12431         The code that generated the Class object was changed to use a CPool.
12432         The actual TREE_LISTs used to build the CONSTRUCTORs used for
12433         the static Class object are now only in build_constants_constructor.
12434         Finally, I wrote code which can generate a .class file (including its
12435         constant pool) from the RECORD_TYPE of a class.  This is a big step
12436         on the way to compiling Java source into .class files.
12437
12438         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
12439         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
12440
12441         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
12442         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
12443         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
12444         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
12445         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
12446         (lang_type):  Removed constant_pool field.
12447         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
12448         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
12449         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
12450         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
12451
12452         * constants.c (current_constant_pool_tags, current_constant_pool_data,
12453         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
12454         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
12455         (set_constant_entry, find_constant1, find_constant2,
12456         find_class_constant, count_constant_pool_bytes, write_constant_pool,
12457         find_utf8_constant, find_class_or_string_constant):  New functions.
12458
12459         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
12460         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
12461         (give_name_to_class, get_class_constant):  Likewise.
12462         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
12463         (get_name_and_type_constant, get_ref_constant):  Removed.
12464         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
12465         * parse.y:  Don't save/restore tree_constant_pool.
12466         * verify.c (verify_jvm_instructions):  Update for new approach.
12467         * expr.c (expand_invoke, expand_java_field_op): Likewise.
12468
12469         * lang-options.h:  Added -femit-class-file, -femit-class-files.
12470         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
12471         (lang_f_options):  Added "emit-class-file(s)".
12472
12473         * expr.c (build_java_arrayaccess):  Generate more efficient array
12474         bounds checking, by using unsigned compare.
12475
12476         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
12477
12478 Wed Jun 10 17:34:42 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12479
12480         * parse.h: New comment on the handling of unresolved type
12481         identifiers. JDEPs are now part of the jdep_code enum.
12482         (typedef struct jdep): Now use enum jdep_code or int, depending on
12483         availability. Both are narrowed down to an 8 bits bitfield.
12484         (CALL_EXPR_PRIMARY): Fixed comment.
12485
12486 Wed Jun 10 10:54:39 1998  Tom Tromey  <tromey@cygnus.com>
12487
12488         * Make-lang.in (java): Added gjavac and jvgenmain.
12489         (java.start.encap): Depend on gjavac.
12490         (java.rest.encap): Depend on jvgenmain.
12491
12492         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
12493         (JAVA_CROSS_NAME): Likewise.
12494         (java.all.build): Depend on jvgenmain and gjavac.
12495         (java.all.cross): Depend on jvgenmain and gjavac-cross.
12496         (jvgenmain$(exeext)): New target.
12497         (java.install-common): Wrote.
12498         * config-lang.in (compilers, stagestuff): Added gjavac and
12499         jvgenmain.
12500
12501 Wed Jun 10 12:19:04 1998  Dave Brolley  <brolley@cygnus.com>
12502
12503         * lang.c (lang_decode_option): New argc/argv interface.
12504
12505 Tue Jun  9 18:12:46 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12506
12507         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
12508         * decl.c (build_decl_no_layout): New function.
12509         * expr.c (java_lang_expand_expr): Layout declarations found in
12510         blocks before they're pushed.
12511         * jcf-parse.c (load_class): Save current line when parsing class
12512         file.
12513         (parse_source_file): Register class before expanding their
12514         methods.
12515         * lang.c (put_decl_node): Produce `null' when `void *' is
12516         processed.
12517         * lex.c (static tree wfl_op): New static global, for error report
12518         on casts.
12519         (java_init_lex): wfl_operator and wfl_op initialized
12520         here. Filename caching added for wfl_op. Return wfl_op when `(' is
12521         parsed.
12522         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
12523         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
12524         build_unresolved_array_type): New static function definitions.
12525         (build_decl_no_layout): New extern function declared.
12526         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
12527         faulty modifier exists.
12528         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
12529         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
12530         (UNARY_PLUS_EXPR): New fake operator.
12531         (struct parser_ctxt): New field osb_number.
12532         * parse.y (static tree wfl_operator): New static WFL for operator
12533         bound error messages.
12534         (DECR_TK, INCR_TK): Moved.
12535         (OP_TK): Tagged <operator>.
12536         (array_type:): Now call build_unresolved_array_type.
12537         (dim_expr:): Count the number of '[' seen.
12538         (post_increment_expression, post_decrement_expression,
12539         pre_increment_expression, pre_decrement_expression,
12540         unary_expression_not_plus_minus, unary_expression:): Actions are
12541         now building the corresponding unary expressions.
12542         (cast_expression:): Actions are now building cast expressions.
12543         (build_unresolved_array_type): New function.
12544         (create_interface): Reset the number of declared interfaces.
12545         (create_class): Likewise.
12546         (method_header): Methods declared within the scope of an interface
12547         are now implicitly set public and abstract.
12548         (java_complete_class): Variable's and parameter's type are patched
12549         with a promoted type.
12550         (declare_local_variables): Resolved non builtin types are promoted
12551         before being used to build a variable decl. Removed type patch
12552         posted on variable initialization statement.
12553         (source_start_java_method): Use build_decl_no_layout to build the
12554         decl of a parameter of incomplete type.
12555         (java_register_parsed_class): Process interfaces too. Call
12556         rest_of_decl_compilation on each processed class declarations.
12557         (java_complete_expand_methods): Don't attempt to expand things in
12558         interfaces.
12559         (java_complete_tree): Process CONVERT_EXPR, even though it always
12560         has a type. Propagate error_mark_node to node's type too. Promote
12561         method's call argument type and return error_mark_node if
12562         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
12563         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
12564         handle unary operator nodes.
12565         (build_assignment): Added comment.
12566         (print_int_node): New function.
12567         (patch_assignment): New second argument. New error handling. Use
12568         print_int_node. Handle references. Use can_cast_to_p to issue
12569         different error message according to the context and check upon
12570         the initialization of the RHS.
12571         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
12572         (operator_string): Handle more operators.
12573         (patch_binop): No longer use a function static
12574         wfl_operator. Improved error message on shift distance.
12575         (build_unaryop, build_incdec, build_cast, patch_unaryop,
12576         patch_cast): New functions.
12577
12578 Fri Jun  5 18:03:07 1998  Per Bothner  <bothner@cygnus.com>
12579
12580         * jvspec.c:  New file.
12581         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
12582
12583         * java-tree.h (identifier_subst):  Add declaration.
12584
12585 Thu Jun  4 13:44:23 1998  Tom Tromey  <tromey@cygnus.com>
12586
12587         * jvgenmain.c (main): Generate call to JvRunMain.
12588
12589         * class.c (make_class_data): Push value for "sync_info" field.
12590         * decl.c (init_decl_processing): Push "sync_info" field.
12591
12592 Wed Jun  3 20:39:14 1998  Per Bothner  <bothner@cygnus.com>
12593
12594         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
12595         Java (source) name, not signature.
12596         Set TYPE_ALIGN to (at least) that of element_type.
12597
12598 Tue Jun  2 15:19:19 1998  Per Bothner  <bothner@cygnus.com>
12599
12600         * class.c:  Moved classname-mangling-rekated code to ...
12601         * mangle.c:  ... this new file.
12602         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
12603         * Makefile.in:  Update for above changes.
12604
12605 Mon Jun  1 09:58:36 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12606
12607         * expr.c (truthvalue_conversion): Convert integer and floating
12608         point value to their truth value.
12609         * lex.c (java_lex): Handle the `null' literal.
12610         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
12611         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
12612         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
12613         New macros.
12614
12615         * parse.y: Reorganization/documentation on token declaration.
12616         (binop_lookup[]): New added new tree codes.
12617         (relational_expression): Build corresponding binary operators.
12618         (equality_expression, conditional_and_expression,
12619         conditional_or_expression): Likewise.
12620         (java_complete_class): Fix crash in debug message.
12621         (java_complete_tree): Check initialization of method call
12622         arguments. Further bogus node evaluation to detect more error
12623         during assignments. Handles more binary operators.
12624         (patch_assignment): Use DECL_P.
12625         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
12626         code.
12627         (operator_string): Handle more case. Compacted source.
12628         (patch_binop): Changed function comment. Checking for
12629         uninitialized first operand takes the compound assignment into
12630         account and uses DECL_P. Checking for uninitialized second operand
12631         delayed to routine's end. Use macros to issue type bound error
12632         messages and issue messages on both operands if their types are
12633         different. Force fixed type into node. Handle all binary
12634         operators.
12635
12636 Wed May 27 10:30:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12637
12638         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
12639         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
12640         build operator node and return tokens.
12641         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
12642         * parse.h (java_complete_tree): Changed returned type in prototype.
12643         (build_method_invocation, build_assignment, patch_assignment,
12644         patch_binop): New static function declarations.
12645         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
12646         BUILD_EXPR_WFL): New macros.
12647         * parse.y (enum tree_code binop_lookup[]): New static for token to
12648         TREE_CODE lookup.
12649         (%union): Parser union has new sub-structure `operator'.
12650         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
12651         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
12652         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
12653         ASSIGN_ANY_TK): Tokens tagged `operator'.
12654         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
12655         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
12656         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
12657         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
12658         (assignment_operator:): Rule tagged `operator'.
12659         (expression_statement:): Re-installed default rule.
12660         (method_invocation:): Sub rules call build_method_invocation.
12661         (postfix_expression:): Don't attempt to resolve name here. Just
12662         return an ID.
12663         (multiplicative_expression:): Sub-rules build corresponding binop
12664         expression node.
12665         (additive_expression:, shift_expression:, and_expression:,
12666         exclusive_or_expression:, inclusive_or_expression:): Likewise.
12667         (assignment:): Sub rule invoke build_assignment.
12668         (assignment_operator:): Default rules on sub rules.
12669         (force_error): Added documentation on this variable.
12670         (declare_local_variables): Build initialization calling
12671         build_assignment.
12672         (expand_start_java_method): Removed unused rtx declaration. Mark
12673         arguments as already initialized.
12674         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
12675         (java_complete_expand_methods): Don't process next method if
12676         completion of the previous one triggered errors.
12677         (java_complete_expand_method): Call source_end_java_method if no
12678         error were found during completion.
12679         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
12680         locals declaratilon. Handle names found within a class. Return
12681         error_mark_node when things aren't found.
12682         (patch_method_invocation_stmt): Return error_mark_node on failures.
12683         (patch_invoke): Removed unused local. Return the correct node.
12684         (java_complete_tree): Now returns a value. The BLOCK section binds
12685         local identifiers and the type of a BLOCK is now void. Assign the
12686         result of operand completion on COMPOUND_EXPR. Assign the
12687         encapsulated node of a WFL to the result of its completion, except
12688         when the node is an identifier. Now handle MODIFY_EXPR and several
12689         binary operators. Return error_mark_node on errors.
12690         (build_method_invocation, build_assignment, patch_assignment,
12691         build_binop, operator_string, patch_binop): New functions.
12692         * typeck.c (binary_numeric_promotion): New function.
12693
12694 Thu May 21 12:01:04 1998  Per Bothner  <bothner@cygnus.com>
12695
12696         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
12697         Replace most uses of ident_subst by identifier_subst.
12698
12699         * class.c (push_class_static_dummy_field):  Removed function.
12700         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
12701         instead of looking got "class" static field.  Create that decl here.
12702         (class_identifier_node):  Removed;  no longer needed.
12703         (init_class_processing):  Don't init class_identifier_node.
12704         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
12705         Do nreverse 0 times (instead of twice) for Object and Class.
12706         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
12707
12708 Wed May 20 16:35:04 1998  Per Bothner  <bothner@cygnus.com>
12709
12710         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
12711         while initializing linenumber_count and linenumber_table.
12712         Do it before init_function_start (which calls emit_line_note).
12713         * expr.c (expand_byte_code):  Don't need to clear lineno here.
12714
12715 Mon May 18 16:23:32 1998  Tom Tromey  <tromey@cygnus.com>
12716
12717         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
12718         then mangle number as _N_.
12719
12720         * class.c (mangle_class_field): New function.
12721         (build_class_ref): Set assembler name of class reference using
12722         mangle_class_field.
12723         (push_class_static_dummy_field): Likewise.
12724
12725 Sun May 17 12:52:35 1998  Michael Tiemann <tiemann@cygnus.com>
12726
12727         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
12728         of assigning to TREE_CODE.  The latter method exploits a feature
12729         of GCC that is not ANSI compliant.
12730
12731 Thu May 12 13:44:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12732
12733         * decl.c (pushdecl_force_head): New function.
12734         (pushlevel): Removed conditional printf.
12735         (complete_start_java_method): Don't enter local variable scope if
12736         function is compiled from source code.
12737         * expr.c: parse.h now included
12738         (java_lang_expand_expr): New function.
12739         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
12740         printf. Terminate buffer when doing directories.
12741         * jcf-parse.c (parse_source_file): Call lang_init_source before
12742         parsing and before code generation.
12743         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
12744         use printf if the macro is defined.
12745         * lang.c (lang_init): Install lang_expand_expr hook on
12746         java_lang_expand_expr.
12747         (java_dummy_print): New function.
12748         (lang_init_source): New function.
12749         * lex.c (java_lex): Remember location of an opening brace at the
12750         second nesting level.
12751         (java_is_eol): Unget character seen after a CR if it is EOF.
12752         * parse.h: Now includes lex.h
12753         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
12754         printf if the macro is defined.
12755         (expand_start_java_method, build_expr_block, enter_block,
12756         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
12757         New static function declarations.
12758         (pushdecl_force_head): New extern function declaration.
12759         (INCOMPLETE_TYPE_P): New macro.
12760         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
12761         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
12762         BLOCK_EXPR_ORIGIN): New macros.
12763         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
12764         DECL_SOURCE_LINE_LAST): New macros.
12765         (struct parser_ctxt): Removed field current_method_decl, redundant
12766         with the field current_function_decl. Added fields
12767         first_ccb_indent1 and pending_block.
12768         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
12769         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
12770         tagged <node>
12771         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
12772         (compilation_unit:): Cosmetic on sub rule.
12773         (type_declaration:): Cosmetic on sub rules. Added an error rule.
12774         (variable_initializer:): Installed default rule on expression:.
12775         (method_declaration:): method_header: starts a new
12776         method. method_body: installs the function body, absorbs blocks
12777         emitted for temporary variable scopings, pops function's body block
12778         and merges function's last statement lineno in DECL_SOURCE_LINE.
12779         (method_body:): Installed default rules.
12780         (block:): Call enter_block when an opening brace is seen.  Absorb
12781         scoping blocks and call exit_block when a closing brace is seen.
12782         (block_statement:): Cosmetic changes.
12783         (method_invocation:): Create WFL around CALL_EXPR node.
12784         (patch_stage): Added comment around definition.
12785         (method_header): Try to use first_ccb_indent1 as the first line of
12786         the method, so BP debug info are emitted at the first opening
12787         brace of the function. If the function has no body, use the
12788         location of the function's name. Override currently defined method
12789         name with the matching WFL so we can point redefinition errors
12790         using the location where the function's name was declared.
12791         (check_abstract_method_header): Interprets DECL_NAME as an
12792         identifier or as a WFL, accordingly.
12793         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
12794         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
12795         location and name information out of it and reinstall DECL_NAME to
12796         its original identifier node value.
12797         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
12798         function's source code).
12799         (read_import_dir): Test the value returned by find_class and issue
12800         a fatal accordingly.
12801         (declare_local_variables): Push a new block for the scope of the
12802         new variable(s) if code has been already generated at that nesting
12803         level. Pinpoint redefinition errors using the variable id
12804         WFLs. Generate initialization code if necessary. If the variable
12805         type is incomplete, register a patch on its decl.
12806         (source_start_java_method): Rewritten. Define a new block for the
12807         function's parameters. Build parameter decl out of function's
12808         arguments and register them for a patch if their types are
12809         incomplete.
12810         (expand_start_java_method): Includes the part of
12811         source_start_java_method that was pushing the parameter decls and
12812         completing the method start code.
12813         (source_end_java_method): Removed call the expand_end_bindings and
12814         poplevel (already taken care of). Reinstall function's arguments
12815         and get function's last line of code before calling
12816         expand_function_end.
12817         (java_method_add_stmt): New comment before the function's
12818         code. Complement the second operand of the current COMPOUND_EXPR
12819         if necessary.
12820         (java_complete_expand_methods): Don't generate debug info on line
12821         zero when expanding a generated constructor.
12822         (java_complete_expand_method): Set start and end line numbers for
12823         a artificially generated constructor to one and manually call
12824         enter_block and exit_block when defining it. For all methods:
12825         expand function's start calling the new expand_start_java_method
12826         and invoke java_complete_tree on the effective method's body, if
12827         any.
12828         (resolve_expression_name): Now use lookup_name_in_blocks to search
12829         local variable decls and print out an error when variables are
12830         undefined.
12831         (patch_method_invocation_stmt): Inserted comment before the
12832         function's code.
12833         (lookup_method_invoke): Chain method's arguments using chainon
12834         with the current arg list as a second argument. Inserted missing
12835         IDENTIFIER_POINTER when reporting an error on methods not found.
12836         (refine_accessible_methods_list): Don't retain constructors.
12837         (patch_arguments): Function removed.
12838         (java_complete_tree): Inserted comment before the function's
12839         code. New case for BLOCKs. Moved the WFL case a bit
12840         further. Complete function's arguments.
12841         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
12842         maybe_absorb_scoping_blocks): New functions.
12843
12844 Mon Apr 27 10:50:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12845
12846         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
12847         previously set.
12848         * jcf-parse.c (parse_source_file, java_error_count): New forward
12849         and extern declarations.
12850         (java_parse_abort_on_error): Macro moved.
12851         (jcf_parse_source): fatal called if fopen fails. Now calls
12852         parse_source_file.
12853         (parse_source_file): New parse_only parameter. Reflects the
12854         elimination of the second pass.
12855         (yyparse): parse_source_file called with argument set to 0.
12856         * jcf.h (JCF_ZERO): Sets java_source to zero.
12857         * lex.c (java_init_lex): pass argument is gone. Function modified
12858         to be called once during the analysis of a file.
12859         (java_unget_unicode): Fixed typo in fatal message.
12860         (java_get_line_col): Likewise.
12861         (java_lval): Likewise. String literals no longer built during
12862         second pass.
12863         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
12864         account.
12865         * parse.h (MODIFIER_WFL): New macro.
12866         (parse_check_super, parser_check_super_interface): Now return int.
12867         (parser_chain_incomplete_item, not_builtin_p,
12868         complete_method_decl): Declarations removed.
12869         (build_method_invocation_stmt, build_invoke): Renamed using the
12870         `patch' instead of `build'
12871         (register-incomplete_type, obtain_incomplete_type,
12872         java_complete_tree, java_complete_expand_method,
12873         unresolved_type_p, create_jdep_list): New function declarations.
12874         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
12875         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
12876         (jdep): New typedef on new struct _jdep.
12877         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
12878         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
12879         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
12880         JDEP_RESOLVED_P): New macros.
12881         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
12882         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
12883         JDEP_VARIABLE): New enum values and jdep kinds.
12884         (jdeplist): New typedef on struct _jdeplist.
12885         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
12886         macros.
12887         (CALL_EXPR_PRIMARY): New macro.
12888         (struct parser_ctxt): Fields java_pass, current_method_decl,
12889         method_decl_list deleted. New field jdeplist.
12890         (INCOMPLETE_P): Macro deleted.
12891         * parse.y (single_type_import_declaration:): Removed pass switch.
12892         (type_import_on_demand_declaration): Likewise.
12893         (field_declaration:): Removed pass switch on all sub rules.
12894         (class_declaration:): Call the complete_class_decl removed on
12895         class_body rules.
12896         (method_declaration:): Removed second pass switch. No longer chain
12897         methods decl when method_header reduced.
12898         (method_header:): Sub rules no longer depend on pass switch.
12899         (method_declarator:): Likewise.
12900         (method_body:): Likewise.
12901         (abstract_method_declaration:): Likewise.
12902         (block_statement:): Likewise.
12903         (local_variable_declaration:): Likewise.
12904         (argument_list:): Likewise.
12905         (method_invocation:): Likewise. Call to build_method_invocation_stmt
12906         removed. Partial CLASS_EXPR tree node built instead.
12907         (postfix_expression:): Removed pass switch on all sub rules.
12908         (java_pop_parser_context): Free classd_list content.
12909         (yyerror): Call obstrack_grow0 to finalize error message.
12910         (check_class_interface_creation): Comment modified to reflect new
12911         returned value meaning. Removed second pass switch. Return 1 if an
12912         error was found, 0 otherwise. Adjust pointer on filename if a
12913         leading path separator was found.
12914         (maybe_create_class_interface_decl): Removed first pass switch
12915         when linking the class decl to the class_list. Install a new
12916         jdep_list for the class.
12917         (add_superinterfaces): List of unresolved interfaces is
12918         gone. Unresolved interfaces are directly added to the current
12919         dependencies list.
12920         (create_interface): Second pass shortcut removed.
12921         ctpx->modifier_ctx access through MODIFIER_WFL.
12922         (create_class): Second pass shortcut removed. Call to
12923         register_incomplete_type replaces the call to
12924         parser_chain_incomplete_item.
12925         (complete_class_decl): Function removed.
12926         (duplicate_declaration_error): New way of retrieving redeclared
12927         item type.
12928         (register_fields): Call to lookup_modifier_cl replaced by
12929         MODIFIER_WFL. New way of handling unresolved type, using
12930         unresolved_type_p and obtain_incomplete_type.
12931         register_incomplete_type replaces call to parser_chain_incomplete_item.
12932         (patch_stage): New static global variable.
12933         (method_header): New way of handling unresolved type, using
12934         unresolved_type_p and obtain_incomplete_type. patch_stage used to
12935         indicates that the method decl needs to be patched.
12936         (check_abstract_method_header): Call to lookup_modifier_cl
12937         replaced by MODIFIER_WFL.
12938         (method_declarator): Incomplete argument type are registered
12939         calling register_incomplete_type. Patch on the declared method is
12940         issued in that case.
12941         (unresolved_type_p): New function.
12942         (parser_check_super_interface): New comment to reflect function's
12943         modified returned type (int). Function and has a new argument
12944         this_wfl. Call to parse_error_context uses this_wfl instead of
12945         relying on lookup_cl.
12946         (parser_check_super): Comment reflects function's new returned
12947         type (int). Function returns nonzero value on error.
12948         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
12949         register_incomplete_type, jdep_resolve_class): New functions to
12950         handle incomplete types in declarations.
12951         (java_complete_class): Rewritten to work with the new incomplete
12952         type handling scheme.
12953         (complete_class_report_errors): Likewise.
12954         (complete_method_decl): Removed: it jobs is now handled by
12955         java_complete_class.
12956         (do_resolve_class): Class loaded in not already loaded and not
12957         found in Java source code.
12958         (java_check_regular_methods, java_check_abstract_methods): Don't
12959         call complete_method_decl anymore.
12960         (lookup_modifier_cl, not_builtin_p): Functions deleted.
12961         (read_import_dir): Got rid of the pass number dependency.
12962         (declare_local_variables): New handling of unresolved types (patch
12963         issued).
12964         (source_start_java_method): New parameter level. Function called
12965         with level set to 1 when argument types are potentially
12966         unresolved.  Called to complete the job with level set to 2 once
12967         types are complete.
12968         (source_end_java_method): Call to permanent_allocation
12969         removed. Waiting to be replaced by a more suitable obstack
12970         management.
12971         (java_complete_expand_methods, java_complete_expand_method,
12972         java_expand_finals): New functions.
12973         (build_method_invocation_stmt): Renamed
12974         patch_method_invocation_stmt. Extracts function call expression
12975         (wfl) and arguments (args) from CALL_EXPR tree operands.
12976         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
12977         call. Patch the function and argument operand of the CALL_EXPR
12978         tree argument.
12979         (patch_argument, java_complete_tree): New functions.
12980
12981 Mon Apr 20 18:26:57 1998  Per Bothner  <bothner@cygnus.com>
12982
12983         Recover from missing fields and methods (i.e. error instead of fatal).
12984         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
12985         * expr.c (expand_invoke):  Recover from missing method.
12986         (expand_java_field_op):  Recover from missing field.
12987         Inline references to java.lang.{Integer,Char,...}.TYPE.
12988         * typeck.c (get_type_from_signature), java-tree.h:  New function.
12989         * class.c (add_method):  Use get_type_from_signature.
12990         (build_class_ref):  Handle a class that was not found.
12991         * typeck.c (convert):  Handle conversion to pointers (for convenience).
12992         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
12993         instead of lookup_field to handle missing fields.
12994
12995         * jcf-parse.c (process_zip_dir):  Set java_source.
12996
12997 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
12998
12999         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
13000
13001 Tue Apr 14 15:59:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13002
13003         * jcf-parse.c (load_class): Don't change input_filename before
13004         calling jcf_parse_source (but still do it before calling
13005         jcf_parse).
13006         (jcf_parse_source): Assign input_filename after having saved the
13007         parser context.
13008         * lex.c (java_init_lex): Chain a WFL node to the import on demand
13009         list. ctxp->modifier_ctx zeroed according to its new
13010         definition. ctxp->filename initialized. Removed
13011         JAVA_MODIFIER_CTX_UNMARK.
13012         (java_unget_unicode): Update the character based column position.
13013         (java_allocate_new_line): ref_count not used anymore. Always free
13014         ctxp->p_line. Initialize c_line->char_col to 0.
13015         (java_get_unicode): Update the character based column position.
13016         (java_lex): Use ctxp->elc to store current position in source
13017         file, at the beginning of the parsed token. Set modifier_ctx entry
13018         corresponding to the parse modifier to a WFL node. Return a WFL
13019         node when an identifier is parsed.
13020         (java_lex_error): Now uses ctxp->elc to store current position in
13021         source.
13022         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
13023         * lex.h (build_wfl_node): New function definitions.
13024         (struct java_line): ref_count and next fields are gone. New field
13025         char_col.
13026         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13027         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
13028         (JAVA_COLUMN_DELTA): New macro.
13029         (java_lc): New typedef on new struct _java_lc.
13030         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
13031         (parse_error_context, parse_warning_context): Changed prototypes.
13032         (java_get_line_col): Added as an available global function.
13033         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
13034         (IC_DECL): Replaced by macro IC_TYPE
13035         (DEPEND_WFL): New macro.
13036         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
13037         wrong modifier.
13038         (exit_java_complete_class): Removed a commented out statement.
13039         (struct parser_ctxt): Added comments on fields. modifier_ctx is
13040         now an array of tree nodes. Deleted fields line_list and
13041         e_line. New field elc, to replace e_line.
13042         * parse.y (array_type:): Build WFL node.
13043         (qualified_name:): Build a single WFL node out of two. Retain
13044         the location information of the first node in the resulting node.
13045         (package_declaration:): Use package name as a WFL node
13046         (single_type_import_declaration:): Use imported name as a WFL node.
13047         (type_import_on_demand_declaration:): Use root of the imported
13048         packages as a WFL node.
13049         (field_declaration:): Removed unused local variable cl.
13050         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
13051         (yyerror): New static elc. Removed static error_line, error_pos.
13052         New local code_from_source. Save ctxp->elc into elc at the first
13053         pass. Call java_get_line_col to get a string of the line where
13054         the error occurred.
13055         (debug_line): Removed static function.
13056         (parse_error_context, parse_warning_context): Parameter cl is now
13057         a WFL node. Use its value to initialize ctxp->elc.
13058         (redefinition_error): Parameter cl is now a WFL node.
13059         (parse_add_interface): New parameter wfl. No longer call
13060         lookup_cl, use wfl instead.
13061         (check_class_interface_creation): Parameter cl is now a WFL node.
13062         (maybe_create_class_interface_decl): Likewise.
13063         (add_superinterfaces): New function.
13064         (create_interface): Removed local cl, node, super_decl,
13065         super_decl_type.  Function now uses id as a WFL node. Better
13066         warning/error report on obsolete or forbidden mix of
13067         modifiers. Now calls add_superinterfaces to register interfaces.
13068         (create_class): Removed local cl, node. Local variable id is used
13069         as a WFL node. Better error report on forbidden modifier
13070         mix. Uses add_superinterfaces to register interfaces.
13071         (find_field): Argument cl is now a WFL node. Now store the WFL
13072         node of a fields that needs to be checked for their
13073         initialization.
13074         (method_header): Local variable node non longer used. Local
13075         variable id replaces cl.
13076         (check_modifiers_consistency): Local variable cl is now a WFL
13077         node.
13078         (method_declarator): Local variable cl replaced by parameter id.
13079         (parser_qualified_name): Now uses parameter name as a WFL node.
13080         (parser_check_super_interface): New parameter wfl, for achieve
13081         greater accuracy during error reports.
13082         (parser_chain_incomplete_item): New parameter named location. Used,
13083         along the decl, to construct the incomplete item node.
13084         (java_complete_class): resolve_class now uses WFL node extracted
13085         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
13086         where appropriate.
13087         (complete_method_decl): Unresolved function's argument types are WFL.
13088         (resolve_class): Parameter cl is now a WFL node.
13089         (resolve_and_layout): Likewise.
13090         (do_resolve_class): Likewise. Try first to use cl and then do the
13091         lookup on the decl when calling check_pkg_class_access.
13092         (complete_class_report_errors): Use IC_TYPE in place of
13093         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
13094         instead of doing a lookup over the decl.
13095         (java_check_final): Use WFL info from field tree list.
13096         (lookup_cl): Rewritten and returns a statically defined WFL node.
13097         (lookup_modifier_cl): Now uses information from WFL nodes.
13098         (process_imports): Likewise.
13099         (read_import_dir): name and cl arguments replaced by a single WFL
13100         node. Function modified accordingly.
13101         (find_in_imports_on_demand): Now uses WFL node.
13102         (check_pkg_class_access): cl argument is now a WFL node.
13103         (declare_local_variables): Fixed to use WFL nodes.
13104         (resolve_expression_name): Likewise.
13105         (build_method_invocation_stmt): name_combo argument renamed
13106         wfl. Function modified to use WFL nodes.
13107         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
13108         (lookup_method_invoke): cl is now a WFL node. Added missing
13109         IDENTIFIER_POINTER to class type decl name.
13110
13111 Tue Apr 14 15:23:29 1998  Dave Brolley  <brolley@cygnus.com>
13112
13113         * lang.c (init_parse): Now returns char* containing the filename.
13114
13115 Fri Apr 10 11:36:04 1998  Per Bothner  <bothner@cygnus.com>
13116
13117         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
13118
13119         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
13120         * class.c (make_class_data):  If flag_assume_compiled, initial class
13121         state is CSTATE_PREPARED; make superclass and interfaces direct
13122         references, rather than constant pool indexes.
13123
13124 Thu Apr  9 16:10:56 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13125
13126         * parser.y: Include flags.h. Removed debug variable pl.
13127         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
13128         (block:): Likewise.
13129         (labeled_statement_nsi:): Generate debug info when reducing
13130         expression_statement:.
13131         (check_pkg_class_access): get_access_flags_from_decl invokation
13132         fixed for new CLASS_* flags location.
13133         (source_end_java_method): Save/restore parser context when
13134         entering/leaving this routine. Restore lineno to its right value
13135         before calling expand_end_bindings.
13136         (build_method_invocation_stmt): build_invoke called with the
13137         current line information.
13138         (build_invoke): New argument cl. Wrap the function call around a
13139         wfl node.
13140         (refine_accessible_methods_list): Changed comment, removed
13141         unnecessary code.
13142         * parse.h: Fixed typo in comments.
13143         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
13144         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
13145         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
13146         parser_ccb_indent.
13147         * lex.c (java_lex): Record the last closing curly bracket of a
13148         function.
13149         * jcf-parse.c (jcf_parse_source): Now calls
13150         java_check_methods. Clarified comment, fixed typo.
13151
13152 1998-04-09  Dave Brolley  <brolley@cygnus.com>
13153
13154         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
13155         (finish_parse): Expose for non USE_CPPLIB builds.
13156
13157 Wed Apr  8 13:06:23 1998  Jeffrey A Law  (law@cygnus.com)
13158
13159         * lang.c (lang_print_xnode): New function.
13160
13161 Fri Apr  3 13:22:41 1998  Per Bothner  <bothner@cygnus.com>
13162
13163         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
13164         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
13165         used to build a class's dispatch table.
13166         (make_class_data):  Generate dispatch table if flag_assume_compiled.
13167         Set dtable of class object to address of class_dtable_decl.
13168
13169         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
13170         be volatile and have side effects - generates better code.
13171
13172         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
13173         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
13174
13175         * expr.c (expand_invoke):  If class is final, method is
13176         effectively final, so can call it directly.
13177
13178         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
13179
13180         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
13181
13182 Thu Mar 19 16:59:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13183
13184         * parse.y (build_method_invocation_stmt): Removed extra argument
13185         to build_invoke.
13186
13187 Mon Mar 16 17:25:19 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13188
13189         * expr.c (dtable_indent): Now static global.
13190         (expand_invoke): Now call invoke_build_dtable and
13191         build_invokevirtual.
13192         (invoke_build_dtable, build_invokevirtual): New functions.
13193         * jcf-io.c (find_class): Defer issuing a warning by setting
13194         jcf->outofsynch to 1.
13195         * jcf-parse.c (jcf_out_of_synch): New function.
13196         (load_class): Test this_jcf.outofsynch flag and call
13197         jcf_out_of_synch accordingly.
13198         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
13199         comment indentation.
13200         * lex.c (java_get_unicode): Fixed code indentation.
13201         (java_lex): Create string literal. Fixed typo. Removed several
13202         premature obstack_free.
13203         * parse.h: New enums for name resolution and invocation mode.
13204         (struct qualification): New data structure.
13205         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
13206         (do_resolve_class, build_method_invocation_stmt,
13207         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
13208         debug_line, identical_subpath_p, invocation_mode,
13209         refine_accessible_methods_list, build_invoke,
13210         lookup_method_invoke): New functions declared.
13211         (build_invokevirtual, invoke_build_dtable, match_java_method,
13212         build_field_ref, jcf_out_of_synch): New references to external
13213         functions.
13214         (struct parse_ctxt): Removed artificial_constructor field.
13215         * parse.y: (array_type:): Type defined for this rule.
13216         (class_type:): Installed default rule for interface_type:.
13217         (array_type:): Now build Java array type.
13218         (qualified_name:): Now use obstack_grow0.
13219         (method_declaration:): Skip the artificial constructor added to
13220         the list, if any.
13221         (abstract_method_declaration:): Execute the code only during pass 1.
13222         (block:): Installed default rule in block_statements:.
13223         (block_statement:): Add the statement to the method during pass 2.
13224         (statement_expression): Installed default rule for
13225         method_invocation:.
13226         (argument_list:): Added code to build the argument list.
13227         (method_invocation:): Added call to create the method invocation
13228         node.
13229         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
13230         (debug_line): New function for debug.
13231         (complete_class_decl): No longer do something during pass 1.
13232         (method_header): Use BUILD_PTR_FROM_NAME.
13233         (parser_qualified_classname): Use obstack_grow0. Removed bogus
13234         obstack_free.
13235         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
13236         function's main comment.
13237         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
13238         classes.
13239         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
13240         (resolve_class): Now works with arrays.
13241         (do_resolve_class, resolve_and_layout): New functions.
13242         (java_check_regular_methods): Reverse method list before and after
13243         having processed it. No longer set ctxp->artificial_constructor.
13244         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
13245         accordingly. Fixed typo in issued error message. Now use
13246         obstack_grow0.
13247         (find_in_imports_on_demand): Now use obstack_grow0.
13248         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
13249         (source_end_java_method): Call expand_expr_stmt instead of
13250         expand_expr. Calls it before calling expand_function_end.
13251         (java_method_add_stmt): Do nothing if errors were found during
13252         parsing.
13253         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
13254         (build_method_invocation_stmt, build_invoke, invocation_mode,
13255         lookup_method_invoke, refine_accessible_methods_list,
13256         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
13257         New functions.
13258         * typeck.c (build_java_signature): Properly end method signature
13259         if return type skipped.
13260         (match_java_method): New function.
13261
13262 Mon Mar 16 10:40:47 1998  Per Bothner  <bothner@cygnus.com>
13263
13264         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
13265
13266 Wed Feb 25 08:55:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13267
13268         * expr.c (build_invoke_non_interface): New function.
13269         (methods_ident, ncode_ident): Now static globals.
13270         (expand_invoke): Use build_invoke_non_interface.
13271         * java-tree.h (struct lang_decl): New field function_decl_body.
13272         (DECL_FUNCTION_BODY): New macro.
13273         * jcf-parse.c (jcf_parse_source): Deeper check before setting
13274         CLASS_FROM_SOURCE_P.
13275         (parse_source_file): Fixed typos. Call java_layout_parsed_class
13276         before starting pass 2. Call to java_generate_parsed_class replaced
13277         by java_register_parsed_class.
13278         * lex.c: Fixed typo in header. Some line width related formating.
13279         * lex.h: Some line width related formating.
13280         * parse.h (source_end_java_method, resolve_expression_name,
13281         complete_class_decl, maybe_create_class_interface_decl,
13282         check_class_interface_creation): New static function declarations.
13283         (java_layout_parsed_class, java_method_add_stmt): New function
13284         declarations.
13285         (struct parser_ctxt): Field mark_class_generate removed. New
13286         fields class_list and artificial_constructor.
13287         * parse.y: Fixed typo in header.
13288         (class_declaration:): Call complete_class_decl when class body
13289         parsed.
13290         (method_declaration:): Call source_end_java_method in pass 2 when
13291         the method body is defined.
13292         (postfix_expression:): Do expression name resolution on sub-rule
13293         name during pass 2.
13294         (create_class, create_interface): Merged common pieces.
13295         (check_class_interface_creation, maybe_create_class_interface_decl):
13296         New functions.
13297         (complete_class_decl): New function.
13298         (register_fields): Fixed line width related typo.
13299         (method_header): Correctly skip first argument when fixing
13300         argument line. Changed the loop.
13301         (java_check_circular_reference): Now use ctxp->class_list.
13302         (java_complete_class): Removed start/stop marking.
13303         (java_check_regular_methods): Now takes a class decl as an
13304         argument.  Add default constructor if none were encountered.
13305         (java_check_methods): Now use ctxp->class_list. Changed call to
13306         java_check_regular_methods.
13307         (source_start_java_method): Set DECL_ARG_TYPE for each function
13308         arguments.
13309         (source_end_java_method, java_method_add_stmt): New functions.
13310         (java_generate_parsed_class): No longer exists.
13311         (java_layout_parsed_class, java_register_parsed_class): New functions.
13312         (resolve_expression_name): New function.
13313
13314 Thu Feb 12 11:54:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13315
13316         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
13317         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
13318         until pass initializations are done. Call read_import_dir with
13319         pass set to 0.
13320         * parse.h: (lookup_modifier_cl): New function declared.
13321         (INTERFACE_FIELD_MODIFIERS): New macro.
13322         (OBSOLETE_MODIFIER_WARNING): New macro.
13323         * parse.y: (register_fields): Class type and current field name in
13324         local variables. Check modifier(s) if adding field(s) to an interface.
13325         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
13326         and report errors using the faulty modifier line context.
13327         (lookup_modifier_cl): New function.
13328         (read_import_dir): Detect and report default import processing
13329         failure.
13330
13331 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
13332
13333         Add a pair of -fassume-compiled/-fno-assume-compiled options.
13334         * class.c (is_compiled_class): Return 1 after making sure it
13335         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
13336         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
13337         * java-tree.h (flag_assume_compiled): Add decl.
13338         * lang.c (lang_f_options): Add the flag.
13339         (flag_assume_compiled): Add decl, default to 0.
13340
13341 Wed Feb 11 11:27:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13342
13343         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
13344         (is_compiled_class): Likewise.
13345         (layout_class): Likewise.
13346         (layout_class): Detect and lay out classes defined in source code.
13347         (interface_of_p, add_interface_do, may_add_interface): New
13348         function.
13349         (add_interface): Now use add_interface_do.
13350         (add_method_1): New function.
13351         (add_method): Now use add_method_1.
13352         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
13353         (complete_start_java_method): New function.
13354         (start_java_mehod): Now call complete_start_java_method.
13355         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
13356         (expand_invoke): Likewise and fixed typo.
13357         *gjava.c: (print_super_field): Use new argument to find_class
13358         DO_CLASS_FILE.
13359         (main): Likewise.
13360         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
13361         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
13362         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
13363         IDENTIFIER_NODE.
13364         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
13365         (add_method_1, push_class): New prototypes.
13366         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
13367         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
13368         directory where the class was found.
13369         (find_class): New argument DO_CLASS_FILE. Function find_class
13370         modified accordingly.
13371         *jcf-parse.c: (fix_class_path): New function.
13372         (load_class): Use new VERBOSE argument. load_class now finds and
13373         loads/parses .class/.java files. Save read_state of current_jcf
13374         if necessary.
13375         (java_parser_abort_on_error): New macro.
13376         (jcf_parse_source, parse_source_file): New function.
13377         (jcf_parse): Fixed typo.
13378         (yyparse): Call parse_source_file () only.
13379         (process_zip_dir): Fixed typo, fix zdir->filename_length when
13380         writing the real class name back in the zip directory entry.
13381         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
13382         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
13383         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
13384         (find_class): Prototype fixed.
13385         *lex.c: Added 1998 time stamp.
13386         Removed all static global variables, moved into the parser
13387         context data structure.. Now include unistd.h if SEEK_SET not
13388         defined.
13389         (java_init_lex): Rewritten.
13390         (java_sneak_unicode): Modified current unicode access in current line.
13391         (java_unget_unicode): Likewise.
13392         (java_allocate_new_line): New allocation management.
13393         (java_read_char): Modified access and storage of unget_utf8_value.
13394         New way of processing current unicode.
13395         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
13396         (java_get_unicode): Now use the parser context.
13397         (java_lineterminator): Likewise.
13398         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
13399         of the reentrant parser implementation. Function now use the
13400         parser context data structure and java_lval. Fixed production of
13401         the float and double constant "out of range" error message. Fixed
13402         obstack use. Return integer value when hitting a modifier. Now
13403         return type for TRUE, FALSE and other predefined types. Return
13404         identifier as a TREE_LIST list containing the current line context
13405         as the TREE_VALUE sub-node.
13406         (java_unicode_2_utf8): Fixed typo in declaration.
13407         (java_lex_error): Now use the parser context data structure.
13408         *lex.h: Added 1998 time stamp.
13409         (struct java_line): New fields ref_count and next.
13410         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13411         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
13412         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
13413         *parse.h: Added 1998 time stamp.
13414         (java_parse_source_file): Renamed from parse_source_file.
13415         (YYERROR_NOW, YYNOT_TWICE): Fixed.
13416         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
13417         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
13418         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
13419         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
13420         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
13421         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
13422         (struct parser_ctxt): New data structure to keep the parser context.
13423         *parse.y: Added 1998 time stamp, got rid of static global variables.
13424         (java_error_count, ctxp): New global variables.
13425         (%union): New value field.
13426         (numeric_type, integral_type): Rules removed.
13427         (primitive_type): Rule defined to handle integral, float, double and
13428         boolean types.
13429         (qualified_name, package_declaration,
13430         single_type_import_declaration, type_import_on_demand_declaration,
13431         modifiers, class_declaration, super, interfaces,
13432         interface_type_list, class_body, field_declaration,
13433         field_declaration, variable_declarators, variable_declarator,
13434         variable_declarator_id, method_declaration, method_header,
13435         formal_parameter_list, formal_parameter, method_body, block,
13436         static, interface_declaration, extends_interfaces,
13437         abstract_method_declaration, local_variable_declarators): Rules now
13438         define actions.
13439         (force_error, do_warning): New global statics.
13440         (push_parser_context, parser_context_save_global,
13441         parser_context_restore_global, pop_parser_context): New functions.
13442         (yyerror): Now uses the global parser context. Fixed use of obstack.
13443         (parse_error, parse_error_context, parse_warning_context,
13444         java_accstring_lookup, redefinition_error, check_modifiers,
13445         parser_add_interface, create_interface, create_class, find_field,
13446         duplicate_declaration_error, register_fields, method_header,
13447         check_modifiers_consistency, check_abstract_method_header,
13448         method_declarator, parser_qualified_classname,
13449         parser_check_super_interface, parser_check_super,
13450         parser_chain_incomplete_item, java_check_circular_reference,
13451         layout_class_from_source, java_complete_class,
13452         complete_method_decl, resolve_class, complete_class_report_errors,
13453         java_check_final, check_method_redefinition,
13454         java_check_regular_methods, java_check_abstract_methods,
13455         java_check_methods, lookup_java_interface_method2,
13456         lookup_java_method2, lookup_cl, find_name_in_single_imports,
13457         process_imports, find_in_imports, read_import_entry,
13458         read_import_dir, find_in_imports_on_demand,
13459         check_pkg_class_access, not_builtin_p, declare_local_variables,
13460         source_start_java_method, java_generate_parsed_class): New
13461         functions.
13462         *typeck.c: (signature_include_return): New global variable.
13463         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
13464         to add the function returned type in the signature.
13465
13466 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
13467
13468         * jcf-io.c (open_in_zip): Use strncmp and LEN.
13469
13470 Thu Jan 29 16:12:13 1998  Dave Brolley  <brolley@cygnus.com>
13471
13472         * Make-lang.in (java.info): Added.
13473         (java.install-info): Added
13474
13475 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
13476
13477         * Makefile.in (clean): Also remove java/parse.c.
13478
13479 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
13480
13481         Add a pair of -fbounds-check/-fno-bounds-check options.
13482         * lang.c (lang_decode_option): Add code to grok arguments.
13483         (flag_bounds_check): Add decl.
13484         (lang_f_options): New array w/ the option in it.
13485         * java-tree.h (flag_bounds_check): Add decl.
13486         * lang-options.h: New file.
13487         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
13488         of a static macro value.
13489         (JAVA_ARRAY_EXCEPTION): Delete macro.
13490
13491 Fri Jan 23 14:19:47 1998  Per Bothner  <bothner@cygnus.com>
13492
13493         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
13494         * expr.c (build_anewarray):  Add missing promote_type.
13495
13496 Thu Jan 22 17:43:45 1998  Per Bothner  <bothner@cygnus.com>
13497
13498         Add array types with known length to optimize bounds checking.
13499         * typeck.c (build_java_array_type):  Take length parameter.
13500         (java_array_type_length, build_prim_array_type):  New functions.
13501         * java-tree.h:  Update for new functions.
13502         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
13503         * class.c:  Use build_prim_array_type.
13504         * expr.c (can_widen_reference_to):  Handle known-length array types.
13505         (verify_jvm_instructions):  Keep track of integer push instructions
13506         followed by newarray/anewarray, so we can build known-length arrays.
13507         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
13508         (java_array_data_offset):  New function.
13509         (build_java_array_length_access):  New function.  Optimize if constant.
13510         (build_java_arrayaccess):  Constant fold bounds check.
13511         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
13512         (build_newarray, build_anewarray):  New functions.
13513         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
13514         * verify.c (merge_types):  Handle known-lengh array types.
13515
13516 Mon Jan 19 13:09:25 1998  Per Bothner  <bothner@cygnus.com>
13517
13518         * expr.c (expand_byte_code):  Fix performace bug, which caused
13519         searching linenumber_table to be linear rather than constant.
13520
13521 Fri Dec 12 19:18:42 1997  Per Bothner  <bothner@cygnus.com>
13522
13523         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
13524
13525         * decl.c, java-tree.h (soft_fmod_node):  New global.
13526         * decl.c (init_decl_processing):  Define __builtin_fmod.
13527         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
13528         using __builtin_fmod.
13529
13530 Thu Dec  4 13:22:59 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13531
13532         * keyword.h: New file, output of keyword.gperf as processed by
13533         gperf.
13534         * lex.c (java_lex_init): Initialize java_error_flag.
13535         * parse.c (YYERROR_NOW): Uses java_error_flag.
13536         * parse.y: New static java_error_flag. Useless definition of
13537         buffer_error gone.
13538         * parse.y (java_error): Portable error recovery using
13539         java_error_flag (not yet completely tuned).
13540
13541 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
13542
13543         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
13544
13545 Wed Dec  3 18:37:42 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13546
13547         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
13548         (parse.c, lex.c, keyword.h): New rules for Java source code
13549         front-end.
13550         * parse.c: Renamed into jcf-parse.c.
13551         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
13552         * keyword.gperf: New file, Java keywords.
13553         * parse.y: New file, Java language grammar.
13554         * parse.h: New file, Java language grammar definitions.
13555         * lex.c: New file, Java language lexer.
13556         * lex.h: New file, Java language lexer definitions.
13557
13558 Wed Dec  3 17:00:17 1997  Per Bothner  <bothner@cygnus.com>
13559
13560         * decl.c (clinit_identifier_node), java-tree.h:  New global.
13561         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
13562         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
13563         * expr.c (expand_java_field_op):  Check for invalid assignment
13564         to final field.
13565
13566         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
13567
13568 Mon Oct 27 17:46:36 1997  Per Bothner  <bothner@cygnus.com>
13569
13570         * verify.c (verify_jvm_instructions):  When processing a handler,
13571         attempt to set the current_subr to the right value.
13572         (More complicated code combines Sep 17 and Oct 22 versions.)
13573
13574 Fri Oct 24 11:36:54 1997  Per Bothner  <bothner@cygnus.com>
13575
13576         * class.c (push_class):  Figure out (guess) name of source file.
13577         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
13578         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
13579         (parse_class_file):  Change return type from int to void.
13580         Call debug_start_source_file/debug_end_source_file.
13581
13582         * expr.c (build_java_binop):  Fix masking 2nd operand.
13583         * decl.c (init_decl_processing):  Set sizetype first.
13584
13585 Wed Oct 22 19:39:05 1997  Per Bothner  <bothner@cygnus.com>
13586
13587         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
13588         (Revert Sep 17 change.)
13589
13590 Tue Oct 21 15:09:02 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13591
13592         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
13593         .class extension in their name and fix thing so we don't process
13594         them parse_zip_file_entries().
13595         (parse_zip_file_entries): Cleaned unused local variables.
13596
13597 Mon Oct 20 14:52:42 1997  Per Bothner  <bothner@cygnus.com>
13598
13599         * expr.c (can_widen_reference_to):  Allows equal array element types.
13600         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
13601         * jcf-dump.c (RET):  Get (and print) index.
13602
13603         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
13604         Promote element type to POINTER_TYPE.
13605
13606 Mon Oct 20 13:40:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13607
13608         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
13609         find_in_current_zip, jcf_figure_file_type): Moved from
13610         jcf-reader.c to parse.c.
13611         * zextract.c: (read_zip_archive): takes file_comment_length possible
13612         field into account.
13613
13614 Mon Oct 20 11:45:06 1997  Per Bothner  <bothner@cygnus.com>
13615
13616         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
13617
13618         * verify.c (merge_types):  Handle array types even better ...
13619
13620 Fri Oct 17 15:56:37 1997  Per Bothner  <bothner@cygnus.com>
13621
13622         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
13623
13624         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
13625         * class.c (make_class_data):  Don't build fields_decl if no fields.
13626         When building fields_decl, skip if DECL_ARTIFICIAL.
13627
13628         * expr.c (java_stack_swap):  Update stack_type_map.
13629         * verify.c (merge_types):  Handle array types better.
13630
13631 Wed Oct 15 18:09:45 1997  Per Bothner  <bothner@cygnus.com>
13632
13633         * class.c (add_field):  Don't promote short integral fields to
13634         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
13635         * expr.c (push_value):  Promote and convert short integral values.
13636
13637         * decl.c, java-tree.h (integer_two_node):  New constant node.
13638         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
13639
13640 Wed Oct 15 17:04:50 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13641
13642         * class.c (append_gpp_mangled_type): Use function argument
13643         unpromoted type to generate mangled name.
13644
13645 Mon Oct 13 16:52:55 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13646
13647         * constants.c (build_constant_data_ref): Now uses current_class
13648         instead of main_class.
13649         (build_constants_constructor): Now uses current_class instead of
13650         main_class.
13651         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
13652         of the global variable SeepZipFiles done here.
13653         * zextract.c (read_zip_archive): extra_field optional field taken
13654         into account while computing the position of the class file in the
13655         archive.
13656         * verify.c (verify_jvm_instructions): Use current_jcf to search
13657         the constant pool.
13658         * parse.c (load_class): First search for the class to load in the
13659         current zip file. Saves current_jcf (restored before returning
13660         from that function). Don't call JCF_FINISH in the class was found
13661         in the current ZIP file.
13662         (jcf_parse): If the class was found in the current ZIP file, save
13663         its tree_constant_pool (for later reuse).
13664         (parse_class_file): New function. Process each method defined in
13665         the current class and record the class as to be later registered.
13666         (yyparse): Rewritten. Figure the type of the current file and switch
13667         accordingly.
13668         * lang.c: New global variable current_jcf.
13669         (lang_init): Removed compiling_from_source test (done later, in
13670         yyparse). Removed call the jcf_parse ().
13671         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
13672         (typedef struct JCF): New fields seen_in_zip (to mark a class found
13673         in the current ZIP file) and zip_offset (offset to the class data in
13674         the current zip file).
13675         * jcf-reader.c: zipfile.h included.
13676         localToFile: New ZipFileCache static global variable
13677         (parse_zip_file_entries): New function. Browse the current ZIP
13678         file directory and process each class found.
13679         (process_zip_dir): New function. Register each class found in the
13680         ZIP file directory. The class aren't parsed but a valid JCF is
13681         link to each of them.
13682         (find_in_current_zip): New function. Search for a class in the
13683         current ZIP file directory. If found, prepare the class so that it
13684         can be loaded.
13685         (jcf_figure_file_type): New function. Examine the file structure
13686         to figure a class file, a ZIP file. If none of these categories are
13687         matched, a source file is assumed.
13688         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
13689         SeenZipFile: New global variable.
13690         (open_in_zip): Use zipmember's length to accelerate the search for
13691         a member. If zipmember was NULL and zip file successfully read,
13692         return 0.
13693         * java-tree.h: New global variable current_jcf declared.  Added
13694         declaration for current_constant_pool_tags, current_constant_pool_data,
13695         current_constant_pool_length, current_constant_pool_data_ref.
13696         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
13697         store the JCF of classes seen in a zip file) and tree *constant_pool
13698         (to save a loaded class constant pool). current_class declared here.
13699         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
13700         retrieve method_ref_constant.
13701         (PUSHC): java_push_constant_from_pool now uses current_jcf.
13702         (OBJECT): get_class_constant now uses current_jcf.
13703         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
13704         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
13705         (expand_invoke): Now uses current_class instead of main_class
13706         (build_class_init): Now uses current_class instead of main_class
13707         * class.c: New static global variable registered_class.
13708         (register_class): New function.
13709         (emit_register_class): Modified to use registered_class instead of
13710         main_class
13711         (is_compiled_class): Now take into account class seen in the archive.
13712
13713 Mon Oct  6 12:03:23 1997  Per Bothner  <bothner@cygnus.com>
13714
13715         * except.h:  Renamed to: java-except.h.
13716         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
13717         * except.c:  Add semi-working (commented out) implementation.
13718
13719         * expr.c (expand_iinc):  Add needed flush_quick_stack.
13720         * parse.c (set_source_filename):  New function.
13721         (give_name_to_class):  Set input_filename from package.classname.java.
13722
13723         * jcf-io.c (find_class):  Don't look first in ".".
13724
13725 Wed Oct  1 11:26:10 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13726
13727         * zextract.c (read_zip_archive): Now takes into account the
13728         extra_field field.
13729         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
13730
13731 Sat Sep 20 12:44:28 1997  Per Bothner  <bothner@cygnus.com>
13732
13733         * constants.c, java-tree.h (build_internal_class_name):  New function.
13734         (alloc_class_constant):  Re-implement using build_internal_class_name.
13735         * class.c (make_class_data):  Likewise.
13736         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
13737
13738 Wed Sep 17 13:15:23 1997  Per Bothner  <bothner@cygnus.com>
13739
13740         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
13741         to NULL before pushing an exception handler target.
13742
13743         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
13744         (java_stack_swap, java_stack_dup):  Re-write to be safe from
13745         clobbering registers.
13746         (build_class_init):  New function.
13747
13748 Wed Sep 17 11:02:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13749
13750         * typeck.c (build_java_array_type): Temporary use
13751         permanent_obstack to create the array 'length' field.
13752         * expr.c (lookup_label): Temporay use permanent_obstack to create
13753         label if not found.
13754         * class.c (push_super_field): Tempory use permanent_obstack.
13755
13756 Mon Sep 15 11:33:31 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13757
13758         * typeck.c (type_for_mode): Now handles double_type_node and
13759         float_type_node.
13760         * verify.c (verify_jvm_instructions): The instruction following
13761         the wide bytecode is checked. OPCODE_ret added to the list of
13762         wide.
13763
13764 Thu Sep 11 19:45:18 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13765
13766         * class.c (make_class): Temporary use permanent_obstack. Set the
13767         class CLASS_P field to 1.
13768         (push_class): Temporary use permanent_obstack.
13769         (set_super_info): Temporary use permanent_obstack.
13770         (add_method): Temporary use permanent_obstack, set
13771         METHOD_TRANSIENT().
13772         (add_field): Temporary use permanent_obstack. Sets
13773         FIELD_VOLATILE() and FIELD_TRANSIENT().
13774         (build_class_ref): Temporary use permanent_obstack if the class
13775         isn't compiled.
13776         (build_static_field_ref): Temporary use permanent_obstack when
13777         creating field's rtl.
13778         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
13779         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
13780         and fields. Function finalized, as far as flag handling.
13781         (push_class_static_dummy_field): Temporary use permanent_obstack.
13782         (emit_register_class): Force generation of class registration at
13783         -O3 or deeper.
13784         * decl.c (end_java_method): Call permanent_allocation() before
13785         returning.
13786         * expr.c (can_widen_reference_to): Added comment to interface
13787         handling, fixed typo.
13788         (lookup_field): Now uses CLASS_P() to correct FIXME
13789         (expand_invoke): Verification on public && !static &&
13790         !abstract moved into soft_lookupinterfacemethod (kaffe).
13791         Use Object class dtable if objectref is an array when expanding
13792         invokeinterface.
13793         (java_push_constant_from_pool): Temporary use permanent_obstack
13794         for CONSTANT_string
13795         * parse.c (get_ref_constant): Temporary use permanent_obstack to
13796         create constant references.
13797         (get_constant): Temporary use permanent_obstack to create constant.
13798         (load_class): Temporary use permanent_obstack to load class.
13799         (jcf_parse): Temporary use permanent_obstack to perform class
13800         layout.
13801         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
13802         (build_java_signature): Temporary use permanent_obstack.
13803         * verify.c: (verify_jvm_instruction): removed unnecessary verification
13804         on ACC_SUPER flag.
13805         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
13806         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
13807         (CLASS_P): Defined
13808
13809 Thu Sep 11 11:57:32 1997  Per Bothner  <bothner@cygnus.com>
13810
13811         * class.c (append_gpp_mangled_type):  Fix typo.
13812         (emit_register_class):  Use main_class to get class object, rather
13813         than looking for no-longer-existing static decl starting with _CL.
13814         * typeck.c (parse_signature_type):  Promote array element type
13815         if it is a RECORD_TYPE.
13816
13817 Wed Sep 10 16:09:23 1997  Per Bothner  <bothner@cygnus.com>
13818
13819         * class.c (push_class_static_dummy_field):  New function.
13820         (mangle_static_field):  New. Do G++-style mangling of static fields.
13821         (layout_class):  Mandle static fields here, not in add_field.
13822         (build_class_ref):  The class object is now a dummy static field.
13823         * decl.c (find_local_variable):  Look for best, instead of first match.
13824         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
13825         (build_java_athrow):  Don't check here if exception is Throwable.
13826         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
13827         (TYPE_USED):  Removed.  No longer used ...
13828         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
13829         * verify.c (push_pending_label):  New function.
13830         (push_pending_block):  Renamed to check_pending_block.
13831         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
13832         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
13833         re-checking possible handlers) after a store (less wasted work).
13834         Check for null handler (finally) before calling add_handler.
13835         Various changes to (finally?) correctly handle try/finally.
13836
13837 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13838
13839         * class.c: Include stdio.h.
13840
13841 Thu Sep  4 21:30:55 1997  Per Bothner  <bothner@cygnus.com>
13842
13843         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
13844         to make sure class is initialized before static/special invoke.
13845
13846         * verify.c (verify_jvm_instructions):  On a store instruction,
13847         call find_local_variable to force pre-allocation of decl and rtx.
13848         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
13849
13850 Wed Sep  3 16:13:23 1997  Per Bothner  <bothner@cygnus.com>
13851
13852         * class.c (build_class_ref):   Strip off "promoted_" if need be.
13853         (make_field_value): Call build_java_signature when needed.
13854         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
13855         * expr.c (build_java_athrow):  Don't push_value of exception.
13856         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
13857         match specification of [fd]cmp[lg] for NaNs.
13858         (expand_byte_code):  Add support for exception handler ranges.
13859         * except.c:  Add skeleton for EH code-generation.
13860         * verify.c (merge_types):  Treat all promoted integral types as equal.
13861         * constants.c (build_constants_constructor):  To force creation of
13862         current_constant_pool_data_ref, call build_constant_data_ref.
13863
13864         * javaop.def (lload):  Fix typo.
13865         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
13866
13867 Tue Sep  2 17:37:25 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13868
13869         * parse.c: Don't include function.h.
13870
13871 Wed Aug 27 18:33:04 1997  Per Bothner  <bothner@cygnus.com>
13872
13873         * except.[ch]:  New files.
13874         * Makefile.in (JAVA_OBJS):  Add except.o
13875         * expr.c:  Temporary warning about unimplemented exceptions.
13876         * verify.c:  Verify exception handlers.
13877
13878         * jcf-dump.c (disassemble_method):  Print exception table.
13879
13880 Wed Aug 27 13:26:58 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13881
13882         * expr.c (verify_jvm_instructions): Started a thorough
13883         verification of invoke* bytecodes.
13884         (expand_byte_code): flush quick stack if PC is the target of a
13885         branch.  and undef RET (conflicting with config/i386/i386.h).
13886         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
13887         used.
13888         (expand_invoke): Now handles invokeinterface and do more
13889         verification according to the bytecode.
13890         (lookup_field): Don't try to load the class if processing
13891         dtable_type.
13892         (can_widen_reference_to): Now handles interfaces.
13893         * decl.c (init_decl_processing): New global variable
13894         soft_lookupinterfacemethod_node, declared in java-tree.h.
13895         Call set_super_info on string_type_node.
13896         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
13897         defined.
13898         * class.c (set_super_info): Fills the CLASS_* flags according to
13899         access_flags.
13900         (get_access_flags_from_decl): Handles all class flags.
13901
13902 Tue Aug 26 18:54:34 1997  Per Bothner  <bothner@cygnus.com>
13903
13904         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
13905         * parse.c (yyparse):  Check for abstract method, and missing code.
13906         * expr.c (expand_byte_code):  Change interface.
13907         * lang.c (put_decl_node):  Print promoted types prettier.
13908         * verify.c (verify_jvm_instruction):  Change interface.
13909         Partial support for scanning exception table.
13910         For load instructions, handle promoted integral types.
13911
13912 Thu Aug 21 13:48:01 1997  Per Bothner  <bothner@cygnus.com>
13913
13914         * verify.c:  New file, with contents moved from expr.c.
13915         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
13916         * typeck.c (is_array_type_p):  Moved here from expr.c.
13917         * java-tree.h:  Add some now-needed function declarations.
13918         * Makefile.in (JAVA_OBJS): Added verify.o.
13919
13920 Wed Aug 20 14:34:34 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13921
13922         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
13923         METHOD_ABSTRACT flag.
13924
13925         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
13926         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
13927         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
13928
13929         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
13930         variables.
13931         (start_java_method): Hook for SYNCHRONIZED methods.
13932
13933         * expr.c (build_java_jsr, build_java_ret): New functions
13934         (JSR,PRE): New macros
13935         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
13936         (verify_jvm_instructions): tableswitch, lookupswitch,
13937         monitorenter, monitorexit, goto_w: verified.
13938         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
13939         (build_java_monitor): New function.
13940         (MONITOR_OPERATION): Modified to call build_java_monitor()
13941         (verify_jvm_instructions): Started a thorough verification of
13942         invoke* bytecodes.
13943
13944 Tue Aug 19 13:35:49 1997  Per Bothner  <bothner@cygnus.com>
13945
13946         Support verification of jsr/ret subroutines (used for try/finally).
13947         * decl.c (return_address_type_node):  New type node.
13948         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
13949         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
13950         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
13951         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
13952         TYPE_USED):  New macros for special types in type_map.
13953
13954         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
13955         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
13956         BCODE_JUMP_TARGET.
13957         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
13958
13959         * expr.c (can_widen_reference_to):  New function.
13960         (pop_type):  Use it.
13961         (merge_type_state):  Support handling start of subroutine.
13962         (push_pending_block):  Return char* error message, instead of calling
13963         fatal on an error.  Also handle subroutines.
13964         (verify_jvm_instructions):  Handle errors from push_poending_block.
13965         Support jsr and ret instructions.
13966
13967 Tue Aug 19 13:33:36 1997  Per Bothner  <bothner@cygnus.com>
13968
13969         * jcf-io.c (find_classfile):  Fix thinko.
13970         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
13971
13972 Tue Aug 12 20:14:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
13973
13974         * Makefile.in (BISON): Remove.
13975
13976 Thu Aug  7 23:08:24 1997  Per Bothner  <bothner@cygnus.com>
13977
13978         * Makefile.in:  Convert to autoconf.
13979         * config-lang.in (outputs):  Added java/Makefile.
13980
13981         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
13982         Rename cc1java to jc1.
13983
13984         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
13985         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
13986
13987         * class.c (class_depth):  Do load_class if needed.
13988
13989         Mostly better verification.
13990         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
13991         (init_decl_processing):  Change return type of soft_checkcast.
13992         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
13993         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
13994         lang_print_error):  New functions.
13995         (lang_init):  Set global hook print_error_function to lang_print_error.
13996         * expr.c:  In the type_map ptr_type_node is only used for null now.
13997         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
13998         (merge_types):  Dererence pointer to record types before comparing.
13999         (decode_newarray_type, merge_types):  On error just return NULL.
14000         (build_java_binop):  Add preliminary implementation (with warning)
14001         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
14002         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
14003         (expand_compare, expand_java_goto, expand_java_call):  Don't
14004         push_pending_block, since that only makes sense when verifying.
14005         (merge_type_state):  Different return codes.
14006         (push_pending_block):  A block may need to be verified more than once.
14007         (expand_byte_code):  Warn about unused code at code generation time.
14008         (verify_jvm_instruction):  Changed logic, since code may need to be
14009         re-verified if type-state has changed.  Also, better error handling.
14010         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
14011         Improve newarray, anewarray, ?aload, athrow,
14012         * java-tree.h (LABEL_CHANGED):  New macro.
14013
14014 Tue Aug  5 12:21:27 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14015
14016         * decl.c (soft_athrow_node): New global variable initialized.
14017         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
14018         * typeck.c (convert): Added support for REAL_TYPE.
14019         (convert_to_char): New function.
14020         (convert): Handle CHAR_TYPE.
14021         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
14022         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
14023         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
14024         promoted type.
14025         (verify_jvm_instructions): Added break a the end of bogus unop: label.
14026         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
14027         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
14028         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
14029         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
14030         to Use The Right Things.
14031         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
14032         compatible with INT. BOOLEAN is made equivalent to BYTE.
14033         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
14034         OPCODE_ifnonnull): Now supported.
14035         (build_java_athrow): New function.
14036
14037 Mon Aug  4 15:46:45 1997  Per Bothner  <bothner@cygnus.com>
14038
14039         Rename method name <init> to match G++ (and fix mangling).
14040         * class.c (layout_class):  Replace method name of <init> by class name.
14041         (make_method_value):  Do inverse renaming of constructor from <init>.
14042         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
14043         * typeck.c (lookup_java_constructor):  New function.
14044         * expr.c (expand_invoke):  If method_name is <init>, call
14045         lookup_java_constructor to find constructor.
14046
14047         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
14048
14049 Fri Aug  1 11:37:09 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14050
14051         * parse.c (get_class_constant): Modified to handle array "classes"
14052         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
14053         wide type.
14054         (convert): Modified to handle real type.
14055         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
14056         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
14057         variables declared.
14058         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
14059         soft_multianewarray, soft_newarray_node, soft_throw_node): New
14060         global variables initialized.
14061         (find_local_variable): Handles the case of a pointer
14062         (end_java_method): Restore the use of one more scope
14063         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
14064         build_java_array_length_access, expand_java_arrayload,
14065         expand_java_arraystore, expand_java_array_length,
14066         expand_java_multianewarray, expand_java_anewarray,
14067         build_java_check_indexed_type, is_array_type_p,
14068         build_java_throw_out_of_bound_exception): New functions.
14069         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
14070         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
14071         OPCODE_<t>aload): Implemented code for verification.
14072         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
14073         ARRAY_NEW_MULTI): Macro defined.
14074         (CONVERT): Modified to invoke convert().
14075         (case OPCODE_aload2): Fixed index typo from 2 to 1.
14076
14077 Thu Jul 31 12:48:18 1997  Per Bothner  <bothner@cygnus.com>
14078
14079         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
14080         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
14081         (make_class_data):  Field name needs '/' as package prefix.
14082         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
14083
14084 Fri Jul 25 11:44:21 1997  Per Bothner  <bothner@cygnus.com>
14085
14086         Implement debug information for local variables.
14087         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
14088         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
14089         DECL_LOCAL_SLOT_CHAIN):  New macros.
14090         (struct lang_decl_var):  New type.
14091         * parse.c (give_name_to_locals):  Move to decl.c.
14092         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
14093         (start_java_method):  Re-write parameter handling.
14094         (pending_local_decls):  New global variable.
14095         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
14096         (find_local_variable):  Accept pc so we can skips decls not in range.
14097         (struct binding_level):  Add end_pc field.
14098         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
14099         (various):  Change so current pc gets passed to find_local_variable.
14100
14101         * decl.c (init_decl_processing):  Re-arrange fields in
14102         class_type_node and and method_type_node to match kaffe 0.9.1.
14103         * class.c (make_method_value, make_class_data):  Update
14104         initializations to match.
14105
14106 Wed Jul 16 17:17:50 1997  Per Bothner  <bothner@cygnus.com>
14107
14108         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
14109         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
14110         (push_super_field):  New function.
14111         (make_class_data):  Handle inheritance of class static initializer.
14112         (layout_class):  New name mangling.
14113         * constants.c (build_constant_data_ref):  Init type of data array
14114         to a one-element array.
14115         (build_constants_constructor):  Set DECL_SIZE from complete array type.
14116         * decl.c:  Rename class_type, object_type etc to class_type_node,
14117         object_type_node etc.  Make former inherit from latter.
14118         * expr.c (expand_invoke):  Add cast of function address.
14119         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
14120         * parse.c (yyparse):  Don't call layout_class here.
14121         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
14122
14123 Sat Jun 14 12:06:57 1997  Per Bothner  <bothner@cygnus.com>
14124
14125         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
14126         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
14127         (alloc_class_constant):  New.
14128         * expr.c (expand_invoke):  Make sure method's class is initialized.
14129         * class.c (interits_from_p, emit_register_class):  New functions.
14130         * parse.c (yyparse):  Call emit_register_class.
14131
14132 Mon Jun  9 18:08:06 1997  Per Bothner  <bothner@cygnus.com>
14133
14134         * constants.c:  New file, to handle constant pool.
14135         * Makefile.in (JAVA_OBJS):  Add constants.o.
14136         * decl.c (init_decl_processing):  Update, fix, finish various structs.
14137         (pushdecl_top_level):  New.
14138         * parse.c (layout_class):  Moved to class.c.
14139         * expr.c (java_push_constant_from_pool):  New function.
14140         * class.c (build_class_ref):  Make work fully
14141         (make_class_data):  Emit super-class, constant pool, interface vector.
14142
14143 Tue Jun  3 10:14:31 1997  Per Bothner  <bothner@cygnus.com>
14144
14145         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
14146         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
14147         * class.c (class_depth):  New function.
14148         (lookup_named_class):  Replaced by new function lookup_class.
14149         * decl.c (object_type_node, string_type_node):  New.
14150         Remove various types that we no longer need.
14151         * expr.c (verify_jvm_instructions):  New separate verifier pass.
14152         (push_type, pop_type):  New functions for verifier.
14153         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
14154         (expand_byte_code):  Simplify, since we assume already verified.
14155         (expand_invoke):  Now mostly works.
14156         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
14157         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
14158         * parse.c:  Wait to allocate class object until we know its name.
14159         (layout_class):  Calculate DECL_VINDEX for each virtual method.
14160         * typeck.c (get_array_type):  Rename to ...
14161         (build_java_array_type):  ... and provide working implementation.
14162         (build_java_signature):  New function - build Java signature of type.
14163         (set_java_signature):  New function - cache signature with type.
14164         (lookup_java_method):  New function.
14165
14166 Tue May  6 22:08:24 1997  Per Bothner  <bothner@deneb.cygnus.com>
14167
14168         * class.c (ident_subst):  Take extra SUFFIX parameter.
14169         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
14170         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
14171         (build_class_ref):  Actually implement.
14172         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
14173         * decl.c (builtin_function):  New.
14174         (init_decl_processing):  Update for current Kaffe.  Declare some
14175         builtin Kaffe functions.
14176         * expr.c (build_address_of):  New.
14177         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
14178         Renamed (from expand_java_new etc), and added working implementations.
14179         (build_field_ref):  Now also handle static fields.
14180         (expand_invoke):  Implement invokestatic, and start implement rest.
14181         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
14182         * javaop.def:  Rename invokevirt -> invokevirtual.
14183         * lang.c (use_handles):  Removed.
14184         * parse.c:  Add support for ConstantValue attribute.
14185         Handle nested loading of a class.  (JPOOL_UTF):  New.
14186
14187 Tue Mar 11 20:11:05 1997  Per Bothner  <bothner@deneb.cygnus.com>
14188
14189         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
14190
14191 Thu Feb 27 14:24:29 1997  Per Bothner  <bothner@deneb.cygnus.com>
14192
14193         * Make-lang.in (java.install-man):  New empty rule.
14194         * typeck.c (set_local_type):  New function.
14195         * expr.c (STORE_INTERNAL):  Call find_local_variable,
14196         not find_stack_slot.  Call set_local_type.
14197
14198 Wed Feb 12 16:11:05 1997  Per Bothner  <bothner@kalessin.cygnus.com>
14199
14200         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
14201         and building RECORD_TYPE CONSTRUCTORs.
14202         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
14203
14204         * lang.c (use_handles):  Change the default to 0.
14205         * decl.c:  Define and build class_type, field_type, utf8const_type.
14206         * class.c (make_class_data, make_field_value,
14207         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
14208         hashUtf8String, strLengthUtf8, mangled_classname:
14209         Functions to build reflective data structures.
14210         * parse.c (yyparse):  Call make_class_data.
14211
14212         * jcf-io.c (open_class, find_classfile):  New functions.
14213         * jcf-dump.c:  Support reading classfile from explicitly-named
14214         class file (without CLASSPATH searching).
14215
14216 Thu Oct 24 14:10:16 1996  Per Bothner  <bothner@deneb.cygnus.com>
14217
14218         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
14219         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
14220         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
14221         (get_constant):  Now trivial for CONSTANT_Utf8.
14222
14223         * jcf.h:  Make NEW_CPOOL the default.
14224         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
14225
14226 Thu Oct 24 13:52:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
14227
14228         New directory.