OSDN Git Service

2003-01-14 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2003-01-14  Andrew Haley  <aph@redhat.com>
2
3         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4         varargs function -- correct.
5
6 2003-01-14  Andrew Haley  <aph@redhat.com>
7
8         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
9
10 2003-01-14  Andrew Haley  <aph@redhat.com>
11
12         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
13         varargs function -- correct.
14
15         * parse.y (patch_assignment): Copy the rhs of an assignment into a
16         temporary if the RHS is a reference.
17
18 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19
20         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
21         * keyword.h: Regenerated.
22
23         * All Files: Convert to ISO C style function definitions.
24
25 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
26
27         * parse.y (check_pkg_class_access): ANSIfy definition.
28
29 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
30
31         * decl.c, parse-scan.y, parse.y: Don't cast return value of
32         xmalloc et al.
33
34         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
35
36 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
37
38         Merge from pch-branch:
39
40         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
41
42         * Make-lang.in (java/gjavah.o): Update dependencies.
43         * gjavah.c: Include ggc.h.
44
45         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
46
47         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
48         (JCFDUMP_OBJS): Add ggc-none.o.
49         (java/jcf-dump.o): Depend on GGC_H.
50         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
51         CPool substructures.
52         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
53         * jcf-dump.c: Include ggc.h.
54
55         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
56
57         * jcf.h (union cpool_entry): New.
58         (struct CPool): Use gengtype to mark.  Change field 'data' to be
59         an array of unions.
60         (struct JCF): Use gengtype to mark.
61         (CPOOL_UINT): Update for new cpool_entry type.
62         (CPOOL_USHORT1): Likewise.
63         (CPOOL_USHORT2): Likewise.
64         (CPOOL_FINISH): Use GC to free cpool subfields.
65         * parse.h (struct parser_ctxt): Mark field current_jcf.
66         * lex.c (java_init_lex): Use GC to allocate struct JCF.
67         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
68         (main_jcf): Use gengtype to mark.
69         (ggc_mark_jcf): Delete.
70         (get_constant): Update for new cpool_entry type.
71         (give_name_to_class): Likewise.
72         (get_class_constant): Likewise.
73         (init_outgoing_cpool): Use GGC to allocate struct CPool.
74         (java_parse_file): Use GGC to allocate struct JCF.
75         (init_jcf_parse): Don't call ggc_add_root.
76         * jcf-reader.c (jcf_parse_constant_pool): Update for new
77         cpool_entry type.
78         * java-tree.h (current_jcf): Use gengtype to mark.
79         (CPOOL_UTF): Update for new cpool_entry type.
80         (outgoing_cpool): Use gengtype to mark.
81         (struct lang_type): GC struct JCF and struct CPool.
82         * config-lang.in (gtfiles): Add jcf.h.
83         * constants.c (find_tree_constant): New.
84         (set_constant_entry): Allocate cpool subfields using GGC.  Update
85         for new cpool_entry type.
86         (find_constant1): Update for new cpool_entry type.
87         (find_constant2): Likewise.
88         (find_utf8_constant): Use find_tree_constant.
89         (find_class_or_string_constant): Remove unnecessary cast to jword.
90         Update for new cpool_entry type.
91         (count_constant_pool_bytes): Update for new cpool_entry type.
92         (write_constant_pool): Likewise.
93         (alloc_name_constant): Use find_tree_constant.
94         (build_constants_constructor): Update for new cpool_entry type.
95
96         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
97
98         * parse.y (mark_parser_ctxt): Delete.
99         (goal): Don't use ggc_add_root.
100         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
101         (java_pop_parser_context): Let GC free parser_ctxt.
102         (java_parser_context_resume): Likewise.
103         * parse.h (struct parser_ctxt): Use gengtype to mark.
104         (ctxp): Likewise.
105         (ctxp_for_generation): Likewise.
106         * lex.h (struct java_lc_s): Mark for gengtype.
107         (java_lexer): Rearrange for gengtype.
108         * config-lang.in (gtfiles): Add lex.h, parse.h.
109
110 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
111
112         * All Files: Remove PARAMS macro.
113
114         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
115         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
116         `__STDC__' macros.
117
118         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
119         VA_CLOSE.
120
121 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
122
123         * Make-lang.in (java.install-common, java.uninstall,
124         java.install-info, java.install-man): Prepend $(DESTDIR)
125         to destination paths in all (un)installation commands.
126         (java.install-common): Rewrite $(LN) command to support
127         DESTDIR with "ln" as well as with "ln -s".
128
129 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
130
131         * java-tree.h: Protect against multiple inclusion.
132
133 2003-01-07  Tom Tromey  <tromey@redhat.com>
134
135         * class.c (add_assume_compiled): Don't adjust parent if we're
136         already at the root of tree.
137
138 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
139
140         * lang.c (dump_compound_expr): Prototype.
141
142 2003-01-03  Tom Tromey  <tromey@redhat.com>
143
144         Fix for PR java/8712:
145         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
146         when simply checking against `null'.
147
148 2003-01-03  Tom Tromey  <tromey@redhat.com>
149
150         * gcj.texi (Standard Properties): Document http.proxyHost and
151         http.proxyPort.
152
153         * gcj.texi (GNU Classpath Properties): Document new properties.
154
155 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
156
157         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
158         java/lang-options.h, java/mangle.c, java/mangle_name.c,
159         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
160
161 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
162
163         * Make-lang.in, boehm.c, buffer.c,
164           buffer.h, builtins.c, class.c,
165           config-lang.in, constants.c,
166           convert.h, decl.c, except.c,
167           expr.c, java-except.h,
168           java-tree.h, javaop.def,
169           jcf-parse.c, jcf-write.c,
170           jv-scan.c, jvgenmain.c,
171           jvspec.c, keyword.gperf,
172           keyword.h, lang-options.h,
173           lang-specs.h, lang.c, lex.c,
174           lex.h, mangle.c, mangle_name.c,
175           parse-scan.y, parse.h, parse.y,
176           typeck.c, verify.c, xref.c,
177           xref.h: Replace "GNU CC" with
178           "GCC" in the copyright header.
179
180         * check-init.c, gjavah.c, javaop.h,
181           jcf-depend.c, jcf-dump.c, jcf-io.c,
182           jcf-path.c, jcf-reader.c, jcf.h,
183           zextract.c, zipfile.h: These files are
184           "part of GCC". Also say "GCC" not "GNU CC".
185
186 2002-12-30  DJ Delorie  <dj@redhat.com>
187
188         * Make-lang.in: Protect against texi2pod/pod2man failing.
189
190 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
191
192         * gcj.texi: Use @copying.
193
194 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
195
196         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
197         print_cxx_classname.
198         (print_cxx_classname): Add add_scope parameter.
199         (print_class_decls): Do not emit a semicolon after the extern
200         "Java" block.
201         (process_file): Adjust calls to print_cxx_classname.
202
203 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
204
205         * gcj.texi: Include Cover Texts in man page.
206
207 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
208
209         * class.c (build_static_field_ref): Check FIELD_FINAL.
210
211         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
212         instead of current_constant_pool_data_ref.
213         * java-tree.h (current_constant_pool_data_ref): Undefine.
214         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
215         * jcf-parse.c (init_outgoing_cpool): Don't initialize
216         current_constant_pool_data_ref.
217
218         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
219         not build_internal_class_name.
220
221         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
222         Use it when class ref isn't certain to be compiled.
223
224 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
225
226         * gcj.texi: Include gcc-common.texi.
227         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
228         $(srcdir)/doc/include/gcc-common.texi.
229
230 2002-12-22  Anthony Green  <green@redhat.com>
231
232         * gcj.texi (Limitations): Add note about org.xml.sax and
233         org.w3c.dom.
234
235 2002-12-20  Tom Tromey  <tromey@redhat.com>
236
237         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
238         where minimum case value is Integer.MIN_VALUE.
239         Fixes PR java/8955.
240
241 2002-12-18  Andrew Haley  <aph@redhat.com>
242
243         * parse.y (patch_invoke): Force evaluation order when `check' is
244         set.  For PR libgcj/8945.
245
246 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
247
248         * gcj.texi: Change version number to 3.4.
249
250 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
251         Andrew Haley <aph@redhat.com>
252
253         * parse.y (source_end_java_method): Remove custom encoding of line
254         numbers for a function decl before passing it to the back end.
255
256 2002-12-03  Andrew Haley  <aph@redhat.com>
257
258         * class.c (make_class_data): New field, "chain".
259         * decl.c (java_init_decl_processing): Likewise.
260
261 2002-12-02  Tom Tromey  <tromey@redhat.com>
262
263         For PR java/8740:
264         * parse.y (do_resolve_class): Handle qualified name via
265         recursion.
266
267 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
268
269         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
270         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
271         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
272         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
273         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
274         Include coretypes.h and tm.h.
275         * Make-lang.in: Update dependencies.
276
277 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
278
279         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
280
281 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
282
283         * jcf-reader.c: Don't expand JCF_readu4 inside the
284         expansion of JCF_SKIP.
285
286 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
287
288         * jcf-reader.c: Don't expand JCF_readu4 inside the
289         expansion of JCF_SKIP.
290
291 2002-11-22  Tom Tromey  <tromey@redhat.com>
292
293         * parse.y (patch_binop): Cast right hand side of shift expression
294         to `int'.  Fixes PR java/8676.
295
296 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
297             Andrew Haley <aph@redhat.com>
298
299         * gcc/java/jcf-write.c (write_classfile): Remove target
300         class file, if it exists, before renaming the temporary
301         class file to it.
302
303 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
304
305         * jvspec.c (lang_specific_spec_functions): New.
306
307 2002-11-18  Tom Tromey  <tromey@redhat.com>
308
309         Fix for PR java/7912:
310         * expr.c (can_widen_reference_to): Allow cast of array to
311         Cloneable or Serializable.
312         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
313         (java_io_serializable_identifier_node): Likewise.
314         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
315         (valid_ref_assignconv_cast_p): Use new identifier nodes.
316         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
317         java_io_serializable.
318         * decl.c (java_init_decl_processing): Initialize
319         java_lang_cloneable_identifier_node and
320         java_io_serializable_identifier_node.
321         (java_lang_cloneable_identifier_node): New global.
322         (java_io_serializable_identifier_node): Likewise.
323
324 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
325
326         * buffer.c: Remove unnecessary casts.
327         * check-init.c: Likewise.
328         * class.c: Likewise.
329         * constants.c: Likewise.
330         * decl.c: Likewise.
331         * except.c: Likewise.
332         * gjavah.c: Likewise.
333         * jcf-io.c: Likewise.
334         * jcf-parse.c: Likewise.
335         * jcf-path.c: Likewise.
336         * jvspec.c: Likewise.
337         * lang.c: Likewise.
338         * lex.c: Likewise.
339         * verify.c: Likewise.
340
341 2002-11-06  Tom Tromey  <tromey@redhat.com>
342
343         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
344         a JNI header.
345
346 2002-11-05  Tom Tromey  <tromey@redhat.com>
347
348         Fix for PR java/6388.
349         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
350         * java-tree.h (enum java_tree_index): New values
351         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
352         (decimal_int_max, decimal_long_max): New defines.
353         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
354         (error_if_numeric_overflow): Rewrote range checking.
355         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
356         decimal_long_max.
357
358 2002-11-02  Tom Tromey  <tromey@redhat.com>
359
360         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
361
362         * class.c (make_method_value): Put class name, not signature, into
363         `throws' field.  For PR java/8415.
364
365 2002-10-24  Tom Tromey  <tromey@redhat.com>
366
367         * gcj.texi (Invoking gij): Document --showversion.
368         (Standard Properties): java.library.path now set.
369
370 2002-10-23  Tom Tromey  <tromey@redhat.com>
371
372         * gjavah.c (decode_signature_piece): In JNI mode, print
373         `jobjectArray' when array depth is nonzero.
374         Fixes PR java/8296.
375
376 2002-10-15  Andrew Haley  <aph@redhat.com>
377
378         * parse.y (patch_invoke): Call force_evaluation_order on a static
379         arg list.
380         (resolve_qualified_expression_name): Call force_evaluation_order
381         on a arg list that is part of a Qualified Expression Name.
382
383         * lang.c (dump_compound_expr): New.
384         (java_dump_tree): New.
385
386 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
387
388         * gcj.texi: Added item describing the GCJ runtime property
389         "gnu.gcj.progname".
390
391 2002-10-15  Richard Henderson  <rth@redhat.com>
392
393         * jcf-parse.c (get_constant): Fix type warning.
394
395 2002-10-15  Andrew Haley  <aph@redhat.com>
396
397         * java-tree.h (java_inlining_merge_static_initializers): Declare.
398         (java_inlining_map_static_initializers): Declare.
399
400 2002-10-14  Andrew Haley  <aph@redhat.com>
401
402         * tree-inline.c (remap_block): All local class initialization
403         flags go in the outermost scope.
404         (expand_call_inline): Call java_inlining_map_static_initializers.
405         (expand_call_inline): Call java_inlining_merge_static_initializers.
406         * java/lang.c (merge_init_test_initialization): New.
407         (java_inlining_merge_static_initializers): New.
408         (inline_init_test_initialization): New.
409         (java_inlining_map_static_initializers): New.
410
411 2002-10-11  Mark Wielaard  <mark@klomp.org>
412
413         * gcj.texi (Compatibility): Add Limitations and Extensions section.
414
415 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
416
417         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
418
419 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
420
421         * parse.y (merge_string_cste): Add parentheses around & within |.
422
423 2002-10-08  Tom Tromey  <tromey@redhat.com>
424
425         * parse.y (variable_declarator_id): Simplify error path for
426         array declarator error.  For PR java/8003.
427
428 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
429
430         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
431         bug_report_url.
432
433 2002-10-08  Andrew Haley  <aph@redhat.com>
434
435         * parse.y (attach_init_test_initialization_flags): Check for
436         error_mark_node.
437
438 2002-10-07  Anthony Green  <green@redhat.com>
439
440         * parse.y (merge_string_cste): Fix bug in string concatenation.
441
442 2002-10-03  Michael Koch  <konqueror@gmx.de>
443
444         * gcj.texi (Standard properties):
445         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
446
447 2002-10-02  Roger Sayle  <roger@eyesopen.com>
448
449         PR optimization/6627
450         * lang.c (java_init): If storing the vbit in function
451         pointers, ensure that force_align_functions_log is atleast
452         one to aid compatability with g++ vtables.
453
454 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
455
456         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
457         foul of type-based aliasing.
458
459 2002-09-30  Anthony Green  <green@redhat.com>
460
461         * gcj.texi (Invoking jv-scan): Fix texinfo.
462
463 2002-09-28  Anthony Green  <green@redhat.com>
464
465         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
466         (Code Generation): Add -fno-assert documentation.
467         * jv-scan.c (flag_assert): New global.
468         (options): Add assert option.
469         (help): Add --no-assert documentation.
470         * parse-scan.y (flag_assert): New global.
471         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
472         (flag_assert): New global.
473         * java-tree.h (flag_assert): New global.
474         * lex.c (java_lex): Obey flag_assert.
475         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
476         calling cc1.
477
478 2002-09-26  Andrew Haley  <aph@redhat.com>
479
480         * expr.c (build_java_array_length_access): Check for null pointer.
481         * expr.c (expand_java_arrayload): Likewise.
482
483 2002-09-21  Richard Henderson  <rth@redhat.com>
484
485         * jcf-parse.c (get_constant): Decode from IEEE no matter
486         what the target format.
487
488 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
489
490         * ChangeLog: Follow spelling conventions.
491         * class.c: Likewise.
492         * decl.c: Likewise.
493         * expr.c: Likewise.
494         * gjavah.c: Likewise.
495         * java-tree.h: Likewise.
496         * jcf-dump.c: Likewise.
497         * jcf-parse.c: Likewise.
498         * jvspec.c: Likewise.
499         * lang.c: Likewise.
500         * mangle.c: Likewise.
501         * parse.y: Likewise.
502
503 2002-09-17  Tom Tromey  <tromey@redhat.com>
504
505         * lex.c (java_read_unicode_collapsing_terminators): Handle case
506         where \r appears at EOF.  Fixes PR java/7950.
507
508 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
509
510         * jvspec.c (lang_specific_driver): Remove unused variable.
511
512 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
513
514         * java-tree.h (union lang_tree_node): Add chain_next option.
515
516 2002-09-16  Richard Henderson  <rth@redhat.com>
517
518         * jcf-parse.c (get_constant): Runtime check for IEEE format;
519         use new real.h interface.
520         * jcf-write.c (find_constant_index): Use new real.h interface.
521         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
522
523 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
524
525         * lang.c: Follow spelling conventions.
526
527 2002-09-11  Per Bothner  <per@bothner.com>
528
529         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
530         constant to the type of the field.
531         (java_complete_tree):  Remove now-redundant code.
532
533         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
534
535 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
536
537         For PR java/5794:
538         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
539         return label if a ret instruction for the jsr has been reached.
540
541 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
542
543         * parse.y (DIR_SEPARATOR): Don't define.
544         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
545
546 2002-08-28  Andrew Haley  <aph@redhat.com>
547
548         * verify.c (verify_jvm_instructions): Allow exception handler
549         inside code that is being protected, but generate a warning.
550         * except.c (link_handler): Initialize `expanded' in new eh_range.
551         (binding_depth, is_class_level, current_pc): Declare extern.
552
553 2002-09-01  Mark Wielaard <mark@klomp.org>
554
555         * gcj.texi: Add chapter about system properties.
556         Fixed some typos.
557
558 2002-08-26  Tom Tromey  <tromey@redhat.com>
559
560         * parse.y (try_builtin_assignconv): Allow narrowing primitive
561         conversion if RHS_TYPE is byte, short, or char.
562
563 2002-08-22  Tom Tromey  <tromey@redhat.com>
564
565         * gcj.texi (Invoking gij): Document -cp and -classpath.
566
567 2002-08-21  Tom Tromey  <tromey@redhat.com>
568
569         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
570         $(prefix)/share.  For PR libgcj/7633.
571
572         For PR java/6005 and PR java/7611:
573         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
574         (java_can_use_bit_fields_p): New function.
575
576 2002-08-16  Tom Tromey  <tromey@redhat.com>
577
578         * gcj.texi (Class Initialization): Mention class initialization of
579         arrays.
580
581 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
582
583         * Make-lang.in (java-tree-inline.o): New.
584         (JAVA_OBJS): Add java-tree-inline.o.
585         * parse.y (source_end_java_method): Call java_optimize_inline.
586         (java_expand_method_bodies): Save method's tree in
587         DECL_SAVED_TREE.
588         (add_stmt_to_compound): Keep track of the number of statments.
589         * lang.c (java_init): Enable flag_inline_trees.
590         (java_post_options): If flag_inline_functions is on, enable
591         flag_inline_trees instread.
592         (decl_constant_value): New.
593         (java_tree_inlining_walk_subtrees): New.
594         * java-tree.h (DECL_NUM_STMTS): New macro.
595         (java_optimize_inline): Declare.
596         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
597         Handle a LABEL_EXPR.
598         * decl.c (build_result_decl): If we already have a DECL_RESULT
599         don't make another.
600         (dump_function): New.
601         (java_optimize_inline): New.
602         (dump_function): New.
603
604 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
605
606         For PR java/7483:
607         * parse.y (build_assertion): Invert return from
608         desiredAssertionStatus.
609
610 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
611
612         * jcf-write.c (get_access_flags): Return correct access flags for
613         private and protected inner classes.
614
615 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
616
617         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
618
619 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
620
621         * mangle_name.c: Don't include obstack.h twice.
622         * xref.c: Don't include obstack.h.
623
624 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
625
626         * class.c: (permanent_obstack): Delete declaration.
627         * constants.c: (permanent_obstack): Delete declaration.
628         * except.c: (permanent_obstack): Delete declaration.
629         * expr.c: (permanent_obstack): Delete declaration.
630         * jcf-parse.c: (permanent_obstack): Delete declaration.
631         (saveable_obstack): Delete declaration.
632         * parse.h: (permanent_obstack): Delete declaration.
633         * typeck.c: (permanent_obstack): Delete declaration.
634
635 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
636
637         * gcj.texi (version-gcc): Increase to 3.3.
638
639 2002-07-22  Tom Tromey  <tromey@redhat.com>
640
641         * lex.c (java_lex): Check for `e' or `E' after 0.
642
643 2002-07-21  Richard Henderson  <rth@redhat.com>
644
645         * lang.c (java_unsafe_for_reeval): New.
646         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
647
648 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
649
650         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
651         (jcf_path_init): Use GET_ENVIRONMENT.
652
653 2002-07-10  Roger Sayle  <roger@eyesopen.com>
654             Zack Weinberg <zack@codesourcery.com>
655
656         * builtins.c (initialize_builtins): Remove defines that
657         handled C/C++ specific junk hereby removed from builtins.def.
658
659 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
660
661         * lang.c (java_post_options): Update prototype.
662
663 2002-07-05  Roger Sayle  <roger@eyesopen.com>
664
665         * builtins.c (initialize_builtins): Ignore the additional
666         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
667         the builtins.def file.
668
669 2002-07-01  Tom Tromey  <tromey@redhat.com>
670
671         For PR libgcj/7073:
672         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
673         specially.
674
675 2002-07-01  Roger Sayle  <roger@eyesopen.com>
676
677         * java/decl.c (builtin_function): Accept additional parameter.
678         (java_init_decl_processing): Pass an additional NULL_TREE
679         argument to builtin_function.
680
681 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
682
683         * gcj.texi: Fixed gcj invocation example so that it compiles.
684
685 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
686
687         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
688         * parse.y (mark_parser_ctxt): Likewise.
689         (check_modifiers, declare_local_variables): Avoid incorrect
690         hardcoded constant 10.
691
692         * lex.c (java_read_char): Avoid "comparison is always true"
693         warning.
694
695 2002-06-25  Andreas Schwab  <schwab@suse.de>
696
697         * expr.c (JSR): Avoid undefined operation on PC.
698
699 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
700
701         * decl.c (clear_binding_level): Const-ify.
702
703 2002-06-13  Akim Demaille  <akim@epita.fr>
704
705         * parse.y (class_declaration, interface_declaration): Make sure
706         all their rules have an action, in order to avoid meaningless `$$
707         = $1' and their type clashes.
708
709 2002-06-11  Tom Tromey  <tromey@redhat.com>
710
711         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
712         * parse-scan.y (statement_without_trailing_substatement): Added
713         assert_statement.
714         (assert_statement): New rule.
715         * java-tree.h (struct lang_type) [assertions]: New field.
716         (TYPE_USES_ASSERTIONS): New macro.
717         (CLASS_USES_ASSERTIONS): Likewise.
718         (FIELD_SYNTHETIC): New define.
719         * lex.c (java_lval;): Added ASSERT_TK.
720         * parse.y (ASSERT_TK): Added.
721         (statement_without_trailing_substatement): Added assert_statement.
722         (assert_statement): New rule.
723         (build_assertion): New function.
724         (maybe_generate_pre_expand_clinit): Create and initialize
725         $assertionsDisabled.
726         (lookup_package_type): Removed decl.
727         * keyword.h: Rebuilt.
728         * keyword.gperf (assert): New token.
729
730 2002-06-10  Akim Demaille  <akim@epita.fr>
731
732         * parse.y (interface_type_list, class_member_declaration)
733         (unary_expression_not_plus_minus): Remove duplicate %type.
734         Whitespace changes.
735
736 2002-06-09  Tom Tromey  <tromey@redhat.com>
737
738         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
739
740         * parse.y (method_header): Give error message in all cases.
741         Fixes PR java/6865.
742
743 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
744
745         Don't use RTL inlining. Fix for PR java/6820.
746         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
747         (flag_really_inline): New.
748         (java_decode_option): Set flag_really_inline if -finline-functions
749         is seen.
750         (java_post_options): New function. Turn off inlining unless
751         flag_really_inline is set.
752
753 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
754
755         * gjavah.c (throwable_p): Accept argument as either a classname or
756         signature fragment. Create null-terminated classname string for super
757         when calling itself recursively.
758         (decode_signature_piece): Skip first character from class name
759         signature when calling throwable_p.
760
761 2002-06-08  H.J. Lu  (hjl@gnu.org)
762
763         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
764
765 2002-06-04  Tom Tromey  <tromey@redhat.com>
766
767         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
768
769 2002-06-04  Michael Koch  <konqueror@gmx.de>
770
771         * gcj.texi (Input Options): Fixed typo.
772
773 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
774
775         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
776         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
777         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
778         and all now-pointless local variables.  Rename other local
779         variables to reflect their not being handles.
780
781         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
782         #if JCF_USE_STDIO blocks.
783
784         * parse.y: Add missing semicolon at end of rule.
785
786 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
787
788         * check-init.c (attach_initialized_static_class): Delete, unused.
789         * parse.y: Use htab_t instead of struct hashtable, update
790         all uses.
791         * java-tree.h: Include hashtab.h instead of hash.h.
792         (struct lang_decl_func): Use htab_t, set up for gengtype.
793         (struct init_test_hash_entry): Delete.
794         (struct treetreehash_entry): New.
795         (java_treetreehash_find): New
796         (java_treetreehash_new): New prototype.
797         (java_treetreehash_create): New prototype.
798         (java_mark_tree): Delete prototype.
799         (java_hash_hash_tree_node): Delete prototype.
800         (java_hash_compare_tree_node): Delete prototype.
801         (attach_initialized_static_class): Delete prototype.
802         * expr.c (build_class_init): Update to use java_treetreehash
803         functions.
804         (java_expand_expr): Update to use htab_t.
805         (emit_init_test_initialization): Likewise.
806         * decl.c (java_mark_tree): Delete.
807         * class.c (init_test_hash_newfunc): Delete.
808         (java_hash_hash_tree_node): Delete.
809         (java_hash_compare_tree_node): Delete.
810         (add_method_1): Update to use java_treetreehash functions.
811         (JAVA_TREEHASHHASH_H): New macro.
812         (java_treetreehash_hash): New function.
813         (java_treetreehash_compare): New function.
814         (java_treetreehash_find): New function.
815         (java_treetreehash_new): New function.
816         (java_treetreehash_create): New function.
817         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
818
819         * Make-lang.in (java/parse.o): Depend on debug.h.
820         * java-tree.h (struct lang_identifier): Use gengtype.
821         (union lang_tree_node): New.
822         (struct lang_decl_func): Use gengtype.
823         (struct lang_decl_var): Likewise.
824         (struct lang_decl): Likewise.
825         * parse.y: Include debug.h.
826         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
827
828         * lang.c (struct language_function): New dummy structure.
829
830         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
831         descriminator for DECL_LANG_SPECIFIC.
832         (struct lang_decl_func): Rename from struct lang_decl.
833         (enum lang_decl_desc): New.
834         (struct lang_decl): Make it a union.  Update all the accessor macros.
835         (struct lang_type): Use gengtype.
836         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
837         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
838         are now the same size.
839         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
840         use discriminator to mark DECL_LANG_SPECIFIC.
841
842         * Make-lang.in (gt-java-builtins.h): New rule.
843         (java/builtins.o): Add dependency on gt-<filename>.h.
844         * builtins.c: Use gengtype for roots.
845         (union string_or_tree): Use gengtype.
846         (struct builtin_record): Use gengtype.
847         * config-lang.in (gtfiles): Add builtins.c.
848
849         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
850         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
851         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
852         gt-java-parse.h, gtype-java.h): Add rules to generate.
853         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
854         (class.o): Add dependency on gt-*.h.
855         (constants.o): Likewise.
856         (decl.o): Likewise.
857         (expr.o): Likewise.
858         (jcf-parse.o): Likewise.
859         (jcf-write.o): Likewise.
860         (lang.o): Likewise.
861         * config-lang.in (gtfiles): New.
862         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
863         * constants.c: Replace uses of ggc_add_* with GTY markers.
864         Include gt-*.h.
865         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
866         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
867         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
868         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
869         Include gt-*.h.
870         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
871         Include gt-*.h.
872         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
873         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
874         gt-*.h.
875         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
876         Include gtype-java.h.
877
878 2002-06-02  Tom Tromey  <tromey@redhat.com>
879
880         Fix for PR java/5913:
881         * parse.y (patch_binop): Call patch_string on op1.
882
883 2002-06-02  Tom Tromey  <tromey@redhat.com>
884
885         Fix for PR java/1343, PR java/6336:
886         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
887         formatting.  Changed return type.
888         (anonymous_class_counter): Moved to top of file.
889         (maybe_make_nested_class_name): Append number to class name for
890         function-local classes.
891
892 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
893
894         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
895         * Make-lang.in: Update dependency lists.
896
897 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
898
899         * gjavah.c (throwable_p): Do not free the name of the class after
900         passing it to find_class.
901         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
902         * jcf-io.c (dirent.h): Include it.
903         (fnmatch.h): Likewise.
904         (compare_path): New function.
905         (java_or_class_file): Likewise.
906         (memoized_dirlist_entry): New type.
907         (memoized_dirlist_lookup_eq): New function.
908         (memoized_dirlists): New variable.
909         (caching_stat): New function.
910         (memoized_class_lookup_eq): New function.
911         (memoized_class_lookups): Likewise.
912         (find_class): Use memoized_class_lookups and caching_stat.
913         * jcf.h (JCF_USE_SCANDIR): Define.
914         * parse.y (java_expand_classes): Write the class files in reverse
915         order.
916
917 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
918
919         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
920
921 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
922
923         * jcf-write.c (write_classfile): Unlink the temporary file if it
924         cannot be renamed.  Use concat to build up the name of the
925         temporary file.
926
927 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
928
929         * jcf-write.c (write_classfile): Write the file to a
930         temporary file and then rename it.
931
932 2002-05-07  Tom Tromey  <tromey@redhat.com>
933
934         * gjavah.c (throwable_p): Use xstrdup, not strdup.
935
936         Fix for PR java/1200:
937         * gjavah.c (throwable_p): New function.
938         (decode_signature_piece): Use it.  A `WeakReference' isn't the
939         same as a `jweak'.
940         Include hashtab.h.
941         (gcjh_streq): New function.
942
943 2002-05-07  Andreas Jaeger  <aj@suse.de>
944
945         * parse.y (finish_for_loop): Fix if statement.
946
947 2002-05-06  Tom Tromey  <tromey@redhat.com>
948
949         Fix for PR java/5941:
950         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
951         loop update expression.
952         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
953         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
954
955 2002-05-04  Mark Wielaard  <mark@klomp.org>
956
957         For PR java/6519:
958         * parse.y (build_string_concatenation): Return just op1 only when op2
959         is null and op1 is a STRING_CST, otherwise always construct a
960         StringBuffer.
961
962 2002-04-27  Tom Tromey  <tromey@redhat.com>
963
964         For PR java/6382:
965         * parse.y (string_convert_int_cst): New function.
966         (merge_string_cste): Use it.
967
968 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
969
970         * java-tree.h (java_parse_file): Update.
971         (java_set_yydebug): Remove.
972         * jcf-parse.c (yydebug): Remove.
973         (java_set_yydebug): Die.
974         (java_parse_file): Update.
975         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
976
977 2002-04-24  Tom Tromey  <tromey@redhat.com>
978
979         For PR java/6425:
980         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
981         EXPR_WFL_QUALIFICATION of qual_wfl.
982
983 2002-04-23  Per Bothner  <per@bothner.com>
984
985         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
986         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
987         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
988
989 2002-04-23  Tom Tromey  <tromey@redhat.com>
990
991         For PR java/6314:
992         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
993         recognize `-fcompile-resource='.
994         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
995         a bit.
996
997 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
998
999         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
1000         paths. Fixes PR java/2791.
1001
1002 2002-04-19  Andrew Haley  <aph@redhat.com>
1003
1004         * jcf-write.c (push_long_const): lo, hi: New variables.
1005         Use rshift_double to extract the high part of a 64-bit long.
1006         Use WORD_TO_INT to extract the low part.
1007
1008         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
1009         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
1010         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
1011
1012 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1013
1014         * typeck.c (incomplete_type_error): Remove.
1015
1016 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1017
1018         * class.c (make_class_data): Set DECL_ALIGN on static class data,
1019         for hash synchronization.
1020         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
1021         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
1022         class_type_node.
1023
1024 2002-04-16  Mark Wielaard  <mark@klomp.org>
1025
1026         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
1027         negative zero.
1028
1029 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1030
1031         Fix for PR java/6294:
1032         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
1033         interfaces.
1034
1035 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1036
1037         Fix for PR java/6085:
1038         * parse.y (patch_method_invocation): Always use build_access_to_thisn
1039         to get enclosing "this" argument for inner-class constructor
1040         invocation. Pass correct arguments to build_access_to_thisn.
1041
1042 2002-04-10  Andreas Jaeger  <aj@suse.de>
1043
1044         * gcj.texi (Input Options): Fix extdirs patch.
1045
1046 2002-04-10  Anthony Green  <green@redhat.com>
1047
1048         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
1049
1050 2002-04-09  Anthony Green  <green@redhat.com>
1051
1052         * gcj.texi (Input Options): Add --extdirs documentation.
1053         * jcf-dump.c (OPT_extdirs): New macro.
1054         (options): Add extdirs option.
1055         (help): Describe --extdirs.
1056         (main): Handle OPT_extdirs.
1057         * gjavah.c (OPT_extdirs): New macro.
1058         (options): Add extdirs option.
1059         (help): Describe --extdirs.
1060         (main): Handle OPT_extdirs.
1061         * jcf-path.c (jcf_path_init): Add extdirs support.
1062         (jcf_path_extdirs_arg): New function.
1063         (extensions): New variable to hold extensions path entries.
1064         * jvspec.c: Remove -fextdirs= when compiling main().
1065         * lang.c (java_decode_option): Handle -fextdirs=.
1066         * jcf.h (jcf_path_extdirs_arg): Declare new function.
1067         * Make-lang.in: Compile jcf-path with version info for use in
1068         identifying the appropriate libgcj.jar.
1069
1070 2002-04-08  Tom Tromey  <tromey@redhat.com>
1071
1072         For PR libgcj/5303:
1073         * .cvsignore: Added rmic.1 and rmiregistry.1.
1074         * gcj.texi (Top): Link to new nodes.
1075         (Invoking rmic): New node.
1076         (Invoking rmiregistry): Likewise.
1077         * Make-lang.in (java.generated-manpages): Added rmic.1 and
1078         rmiregistry.1.
1079         (java.maintainer-clean): Likewise.
1080         ($(srcdir)/java/rmic.1): New target.
1081         ($(srcdir)/java/rmiregistry.1): Likewise.
1082         (java.install-man): Handle rmic.1 and rmiregistry.1.
1083
1084 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1085
1086         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
1087         Add note about handling uncaught exceptions. Add an exception handler
1088         to example.
1089
1090 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1091
1092         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
1093         after using it to patch CALL_EXPR.
1094
1095 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1096
1097         * gcj.texi (Invocation): Document CNI invocation API.
1098
1099 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
1100
1101         * expr.c (truthvalue_conversion): Rename.  Update.
1102         (expand_compare): Update.
1103         * java-tree.h (java_truthvalue_conversion): New.
1104         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1105
1106 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1107
1108         * java-tree.h (java_mark_addressable): New.
1109         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1110         * typeck.c (mark_addressable): Rename, update.
1111
1112 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1113
1114         * expr.c (build_java_binop): Update.
1115         * java-tree.h (java_signed_type, java_unsigned_type,
1116         java_signed_or_unsigned_type): Update.
1117         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1118         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1119         * parse.y (patch_binop): Update.
1120         * typeck.c (signed_or_unsigned_type, unsigned_type,
1121         signed_type): Update.
1122
1123 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1124
1125         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1126         (java_dummy_print): Remove.
1127         (lang_print_error): Rename.  Exit early if inhibiting output.
1128         (inhibit_error_printing_function): New.
1129         (java_init): Don't set hook.
1130         (lang_init_source): Use new boolean.
1131
1132 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
1133
1134         * parse.y (do_resolve_class): Fix infinite recursion.
1135
1136 2002-03-29  Tom Tromey  <tromey@redhat.com>
1137
1138         * parse.y (check_inner_circular_reference): Ignore incomplete
1139         types.
1140
1141 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1142
1143         * Make-lang.in (builtins.o): Update.
1144         * boehm.c (get_boehm_type_descriptor): Update.
1145         * builtins.c: Include langhooks.h.
1146         * decl.c (java_init_decl_processing): Update.
1147         * java-tree.h (java_type_for_mode, java_type_for_size): New.
1148         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
1149         Redefine.
1150         * typeck.c (type_for_mode, type_for_size): Update.
1151
1152 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
1153
1154         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
1155
1156 2002-03-28  Tom Tromey  <tromey@redhat.com>
1157
1158         * except.c (expand_end_java_handler): If the handler type is NULL,
1159         use java.lang.Throwable.  Fixes PR java/5986.
1160
1161 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
1162
1163         Fix for PR java/4715:
1164         * jcf-parse.c (parse_source_file_3): New function.
1165         (read_class): Call it.
1166         (java_parse_file): Likewise.
1167
1168 Thu Mar 28 13:22:22 CET 2002  Jan Hubicka  <jh@suse.cz>
1169
1170         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
1171
1172 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1173
1174         * parse.y (resolve_package): Initialize "decl".
1175         (lookup_package_type): Remove unused function.
1176
1177 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1178
1179         Fix for PR java/5993:
1180         * parse.y (resolve_package): Return the decl if resolution was
1181         successful. Don't special case "java.lang" and "java.lang.reflect"
1182         packages. Set type_name to the merged identifier.
1183         (resolved_qualified_expression_name): Print error using "name" if
1184         resolve_package returns NULL_TREE.
1185
1186 2002-03-27  Tom Tromey  <tromey@redhat.com>
1187
1188         * expr.c (expand_invoke): Don't generate null pointer check if
1189         we're calling <init>.
1190
1191 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1192
1193         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
1194         fix prototype.
1195         * java-tree.h (java_lang_expand_expr): Similarly.
1196         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1197         (java_init): Don't set hook.
1198
1199 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1200
1201         Fix for PR java/5850:
1202         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
1203         context if field was not found in the current scope.
1204         * expr.c (lookup_field): Don't look in enclosing contexts.
1205
1206 2002-03-26  Tom Tromey  <tromey@redhat.com>
1207
1208         Fix for PR java/5942:
1209         * parse.y (init_src_parse): Added sanity check.
1210         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
1211         elements, not 11.
1212
1213 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1214
1215         * decl.c (lang_mark_tree): Rename java_mark_tree.
1216         * java-tree.h (java_mark_tree): New.
1217         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1218
1219 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
1220
1221         * lex.c: Change java_perform_atof to take normal parameters
1222         instead of a pointer to a parameter block.  Call it directly
1223         from java_lex.
1224
1225 2002-03-22  Mark Wielaard  <mark@klomp.org>
1226
1227         Fix for PR java/5368:
1228         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
1229         when printing error message.
1230
1231 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1232
1233         * decl.c (maybe_build_cleanup): Remove.
1234
1235 2002-03-22  Tom Tromey  <tromey@redhat.com>
1236
1237         Andrew Haley  <aph@cambridge.redhat.com>
1238
1239         * expr.c (build_field_ref): Don't build a check if the field is a
1240         member of `this'.
1241
1242 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
1243
1244         Fix for PR java/6026:
1245         * lex.c (java_lex): Fix parsing of consecutive floats.
1246
1247 2002-03-21  Tom Tromey  <tromey@redhat.com>
1248
1249         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
1250         class.
1251
1252 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
1253
1254         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1255         insert_block, getdecls, kept_level_p, global_bindings_p): New.
1256
1257 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1258
1259         * gcj.texi: @code{gcj} becomes @command{gcj}.
1260         @code{gcc} becomes @command{gcc}.
1261         GcjRaw changed to gnu.gcc.RawData.
1262
1263 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1264
1265         * decl.c (start_java_method): Use new hook.
1266         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1267         (java_init): Remove old hook.
1268
1269 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
1270
1271         * builtins.c (define_builtin): Do nothing if `type' is null.
1272         Fixes PR java/5876.
1273
1274 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1275
1276         * parse.y (parser_check_super_interface): Fix error message
1277         grammar/order.
1278
1279 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1280
1281         * jcf-parse.c (get_constant): Delete unused variables.
1282
1283 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
1284
1285         * java-tree.h (java_parse_file): New.
1286         * jcf-parse.c (yyparse): Rename java_parse_file.
1287         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
1288
1289 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1290
1291         * parse.y (craft_constructor): Return the constructor decl.
1292         (java_expand_classes): Update comments.
1293         (lookup_method_invoke): Call fix_constructors immediately for
1294         anonymous class. Fixes PR java/5935.
1295
1296 2002-03-15  Anthony Green  <green@redhat.com>
1297
1298         * jcf-parse.c (yyparse): Don't emit class registration
1299         constructor when compiling resource files.
1300
1301 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1302
1303         * lang.c (java_tree_code_type, java_tree_code_length,
1304         tree_code_name): Delete.
1305         (tree_code_type, tree_code_length, tree_code_name): Define.
1306         (java_init): Don't try to copy into the various tree_code
1307         arrays.
1308
1309 2002-03-12  Tom Tromey  <tromey@redhat.com>
1310
1311         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
1312         UTF-8, not UCS-2.  Fixes PR java/5923.
1313
1314         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
1315         a call_expr wrapped in a convert.  Fixes PR java/5848.
1316
1317 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1318
1319         * jcf-write.c (write_classfile): Improve error strings.
1320
1321 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
1322
1323         * lex.c: Adjust comments to GNU standards.
1324
1325 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
1326
1327         Fix for PR java/5902:
1328         * lex.c (java_lex): Fix parsing of literals.
1329
1330 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1331
1332         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
1333         to prevent it getting evaluated twice in the store checking case.
1334         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
1335         examining OBJECT.
1336
1337 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1338
1339         * decl.c (java_init_decl_processing): Make sure class_type_node
1340         alignment is not less than 64 bits if hash synchronization is enabled.
1341
1342 2002-03-08  Per Bothner  <per@bothner.com>
1343
1344         * parse.y (java_complete_lhs):  Check if patch_assignment
1345         returned an error-mark.
1346
1347         * parse.y (try_builtin_assignconv):  Don't special-case zero.
1348
1349 2002-03-08  Per Bothner  <per@bothner.com>
1350
1351         Fix for PR java/5812.
1352         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
1353         here instead of in JSR macro.  Likewise with load_type_state call.
1354         Do the latter on if the return_pc has been verified (the jsr returns).
1355         (JSR):  Now just call build_java_jsr.
1356
1357 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
1358
1359         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
1360         (java.install-common): Link native driver to
1361         JAVA_TARGET_INSTALL_NAME.
1362
1363 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
1364
1365         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
1366         * builtins.c(sin_builtin): Likewise
1367         * builtins.c(sqrt_builtin): Likewise
1368
1369 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
1370
1371         * java/expr.c, java/jcf-parse.c, java/lex.c:
1372         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
1373         REAL_ARITHMETIC blocks unconditional.  Delete some further
1374         #ifdef blocks predicated on REAL_ARITHMETIC.
1375
1376 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1377
1378         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
1379         explicit sizeof/sizeof.
1380         * decl.c (java_init_decl_processing): Likewise.
1381         * jcf-parse.c (init_jcf_parse): Likewise.
1382         * parse.y (init_src_parse): Likewise.
1383
1384 2002-03-02  Per Bothner  <per@bothner.com>
1385
1386         Make --CLASSPATH by a synonym for --classpath and -classpath.
1387         Implement --bootclasspath.
1388         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
1389         (classpath_l):  Remove.
1390         (jcf_path_CLASSPATH_arg):  Remove.
1391         (jcf_path_bootclasspath_arg):  New function.
1392         (jcf_path_seal):  Simplify accordingly.
1393
1394         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
1395         (jcf_path_CLASSPATH):  Remove declaration.
1396         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
1397         (lang_specific_driver):  Translate -bootclasspath.
1398         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
1399         * lang.c (decode_lang_options):  Do jcf_path_init first.
1400         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
1401         * gjavah.c:  Also handle --bootclasspath.
1402         Handle --CLASSPATH as a synonum for --classpath.
1403         * jcf-dump.c: Likewise.
1404
1405         "." is not part of system path, but is the default for --classpath.
1406         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
1407         (jcf_path_seal):  Add "." if no CLASSPATH specified.
1408
1409         * gcj.texi:  Document changes.
1410
1411 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1412
1413         * expr.c (build_java_arraystore_check): Fix formatting.
1414
1415 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
1416
1417         Fix for PR java/5758, java/5632:
1418         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
1419         inner-class separator too.
1420         * parse.y (do_resolve_class): New local `decl_result.'
1421         Progressively build a name for what can have been loaded.
1422
1423 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1424
1425         * expr.c (java_array_data_offset): Removed function.
1426         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
1427         (build_java_array_length_access): Obtain "length" value using a
1428         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
1429         (build_java_arrayaccess): Correct comment. Access "data" using a
1430         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
1431         (build_java_arraystore_check): New function.
1432         (expand_java_arraystore): Use build_java_arraystore_check.
1433         * parse.y (patch_assignment): Simplify code to insert a store check
1434         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
1435         * check-init.c (check_init): Update to reflect that an array length
1436         access is now a COMPONENT_REF.
1437         * gcj.texi (Code Generation): Improve documentation of
1438         -fno-bounds-check. Add documentation for -fno-store-check.
1439         * java-tree.h (flag_store_check): Declare.
1440         (build_java_arraystore_check): Declare.
1441         * lang.c (flag_store_check): Initialize to 1.
1442         (lang_f_options): Add store-check option.
1443         * jvspec.c: Don't pass store-check option to jvgenmain.
1444         * lang-options.h: Add help string for -fno-store-check.
1445
1446 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
1447
1448         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
1449         * java-tree.h (java_dup_lang_specific_decl): New.
1450         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
1451
1452 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
1453
1454         * builtins.c, decl.c: Delete traditional-mode-related code
1455         copied from the C front end but not used, or used only to
1456         permit the compiler to link.
1457
1458 2002-02-22  Tom Tromey  <tromey@redhat.com>
1459
1460         Fix for PR java/2369:
1461         * jvspec.c (verify_class_name): New function.
1462         (lang_specific_driver): Call it.
1463         (JAVA_START_CHAR_P): New macro.
1464         (JAVA_PART_CHAR_P): Likewise.
1465
1466 2002-02-22  Per Bothner  <per@bothner.com>
1467
1468         * class.c:  Change vtable to be more compatible with g++ v3 abi.
1469         (get_dispatch_table):  Prepend offset-to-top (always 0) and
1470         type_info pointer (currently unimplemented hence NULL) to vtable.
1471         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
1472         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
1473         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
1474         (build_dtable_decl):  Add declarations for new fields.
1475
1476 2002-02-20  Per Bothner  <per@bothner.com>
1477
1478         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
1479         to finit$ (otherwise generate_bytecode_insns drops it). However, we
1480         don't need to set it on the COMPOUND_EXPR - the caller does that.
1481
1482 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1483
1484         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
1485         `--CLASSPATH' becomes `--classpath.'
1486         * gjavah.c: Likewise.
1487         * jcf-dump.c: Likewise.
1488         * lang-options.h: Likewise.
1489         * lang.c: Likewise.
1490         * jcf-path.c: Updated comment.
1491         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
1492         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
1493         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
1494         (jcf_path_CLASSPATH_arg): Ditto.
1495         (classpath_u): Updated leading comment.
1496
1497 2002-02-20  Per Bothner  <per@bothner.com>
1498
1499         * builtins.c (check_for_builtin):  New function.
1500         (build_call_or_builtin):  Remove.
1501         * java-tree.h:  Update accordingly.
1502         * expr.c (expand_invoke):  Use build + check_for_builtin instead
1503         of build_call_or_builtin.
1504         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
1505         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
1506         flag (which had caused jcf-write to incorrectly emit invokevirtual).
1507
1508 2002-02-17  Tom Tromey  <tromey@redhat.com>
1509
1510         * java-tree.h (TYPE_STRICTFP): New macro.
1511         (struct lang_type) [strictfp]: New field.
1512         (CLASS_STRICTFP): New macro.
1513         (METHOD_STRICTFP): New macro.
1514         (struct lang_decl) [strictfp]: New field.
1515         * parse.y (method_header): Disallow strictfp constructor or
1516         abstract method.
1517         (STRICT_TK): Move before MODIFIER_TK.
1518         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
1519         (METHOD_MODIFIERS): Likewise.
1520         (INTERFACE_MODIFIERS): Likewise.
1521         * jcf-write.c (get_access_flags): Likewise.
1522         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
1523         (add_method_1): Likewise.
1524         (get_access_flags_from_decl): Likewise.
1525         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
1526         recognize strictfp flag.
1527         * jcf.h (ACC_STRICT): New define.
1528
1529 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
1530
1531         * class.c(build_utf8_ref): Move declaration of decl_size
1532
1533 2002-02-07  Tom Tromey  <tromey@redhat.com>
1534
1535         * gcj.texi (Input Options): --CLASSPATH does not suppress system
1536         path.
1537
1538 2002-02-04  Anthony Green  <green@redhat.com>
1539
1540         * class.c (build_utf8_ref): Put UTF-8 constants into merged
1541         sections if available.
1542
1543 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1544
1545         * parse.y (java_expand_classes): Fix typo in static field loop.
1546
1547 2002-02-02  Richard Henderson  <rth@redhat.com>
1548
1549         * class.c (add_field): Mark static fields external.
1550         (build_class_ref): Remove redundant set.
1551         * parse.y (java_expand_classes): Mark static fields of classes
1552         to be compiled as local.
1553         * jcf-parse.c (parse_class_file): Likewise.
1554
1555 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1556
1557         * gcj.texi (About CNI): New node.
1558
1559 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1560
1561         PR java/5080
1562         * jcf-parse.c : Check for HAVE_LOCALE_H before using
1563         setlocale() with LC_CTYPE as a parameter.
1564         * jv-scan.c: Same.
1565
1566 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
1567
1568         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
1569         Follow GNU Coding Standards for --version.
1570
1571 2002-01-28  Tom Tromey  <tromey@redhat.com>
1572
1573         * expr.c (build_jni_stub): Ensure storage for `meth' is
1574         generated.
1575         * parse.y (java_complete_expand_methods): Set
1576         current_function_decl before building JNI stub.
1577
1578 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
1579
1580         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
1581         BUILT_IN_SQRTF.
1582
1583 2002-01-22  Tom Tromey  <tromey@redhat.com>
1584
1585         * decl.c (java_init_decl_processing): Use add_predefined_file.
1586         Predefine RawData.java.
1587         (predef_filenames): Removed.
1588         (java_init_decl_processing): Don't register predef_filenames.
1589         * jcf-parse.c (add_predefined_file): New function.
1590         (predefined_filename_p): Rewrote.
1591         (predefined_filename_p): No longer static.
1592         * decl.c (java_init_decl_processing): Call initialize_builtins.
1593         * Make-lang.in (JAVA_OBJS): Added builtins.o.
1594         (java/builtins.o): New target.
1595         * builtins.c: New file.
1596         * parse.y (patch_invoke): Use build_call_or_builtin.
1597         * java-tree.h (build_call_or_builtin): Declare.
1598         (initialize_builtins): Declare.
1599         (java_set_exception_lang_code): Removed unused declaration.
1600         (PREDEF_FILENAMES_SIZE): Removed.
1601         (java_tree_index): Added JTI_PREDEF_FILENAMES.
1602         (predef_filenames): New define.
1603         (add_predefined_file): Declare.
1604         (predefined_filename_p): Declare.
1605         * expr.c (expand_invoke): Use build_call_or_builtin.
1606
1607 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1608
1609         * parse.y (patch_switch_statement): Fix format specifier.
1610
1611 2002-01-16  Tom Tromey  <tromey@redhat.com>
1612
1613         More for PR java/5365:
1614         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
1615         default.
1616         (process_file): Generate include for
1617         java.lang.UnsupportedOperationExceptions.
1618
1619 2002-01-15  Andreas Jaeger  <aj@suse.de>
1620
1621         * .cvsignore: Add man pages.
1622
1623 2002-01-15  Tom Tromey  <tromey@redhat.com>
1624
1625         Fix for PR java/5365:
1626         * gjavah.c (process_file): Turn class name into a file name.
1627
1628 2002-01-14  Matthias Klose  <doko@debian.org>
1629
1630         * gcj.texi: Fix whitespace and formatting errors in the
1631         synopsis of the man pages. Update copyright.
1632
1633 2002-01-14  Tom Tromey  <tromey@redhat.com>
1634
1635         For PR libgcj/5303:
1636         * Make-lang.in (java.install-man): Handle jv-convert man page.
1637         (java.generated-manpages): Added jv-convert.1.
1638         (java.uninstall): Remove jv-convert.1.
1639         (java.maintainer-clean): Likewise.
1640         ($(srcdir)/java/jv-convert.1): New target.
1641         * gcj.texi (Top): Link to jv-convert node.
1642         (Individual utilities): Likewise.
1643         (Invoking jv-convert): New node.
1644
1645 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
1646             Martin Kahlert  <martin.kahlert@infineon.com>
1647
1648         * jcf-parse.c (get_constant): Don't swap lo/hi for big
1649         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
1650
1651 2002-01-03  Graham Stott  <grahams@redhat.com>
1652
1653         * class.c (compile_resource_file): Update copyright date.
1654         Constify filename parameter.
1655         (java-tree.h): Update copyright date.
1656         (compile_resource_file): Constify filename parameter.
1657
1658 2002-01-03  Graham Stott  <grahams@redhat.com>
1659
1660         * gcc/jcf-parse.c: Update copyright date.
1661         (yyparse): Constify resource_filename.
1662
1663 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1664
1665         * parse.y (src_parse_roots): Don't needlessly zero init.
1666
1667 2001-12-31  Tom Tromey  <tromey@redhat.com>
1668
1669         * parse.y (dump_java_tree): New function.
1670         (source_end_java_method): Call it.
1671         (end_class_declaration): Likewise.
1672         * lang.c (java_decode_option): Call dump_switch_p.
1673
1674 2001-12-28  Tom Tromey  <tromey@redhat.com>
1675
1676         * gen-table.pl: Don't process characters after \uffff.  Added
1677         comment pointing to input file.
1678
1679 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1680
1681         * gen-table.pl: Const-ify output.  Document the location of a
1682         suitable unicode input file.
1683
1684         * chartables.h: Regenerate.
1685
1686 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1687
1688         * chartables.h: Const-ify.
1689         * gjavah.c (options): Likewise.
1690         * jcf-dump.c (options): Likewise.
1691         * jv-scan.c (options): Likewise.
1692         * lex.c (java_start_char_p, java_part_char_p): Likewise.
1693         * parse.y (binop_lookup): Likewise.
1694
1695 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1696
1697         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
1698         the static arrays that are output.
1699         * jvspec.c (jvgenmain_spec): Make static.
1700         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
1701         * keyword.h: Regenerate.
1702         * lang.c (string_option, process_option_with_no, lang_f_options,
1703         lang_W_options): Const-ify.
1704         * lex.c (java_lex): Likewise.
1705
1706 2001-12-21  Richard Henderson  <rth@redhat.com>
1707
1708         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
1709         (get_boehm_type_descriptor): ... here.  Arrange for the
1710         TREE_TYPE to get set properly.
1711
1712 2001-12-21  Richard Henderson  <rth@redhat.com>
1713
1714         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
1715         only if the target requires collect2.
1716
1717         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
1718
1719 2001-12-20  Tom Tromey  <tromey@redhat.com>
1720
1721         For PR java/4509:
1722         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
1723         CAN_COMPLETE_NORMALLY for the node.
1724         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
1725         generate code for second branch if first branch can't complete
1726         normally.
1727         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
1728         the loop head if the loop body can't complete normally.
1729
1730 2001-12-20  Tom Tromey  <tromey@redhat.com>
1731
1732         For PR java/4766:
1733         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
1734         case where `finally' clause can't complete normally.
1735
1736 2001-12-20  Tom Tromey  <tromey@redhat.com>
1737
1738         Fixes PR java/5057:
1739         * parse.y (analyze_clinit_body): Added this_class parameter.
1740         Check for more cases where we must keep <clinit>.
1741         (maybe_yank_clinit): Cleaned up flow control.
1742
1743 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1744
1745         * decl.c (java_init_decl_processing): Don't initialize
1746         finit_leg_identifier_node.
1747         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
1748         (finit_leg_identifier_node): Remove.
1749         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
1750
1751 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1752
1753         * mangle.c (mangle_member_name): Don't special-case for
1754         NO_DOLLAR_IN_LABEL.
1755         * mangle_name.c (unicode_mangling_length): Likewise.
1756         (append_unicode_mangled_name): Likewise.
1757         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
1758         code.
1759
1760 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1761
1762         * expr.c (build_java_array_length_access): Don't force null pointer
1763         check unless flag_check_references is set.
1764
1765 2001-12-20  Tom Tromey  <tromey@redhat.com>
1766
1767         Fix for PR java/3417:
1768         * parse.y (patch_assignment): Added special processing for
1769         `return'.
1770         (patch_return): Don't convert booleans to integers, and don't
1771         special-case `null'.
1772
1773 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1774
1775         * config-lang.in (diff_excludes): Remove.
1776
1777 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1778
1779         * gcj.texi: Update link to GCC manual.
1780
1781 2001-12-17  Tom Tromey  <tromey@redhat.com>
1782
1783         * parse.y (link_nested_class_to_enclosing): Removed useless
1784         statement.
1785
1786 2001-12-16  Tom Tromey  <tromey@redhat.com>
1787
1788         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
1789         Fixes PR java/5088.
1790
1791 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1792
1793         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
1794         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
1795         spelling errors.
1796
1797 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1798
1799         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
1800
1801 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1802
1803         * decl.c (java_init_decl_processing): Build otable_type correctly.
1804         otable_decl is an otable_type.
1805
1806 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1807
1808         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
1809         otable_type, otable_ptr_type, method_symbol_type,
1810         method_symbols_array_type, method_symbols_array_ptr_type): New
1811         field/global tree definitions.
1812         (flag_indirect_dispatch): New flag.
1813         * decl.c (java_init_decl_processing): Initialize new otable and
1814         otable_syms type nodes and decls. Add new field "index" to
1815         method_type_node.
1816         * class.c (build_method_symbols_entry): New function.
1817         (make_method_value): Set "index" to to method's vtable index for
1818         virtual methods when indirect-dispatch is not used.
1819         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
1820         and set vtable_method_count to -1. Set otable and otable_syms field
1821         if indirect-dispatch is used and there was something to put in them.
1822         (build_method_symbols_entry): New function.
1823         (emit_offset_symbol_table): New function.
1824         * expr.c (get_offset_table_index): New function.
1825         (build_invokevirtual): Build array reference to otable at the index
1826         returned by get_offset_table_index, and use the result as the vtable
1827         offset.
1828         (build_invokeinterface): Similar.
1829         * jcf-parse.c (yyparse): If indirect-dispatch, call
1830         emit_offset_symbol_table at the end of compilation, after all classes
1831         have been generated.
1832         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
1833         * lang.c (flag_indirect_dispatch): Define.
1834         (lang_f_options): Add indirect-dispatch flag.
1835
1836 2001-12-14  Matthias Klose  <doko@debian.org>
1837
1838         * gcj.texi: Markup for man page generation. Document missing
1839         options printed by <tool> --help.
1840         Terminate description of gij's -ms option with a dot.
1841         * Make-lang.in ($(srcdir)/java/*.1): New targets.
1842         (java.generated-manpages java.install-man, java.uninstall,
1843         java-maintainer-clean) Updated.
1844
1845 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
1846
1847         * class.c (get_dispatch_table): Fix java vtable layout
1848         for TARGET_VTABLE_USES_DESCRIPTORS.
1849         * decl.c (java_init_decl_processing): Initialize
1850         alloc_no_finalizer_node, finalize_identifier_node.
1851         * expr.c (class_has_finalize_method): New function.
1852         (expand_java_NEW): Generate calls for finalizer-free allocation.
1853         (build_invokevirtual): Fix java vtable layout for
1854         TARGET_VTABLE_USES_DESCRIPTORS.
1855         * java-tree.h (enum java_tree_index): New entries:
1856         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
1857         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
1858         (class_has_finalize_method): declare.
1859         (HAS_FINALIZER_P): New macro.
1860         * parse.y (patch_invoke): Generate calls for finalizer-free
1861         allocation.
1862
1863 2001-12-12  Matthias Klose  <doko@debian.org>
1864
1865         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
1866         whitespace at end of line.
1867
1868 2001-12-11  Tom Tromey  <tromey@redhat.com>
1869
1870         * lex.c (java_init_lex): Define wfl_to_string as
1871         gnu.gcj.runtime.StringBuffer unless generating bytecode.
1872
1873 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
1874
1875         * class.c (make_method_value): Use null_pointer_node to
1876         represent empty exception table.
1877
1878 2001-12-10  Tom Tromey  <tromey@redhat.com>
1879
1880         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
1881
1882 Mon Dec 10 06:09:57 2001  Douglas B. Rupp  <rupp@gnat.com>
1883
1884         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
1885
1886 2001-12-09  Per Bothner  <per@bothner.com>
1887
1888         * check-init.c (current_switch_has_default):  New static field.
1889         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
1890         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
1891         DEFAULT_EXPR seen, simulate a default alternative that copies state.
1892
1893 2001-12-09  Tom Tromey  <tromey@redhat.com>
1894
1895         * check-init.c (check_init): Don't allow pre- or post- increment
1896         or decrement of final variable.
1897         (final_assign_error): Minor error message rewording.
1898
1899 2001-12-08  Tom Tromey  <tromey@redhat.com>
1900
1901         * java-tree.h: Fixed typo.
1902
1903         * gjavah.c (decompile_method): Don't decompile to `return this'
1904         for static methods.
1905
1906         * gjavah.c (cxx_keywords): Re-sorted.
1907         * lex.c (cxx_keywords): Re-sorted.
1908
1909         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
1910         else.
1911
1912         * gjavah.c (print_namelet): Clear subnamelets.
1913         (HANDLE_METHOD): Set `method_printed' earlier.
1914
1915 2001-12-07  Tom Tromey  <tromey@redhat.com>
1916
1917         * lang.c (lang_f_options): Added
1918         optimize-static-class-initialization.
1919         (java_decode_option): Removed special case.
1920
1921 2001-12-07  Per Bothner  <per@bothner.com>
1922
1923         * check-init.c (check_init):  Fix typo freeing memory twice.
1924
1925 2001-12-05  Per Bothner  <per@bothner.com>
1926
1927         Restore support for static class initialization optimization.
1928         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
1929         * check-init.c (check_int):  At end of BLOCK handle initialization
1930         blocks, which used to be done in java_complete_expand_method but did
1931         not handle the case where check_for_initialization might allocate
1932         more than a word of bits.
1933         * decl.c (lang_make_tree):  The smic field is now a tree.
1934         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
1935         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
1936
1937         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
1938
1939         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
1940         Change from a hash table to a list.
1941         (struct_lang_decl):  Change field 'smic' to match.
1942         * class.c (add_method_1):  Initialize
1943         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
1944         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
1945         (java_expand_method_bodies): -here, since 'smic' is now a list.
1946         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
1947
1948         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
1949
1950         * class.c (java_hash_compare_tree_node):  Fix casts.
1951
1952 2001-12-04  Per Bothner  <per@bothner.com>
1953
1954         * check-init.c:   Handle definite unassignment to finals in addition
1955         to definite assignment.
1956         (loop_current_locals):  New field.
1957         (num_current_locals, int start_current_locals, num_current_words):
1958         Make static.
1959         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
1960         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
1961         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
1962         (get_variable_decl, check_final_reassigned):  New functions.
1963         (check_init, check_bool_init):  Modify as needed for checking finals.
1964         (check_for_initialization):  Take extra parameter and return void.
1965         Do extra start-up logic to check final fields for assignment.
1966         * parse.y (check_static_final_variable_assignment_flag,
1967         reset_static_final_variable_assignment_flag, check_final_assignment,
1968         check_final_variable_local_assignment_flag,
1969         reset_final_variable_indirect_assignment_flag,
1970         reset_final_variable_global_assignment_flag):  Remove functions.
1971         (java_complete_expand_methods, outer_field_access_fix,
1972         patch_assignment): Remove no-longer used logic.
1973         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
1974         * parse.y (register_fields, java_complete_tree):  Update accordingly.
1975
1976         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
1977         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
1978         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
1979
1980         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
1981
1982         * java-tree.h (DECL FINAL):  New bit-field.
1983         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
1984         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
1985         (DECL_INIT_CALLS_THIS):  New macro.
1986         (struct lang_decl):  New bit-field init_calls_this.
1987         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
1988         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
1989         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
1990         use it for both local variables and final fields.
1991         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
1992         and local_final.
1993         (struct lang_type):  Remove hfv bit-field.
1994         (check_for_initialization):  Change to return void.
1995
1996         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
1997         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
1998         * check-init.c (final_assign_error):  New helper function.
1999         (check_final_reassigned, check_init):  Use it.
2000         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
2001
2002         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
2003         bit-fields to unsigned.
2004
2005 2001-12-03  Per Bothner  <per@bothner.com>
2006
2007         * parse.y (patch_binop):  Minor constant folding.
2008
2009         * parse.y (build_current_thisn):  Shorter 'buffer'.
2010
2011 2001-12-03  Per Bothner  <per@bothner.com>
2012
2013         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
2014         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
2015         * jcf-write.c (generate_bytecode_insns):  Remove support for
2016         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
2017         * check-init.c (check_init):  Likewise.
2018
2019 2001-12-03  Per Bothner  <per@bothner.com>
2020
2021         * verify.c (subroutine_nesting):  New function.
2022         (verify_jvm_instructions):  Use it to fix logic for checking that
2023         we're done with the current subroutine.
2024
2025         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
2026         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
2027
2028 2001-12-03  Per Bothner  <per@bothner.com>
2029
2030         * jcf.h:  Fix obvious typo in comment.
2031         * typeck.c (build_null_signature):  Add comment.
2032
2033 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
2034
2035         * expr.c: Remove leading capital from diagnostic messages, as
2036         per GNU coding standards.
2037         * jcf-io.c: Similarly.
2038         * jcf-parse.c: Similarly.
2039         * jv-scan.c: Similarly.
2040         * jvspec.c: Similarly.
2041         * mangle.c: Similarly.
2042
2043 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
2044             Alexandre Petit-Bianco  <apbianco@redhat.com>
2045
2046         * expr.c (build_java_arrayaccess): Call save_expr on array for
2047         correct evaluation order, modified comment, fixed indentation.
2048         * parse.y: (patch_assignment): Correctly extract the array base
2049         from the tree generate by build_java_arrayaccess, added comments.
2050         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
2051         Fixes PR java/3096, PR java/3803, PR java/3965.
2052
2053 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2054
2055         * expr.c (expand_byte_code): Remove trailing periods from messages.
2056         * jcf-parse.c (load_class, jcf_parse): Similarly.
2057         * jcf-write.c (generate_classfile): Similarly.
2058         * lex.c (java_lex): Similarly.
2059
2060 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2061
2062         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
2063
2064 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2065
2066         * Make-lang.in (java.generated-manpages): New dummy target.
2067
2068 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2069
2070         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2071         ASM_FINAL_SPEC.
2072         (lang_specific_pre_link): Use set_input to set input_filename.
2073         Append `main' here.
2074         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2075         (main): Fix definition.
2076         Strip `main' from classname.
2077         Fixes PR java/227.
2078
2079 2001-11-18  Roger Sayle <roger@eyesopen.com>
2080
2081         * parse.h (java_expand_switch): Remove old prototype.
2082
2083 2001-11-18  Tom Tromey  <tromey@redhat.com>
2084
2085         Fix for PR java/1401:
2086         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
2087         arg0 is null.
2088         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
2089         correctly.
2090
2091 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2092
2093         * lang.c (finish_parse): Rename to java_finish.
2094         (LANG_HOOKS_FINISH, java_finish): New.
2095
2096 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2097
2098         * decl.c (init_decl_processing): Rename java_init_decl_processing.
2099         * java-tree.h: New prototype.
2100         * lang.c (java_init): Update prototype.  Combine with old init_parse.
2101
2102 2001-11-13  Tom Tromey  <tromey@redhat.com>
2103
2104         * gjavah.c (method_signature): New global.
2105         (HANDLE_METHOD): Set it.
2106         (decompile_return_statement): New function.
2107         (decompile_method): Use it.
2108         (print_method_info): Removed `synth' argument.
2109
2110 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2111
2112         * java-tree.h (java_set_yydebug): New.
2113         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
2114         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
2115         (print_lang_decl, print_lang_type, print_lang_identifier,
2116         print_lang_statistics, lang_print_xnode): Remove.
2117
2118 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2119
2120         * jcf-parse.c (init_lex): Remove.
2121         * lang.c (language_string, lang_identify): Remove.
2122         (struct lang_hooks): Constify.
2123         (LANG_HOOKS_NAME): Override.
2124         (init_parse): Update.
2125
2126 2001-11-08  Andreas Franck  <afranck@gmx.de>
2127
2128         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
2129         program_transform_name the way suggested by autoconf.
2130         (java.install-common): Also transform auxiliary program names with
2131         program_transform_name.
2132
2133 2001-11-08  Tom Tromey  <tromey@cygnus.com>
2134
2135         * parse.y (trap_overflow_corner_case): New rule.
2136         (unary_expression): Use it.
2137         * lex.c (java_init_lex): Don't set minus_seen.
2138         (yylex): Don't use minus_seen.  Communicate overflow to parser for
2139         it to handle.
2140         (error_if_numeric_overflow): New function.
2141         * parse.h (minus_seen): Removed field.
2142         (JAVA_RADIX10_FLAG): New define.
2143
2144 2001-11-07  Tom Tromey  <tromey@redhat.com>
2145
2146         Patch for PR java/1414:
2147         * parse.y (case_label_list): New global.
2148         (goal): Register case_label_list with GC.
2149         (java_complete_lhs): Save new case on case_label_list.
2150         (patch_switch_statement): Check for duplicate case labels.
2151
2152 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2153
2154         * parse.y (patch_assignment): Removed unused third argument.
2155         (java_complete_lhs): Removed unused third argument to patch_assignment.
2156
2157 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2158
2159         * lang.c: Include langhooks-def.h.
2160         * Make-lang.in: Update.
2161
2162 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2163
2164         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2165
2166 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2167
2168         * mangle.c (find_compression_record_match): Don't match compression
2169         records for package name elements unless they occur at the start of
2170         the name. Fix for PR java/4717.
2171
2172 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2173
2174         * expr.c (expand_java_field_op): Don't special-case references to
2175         java.lang.PRIMTYPE.TYPE.
2176         (build_primtype_type_ref): Removed.
2177         * java-tree.h (build_primtype_type_ref): Remove prototype.
2178         * parse.y (maybe_build_primttype_type_ref): Removed.
2179         (complete_function_arguments): Don't special-case references to
2180         java.lang.PRIMTYPE.TYPE.
2181         (patch_assignment): Likewise.
2182         (array_constructor_check_entry): Likewise.
2183
2184 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
2185
2186         * mangle.c (static tree compression_table): Fixed leading comment.
2187         * parse.h (struct parser_ctxt): Fixed field comment.
2188         * parse.y (check_pkg_class_access): New prototype, fixed leading
2189         comment, new parameter used to emit error only if passed as true.
2190         (parse_check_super): Pass extra argument to check_pkg_class_access.
2191         (do_resolve_class): Likewise.
2192         (process_imports): Likewise.
2193         (read_import_dir): Fixed indentation.
2194         (find_in_imports_on_demand): New local class_type_name. Local
2195         node_to_use deleted. while loop changed into for loop. Report
2196         multiple definition only for accessible classes. Improved error
2197         message.
2198         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
2199         assigned to parameter list, fixed indentation. while loop changed
2200         into for loop, restore TREE_CHAIN on local `tem' before the next
2201         iteration.
2202
2203 Tue Oct 23 14:02:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2204
2205         * lang.c (lang_get_alias_set): Deleted.
2206
2207 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2208
2209         * gjavah.c (jni_print_char): Fix thinko in last change.
2210
2211         * gjavah.c (jni_print_char, decode_signature_piece): Use
2212         safe-ctype macros and/or fold extra calls into fewer ones.
2213         * lex.c (java_read_unicode, java_lex): Likewise.
2214         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
2215         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
2216         * mangle_name.c (append_unicode_mangled_name,
2217         unicode_mangling_length): Likewise.
2218
2219 2001-10-17  Richard Henderson  <rth@redhat.com>
2220
2221         * Make-lang.in (java/lang.o): Depend on langhooks.h.
2222
2223 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
2224
2225         * lang.c (langhooks.h): Included.
2226         (LANG_HOOKS_INIT): Redefined.
2227         (LANG_HOOKS_INIT_OPTIONS): Likewise.
2228         (LANG_HOOKS_DECODE_OPTION): Likewise.
2229         (struct lang_hooks lang_hooks): New initialization.
2230
2231 2001-10-11  Per Bothner  <per@bothner.com>
2232
2233         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
2234         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
2235         The former is simpler, and jcf-write.c handles it better.
2236         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
2237         or WITH_CLEANUP_EXPR.
2238         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
2239         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
2240
2241         * parse.y (patch_if_else_statement):  If the condition is constant,
2242         optimize away the test.
2243
2244 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2245
2246         * parse.y (patch_cast): Call patch_string on the first operand of
2247         the incoming node, update it if necessary. Fixes PR java/4510.
2248
2249 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2250
2251         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
2252         when name qualifier matches a package name.
2253
2254 2001-10-08  Tom Tromey  <tromey@redhat.com>
2255
2256         Fix for PR java/4489:
2257         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
2258         force a new label when computing `body_block'.
2259
2260 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2261
2262         * jcf-io.c (format_uint): Const-ify.
2263         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
2264         * lex.c (java_get_line_col): Likewise.
2265         * parse.y (build_incdec): Likewise.
2266
2267 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
2268
2269         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
2270         a NULL enclosing context if appropriate. Fixes PR java/4466.
2271
2272 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
2273
2274         * parse.y (patch_assignment): Use lvalue's original TYPE when
2275         building the final COMPOUND_EXPR.
2276         (try_reference_assignconv): Fixed leading comment.
2277
2278 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
2279
2280         * parse.y (check_final_variable_indirect_assignment): For
2281         COMPOUND_EXPR, return only if finals were found initialized
2282         properly, if not, keep on checking.
2283         (check_final_variable_global_assignment_flag): New local
2284         error_found, set when appropriate and used to decide whether to
2285         report uninitialized finals. Fixed typo in comment.
2286
2287 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2288
2289         * decl.c (init_decl_processing): Fixed typo in predef_filenames
2290         last three initializations. Fixes PR java/4360.
2291
2292 2001-09-21  Richard Henderson  <rth@redhat.com>
2293
2294         * class.c (get_dispatch_table): Handle function descriptors.
2295         (build_dtable_decl): Likewise.
2296         * expr.c (build_invokevirtual): Likewise.
2297
2298 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
2299
2300         * parse.y (patch_method_invocation): Build class initialization
2301         when static finals are used to qualify method invocation.
2302         Fixes PR java/4366.
2303
2304 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
2305
2306         * parse.h: (WFL_STRIP_BRACKET): Re-written using
2307         build_type_name_from_array_name.
2308         (STRING_STRIP_BRACKETS): New macro.
2309         * parse.y (build_type_name_from_array_name): New function.
2310         (array_creation_expression:): Accumulate []s instead of [s.
2311         (cast_expression:): Accumulate []s instead of [s after cast type
2312         name.
2313         (build_array_from_name): Local string deleted, use
2314         build_type_name_from_array_name.
2315         (build_unresolved_array_type): Accumulate []s instead of [s after
2316         type name.
2317         (register_fields): Fixed comment.
2318         (resolve_class): Local name, base deleted, new locals tname and
2319         array_dims. Use build_type_name_from_array_name. Use array_dims to
2320         build array type.
2321         (purify_type_name): Use STRING_STRIP_BRACKETS.
2322
2323 2001-09-18  Andreas Jaeger  <aj@suse.de>
2324
2325         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
2326         * jv-scan.c: Likewise.
2327
2328 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2329
2330         * parse.y (patch_method_invocation): Inner class creation context
2331         check not enforced within constructors. Fixes PR java/1873.
2332
2333 2001-09-16  Tom Tromey  <tromey@redhat.com>
2334
2335         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
2336         NOTE_PUSH for single-case push.  Fixes PR java/4189.
2337
2338 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2339
2340         * java-tree.h (TYPE_IMPORT_LIST): New macro.
2341         (TYPE_IMPORT_DEMAND_LIST): Likewise.
2342         (struct lang_type): New fields import_list and import_demand_list.
2343         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
2344         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
2345         (do_resolve_class): New local saved_enclosing_type, initialized,
2346         passed as parameter to find_in_imports and find_in_imports_on_demand.
2347         (find_in_imports): Added paramater enclosing_type, use its
2348         TYPE_IMPORT_LIST when applicable.
2349         (find_in_imports_on_demand): Added parameter enclosing_type, use
2350         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
2351         declaration and initialization.
2352         (fold_constant_for_init): Switch/restore current_class to the
2353         appropriate context.
2354
2355 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
2356
2357         * verify.c (verify_jvm_instructions): Fix typo.
2358
2359 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2360
2361         * expr.c (expand_invoke): Const-ification.
2362         * parse.y (patch_method_invocation): Likewise.
2363
2364 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2365
2366         * gjavah.c (cxx_keywords): Const-ification.
2367         * keyword.gperf (java_keyword): Likewise.
2368         * lang.c (java_tree_code_name): Likewise.
2369         * lex.c (cxx_keywords): Likewise.
2370         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
2371
2372 2001-09-11  Richard Henderson  <rth@redhat.com>
2373
2374         * parse.h (ctxp_for_generation): Mark extern.
2375
2376 2001-09-10  Richard Henderson  <rth@redhat.com>
2377
2378         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
2379
2380 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
2381
2382         * typeck.c (java_array_type_length, build_prim_array_type):
2383         Represent empty arrays by NULL index.
2384
2385 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
2386
2387         * java-tree.h (compile_resource_file): Grouped with other prototypes.
2388         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
2389
2390 2001-09-06  Anthony Green  <green@redhat.com>
2391
2392         * class.c (O_BINARY): Define if necessary.
2393         (registerResource_libfunc): Declare.
2394         (init_class_processing): Initilize registerResource_libfunc.
2395         (compile_resource_file): New function.
2396         * java-tree.h (resource_name): Declare.
2397         (compile_resource_file): Declare.
2398         * jcf-parse.c (yyparse): Handle compiling java resource files.
2399         * lang.c (java_decode_option): Handle -fcompile-resource option.
2400         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
2401         resource files.
2402         * gcj.texi (Code Generation): Add documentation for -R flag.
2403
2404 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
2405
2406         * jcf-write.c (generate_classfile): Issue an error in case of
2407         field/initial value mismatch.
2408         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
2409         being initialized and we're generating bytecode.
2410         (java_complete_lhs): In MODIFY_EXPR section: added comments,
2411         set DECL_INITIAL properly when appropriate.
2412         Fixes PR java/4230
2413         Fixes PR java/4204
2414
2415 2001-09-01  Per Bothner  <per@bothner.com>
2416
2417         * parse.y (maybe_yank_clinit):  A field without an initializer is not
2418         relevant.  All initializers except static final and constant require
2419         <clinit>, regardless of flag_emit_class_files.
2420
2421 2001-08-31  Per Bothner  <per@bothner.com>
2422
2423         * class.c (set_constant_value):  When not emiting class files, then a
2424         String ConstantValue is a utf8const_ptr_type.
2425
2426 2001-08-30  Per Bothner  <per@bothner.com>
2427
2428         * jcf-write.c (generate_classfile):  Check that field is primitive
2429         or string before emitting ConstantValue attribute.
2430
2431 2001-08-30  Per Bothner  <per@bothner.com>
2432
2433         * parse.y (resolve_qualified_expression_name):  If creating a
2434         COMPOUND_EXPR, set it's type correctly.
2435
2436 2001-08-30  Per Bothner  <per@bothner.com>
2437
2438         * jcf-io.c (open_class):  Set filename field.
2439
2440         * jcf-parse,c (parse_class_file):  Set current_function_decl
2441         for better error message when Code attribute is missing.
2442
2443         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
2444         better diagnostics, especially for constructors.
2445
2446 2001-08-30  Per Bothner  <per@bothner.com>
2447
2448         * jcf-write.c (generate_classfile):  Don't write ConstantValue
2449         attribute if field is not final, for compatibility with jdk.
2450
2451         * jcf-write.c (generate_classfile):  Convert ConstantValue values
2452         to correct type.  Work-around for front-end bug.
2453         * class.c (set_constant_value):  Error if constant has wrong type.
2454
2455 2001-08-30  Per Bothner  <per@bothner.com>
2456
2457         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
2458         "Double" are printed at verbosity 1.
2459
2460         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
2461
2462         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
2463
2464 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
2465
2466         * parse.y (patch_assignment): Don't verify final re-assignment here.
2467         (java_complete_lhs): Verify assignments to finals calling
2468         patch_assignment. Verify re-assignments to finals before calling
2469         patch_assignment.
2470
2471 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
2472
2473         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
2474         Fixes PR java/1413
2475
2476 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2477
2478         * lex.c (java_lex): new local found_hex_digits. Set and then used
2479         in test to reject invalid hexadecimal numbers.
2480         * parse.y (java_complete_tree): Prevent unwanted cast with
2481         initialized floating point finals.
2482         (patch_binop): Emit a warning when detecting a division by zero,
2483         mark result not constant, don't simplify non integer division.
2484
2485 2001-08-28  Per Bothner  <per@bothner.com>
2486
2487         * jcf-write.c  (generate_bytecode_insns):  For increments and
2488         decrements just recurse to push constant.  Improvement on Mark's patch.
2489
2490 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
2491
2492         * jcf-write.c (generate_bytecode_insns): Generate an integer to
2493         real conversion for increments and decrements of reals.
2494
2495 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2496
2497         * parse.y (resolve_qualified_expression_name): Handle unresolved
2498         qualified expressions, prevent numerical qualifiers, fixed typo.
2499         Fixes PR java/4141
2500
2501 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
2502
2503         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
2504         don't report anything but deprecated class when marked so. Handle
2505         VAR_DECL.
2506         (patch_method_invocation): Check deprecation on methods and types.
2507         (patch_binop): code becomes an enum tree_code, added default: to
2508         switch to handle that. Detect division by zero, try to fold and
2509         return before using a subroutine.
2510
2511 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
2512
2513         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
2514         file smaller than 4 bytes.
2515         * parse.y (check_inner_circular_reference): New function.
2516         (check_circular_reference): Likewise.
2517         (array_initializer:): Accept {,}.
2518         (java_check_circular_reference): Rewritten using
2519         check_circular_reference and check_inner_circular_reference.
2520         (java_complete_expand_method): Unconditionally save and restore
2521         the unpurged exception list.
2522         (build_dot_class_method_invocation): Unmangle signature parameter.
2523
2524 2001-08-21  Tom Tromey  <tromey@redhat.com>
2525
2526         * decl.c (init_decl_processing): Add `throws' field to method
2527         descriptor.
2528         * class.c (make_method_value): Compute `throws' field for method.
2529
2530 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2531
2532         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
2533         circularity is detected.
2534         (ctors_unchecked_throws_clause_p): Fixed leading comment.
2535
2536 2001-08-17  Richard Henderson  <rth@redhat.com>
2537
2538         * class.c (emit_register_classes): Add align parameter to
2539         call to assemble_integer.
2540
2541 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
2542
2543         * jcf-parse.c (load_class): New locals saved and class_loaded. If
2544         loading a class_or_name fails, try considering an innerclass name
2545         and load the enclosing context.
2546         * parse.y (resolve_inner_class): New function.
2547         (find_as_inner_class): Added leading comment.
2548         (register_incomplete_type): Keep the current context as enclosing
2549         context for JDEP_FIELD dependencies.
2550         (do_resolve_class): Locals new_class_decl and super initialized to
2551         NULL. Call resolve_inner_class, explore the enclosing context
2552         superclass if necessary.
2553         Fixes PR java/4007
2554
2555 2001-08-16  Tom Tromey  <tromey@redhat.com>
2556
2557         * jcf-dump.c (main): Updated for change to jcf_path_seal.
2558         * gjavah.c (main): Updated for change to jcf_path_seal.
2559         * lang.c (version_flag): New global.
2560         (java_decode_option): Recognize `-version'.
2561         (java_init): Update for change to jcf_path_seal.
2562         * jcf.h (jcf_path_seal): Added `print' argument.
2563         * jcf-path.c (jcf_path_seal): Added `print' argument.
2564
2565 2001-08-13  Zack Weinberg  <zackw@panix.com>
2566
2567         * Make-lang.in (java/decl.o): Update dependencies.
2568         * decl.c: Include libfuncs.h, don't include toplev.h.
2569
2570 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2571
2572         * decl.c (init_decl_processing): exception_type_node,
2573         class_not_found_type_node, and no_class_def_found_type_node
2574         initialized. predef_filenames augmented accordingly.
2575         instinit_identifier_node initialized.
2576         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
2577         * java-tree.h (enum java_tree_index): New entries
2578         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
2579         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
2580         (exception_type_node): New macro.
2581         (class_not_found_type_node): Likewise.
2582         (no_class_def_found_type_node): Likewise.
2583         (instinit_identifier_node): Likewise.
2584         (PREDEF_FILENAMES_SIZE): Adjusted.
2585         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
2586         (struct lang_type): Fixed typo in bitfield name.
2587         (DECL_INSTINIT_P): New macro.
2588         (ID_INSTINIT_P): Likewise.
2589         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
2590         attribute.
2591         * parse.y (encapsulate_with_try_catch): New function.
2592         (generate_instinit): Likewise.
2593         (build_instinit_invocation): Likewise.
2594         (ctors_unchecked_throws_clause_p): Likewise.
2595         (add_instance_initializer): Deleted.
2596         (build_instance_initializer): Likewise.
2597         (in_instance_initializer): Likewise.
2598         (check_method_redefinition): instinit$ not to be verified.
2599         (java_complete_expand_methods): Generate instinit$, simplified code.
2600         (build_dot_class_method): Eliminated unnecessary locals. Use
2601         encapsulate_with_try_catch, removed unnecessary code.
2602         (fix_constructors): New local iii. Use build_instinit_invocation.
2603         (patch_method_invocation): Added comment.
2604         (maybe_use_access_method): Don't consider instinit$.
2605         (find_applicable_accessible_methods_list): Shorten the search for
2606         instinit$ too.
2607         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
2608         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
2609         (patch_throw_statement): Likewise. Fixed typo.
2610
2611 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
2612
2613         Revert:
2614         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2615         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2616         ASM_FINAL_SPEC.
2617         (lang_specific_pre_link): Use set_input to set input_filename.
2618         Append `main' here.
2619         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2620         (main): Fix definition.
2621         Strip `main' from classname.
2622         Fixes PR java/227.
2623
2624 2001-08-11  Zack Weinberg  <zackw@panix.com>
2625
2626         * lex.h: Don't include setjmp.h.  Don't define
2627         SET_FLOAT_HANDLER or prototype set_float_handler.
2628
2629 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2630
2631         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
2632         `poplevel' in the right order.
2633
2634 2001-08-09  Richard Henderson  <rth@redhat.com>
2635
2636         * Make-lang.in (class.o): Depend on TARGET_H.
2637         * class.c (emit_register_classes): Use target hooks instead of
2638         assemble_constructor and assemble_destructor.
2639
2640 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
2641
2642         * check-init.c (flags.h): Include
2643         (check_init): Don't report uninitialized static class
2644         initialization flags, don't free bit index when doing static class
2645         initialization optimization.
2646         (check_for_initialization): Return type changed to `unsigned int.'
2647         (attach_initialized_static_class): New function.
2648         * class.c (add_method_1): Create the initialized static class
2649         table if necessary.
2650         (finish_class): Always emit deferred inline methods.
2651         * decl.c (emit_init_test_initialization): Moved to expr.c
2652         (complete_start_java_method): Don't traverse
2653         DECL_FUNCTION_INIT_TEST_TABLE.
2654         (lang_mark_tree): Mark hash tables in function decls.
2655         * expr.c (emit_init_test_initialization): Moved from decl.c.
2656         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
2657         initialization flag, set DECL_CONTEXT and
2658         LOCAL_CLASS_INITIALIZATION_FLAG.
2659         (java_lang_expand_expr): Emit initialization code for static class
2660         initialized flags when entering block, if necessary.
2661         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
2662         * java-tree.h (flag_optimize_sci): New global variable declaration.
2663         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
2664         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
2665         (LOCAL_FINAL_P): Fixed typo in comment.
2666         (FINAL_VARIABLE_P): Likewise.
2667         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
2668         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
2669         (struct lang_decl): New fields `ict', `smic' and `cif.'
2670         (check_for_initialization): New returned value for global.
2671         (attach_initialized_static_class): New global function.
2672         (STATIC_CLASS_INIT_OPT_P): New macro.
2673         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
2674         * lang.c (java_decode_option): Handle
2675         `-fno-optimize-static-class-initialization'
2676         * parse.y (start_complete_expand_method): New function.
2677         (java_expand_method_bodies): Likewise.
2678         (attach_init_test_initialization_flags): Likewise.
2679         (adjust_init_test_initialization): Likewise.
2680         (emit_test_initialization): Likewise.
2681         (java_complete_expand_methods): Nullify abstract and native method
2682         bodies.
2683         (java_complete_expand_method): New locals `fbody', `block_body'
2684         and `exception_copy.' Reorganized: directly return on empty method
2685         bodies, call `start_complete_expand_method', remember definitely
2686         initialized static class in function, don't expand method bodies.
2687         (java_expand_classes): Call `java_expand_method_bodies' before
2688         `finish_class' when compiling to native.
2689         (resolve_expression_name): Use `orig' after building outer class
2690         field access.
2691         (patch_invoke): Remember static method invokations.
2692
2693 2001-08-06  Richard Henderson  <rth@redhat.com>
2694
2695         * class.c (emit_register_classes): Pass a symbol_ref and priority
2696         to assemble_constructor.
2697
2698 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
2699
2700         * java-tree.h (all_class_filename): New macro.
2701         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
2702         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
2703         newly created IDENTIFIER_NODE to `all_class_filename.'
2704
2705 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
2706
2707         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
2708         Use ggc_add_tree_root to register roots.
2709
2710 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2711
2712         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
2713         second operand calling check_init.
2714         * decl.c (complete_start_java_method): Swaped second and third
2715         arguments while creating WITH_CLEANUP_EXPR node.
2716         * jcf-write.c (generate_bytecode_insns): Use second operand
2717         instead of third when handling WITH_CLEANUP_EXPR.
2718         * parse.y (java_complete_lhs): Expand second operand of
2719         WITH_CLEANUP_EXPR nodes.
2720         (patch_synchronized_statement): Swaped second and third arguments
2721         while creating WITH_CLEANUP_EXPR node.
2722
2723 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
2724
2725         * parse.y (create_interface): Avoid cyclic inheritance report when
2726         syntax error encountered during class definition.
2727         Fixes PR java/2956
2728
2729 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2730
2731         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2732         ASM_FINAL_SPEC.
2733         (lang_specific_pre_link): Use set_input to set input_filename.
2734         Append `main' here.
2735         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2736         (main): Fix definition.
2737         Strip `main' from classname.
2738         Fixes PR java/227.
2739
2740 2001-07-18  Tom Tromey  <tromey@redhat.com>
2741
2742         For PR java/2812:
2743         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
2744         * lex.c (java_new_lexer): Use ICONV_CONST.
2745         (java_read_char): Likewise.
2746         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
2747         (jv-scan$(exeext)): Likewise.
2748
2749 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2750
2751         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
2752         * parse.y (check_class_interface_creation): Allow `private' if the
2753         enclosing is not an interface.
2754         (create_interface): Interface tagged public if the enclosing
2755         context is an interface.
2756         (create_class): Class tagged public if the enclosing context
2757         is an interface.
2758         Fixes PR java/2959
2759
2760 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2761
2762         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
2763         Fixes PR java/2665
2764
2765 2001-07-14  Tim Josling  <tej@melbpc.org.au>
2766
2767         * check-init.c (check_init): Remove references to EXPON_EXPR.
2768
2769 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2770
2771         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
2772         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
2773         Fixes PR java/3602
2774
2775 2001-07-13  Tom Tromey  <tromey@redhat.com>
2776
2777         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
2778         invocation.
2779
2780 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2781
2782         * parse.y (patch_method_invocation): Don't override primary if one
2783         is already provided, but let this$<n> be built. Fixed comment.
2784
2785 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
2786
2787         * parse.y (empty_statement:): Report empty statement error only
2788         when found at class declaration level.
2789         Fixes PR java/3635
2790
2791 2001-07-12  Tom Tromey  <tromey@redhat.com>
2792
2793         * expr.c (expand_load_internal): New function.
2794         (LOAD_INTERNAL): Use it.
2795
2796 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
2797
2798         * parse.y (verify_constructor_super): Compare anonymous class ctor
2799         args with `valid_method_invocation_conversion_p.'
2800         Fixes PR java/3285
2801
2802 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2803
2804         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
2805         `-fsyntax-only.' Fixes PR java/3248
2806
2807 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2808
2809         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2810
2811 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
2812
2813         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
2814         current function is static. Fixes PR java/1970
2815
2816 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2817
2818         * parse.y (patch_method_invocation): Add enclosing context to ctor
2819         calls if necessary. Fixes PR java/2953
2820
2821 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2822
2823         * parse.y (resolve_package): Abort if qualified expression member
2824         isn't right.
2825         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
2826         Fixes PR java/1391
2827
2828 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
2829
2830         * verify.c: Don't use // comments.
2831
2832 2001-07-05  Tom Tromey  <tromey@redhat.com>
2833
2834         * lang.c (flag_assume_compiled): Removed.
2835         * java-tree.h (flag_assume_compiled): Removed.
2836         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
2837         -fhash-synchronization, -fuse-divide-subroutine,
2838         -fcheck-references, -femit-class-file, -femit-class-files,
2839         -fassume-compiled.  Updated --encoding information.  Changed
2840         -foutput-class-dir to `-d'.
2841
2842 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
2843
2844         * jcf-parse.c (parse_class_file): Add lineno parameter to
2845         debug_start_source_file call.
2846
2847 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2848
2849         * gcj.texi: Use gpl.texi.
2850         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
2851         dependencies and use doc/include in search path.
2852
2853 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
2854
2855         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
2856         `this'.  If so, don't build instance initializers.
2857
2858 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
2859
2860         * parse.y (resolve_expression_name): Improved error message for
2861         inner class cases. Fixes PR java/1958
2862
2863 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2864
2865         * lang.c: #include diagnostic.h
2866         (lang_print_error): Add a `diagnostic_context *' parameter.
2867         (java_dummy_print): Likewise.
2868         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
2869
2870 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2871
2872         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
2873         * jcf.h (typedef struct JCF): New bitfield `finished.'
2874         (JCF_FINISH): Set `finished.'
2875         (JCF_ZERO): Reset `finished.'
2876         Fixes PR java/2633
2877
2878 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2879
2880         * parse.y (class_body_declaration:): Don't install empty instance
2881         initializers.
2882         Fixes PR java/1314
2883
2884 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2885
2886         * class.c (set_super_info): Call `set_class_decl_access_flags.'
2887         (set_class_decl_access_flags): New function.
2888         * java-tree.h (set_class_decl_access_flags): New prototype.
2889         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
2890         (parse_class_file): New local `decl_max_locals.' Take wide types
2891         into account to compute DECL_MAX_LOCALS.
2892         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
2893         imports on demand.
2894
2895 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
2896
2897         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
2898
2899 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
2900
2901         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
2902         * parse.y (do_resolve_class): Moved comments out to leading comment
2903         section. Removed local `start', New local `_ht' and
2904         `circularity_hash.'  Record `enclosing' in hash table and search
2905         it to detect circularity.  Use `enclosing' as an argument to
2906         `lookup_cl.' Free the hash table when done.
2907
2908 2001-06-19  Tom Tromey  <tromey@redhat.com>
2909
2910         * lex.c (java_read_char): Disallow invalid and overlong
2911         sequences.  Fixes PR java/2319.
2912
2913 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
2914
2915         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
2916
2917 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
2918
2919         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
2920         arguments accordingly.
2921
2922 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2923
2924         * gcj.texi: Move contents to just after title page.
2925
2926 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
2927
2928         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
2929         builtin type.
2930         (patch_incomplete_class_ref): Build the class ref, build the class
2931         init if necessary, complete the tree.
2932         Fixes PR java/2605
2933
2934 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2935
2936         * parse.y (lookup_field_wrapper): Test `name' code.
2937         (resolve_qualified_expression_name): Test `qual_wfl' code.
2938         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
2939         handle `qual_wfl' by code.
2940         (maybe_build_primttype_type_ref): Test `wfl' code.
2941
2942 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
2943
2944         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
2945         fdl.texi.
2946         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
2947         the dvi file in the java directory.
2948
2949 2001-05-25  Sam TH  <sam@uchicago.edu>
2950
2951         * gen-table.pl javaop.h jcf.h lex.h,
2952         parse.h: Fix header include guards.
2953
2954 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
2955
2956         * jv-scan.c (version): Update copyright year.
2957
2958 2001-05-21  Per Bothner  <per@bothner.com>
2959
2960         * jcf-parse.c (read_class):  If class is from .class or .zip file
2961         and it's already been read, don't push/pop parser context.
2962
2963 2001-05-18  Per Bothner  <per@bothner.com>
2964
2965         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
2966         command line so the jvgenmain-generated main program comes first.
2967
2968 2001-05-15  Tom Tromey  <tromey@redhat.com>
2969
2970         * class.c (build_utf8_ref): Don't generate identifier based on
2971         utf8const contents.
2972
2973 2001-05-12  Richard Henderson  <rth@redhat.com>
2974
2975         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
2976         * expr.c (java_lang_expand_expr): Expand it.
2977         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
2978         calling build_exception_object_ref.
2979         * parse.y (catch_clause_parameter): Likewise.
2980         (build_dot_class_method): Likewise.
2981         (try_reference_assignconv): Likewise.
2982         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
2983         * jcf-write.c (generate_bytecode_insns): Likewise.
2984
2985 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2986
2987         * parse.y (build_unresolved_array_type): Set
2988         EXPR_WFL_QUALIFICATION on the newly created wfl.
2989         Fixes PR java/2538. Fixes PR java/2535.
2990
2991 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2992
2993         * parse.y (fix_constructors): Removed unnecessary assignment to
2994         local. Moved assignment to `this$<n>', fixed comments and
2995         indentation.
2996         (build_wfl_wrap): Fixed indentation.
2997         Fixes PR java/2598, java/2579 and java/2658.
2998
2999 2001-05-03  Mo DeJong  <mdejong@redhat.com>
3000
3001         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
3002         check for byte swap.
3003
3004 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
3005
3006         * expr.c (build_class_init): Move MODIFY_EXPR
3007         outside of COND_EXPR.  Remove variable `call'.
3008
3009 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3010
3011         * decl.c: NULL_PTR -> NULL.
3012         * jcf-write.c: Likewise.
3013
3014 2001-05-01  Tom Tromey  <tromey@redhat.com>
3015
3016         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
3017         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
3018         * gcj.texi: Updated copyright text.  Include fdl.texi.
3019         (Top): Link to new node.
3020
3021 2001-05-01  Per Bothner  <per@bothner.com>
3022
3023         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
3024
3025 2001-05-01  Per Bothner  <per@bothner.com>
3026
3027         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
3028         import_list contains the name, not the TREE_PURPOSE.
3029
3030 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3031
3032         * jcf-io.c (read_zip_member): Cast to long in comparison with
3033         signed value.
3034
3035         * jvspec.c (lang_specific_driver): Initialize variables.
3036
3037         * mangle.c (find_compression_record_match): Likewise.
3038
3039         * typeck.c (build_null_signature): Provide static prototype.  Mark
3040         parameter with ATTRIBUTE_UNUSED.
3041
3042         * verify.c (verify_jvm_instructions): Initialize variable.
3043
3044 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3045
3046         * parse.y (do_resolve_class): Check for cyclic inheritance during
3047         inner class resolution.
3048
3049 2001-04-27  Per Bothner  <per@bothner.com>
3050
3051         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
3052         while iterating, since that could cause gc to lose stuff.
3053
3054 2001-04-26  Per Bothner  <per@bothner.com>
3055
3056         Fix method search wrt scope of inner classes to match JLS2.
3057         * typeck.c (build_null_signature):  New static function.
3058         (has_method):  New function.  Uses build_null_signature and lookup_do.
3059         * java-tree.h (has_method):  New declaration.
3060         * parse.y (find_applicable_accessible_methods_list):  Do not search
3061         context of inner classes here.
3062         (patch_method_invocation):  Search scope, ie. current and outer clases,
3063         for method matching simple name, to find class.
3064
3065 2001-04-26  Per Bothner  <per@bothner.com>
3066
3067         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
3068         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
3069
3070         * constants.c (find_methodref_with_class_index):  New function.
3071         (find_methodref_index):  Use find_methodref_with_class_index.
3072         * java-tree.h (find_methodref_with_class_index):  New declaration.
3073         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
3074         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
3075         If context changed from interface to class, don't use invokeinterface.
3076
3077 2001-04-25  Per Bothner  <per@bothner.com>
3078
3079         * verify.c (verify_jvm_instructions):  For field instructions,
3080         check that field index is valid.  For invoke instructions, check that
3081         method index is valid.
3082
3083 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
3084
3085         * config-lang.in (target_libs): Copy from $libgcj_saved.
3086
3087 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3088
3089         * decl.c (init_decl_processing): Add new class "protectionDomain"
3090         field.
3091         * class.c (make_class_data): Set initial value for "protectionDomain".
3092
3093 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3094
3095         * jvspec.c (lang_specific_driver): Fix memory allocation
3096         deficit, by using concat in lieu of xmalloc/sprintf.
3097
3098 2001-04-20  Per Bothner  <per@bothner.com>
3099
3100         Fixes to compile multiple .class files at once.
3101         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
3102         * java-tree.h (CLASS_PARSED_P):  New macro.
3103         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
3104         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
3105         (read_class):  Avoid some code duplication.
3106         Don't call JCF_FINISH for a .class file - might be needed later.
3107         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
3108         rather than CLASS_LOADED_P, since latter implies class laid out.
3109         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
3110         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
3111
3112 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3113
3114         * Make-lang.in (java/boehm.o): Depend on toplev.h.
3115
3116         * boehm.c: Include toplev.h.
3117
3118 2001-04-06  Tom Tromey  <tromey@redhat.com>
3119             Alexandre Petit-Bianco  <apbianco@redhat.com>
3120
3121         Fix for PR gcj/1404 and PR gcj/2332:
3122         * parse.y (build_array_from_name): If we use the type_wfl then
3123         accumulate dimensions from the original type as well.
3124         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
3125
3126 2001-04-06  Tom Tromey  <tromey@redhat.com>
3127
3128         * parse.y (analyze_clinit_body): Return true if the second operand
3129         of a METHOD_EXPR is nonzero.
3130
3131 2001-04-06  Tom Tromey  <tromey@redhat.com>
3132
3133         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
3134         directory.
3135         ($(srcdir)/java/parse.c): Likewise.
3136
3137 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
3138
3139         * gcj.texi: Use `which-gcj' instead of `which-g77.'
3140         (version-gcc): Initialized.
3141         (which-gcj): Likewise.
3142
3143 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
3144
3145         * java-tree.h (struct lang_decl): New macro
3146         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
3147         * parse.y (build_instance_initializer): New function.
3148         (add_instance_initializer): Use it.
3149         (java_fix_constructors): Set `current_class' before fix pass.
3150         (fix_constructors): Just return if already fixed. Move `super()'
3151         invokation ahead. Use `build_instance_initializer.'
3152         Fixes PR java/1315.
3153
3154 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
3155
3156         * parse.y (resolve_qualified_expression_name): Pass field's
3157         DECL_CONTEXT to `not_accessible_p.'
3158         (not_accessible_p): Changed parameters order in `inherits_from_p'
3159         invokation.
3160
3161 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
3162
3163         * lang-options.h: Add flag_check_references.
3164
3165 2001-04-04  Per Bothner  <per@bothner.com>
3166
3167         * java-tree.h (CONSTANT_VALUE_P):  New macro.
3168         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
3169         * parse.y (maybe_build_class_init_for_field):  New static function.
3170         (resolve_expression_name, resolve_field_access):  Use
3171         maybe_build_class_init_for_field instead of build_class_init
3172         This does not do the init if the field is compile-time-constant.
3173         (resolve_field_access):  Simplify.
3174
3175         * parse.y (fold_constant_for_init):  Merge test into switch.
3176
3177 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
3178
3179         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
3180         on gansidecl.h.
3181         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
3182
3183 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
3184
3185         * expr.c (pop_type_0): Save the result of the first
3186         lang_printable_name call in a scratch buffer, so it
3187         won't be clobbered by the second call.
3188
3189 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
3190
3191         * parse-scan.y (array_type:): Rewritten.
3192         (type_declaration:): `empty_statement' replaces `SC_TK.'
3193         (class_member_declaration:): `empty statement' added.
3194         (method_body:): Simplified.
3195         (static_initializer:): Likewise.
3196         (primary_no_new_array:): Use `type_literals.'
3197         (type_literals:): New rule.
3198         (dims:): Set and update `bracket_count.'
3199         Fixes PR java/1074. Fixes PR java/2412.
3200
3201 2001-03-28  Hans Boehm  <boehm@acm.org>
3202
3203         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
3204         (get_boehm_type_descriptor): Set type on returned value to be a
3205         pointer length integer.
3206
3207 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3208
3209         * expr.c (pop_type_0): Call `concat' rather than building the
3210         string manually.
3211         (pop_type): Add format specifier in call to `error'.
3212
3213         * parse.y (patch_method_invocation): Avoid casting away
3214         const-ness.
3215
3216 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
3217
3218         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
3219
3220 2001-03-28  Richard Henderson  <rth@redhat.com>
3221
3222         IA-64 ABI Exception Handling:
3223         * Make-lang.in (except.o): Don't depend on eh-common.h.
3224         * check-init.c (check_init): Handle EXC_PTR_EXPR.
3225         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
3226         [soft_exceptioninfo_call_node]: Remove.
3227         [eh_personality_libfunc, lang_eh_runtime_type]: New.
3228         (end_java_method): No emit_handlers.
3229         * except.c (java_set_exception_lang_code): Remove.
3230         (method_init_exceptions): Don't call it.
3231         (prepare_eh_table_type): No CATCH_ALL_TYPE.
3232         (build_exception_object_ref): New.
3233         (expand_end_java_handler): Update for except.h name changes.
3234         (emit_handlers, expand_resume_after_catch): Remove.
3235         * expr.c (java_lang_expand_expr): Update for except.h name changes.
3236         (process_jvm_instruction): Use build_exception_object_ref.
3237         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
3238         (soft_exceptioninfo_call_node): Remove.
3239         (build_exception_object_ref): Declare.
3240         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
3241         soft_exceptioninfo_call_node.  Move processing ...
3242         [EXC_PTR_EXPR]: ... here.
3243         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
3244         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
3245         (source_end_java_method): No java_set_exception_lang_code or
3246         emit_handlers.
3247         (build_dot_class_method): Use build_exception_object_ref.
3248         (try_reference_assignconv): Check EXC_PTR_EXPR not
3249         soft_exceptioninfo_call_node.
3250
3251 2001-03-28  Richard Henderson  <rth@redhat.com>
3252
3253         * java-tree.h (throw_node): Define as a single member of
3254         java_global_trees instead of a separate array.
3255         (JTI_THROW_NODE): New.
3256         * decl.c (throw_node): Don't declare.
3257         (init_decl_processing): Init a scalar throw_node.
3258         Don't register it for gc.
3259         * check-init.c (check_init): Reference scalar throw_node.
3260         * expr.c (build_java_athrow): Likewise.
3261         * jcf-write.c (generate_bytecode_insns): Likewise.
3262         * parse.h (BUILD_THROW): Likewise.
3263
3264 2001-03-28  Richard Henderson  <rth@redhat.com>
3265
3266         * decl.c (end_java_method): Do not save and restore
3267         flag_non_call_exceptions.
3268         * parse.y (source_end_java_method): Likewise.
3269         * lang.c (flag_exceptions): Don't declare.
3270         (java_init_options): Set flag_non_call_exceptions.  Set
3271         flag_exceptions here ...
3272         (java_init): ... not here.
3273
3274 2001-03-27  Richard Henderson  <rth@redhat.com>
3275
3276         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
3277         exceptions_via_longjmp.
3278
3279         * lang.c (flag_new_exceptions): Don't declare it.
3280         (java_init_options): Or set it.
3281
3282 2001-03-27  Richard Henderson  <rth@redhat.com>
3283
3284         * decl.c (end_java_method): Rename asynchronous_exceptions to
3285         flag_non_call_exceptions.
3286         * parse.y (source_end_java_method): Likewise.
3287
3288 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3289
3290         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3291
3292 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
3293
3294         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
3295
3296 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
3297
3298         * parse.y (find_as_inner_class): Follow current package
3299         indications not to mistakingly load an unrelated class.
3300
3301 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3302
3303         * constants.c (PUTN): Use memcpy, not bcopy.
3304
3305         * lex.c (java_read_char): Use memmove, not bcopy.
3306
3307         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
3308
3309 2001-03-23  Per Bothner  <per@bothner.com>
3310
3311         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
3312         macro for better error pin-pointing.
3313         * java-tree.h:  Fix typo in comment.
3314
3315         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
3316         Don't include jsr/goto in exception range.
3317         Check if start and end of exception range are the same (also TRY_EXPR).
3318         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
3319         However, do emit the following goto even if try_block is empty.
3320         Defer freeing exception_decl until after the finalizer, to make
3321         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
3322
3323         * parse.y (java_complete_lhs):  If the try-clause is empty, just
3324         return the finally-clause and vice versa.
3325
3326 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
3327
3328         * gcj.texi (Input Options): documented the check for attribute
3329         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
3330         * java-tree.h (flag_force_classes_archive_check): Declared extern.
3331         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
3332         (jcf_parse): Check for the right classes archive if necessary.
3333         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
3334         (jcf_parse_fields): Fixed indentation.
3335         * jcf-write.c (append_gcj_attribute): New function.
3336         (generate_classfile): Compute the attribute count, invoke
3337         `append_gcj_attribute'.
3338         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
3339         turned into bit-fields. New bit-field `right_zip.'
3340         (JCF_ZERO): Set `right_zip' to zero.
3341         * lang-options.h (-fforce-classes-archive-check): Added flag.
3342         * lang.c (flag_force_classes_archive_check): New flag.
3343         (lang_f_options): New entry `force-classes-archive-check.'
3344         Fixes PR java/1213.
3345
3346 2001-02-07  Andrew Haley  <aph@redhat.com>
3347
3348         * gcj.texi (Configure-time Options): Add -fcheck-references.
3349         * expr.c (build_java_indirect_ref): New function.
3350         (java_check_reference): New function.
3351         (build_java_array_length_access): Use build_java_indirect_ref to
3352         check for null references.
3353         (build_java_arrayaccess): Likewise.
3354         (build_get_class): Likewise.
3355         (build_field_ref): Likewise.
3356         (invoke_build_dtable): Likewise.
3357         (build_invokeinterface): Likewise.
3358         * lang.c (lang_f_options): Add flag_check_references.
3359         * jvspec.c (jvgenmain_spec): Add flag_check_references.
3360         * java-tree.h (flag_check_references): New variable.
3361         * lang.c (flag_check_references): Likewise.
3362         * parse.y (patch_invoke): Use java_check_reference.
3363         (patch_assignment): Allow for extra nesting in
3364         _Jv_CheckArrayStore.
3365
3366 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
3367
3368         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
3369         * lex.c (cxx_keywords): Likewise.
3370
3371 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
3372
3373         * parse.y (qualify_ambiguous_name): Broaden `length'
3374         recognition. Help MODIFY_EXPR be resolved as expression names.
3375         Fixes PR java/2066. Fixes PR java/2400.
3376
3377 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
3378
3379         * gjavah.c (process_file): Mark interface definitions with
3380         "__attribute__ ((java_interface))".
3381
3382 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
3383
3384         * class.c (layout_class): Fixed push_super_field's second
3385         argument. Fixes PR java/2333.
3386         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
3387         too early to lay innerclasses out.
3388
3389 2001-03-20  Tom Tromey  <tromey@redhat.com>
3390             Alexandre Petit-Bianco <apbianco@redhat.com>
3391
3392         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
3393         inside an array reference. Insertion of the array store check
3394         rewritten. Fixes PR java/2299.
3395
3396 2001-03-20  Tom Tromey  <tromey@redhat.com>
3397
3398         * lex.c (java_read_unicode): Only accept leading `u's.
3399
3400 2001-03-20  Tom Tromey  <tromey@redhat.com>
3401
3402         * jcf-parse.c (read_class): Initialize `class'.
3403
3404 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3405
3406         * jcf_parse.c (jcf_parse): Eliminate unused variable.
3407
3408 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
3409
3410         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
3411         (layout_class): Likewise.
3412         (layout_class_method): Likewise.
3413         (emit_register_classes): Likewise.
3414         * decl.c (builtin_function): Likewise.
3415         (give_name_to_locals): Likewise.
3416
3417 2001-03-19  Per Bothner  <per@bothner.com>
3418
3419         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
3420         before trying to load an inner class.
3421
3422         Fixes to process to command-line .class files in two passes.
3423         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
3424         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
3425         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
3426         * class.c (is_compiled_class):  Fix for renamed flag.
3427         * parse.y (maybe_create_class_interface_decl):  Likewise.
3428         * jcf-parse.c (yyparse):  Also set if compiling .class files.
3429         * jcf-parse.c (read_class);  Read current_class.
3430         (jcf_parse):  Make static.
3431         (load_inner_classes):  New function, with code moved from jcf_parse,
3432         because we need to inner classes after the command-line files are read.
3433         (yyparse):  Set finput to NULL when it doesn't need to be closed.
3434         Reduce use of main_jcf (basically only for archive) and
3435         use finput instead of main_jcf->read_state.
3436         Inline jcf_figure_file_type into yyparse.
3437         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
3438         Defer load_inner_classes and parse_class_file to a second pass,
3439         after we've correctly mapped command-line .clas fiels to classes.
3440         (jcf_figure_file_type):  Removed.
3441         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
3442         (JCF_ZERO):  Also clear zipd field.
3443         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
3444
3445 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3446
3447         * jcf-parse.c (yyparse): Change ch from char * to char.
3448
3449 2001-03-19  Per Bothner  <per@bothner.com>
3450
3451         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
3452         Add constructed filelist-file at end, following -xjava.  Thus any .o
3453         and library files are not affected by the -xjava.  Also wrap
3454         explicit @FILE with -xjava and -xnone.
3455
3456 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
3457
3458         * class.c (build_static_field_ref): Call make_decl_rtl() after
3459         setting the DECL_EXTERNAL flag.
3460
3461 2001-03-17  Per Bothner  <per@bothner.com>
3462
3463         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
3464
3465         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
3466         when result is is needed (target is STACK_TARGET).
3467
3468         * parse.h (JDEP_SOLV):  Removed.
3469         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
3470
3471         * parse.y (incomplete_class_list): Removed.
3472         (obtain_incomplete_type): Don't use or set incomplete_class_list.
3473         It doesn't work if resolve_class changes the name of an array type
3474         that is on the list and then someone else looks for the modified name.
3475         Also, seems liable to break when compiling multiple source files at
3476         once.  So the simplest is to just remove incomplete_class_list -
3477         it is only a minor space win and it is not even clear it saves time.
3478
3479         * parse.y (resolve_class):  Remove unneeded promote_type.
3480
3481 2001-03-15  Per Bothner  <per@bothner.com>
3482
3483         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
3484         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
3485         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
3486         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
3487
3488         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
3489         * parse.y (java_expand_classes):  Likewise.
3490
3491         * parse.y (expand_start_java_method):  Was only called once and had a
3492         misleading name, so inline in caller java_complete_expand_method.
3493         (enter_a_block):  Likewise inline in enter_block and remove.
3494
3495         Remove junk from when gcc/java was created (by copying from C/C++).
3496         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
3497         (struct binding_level):  Remove fields keep, keep_if_subblocks,
3498         more_cleanups_ok, have_cleanups (which have never been used).
3499         (pushlevel, poplevel):  Remove related useless code.
3500
3501         * class.c (make_class_data):  The class_dtable_decl (i.e. the
3502         vtable for Class) should be external, except when compiling Class.
3503
3504         * jvspec.c (lang_specific_driver):  Fix -C handling.
3505         Check -save-temps to see if temp @FILE should be deleted.
3506         Follow-up to/fix for February 16 patch.
3507
3508         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
3509         (type_stack_dup):  Remove no-longer neded error check.
3510
3511 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
3512
3513         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
3514         to 'for_pointer'. If this type is for a pointer (argument) mangling,
3515         don't surround the element with 'N..E' if the type name is
3516         unqualified.
3517
3518 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
3519
3520         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
3521         DECL_RTL_SET_P, etc.
3522         (make_method_value): Likewise.
3523         (get_dispatch_table): Likewise.
3524
3525         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3526
3527 2001-03-07  Tom Tromey  <tromey@redhat.com>
3528
3529         * config-lang.in (lang_requires): Define.
3530
3531 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
3532
3533         * typeck.c (convert): Check flag_unsafe_math_optimizations,
3534         not flag_fast_math.
3535
3536 2001-03-05  Per Bothner  <per@bothner.com>
3537
3538         Fix a problem where rest_of_decl_compilation applied to
3539         class_dtable_decl causes problems because it was done too early,
3540         before output file was opened.
3541         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
3542         * class.c (class_dtable_decl):  Add macro - element of class_roots.
3543         (make_class_data):  Define class_dtable_decl.
3544         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
3545
3546 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3547
3548         * java/class.c, java/decl.c, java/java-tree.h: Replace all
3549         uses of 'boolean' with 'bool'.
3550
3551 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3552
3553         * lang-specs.h: Add zero initializer for cpp_spec field to all
3554         array elements.
3555
3556 2001-02-16  Per Bothner  <per@bothner.com>
3557
3558         Handle compiling multiple input files at once, and @FILE syntax.
3559         * gcj.texi:  Updated documentation to match.
3560         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
3561         * jcf-parse.c (parse_source_file):  Split into ...
3562         (parse_source_file_1):  New function - and:
3563         (parse_source_file_2):  New function.
3564         (yyparse):  On -ffilelist-file, open and scan named file.
3565         On first pass over files, only do parse_source_file_1.
3566         A new second pass calls parse_source_file_2 for each file to compile.
3567         (init_jcf_parse):  Call init_src_parse.
3568         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
3569         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
3570         as multiple input file combined in one compilation.
3571         * lang-options.h:  Add -ffilelist-file
3572         * lang.c (flag_filelist_file):  New flag variable.
3573         (lang_f_options):  Handle -ffilelist-file.
3574         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
3575         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
3576         gclass_list - use global fields of src_parse_roots instead.
3577         * parse.y (src_parse_roots):  New array.
3578         (incomplete_class_list, gclass_list):  New macros.
3579         (push_parser_context, java_pop_parser_context,
3580         java_parser_context_resume):  Don't fiddle with deleted fields.
3581         (various):  Use incomplete_class gclass_list and global macros
3582         instead of parse_ctxt fields - the lists are global.
3583         (init_src_parse):  New function.
3584
3585 Fri Feb 23 15:28:39 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3586
3587         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
3588
3589 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
3590
3591         * parse.y (check_inner_class_access): Moved declaration of local
3592         `enclosing_decl_type' to the right location.
3593
3594 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
3595
3596         * parse.y (parser_check_super_interface): Don't call
3597         check_pkg_class_access for an inner interface.
3598         (parser_check_super): Don't call check_pkg_class_access for inner
3599         class.
3600         (do_resolve_class): Simplify enclosing type loop. Don't call
3601         check_pkg_class_access if CL and DECL are not set.
3602         (find_in_imports_on_demand): Set DECL if class_type needed to be
3603         loaded. Don't call check_pkg_class_access for an inner class.
3604         (check_inner_class_access): Rewritten to implement member access
3605         rules as per spec 6.6.1.
3606         (check_pkg_class_access): Handle the empty package correctly.
3607         (in_same_package): New function. Determine if two classes are in the
3608         same package.
3609
3610 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
3611
3612         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
3613         method into array types.
3614         * parse.y (patch_method_invocation): Bypass access check on clone call
3615         to array instance.
3616
3617 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
3618
3619         * expr.c (build_instanceof): Check for arrays when trying fold to
3620         false.
3621
3622 2001-02-15  Jim Meyering  <meyering@lucent.com>
3623
3624         * Make-lang.in (java.install-common): Depend on `installdirs'.
3625         (java.install-info): Likewise.
3626
3627 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
3628
3629         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
3630
3631 2001-02-14  Tom Tromey  <tromey@redhat.com>
3632             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3633
3634         Fix for PR java/1261.
3635         * typeck.c (build_java_array_type): Add public `clone' method to
3636         arrays.
3637         * parse.y (resolve_qualified_expression_name): Use current_class
3638         when checking for inaccessibility.
3639         (patch_method_invocation): Fixed error message when accessibility
3640         denied.  Added `from_super' argument.
3641
3642 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3643
3644         * parse.y (resolve_class): Don't build a fake decl. Use the one
3645         already built.
3646         * typeck.c (build_java_array_type): Build and assign decl to array
3647         type.
3648
3649 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
3650
3651         * parse.y (not_accessible_p): Changed leading comment. Added extra
3652         `where' argument. Use it to enforce protected access rules.
3653         (resolve_qualified_expression_name): Added extra argument to
3654         not_accessible_p.
3655         (patch_method_invocation): Use argument `primary' to provide
3656         not_accessible_p with an extra argument.
3657         (lookup_method_invoke): Added extra argument to not_accessible_p.
3658         (search_applicable_method_list): Likewise.
3659
3660 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3661
3662         * parse.y (resolve_qualified_expression_name): Try to resolve as
3663         an inner class access only if `decl' is a TYPE_DECL.
3664
3665 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3666
3667         * decl.c (classdollar_identifier_node): Initialize.
3668         * java-tree.h (enum java_tree_index): New entry
3669         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
3670         (classdollar_identifier_node): New macro.
3671         (ID_CLASSDOLLAR_P): Likewise.
3672         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
3673         (build_dot_class_method_invocation): Likewise.
3674         (find_applicable_accessible_methods_list): `class$' can't be
3675         inherited.
3676
3677 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
3678
3679         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
3680
3681 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3682
3683         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
3684         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
3685         gone.
3686
3687 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3688
3689         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
3690         outside of the `__U' sequence too.
3691         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
3692         sequence too.
3693
3694 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3695
3696         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
3697
3698 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3699
3700         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
3701         (JVGENMAIN_OBJS): Likewise.
3702         * java-tree.h (append_gpp_mangled_name): New prototype.
3703         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
3704         Removed cast calling `gcc_add_root.'
3705         * jvgenmain.c (mangle_obstack): New global, initialized.
3706         (main): Use it.
3707         (do_mangle_class): Constify local `ptr.'
3708         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
3709         append_gpp_mangle_name and update `count' if necessary.
3710         Use `mangle_obstack.'
3711         * mangle.c (append_unicode_mangled_name): Removed.
3712         (append_gpp_mangled_name): Likewise.
3713         (unicode_mangling_length): Likewise.
3714         (mangle_member_name): Return type set to `void.'
3715         (mangle_field_decl): Don't append `U' in escaped names.
3716         (mangle_method_decl): Likewise.
3717         (mangle_member_name): Just use `append_gpp_mangled_name.'
3718         * mangle_name.c: New file.
3719
3720 2001-02-07  Per Bothner  <per@bothner.com>
3721
3722         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
3723
3724         * check-init.c (check_init):  Don't call done_alternative after
3725         processing loop code, as a LOOP_EXPR never terminates normally.
3726
3727 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3728
3729         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
3730
3731 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3732
3733         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
3734         DECLs.
3735
3736 2001-02-06  Tom Tromey  <tromey@redhat.com>
3737
3738         * lex.c (java_new_lexer): Longer error message.
3739
3740 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
3741             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3742
3743         * typeck.c (build_prim_array_type): Added leading comment.
3744         (build_java_array_type): Moved locals out of
3745         block. Always create the `data' field, fixed alignment to match
3746         C++.
3747
3748 2001-02-04  Tom Tromey  <tromey@redhat.com>
3749
3750         * expr.c (java_lang_expand_expr): Don't bother recomputing
3751         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
3752         Fixes PR java/1866.
3753
3754 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3755
3756         * parse.y (process_imports): Save the original name of the import
3757         for better error report.
3758
3759 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
3760
3761         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
3762         of macros used when compiling jvspec.c.
3763         * jvspec.c (lang_specific_driver): Link with the shared
3764         libgcc by default.
3765
3766 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3767
3768         * check-init.c (check_init): Call internal_error instead of fatal.
3769         * expr.c (java_lang_expand_expr): Likewise.
3770         * jcf-parse.c (get_constant): Likewise.
3771         * mangle.c (java_mangle_decl): Likewise.
3772         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
3773         (operator_string): Likewise.
3774         * check-init.c (check_init): Call abort instead of fatal.
3775         * class.c (build_class_ref): Likewise.
3776         * constants.c (write_constant_pool): Likewise.
3777         * decl.c (start_java_method): Likewise.
3778         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
3779         (java_stack_dup, encode_newarray_type): Likewise.
3780         (build_java_array_length_access): Likewise.
3781         (build_java_check_indexed_type, expand_java_pushc): Likewise.
3782         (build_java_soft_divmod, build_invokeinterface): Likewise.
3783         * java-tree.h (INNER_CLASS_P): Likewise.
3784         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
3785         (give_name_to_class, get_class_constant): Likewise.
3786         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
3787         (find_constant_index, generate_bytecode_conditional): Likewise.
3788         (generate_bytecode_insns, perform_relocations): Likewise.
3789         * lex.c (java_unget_unicode, java_lex): Likewise.
3790         * mangle.c (mangle_type, mangle_record_type): Likewise.
3791         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
3792         (finish_mangling): Likewise.
3793         * parse.h (MARK_FINAL_PARMS): Likewise.
3794         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
3795         (obtain_incomplete_type, java_complete_class): Likewise.
3796         (java_check_regular_methods, java_complete_expand_method): Likewise.
3797         (cut_identifier_in_qualified, check_deprecation): Likewise.
3798         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
3799         (java_complete_lhs, lookup_name_in_blocks): Likewise.
3800         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
3801         * typeck.c (set_local_type, parse_signature_type): Likewise.
3802         (parse_signature_string, build_java_signature): Likewise;
3803         (set_java_signature): Likewise.
3804         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
3805         * class.c (add_method): Call fatal_error instead of fatal.
3806         (build_static_field_ref): Likewise.
3807         * expr.c (build_known_method_ref, expand_invoke): Likewise.
3808         * jcf-parse.c (get_constant, jcf_parse): Likewise.
3809         * lex.c (java_new_new_lexer): Likewise.
3810         * jv-scan.c (main): Likewise.
3811         (fatal_error): Renamed from fatal.
3812         * jcf-parse.c (yyparse): Call fatal_io_error instead of
3813         pfatal_with_name.
3814         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
3815         (yyparse): Likewise.
3816         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
3817         * lex.c (java_get_line_col): Likewise.
3818         * jcf-parse.c (load_class): Make errors non-fatal.
3819         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
3820
3821 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
3822
3823         * jvgenmain.c (class_mangling_suffix): Remove unused string.
3824         (error): Remove unused function.
3825         (main): Don't use "__attribute__ alias" on generated class symbol.
3826
3827 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3828
3829         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
3830         argument.
3831         * parse.y (finish_method_declaration): Code accounting for WFLed
3832         method DECL_NAMEs deleted.
3833         (check_abstract_method_definitions): Likewise.
3834         (resolve_type_during_patch): Layout resolved type.
3835         * typeck.c (lookup_do): Removed unused local.
3836
3837 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
3838
3839         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
3840         * decl.c (init_decl_processing): Use integer_minus_one_node, not
3841         integer_negative_one_node.
3842         * expr.c (build_java_binop): Likewise.
3843
3844 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
3845
3846         * zextract.c (read_zip_archive): Read file_offset before writing
3847         zipd and consequently clobbering the header contents.
3848
3849 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3850
3851         * Make-lang.in: Remove all dependencies on defaults.h.
3852         * decl.c: Don't include defaults.h.
3853         * expr.c: Likewise.
3854         * parse.y: Likewise.
3855
3856 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3857
3858         * ChangeLog (2001-01-21): Fixed typo.
3859         * class.c (layout_class_method): Code accounting for WFLed
3860         method DECL_NAMEs deleted.
3861         * constant.c (find_methodref_index): Likewise.
3862         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
3863         * java-tree.h (DECL_FUNCTION_WFL): New macro.
3864         (struct lang_decl): New field `wfl'.
3865         (java_get_real_method_name): Prototype deleted.
3866         * mangle.c (mangle_method_decl): Code accounting for WFLed
3867         method DECL_NAMEs deleted.
3868         * parse.h (GET_METHOD_NAME): Macro deleted.
3869         * parse.y (reset_method_name): Deleted.
3870         (method_header): Set DECL_FUNCTION_WFL.
3871         (check_abstract_method_header): Code accounting for WFLed method
3872         DECL_NAMEs deleted.
3873         (java_get_real_method_name): Deleted.
3874         (check_method_redefinition): Code accounting for WFLed method
3875         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
3876         (java_check_regular_methods): Likewise.
3877         (java_check_abstract_methods): Likewise.
3878         (java_expand_classes): Don't call `reset_method_name.'
3879         (search_applicable_method_list): Use DECL_NAMEs instead of
3880         GET_METHOD_NAME.
3881         * typeck.c (lookup_do): Code accounting for WFLed method
3882         DECL_NAMEs deleted.
3883
3884 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
3885
3886         * lex.c (java_read_char): Check for EOF from getc first.
3887
3888 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3889
3890         * class.c (layout_class): Don't lay the superclass out if it's
3891         already being laid out.
3892         * jcf-parse.c (handle_innerclass_attribute): New function.
3893         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
3894         handle_innerclasses_attribute.
3895         (jcf_parse): Don't load an innerclasses if it's already being
3896         laid out.
3897         * jcf-write.c (append_innerclass_attribute_entry): Static
3898         `anonymous_name' and its initialization deleted. `ocii' and `ini'
3899         to be zero for anonymous classes.
3900
3901 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3902
3903         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
3904         necessary.
3905         * jcf-parse.c (set_source_filename): Use
3906         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
3907
3908 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3909
3910         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
3911         gets a unique asm name.
3912
3913 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3914
3915         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
3916         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3917         if necessary.
3918         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
3919         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
3920         * parse.y (lookup_package_type_and_set_next): Deleted.
3921         (resolve_package): Removed unnecessary code.
3922         (find_applicable_accessible_methods_list): `finit$' can't be
3923         inherited.
3924         * verify.c (pop_argument_types): Added missing prototype.
3925
3926 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
3927
3928         * config-lang.in: Disable java by default.
3929
3930 2001-01-23  Tom Tromey  <tromey@redhat.com>
3931
3932         * gcj.texi (Copying): New node.
3933         Added copyright information.
3934
3935 2001-01-21  Per Bothner  <per@bothner.com>
3936
3937         Various fixes to allow compiling a compressed .jar/.zip archive.
3938         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
3939         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
3940         (struct ZipDirectory):  New field zipf points to owning ZipFile.
3941         * jcf.h (struct ZipDirectory):  Add forward declaration.
3942         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
3943         Remove seen_in_zip and zip_offset fields.
3944         (JCF_SEEN_IN_ZIP):  New macro.
3945         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
3946         * jcf-io.c:  Change all ZipFileCache to ZipFile.
3947         (read_zip_member):  New function.
3948         (open_in_zip):  Call read_zip_member.
3949         * jcf-parse.c (find_in_current_zip):  Remove function.
3950         (read_class):  Merge in find_in_current_zip functionality.
3951         Call read_zip_member if needed.
3952         (parse_zip_file_entries):  Use read_zip_member.
3953         (process_zip_dir):  Update for removed and added JCF fields.
3954         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
3955
3956 2001-01-21  Per Bothner  <per@bothner.com>
3957
3958         Minor optimization of static ggc roots.
3959         * jcf-parse.c (parse_roots):  New static field.
3960         (current_field, current_method, current_file_list):  Replace by macros
3961         naming fields of parse_roots.
3962         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
3963         * class.c (class_roots):  New static field.
3964         (registered_class, fields_ident, info_ident, class_list):
3965         New macros naming fields of parse_roots.
3966         (build_static_field_ref):  Don't register roots here.
3967         (layout_class):  Static field list replaced by macro class_list.
3968         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
3969         Initialize fields_ident and info_ident here.
3970
3971 2001-01-21  Per Bothner  <per@bothner.com>
3972
3973         * jcf-parse.c (ggc_mark_jcf):  New function.
3974         (init_jcf_parse):  Register current_jcf as ggc root.
3975
3976 2001-01-21  Per Bothner  <per@bothner.com>
3977
3978         * lang.c (put_decl_node):  Print method's name.
3979
3980 2001-01-21  Per Bothner  <per@bothner.com>
3981
3982         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
3983         (verify_jvm_instructions):  Use it, for better error messages on loads.
3984
3985 2001-01-21  Per Bothner  <per@bothner.com>
3986
3987         * verify.c (merge_type_state):  Still may have to merge even if
3988         LABEL_VERIFIED (label).
3989
3990 2001-01-21  Per Bothner  <per@bothner.com>
3991
3992         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
3993         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
3994
3995 2001-01-19  Per Bothner  <per@bothner.com>
3996
3997         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
3998         if expeting an interface type.  Refines Tom's change of 2000-09-12.
3999
4000 2001-01-18  Per Bothner  <per@bothner.com>
4001
4002         * gcj.texi (Input Options): Mention .java files.
4003
4004 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4005
4006         * lang-options.h (-Wunsupported-jdk11): Removed.
4007         * lang.c (flag_not_overriding): Deleted.
4008         (flag_static_local_jdk1_1): Likewise.
4009         (lang_W_options): Removed "unsupported-jdk11" entry.
4010         * parse.y (java_check_methods): Removed dead code.
4011
4012 2001-01-17  Tom Tromey  <tromey@redhat.com>
4013
4014         Changes suggested by Per Bothner:
4015         * gcj.texi (Input Options): Don't mention input files.
4016         (Code Generation): Updated --main information.
4017         (Invoking jcf-dump): Mention that --javap is incomplete.
4018         From Alexandre Petit-Bianco:
4019         (Warnings): Don't mention -Wunsupported-jdk11.
4020         My stuff:
4021         (Compatibility): Mention JDK 1.2-ness of libraries.
4022         (Resources): Mention resources used when writing gcj.
4023
4024 2001-01-17  Tom Tromey  <tromey@redhat.com>
4025
4026         * gcj.texi: New file.
4027         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
4028         (java.info): Depend on gcj.info.
4029         (java/gcj.dvi): New target.
4030         (java.dvi): Depend on gcj.dvi.
4031         (java.install-info): Wrote.
4032
4033 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
4034
4035         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
4036         having called make_decl_rtl.
4037
4038 2001-01-14  Per Bothner  <per@bothner.com>
4039
4040         Various patches to emit better messages on verification errors.
4041         * expr.c (push_type_0):  Return error indication on stack overflow,
4042         instead of callinfg fatal.
4043         (push_type):  Now just call push_type_0 (nd fatal on overflow).
4044         (pop_type_0):  Return detailed error message (in a char** argument).
4045         (pop_type):  If pop_type_0 fails, print error message.
4046         (pop_argument_types):  Moved to verify.c.
4047         * verify.c (pop_argument_types):  Moved from expr.c.
4048         Return a (possible) error message, rather than void.
4049         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
4050         (verify_jvm_instruction):  Use new macros, improving error messages.
4051         For case OPCODE_astore use object_ptr_type_node.
4052         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
4053         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
4054
4055         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
4056         constant, return body without wrapper.  (Improves constant folding.)
4057         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
4058
4059 2001-01-13  Per Bothner  <per@bothner.com>
4060
4061         * expr.c (expand_java_field_op):  Assigning to a final field outside
4062         an initializer does not violate JVM spec, so should be warning, not
4063         error.  (Sun's verifier does not complain - though MicroSoft's does.)
4064
4065 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
4066
4067         * gjavah.c (version), jcf-dump.c (version): Update copyright year
4068         to 2001.
4069
4070 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
4071
4072         * parse.y (resolve_expression_name): Permit instance variables from
4073         enclosing context in super constructor call.
4074         (resolve_qualified_expression_name): Permit enclosing class's qualified
4075         "this" in super constructor call.
4076
4077 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
4078
4079         * class.c (build_utf8_ref): Remove last argument in call to
4080         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4081         (build_class_ref): Likewise.
4082         (build_static_field_ref): Likewise.
4083         (get_dispatch_table): Likewise.
4084         (layout_class_method): Likewise.
4085         (emit_register_classes): Likewise.
4086         * constants.c (build_constant_data_ref): Likewise.
4087         * decl.c (builtin_function): Likewise.
4088         (create_primitive_vtable): Likewise.
4089         * expr.c (build_known_method_def): Likewise.
4090         (build_jni_stub): Likewise.
4091         (java_lang_expand_expr): Likewise.
4092
4093 2001-01-10  Tom Tromey  <tromey@redhat.com>
4094
4095         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
4096
4097 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4098
4099         * java-tree.h (lang_printable_name_wls): New prototype.
4100         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
4101         rather than `current_class' to print type name. Don't prepend type
4102         names when printing constructor names.
4103         (lang_printable_name_wls): New function.
4104         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
4105         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
4106         * parse.y (patch_method_invocation): Message tuned for constructors.
4107         (not_accessible_p): Grant `private' access from within
4108         enclosing contexts.
4109
4110 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4111
4112         All files with updated copyright when applicable.
4113         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
4114         * class.c (mangle_class_field): Function removed.
4115         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
4116         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
4117         (build_class_ref): Call `java_mangle_class_field' instead of
4118         `mangle_class_field.'
4119         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
4120         (layout_class): Call `java_mangle_decl' instead of
4121         `mangle_static_field.'
4122         (cxx_keywords): Initialized static array moved to `lex.c.'
4123         (layout_class_method): Changed leading comment. Simplified to
4124         call `java_mangle_decl.' Local `ptr' moved in for loop body.
4125         * decl.c (lang_mark_tree): Mark field `package_list.'
4126         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
4127         (struct lang_type): New field `package_list.'
4128         (unicode_mangling_length): Prototype removed.
4129         (append_gpp_mangled_name, append_gpp_mangled_classtype,
4130         emit_unicode_mangled_name): Likewise.
4131         (cxx_keyword_p): New prototype.
4132         (java_mangle_decl, java_mangle_class_field,
4133         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
4134         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
4135         `build_expr_wfl.'
4136         * jvgenmain.c (main_method_prefix): Global variable removed.
4137         (main_method_suffix): Likewise.
4138         (do_mangle_classname): New function.
4139         (main): Call it. Format changed to accommodate new mangling scheme.
4140         * lex.c: (utf8_cmp): Conditionally prototyped.
4141         (cxx_keywords): Moved from class.c, conditionally defined.
4142         (utf8_cmp, cxx_keyword_p): Likewise.
4143         * mangle.c (obstack.h, ggc.h): Included.
4144         (mangle_field_decl): New function.
4145         (mangle_method_decl, mangle_type, mangle_pointer_type,
4146         mangle_array_type, mangle_record_type,
4147         find_compression_pointer_match, find_compression_array_match,
4148         find_compression_record_match,
4149         find_compression_array_template_match, set_type_package_list,
4150         entry_match_pointer_p, emit_compression_string, init_mangling,
4151         finish_mangling, compression_table_add, mangle_member_name): Likewise.
4152         (mangle_obstack): New global.
4153         (MANGLE_RAW_STRING): New macro.
4154         (unicode_mangling_length): Turned static.
4155         (append_unicode_mangled_name): Renamed from
4156         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
4157         replaces `obstack', removed from the parameter list.
4158         (append_gpp_mangled_name): Turned static. `mangle_obstack'
4159         replaces parameter `obstack', removed from the parameter list. Call
4160         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
4161         (append_gpp_mangled_classtype): Removed.
4162         (compression_table, compression_next): New static variables.
4163         * parse.y (temporary_obstack): Extern declaration removed.
4164
4165 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4166
4167         * parse.y (patch_binop): Compute missing type in error situations.
4168
4169 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
4170
4171         * class.c (make_class_data): Push initial value for "arrayclass".
4172         * decl.c (init_decl_processing): Add new class field "arrayclass".
4173
4174 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
4175
4176         From patha@softlab.ericsson.se:
4177         * parse.y (switch_label): Use build, not build1, to construct
4178         DEFAULT_EXPR.
4179
4180 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4181
4182         * lang.c (lang_decode_option): Change -MA to -MP.
4183         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
4184         Update to new prototype; do quote targets.
4185         (jcf_dependency_write): Update.
4186
4187 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
4188
4189         Shorten primitive array allocation path:
4190         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
4191         to create new primitive arrays.
4192         * expr.c (build_newarray): If generating native code, call
4193         soft_newarray_node with a reference to the primitive TYPE identifier
4194         instead of type_value.
4195
4196 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
4197
4198         Fix for PRs gcj/312 and gcj/253:
4199         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
4200         dest if they arn't already.
4201         * class.c (layout_class): Call maybe_layout_super_class on
4202         superinterfaces also, but only if compiling from bytecode.
4203
4204         Fix for PR gcj/373:
4205         * parse.y (create_class): Set ACC_STATIC if class is declared in an
4206         interface.
4207
4208 2000-12-15  Tom Tromey  <tromey@redhat.com>
4209
4210         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
4211         set.
4212
4213 2000-12-14  Andrew Haley  <aph@redhat.com>
4214
4215         * boehm.c (mark_reference_fields): Change test to correctly detect
4216         bitmap overflow.
4217
4218 2000-12-15  Andreas Jaeger  <aj@suse.de>
4219
4220         * config-lang.in (lang_dirs): Added.
4221
4222 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4223
4224         * parse.y (end_artificial_method_body): Fixed undefined behavior.
4225         Credits go to rth for finding it.
4226
4227 2000-12-13  Mike Stump  <mrs@wrs.com>
4228
4229         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
4230
4231 2000-11-07  Tom Tromey  <tromey@cygnus.com>
4232
4233         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
4234         * lex.c (java_ignorable_control_p): Removed.
4235         (java_letter_or_digit_p): Removed.
4236         (java_start_char_p): New function.
4237         (java_read_char): Return `int', not `unicode_t'.  Changed
4238         callers.
4239         (java_read_unicode): Likewise.
4240         (java_read_unicode_collapsing_terminators): Likewise.
4241         (java_get_unicode): Likewise.
4242         (java_new_lexer): Initialize hit_eof.
4243         (java_parse_end_comment): Take `int' argument.
4244         (java_parse_doc_section): Likewise.
4245         (java_parse_escape_sequence): Don't allow backlash-newline.
4246         Return `int'.
4247         * lex.h (JAVA_DIGIT_P): Removed.
4248         (_JAVA_LETTER_OR_DIGIT_P): Removed.
4249         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
4250         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
4251         (JAVA_PART_CHAR_P): New macro.
4252         (UEOF): Now -1.
4253         (JAVA_CHAR_ERROR): Now -2.
4254         (java_lexer): New field `hit_eof'.
4255         * chartables.h: New file.
4256         * gen-table.pl: new file.
4257
4258 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4259             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4260
4261         * parse.y (java_complete_lhs): Only allow compound assignment of
4262         reference type if type is String.
4263
4264 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4265
4266         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
4267         jcf-path.c: Likewise.
4268
4269 2000-12-09  Anthony Green  <green@redhat.com>
4270
4271         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
4272         filestart and filename_length as int values.
4273
4274 2000-12-07  Mo DeJong  <mdejong@redhat.com>
4275
4276         * jcf-io.c (find_class): Correct the logic that tests to see if a
4277         .java file is newer than its .class file. The compiler was
4278         incorrectly printing a warning when file mod times were equal.
4279
4280 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
4281
4282         * jvgenmain.c: Use ISPRINT not isascii.
4283
4284 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4285
4286         * parse.y (end_artificial_method_body): Fixed typo.
4287
4288 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4289
4290         * parse.y (patch_method_invocation): Pick the correct enclosing
4291         context when creating inner class instances.
4292         Fixes gcj/332.
4293
4294 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
4295
4296         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
4297         Update copyright year to 2000.
4298
4299 2000-11-23  Anthony Green  <green@redhat.com>
4300
4301         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
4302         Move current_file_list out of yyparse and make it static.
4303
4304         * expr.c: Declare quick_stack and tree_list_free_list as static
4305         (init_expr_processing): Register quick_stack and
4306         tree_list_free_list roots.
4307
4308 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4309
4310         * parse.y (build_outer_field_access): New local `decl_ctx', use
4311         it. Check for field's context and current class immediate outer
4312         context inheritance.
4313         (outer_field_access_p): Consider fields inherited from the last
4314         enclosing context.
4315         (build_access_to_thisn): Stop at the last enclosing context if
4316         necessary.
4317         Fixes gcj/367.
4318
4319 Thu Nov 23 02:19:14 2000  J"orn Rennecke <amylaar@redhat.com>
4320
4321         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
4322
4323 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
4324
4325         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
4326         scratch buffer.
4327
4328 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4329
4330         * jv-scan.c (help): Document --complexity.
4331         (options): Added --complexity.
4332         (flag_complexity): New global.
4333         (main): Call `report'.
4334         * parse-scan.y (complexity): New global.
4335         (if_then_statement, if_then_else_statement,
4336         if_then_else_statement_nsi, switch_block_statement_group,
4337         while_expression, do_statement, for_begin, continue_statement,
4338         throw_statement, catch_clause, finally, method_invocation,
4339         conditional_and_expression, conditional_or_expression,
4340         conditional_expression): Update complexity.
4341         (reset_report): Reset complexity.
4342         (report): New function.
4343
4344 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4345
4346         * lex.c (yylex): Added STRICT_TK case.
4347         * parse.y (STRICT_TK): Added.
4348         * parse-scan.y (STRICT_TK): Added.
4349         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
4350         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
4351         file.
4352         * keyword.h: Rebuilt.
4353         * keyword.gperf (strictfp): Added.
4354
4355 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4356
4357         * lex.c (yylex): Recognize floating point constants with leading
4358         0.
4359
4360 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4361
4362         * java-tree.h (cyclic_inheritance_report): Constify.
4363         * parse.y (cyclic_inheritance_report): Likewise.
4364
4365 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
4366
4367         * parse.y (goal): Remove call to ggc_add_string_root.
4368
4369 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
4370
4371         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
4372         Create string in scratch buffer, then pass to build_string.
4373
4374 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4375
4376         * parse.y (issue_warning_error_from_context): Add
4377         ATTRIBUTE_PRINTF.
4378
4379 2000-11-11  Anthony Green  <green@redhat.com>
4380
4381         * jcf-parse.c (process_zip_dir): Add finput parameter.
4382         (jcf_figure_file_type): Call process_zip_dir with appropriate
4383         argument.
4384
4385 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4386
4387         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
4388         * jcf-parse.c (jcf_figure_file_type): Likewise.
4389
4390 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
4391
4392         * parse.y (create_new_parser_context): Use memset () instead of
4393         bzero ().
4394
4395 2000-11-08  Tom Tromey  <tromey@cygnus.com>
4396
4397         * gjavah.c (process_file): Only include gcj/cni.h when generating
4398         CNI stubs.
4399
4400 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4401
4402         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
4403         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
4404         instead of bzero ().
4405
4406 2000-11-05  Tom Tromey  <tromey@cygnus.com>
4407
4408         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
4409         * lex.c (IS_ZERO): New define.
4410         (java_perform_atof): Error on floating point underflow.
4411
4412 2000-11-04  Tom Tromey  <tromey@cygnus.com>
4413
4414         * lex.c (java_parse_escape_sequence): Only read two octal
4415         characters if the first one is greater than 3.  Don't allow
4416         "octal" numbers to include the digits 8 or 9.
4417
4418 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
4419
4420         * Make-lang.in (java.distdir): Remove.
4421
4422 2000-11-03  Tom Tromey  <tromey@cygnus.com>
4423
4424         * Make-lang.in (java.dvi): New target.
4425         Partial fix for PR other/567.
4426
4427         * lang-options.h: Mention -Wout-of-date.
4428         * jcf-dump.c (flag_newer): New global.
4429         * gjavah.c (flag_newer): New global.
4430         * jcf-io.c (find_class): Only warn when flag_newer set.
4431         * lang.c (flag_newer): New global.
4432         (struct string_option): New declaration.
4433         (lang_W_options): New global.
4434         (process_option_with_no): New function.
4435         (lang_decode_option): Use it.
4436
4437         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
4438         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
4439         `$'.
4440
4441         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
4442         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
4443         * lex.c (java_read_unicode): Removed `term_context' argument.
4444         Recognize any number of `u' in `\u'.
4445         (java_read_unicode_collapsing_terminators): New function.
4446         (java_get_unicode): Use it.
4447         (java_lineterminator): Removed.
4448         (yylex): Produce error if character literal is newline or single
4449         quote.  Return if eof found in middle of `//' comment.  EOF in
4450         `//' comment is only an error if pedantic.
4451         (java_ignorable_control_p): New function.
4452         (java_parse_end_comment): Return if eof found in middle of
4453         comment.
4454         Include flags.h.
4455         * jv-scan.c (pedantic): New global.
4456
4457 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4458
4459         * parse.y (outer_field_access_p): Inherited fields aren't
4460         consider outer fields.
4461         (maybe_build_thisn_access_method): Use
4462         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
4463         (resolve_expression_name): Trigger an error if a static field
4464         is being accessed as an outer field.
4465
4466 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4467
4468         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
4469         Fixes gcj/365.
4470
4471 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
4472
4473         * Make-lang.in: Move all build rules here from Makefile.in,
4474         adapt to new context.  Wrap all rules that change the current
4475         directory in parentheses.  Expunge all references to $(P).
4476         When one command depends on another and they're run all at
4477         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
4478         all object-file generation rules.  Delete obsolete variables.
4479
4480         * Makefile.in: Delete.
4481         * config-lang.in: Delete outputs= line.
4482
4483 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4484
4485         * parse.y (patch_method_invocation): NULLify this_arg when already
4486         inserted.
4487         (maybe_use_access_method): Handle call to methods unrelated to the
4488         current class. Fixed comment.
4489         Fixes gcj/361.
4490
4491 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4492
4493        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
4494        scope.
4495
4496 2000-10-24  Tom Tromey  <tromey@cygnus.com>
4497
4498         * lex.c (java_new_lexer): Initialize new fields.  Work around
4499         broken iconv() implementations.
4500         (java_read_char): Swap bytes if required.  Use fallback decoder if
4501         required.
4502         (byteswap_init, need_byteswap): New globals.
4503         (java_destroy_lexer): Only close iconv handle if it is in use.
4504         * lex.h (java_lexer): New fields read_anything, byte_swap,
4505         use_fallback.
4506         Made out_buffer unsigned.
4507
4508 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4509
4510         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
4511         where an enclosing context can be set on the jdep.
4512         (do_resolve_class): Fixed identation.
4513
4514 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4515
4516         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
4517
4518         * jcf-reader.c (peek_attribute, skip_attribute): Only define
4519         when requested.
4520
4521         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
4522
4523         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
4524
4525 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4526
4527         * jcf-write.c (OP1): Update `last_bc'.
4528         (struct jcf_block): Fixed indentation and typo in comments.  New
4529         field `last_bc'.
4530         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
4531         follows `monitorenter'.
4532         * parse.y (patch_synchronized_statement): New local `tmp'. Call
4533         `patch_string'.
4534         Fixes gcj/232.
4535
4536 2000-10-16  Tom Tromey  <tromey@cygnus.com>
4537
4538         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
4539         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
4540         * lang-options.h: Added -MA, -MT, -MF..
4541         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
4542         (DEPEND_TARGET_SET): New macro.
4543         (DEPEND_FILE_ALREADY_SET): Likewise.
4544         (init_parse): Handle new flags.
4545         * jcf.h (jcf_dependency_print_dummies): Declare.
4546         * Make-lang.in (s-java): Added mkdeps.o.
4547         * Makefile.in (BACKEND): Added mkdeps.o.
4548         (../gcjh$(exeext)): Added mkdeps.o.
4549         (../jcf-dump$(exeext)): Added mkdeps.o.
4550         * jcf-depend.c: Include mkdeps.h.
4551         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
4552         add_entry): Removed.
4553         (jcf_dependency_reset): Rewrote.
4554         (dependencies): New global.
4555         (jcf_dependency_set_target): Rewrote.
4556         (jcf_dependency_add_target): Likewise.
4557         (jcf_dependency_add_file): Likewise.
4558         (munge): Removed.
4559         (print_ents): Removed.
4560         (jcf_dependency_write): Rewrote.
4561         (print_dummies): New global.
4562         (jcf_dependency_print_dummies): New function
4563         (jcf_dependency_write): Call deps_dummy_targets if required.
4564
4565 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4566
4567         * gjavah.c (add_class_decl): Removed unused variables `tname',
4568         `tlen' and `name_index'.
4569         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
4570         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
4571         in `wfl_operator' with value.
4572         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
4573         (jcf_figure_file_type): Fixed identation.
4574         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
4575         * parse.y (analyze_clinit_body): New function.
4576         (static_initializer:): Reset `current_static_block'.
4577         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
4578         `wfl_operator' with new value.
4579         (lookup_cl): Use EXPR_WFL_FILENAME.
4580         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
4581         analyze_clinit_body.
4582         (build_outer_field_access): Access to this$<n> built from
4583         current_class, not its outer context.
4584         (build_access_to_thisn): Fixed leading comment. Tidied things up.
4585         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
4586         (patch_method_invocation): Use `is_static_flag' when already
4587         initialized.
4588         (patch_newarray): Removed assignment in ternary operator.
4589
4590 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4591
4592         * except.c (free_eh_ranges): Don't free `whole_range'.
4593
4594 2000-10-15  Anthony Green  <green@redhat.com>
4595
4596         * decl.c (init_decl_processing): Call init_class_processing before
4597         anything else.
4598
4599 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4600
4601         * check-init.c (check_init): Fixed leading comment. Use
4602         LOCAL_FINAL_P.
4603         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4604         (give_name_to_locals): Likewise.
4605         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
4606         fields in lang_decl_var.
4607         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
4608         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
4609         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
4610         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
4611         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
4612         (LOCAL_FINAL): Rewritten.
4613         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
4614         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
4615         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
4616         `init_final' fields.
4617         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
4618         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
4619         (TYPE_HAS_FINAL_VARIABLE): New macro.
4620         (struct lang_type): Added `afv' field.
4621         * parse.y (check_static_final_variable_assignment_flag): New function.
4622         (reset_static_final_variable_assignment_flag): Likewise.
4623         (check_final_variable_local_assignment_flag): Likewise.
4624         (reset_final_variable_local_assignment_flag): Likewise.
4625         (check_final_variable_indirect_assignment): Likewise.
4626         (check_final_variable_global_assignment_flag): Likewise.
4627         (add_inner_class_fields): Use LOCAL_FINAL_P.
4628         (register_fields): Handle local finals and final variables.
4629         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
4630         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4631         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
4632         on local finals.
4633         (java_complete_expand_methods): Loop to set
4634         TYPE_HAS_FINAL_VARIABLE. Call
4635         `reset_final_variable_local_assignment_flag' and
4636         `check_final_variable_local_assignment_flag' accordingly before
4637         and after constructor expansion. Call
4638         `reset_static_final_variable_assignment_flag'
4639         before expanding <clinit> and after call
4640         `check_static_final_variable_assignment_flag' if the
4641         current_class isn't an interface. After all methods have been
4642         expanded, call `check_final_variable_global_assignment_flag' and
4643         `check_static_final_variable_assignment_flag' if the current class
4644         is an interface.
4645         (maybe_yank_clinit): Fixed typo in comment.
4646         (build_outer_field_access_methods): Removed old sanity check. Use
4647         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4648         Don't create access methods for finals.
4649         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
4650         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
4651         existing DECL_INIT has been processed.
4652         (java_complete_lhs): Likewise.
4653         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
4654         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
4655         logic.
4656         (patch_assignment): Use LOCAL_FINAL_P.
4657         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
4658         DECL_INITIAL is nullified.
4659         Fixes gcj/163.
4660
4661 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4662
4663         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
4664
4665         * Makefile.in (parse.c, parse-scan.c): Likewise.
4666
4667 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
4668
4669         * class.c (temporary_obstack): Remove.
4670         (make_class): Don't mess with obstascks.
4671         (push_class): Likewise.
4672         (set_super_info): Likewise.
4673         (add_method_1): Likewise.
4674         (add_method): Likewise.
4675         (add_field): Likewise.
4676         (build_utf8_ref): Likewise.
4677         (build_class_ref): Likewise.
4678         (build_static_field_ref): Likewise.
4679         (finish_class): Likewise.
4680         (push_super_field): Likewise.
4681         (layout_class): Likewise.
4682         (layout_class_methods): Likewise.
4683         (init_class_processing): Likewise.
4684         * constants.c (get_tag_node): Likewise.
4685         (build_constant_data_ref): Likewise.
4686         * decl.c (ggc_p): Remove.
4687         (copy_lang_decl): Use ggc_alloc.
4688         (complete_start_java_method): Don't mess with obstacks.
4689         (start_java_method): Likewise.
4690         (end_java_method): Likewise.
4691         * except.c (link_handler): Use xmalloc.
4692         (free_eh_ranges): New function.
4693         (method_init_exceptions): Use it.
4694         (add_handler): Use xmalloc.
4695         (expand_start_java_handler): Don't mess with obstacks.
4696         (prepare_eh_table_type): Likewise.
4697         (expand_end_java_handler): Likewise.
4698         * expr.c (push_value): Likewise.
4699         (create_label_decl): Likewise.
4700         (build_jni_stub): Likewise.
4701         (java_lang_expand_expr): Likewise.
4702         (note_instructions): Use xrealloc.
4703         (java_push_constant_from_pool): Don't mess with obstacks.
4704         (process_jvm_instruction): Likewise.
4705         * java-tree.h (cyclic_inheritance_report): Remove duplicate
4706         declaration.
4707         * jcf-parse.c (get_constant): Don't mess with obstacks.
4708         (read_class): Likewise.
4709         (jcf_parse): Likewise.
4710         * lex.c (expression_obstack): Remove.
4711         (java_lex): Don't use obstack_free.
4712         * parse.h (exit_java_complete_class): Don't mess with obstacks.
4713         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
4714         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
4715         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
4716         * parse.y (gaol): Add more GC roots.
4717         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
4718         (lookup_field_wrapper): Likewise.
4719         (obtain_incomplete_type): Don't mess with obstacks.
4720         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
4721         macros.
4722         (craft_constructor): Don't mess with obstacks.
4723         (safe_layout_class): Likewise.
4724         (java_complete_class): Likewise.
4725         (source_end_java_method): Likewise.
4726         (build_outer_field_access_methods): Likewise.
4727         (build_outer_method_access_method): Likewise.
4728         (maybe_build_thisn_access_method): Likewise.
4729         (build_dot_class_method_invocation): Likewise.
4730         (java_complete_tree): Likewise.
4731         (java_complete_lhs): Likewise.
4732         (do_merge_string_cste): Likewise.
4733         (patch_string_cst): Likewise.
4734         (array_constructor_check_entry): Likewise.
4735         * typeck.c (build_java_array_type): Likewise.
4736         (parse_signature_string): Likewise.
4737         (build_java_signature): Likewise.
4738
4739 2000-10-12  Tom Tromey  <tromey@cygnus.com>
4740
4741         Fix for PR gcj/356:
4742         * gjavah.c (add_class_decl): Don't special-case inner classes.
4743         (add_namelet): Likewise.
4744
4745 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
4746
4747         * java-tree.h: Constify current_encoding.
4748         * lang.c: Constify current_encoding.
4749
4750 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
4751
4752         * jvgenmain.c (class_mangling_suffix): Omit `.'.
4753         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
4754
4755 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4756
4757         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
4758         patch. Fixes gcj/340.
4759
4760 2000-10-10  Tom Tromey  <tromey@cygnus.com>
4761
4762         * lex.c (java_new_lexer): Initialize out_first and out_last
4763         fields.
4764         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
4765
4766 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4767
4768         * parse.y (pop_current_osb): New function.
4769         (array_type:): Use `dims:', changed actions
4770         accordingly. Suggested by Anthony Green.
4771         (array_creation_expression:): Used pop_current_osb.
4772         (cast_expression:): Likewise.
4773         (search_applicable_method_list): Fixed indentation.
4774
4775 2000-10-08  Anthony Green  <green@redhat.com>
4776
4777         * parse.y (array_type_literal): Remove production.
4778         (type_literals): Refer to array_type, not array_type_literal.
4779
4780 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4781
4782         Patch contributed by Corey Minyard.
4783         * decl.c (check_local_named_variable): New function.
4784         (tree check_local_unnamed_variable): Likewise.
4785         (find_local_variable): Splitted. Call check_local_{un}named_variable.
4786
4787 2000-10-07  Anthony Green  <green@redhat.com>
4788
4789         * class.c (layout_class): Handle case where superclass can't be
4790         layed out yet.
4791
4792 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4793
4794         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
4795         gperf.
4796
4797 2000-10-05  Tom Tromey  <tromey@cygnus.com>
4798
4799         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
4800         * jvgenmain.c (class_mangling_prefix): Removed.
4801         (class_mangling_suffix): New global.
4802         (main): Use it.
4803         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
4804         `$'.
4805         (print_method_info): Handle overrides for static and final
4806         methods.
4807         (process_file): Generate declaration for class object field.
4808         * class.c (cxx_keywords): New array.
4809         (utf8_cmp): New function.
4810         (cxx_keyword_p): New function.
4811         (layout_class_method): Mangle C++ keywords by appending `$'.
4812         (mangle_field): New function.
4813         (mangle_class_field): Use mangle_field.  Mangle class name as
4814         `class$'.
4815         (mangle_static_field): Use mangle_field.
4816
4817 Tue Oct  3 13:44:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4818
4819         * decl.c (find_local_variable): Removed uncessary type check and
4820         fixed range check typo. From Corey Minyard.
4821
4822 Wed Sep 13 16:06:52 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4823
4824         * decl.c (give_name_to_locals): New local `code_offset'. Call
4825         `maybe_adjust_start_pc'.
4826         * expr.c (note_instructions): New function.
4827         (expand_byte_code): Don't collect insn starts here.
4828         (peek_opcode_at_pc): New function.
4829         (maybe_adjust_start_pc): Likewise.
4830         * java-tree.h (maybe_adjust_start_pc): Declare.
4831         (note_instructions): Likewise.
4832         * jcf-parse.c (parse_class_file): Call `note_instructions'.
4833
4834 Wed Sep 13 11:50:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4835
4836         * parse.y (field_access:): Fixed indentation.
4837         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
4838
4839 2000-09-07  Tom Tromey  <tromey@cygnus.com>
4840
4841         Fix for PR gcj/307:
4842         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
4843         JPRIMITIVE_TYPE_P, for arithmetic operators.
4844         (patch_method_invocation): Indentation fix.
4845         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
4846         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
4847         (do_unary_numeric_promotion): Cleaned up code.
4848         (valid_cast_to_p): Handle boolean correctly.
4849
4850 2000-09-27  Tom Tromey  <tromey@cygnus.com>
4851
4852         * lex.c (java_read_unicode): Reset bs_count when finished with
4853         `\u' sequence.
4854
4855 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
4856
4857         Convert to GC.
4858         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
4859         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
4860         (typeck.o): Depend on ggc.h.
4861         * class.c (add_method_1): Use GC functions for allocation.
4862         (init_class_processing): Register roots.
4863         * decl.c (ggc_p): Set to 1.
4864         (pending_local_decls): Make it static.
4865         (push_jvm_slot): Use GC functions for allocation.
4866         (init_decl_processing): Register roots.
4867         (give_name_to_locals): Use GC functions for allocation.
4868         (lang_mark_tree): New function.
4869         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
4870         functions for allocation.
4871         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
4872         * lex.c (java_lex): Use build_string, rather than replicating it
4873         inline.
4874         * parse.y (goal): Add more roots.
4875         (mark_parser_ctxt): New function.
4876         * typeck.c: Include ggc.h.
4877
4878 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4879
4880         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
4881         contains something else than MODIFY_EXPR.
4882
4883 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
4884
4885         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
4886         * Makefile.in (parse.o): Depend on ggc.h.
4887         (class.o): Likewise.
4888         (constants.o): Likewise.
4889         (decl.o): Likewise.
4890         (expr.o): Likewise.
4891         (jcf-parse.o): Likewise.
4892         (jcf-write.o): Likewise.
4893         (mangle.o): Likewise.
4894         * class.c: Include ggc.h.
4895         (build_static_field_ref): Register GC roots.
4896         (layout_class): Likewise.
4897         (init_class_processing): Likewise.
4898         * constants.c: Include ggc.h.
4899         (current_constant_pool_data_ref): Remove.
4900         (tag_nodes): Move it to ...
4901         (get_tag_node): ... here.  Register GC roots.
4902         * decl.c: Include ggc.h.  Remove many global tree definitions.
4903         (throw_node): Define.
4904         (java_global_trees): Likewise.
4905         (predef_filenames): Make the size a constant.
4906         (init_decl_processing): Adjust accordingly.
4907         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
4908         * expr.c: Include ggc.h.
4909         (init_expr_processing): Register GC roots.
4910         (build_invokeinterface): Likewise.
4911         * java-tree.h: Replace extern tree declarations with macros.
4912         (java_global_trees): New variable.
4913         (java_tree_index): New enumeration.
4914         (init_jcf_parse): Declare.
4915         * jcf-parse.c: Include ggc.h.
4916         (current_class): Remove declaration.
4917         (main_class): Likewise.
4918         (all_class_list): Likewise.
4919         (predefined_filename_p): Adjust for constant size of
4920         predef_filenames.
4921         (init_jcf_parse): New function.
4922         * jcf-write.c: Include ggc.h.
4923         (generate_classfile): Register GC roots.
4924         (append_synthetic_attribute): Likewise.
4925         (append_innerclass_attribute_entry): Likewise.
4926         * lang.c: Include ggc.h.
4927         (lang_print_error): Register GC roots.
4928         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
4929         with macros.
4930         * parse.y: Include ggc.h.
4931         (wfl_operator): Remove.
4932         (goal): Register GC roots.
4933         (java_pop_parser_context): Adjust for new field names.
4934         (java_parser_context_save_global): Likewse.
4935         (java_parser_context_restore_global): Likewise.
4936         (java_parser_context_suspend): Likewise.
4937         (java_parser_context_resume): Likewise.
4938         (verify_constructor_circularity): Register GC roots.
4939         (lookup_cl): Likewise.
4940         (java_reorder_fields): Likewise.
4941         (build_current_this): Likewise.
4942         (class_in_current_package): Likewise.
4943         (argument_types_convertible): Likewise.
4944         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
4945
4946 2000-09-14  Tom Tromey  <tromey@cygnus.com>
4947
4948         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
4949
4950 2000-09-13  Tom Tromey  <tromey@cygnus.com>
4951
4952         * jcf-parse.c: Include <locale.h>.
4953         * jv-scan.c: Include <locale.h>.
4954
4955 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4956
4957         * expr.c (pop_type_0): Return `Object' if trying to merge two
4958         interface types.
4959         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
4960         interface types; `Object' is always a valid supertype.
4961
4962 2000-09-12  Tom Tromey  <tromey@cygnus.com>
4963
4964         Fix for PR gcj/33:
4965         * jv-scan.c (help): Document --encoding.
4966         (options): Added `encoding' entry.
4967         (OPT_ENCODING): New define.
4968         (main): Handle --encoding.
4969         Include <langinfo.h> if nl_langinfo exists.
4970         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
4971         --encoding.
4972         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
4973         (parse_source_file): Correctly call java_init_lex.  Added `finput'
4974         argument.  Use nl_langinfo to determine default encoding.
4975         * java-tree.h (current_encoding): Declare.
4976         * parse.y (java_parser_context_restore_global): Don't restore
4977         `finput'.
4978         (java_parser_context_save_global): Don't set `finput' field.
4979         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
4980         if required.
4981         * lang.c (current_encoding): New global.
4982         (lang_decode_option): Recognize `-fencoding='.
4983         (finish_parse): Don't close finput.
4984         * parse.h (struct parser_ctxt): Removed `finput' and
4985         `unget_utf8_value' fields.  Added `lexer' field.
4986         (java_init_lex): Fixed declaration.
4987         * lex.c (java_new_lexer): New function.
4988         (java_destroy_lexer): Likewise.
4989         (java_read_char): Added `lex' argument.  Handle iconv case.
4990         (java_read_unicode): Added `lex' argument.  Count backslashes in
4991         lexer structure.
4992         (java_init_lex): Added `finput' and `encoding' arguments.  Set
4993         `lexer' field in ctxp.
4994         (BAD_UTF8_VALUE): Removed.
4995         (java_lex): Handle seeing UEOF in the middle of a string literal.
4996         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
4997         (java_lexer): New structure.
4998         (UNGETC): Removed.
4999         (GETC): Removed.
5000         (DEFAULT_ENCODING): New define.
5001         (java_destroy_lexer): Declare.
5002
5003 2000-09-12  Tom Tromey  <tromey@cygnus.com>
5004
5005         Fix for PR gcj/343:
5006         * lex.c (java_init_lex): Initialize java_io_serializable.
5007         * parse.y (java_io_serializable): New global.
5008         (valid_ref_assignconv_cast_p): An array can be cast to
5009         serializable.
5010
5011 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
5012
5013         * decl.c, expr.c: Include defaults.h if not already included.
5014         Don't define the *_TYPE_SIZE macros.
5015
5016 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
5017
5018         * typeck.c (build_java_array_type): Correct first parameter
5019         in ADJUST_FIELD_ALIGN invocation.
5020
5021 2000-09-06  Tom Tromey  <tromey@cygnus.com>
5022
5023         * lang-specs.h: Also recognize `-femit-class-files'.
5024
5025 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5026
5027         * verify.c (merge_types): Load the types to merge if necessary.
5028
5029 2000-09-02  Anthony Green  <green@redhat.com>
5030
5031         * jcf-io.c: Include zlib.h.
5032         (open_in_zip): Read compressed class file archives.
5033         * zipfile.h (ZipDirectory): Add uncompressed_size and
5034         compression_method fields.
5035         * zextract.c (read_zip_archive): Collect file compression info.
5036
5037 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
5038
5039         * parse.y (do_resolve_class): Also explore superclasses of
5040         intermediate enclosing contexts when searching for inner classes.
5041
5042 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5043
5044         * parse.y (variable_declarator_id:): Better error message.
5045         (expression_statement:): Use YYNOT_TWICE.
5046         (cast_expression:): Likewise.
5047         (assignment:): Likewise.
5048
5049 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5050
5051         * parse.y (do_merge_string_cste): New locals. Create new
5052         STRING_CSTs each time, use memcpy. Fixes gcj/311.
5053
5054 2000-08-07  Hans Boehm  <boehm@acm.org>
5055
5056         * boehm.c (mark_reference_fields): Set marking bits for all words in
5057         a multiple-word record.
5058         (get_boehm_type_descriptor): Use the procedure marking descriptor for
5059         java.lang.Class.
5060
5061 2000-08-31  Mike Stump  <mrs@wrs.com>
5062
5063         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
5064         jcf-dump$(exeext)): Make parallel safe.
5065
5066 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
5067
5068         * jcf-parse.c (set_source_filename): Constify a char *.
5069         * jcf-write.c (append_innerclasses_attribute,
5070         make_class_file_name): Constify a char *.  Don't recycle a
5071         variable for an unrelated purpose.
5072         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
5073         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
5074
5075 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5076
5077         * expr.c (can_widen_reference_to): Fixed indentation.
5078         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
5079         * parse.y: `finit$' replaces `$finit$' in comments.
5080         (try_builtin_assignconv): Fixed leading comment.
5081
5082 2000-08-25  Greg McGary  <greg@mcgary.org>
5083
5084         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
5085
5086 2000-08-24  Greg McGary  <greg@mcgary.org>
5087
5088         * lang.c (lang_decode_option): Use ARRAY_SIZE.
5089         * parse.y (BINOP_LOOKUP): Likewise.
5090
5091 2000-08-22  Andrew Haley  <aph@cygnus.com>
5092
5093         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
5094         sign extending. Fixes gcj/321.
5095         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
5096         combining to make a jlong. Fixes gcj/321.
5097
5098 2000-08-21  Nix  <nix@esperi.demon.co.uk>
5099
5100         * lang-specs.h: Do not process -o or run the assembler if
5101         -fsyntax-only.
5102
5103 2000-08-16  Andrew Haley  <aph@cygnus.com>
5104
5105         * typeck.c (build_java_array_type): Rewrite code to do array
5106         alignment.  Take into account back-end macros when aligning array
5107         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
5108         user to set alignment. Fixes gcj/252 and 160.
5109
5110 2000-08-09  Tom Tromey  <tromey@cygnus.com>
5111
5112         * parse.y (check_abstract_method_definitions): Now return `int'.
5113         Check implemented interfaces.  Fixes PR gcj/305.
5114
5115         * parse.y (patch_switch_statement): Disallow `long' in switch
5116         expressions.  Fixes PR gcj/310.
5117
5118 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5119
5120         * decl.c (finit_leg_identifier_node): New global.
5121         (init_decl_processing): Use `finit$' to initialize
5122         finit_identifier_node. Use `$finit$' to initialize
5123         finit_leg_identifier_node.
5124         * expr.c (expand_java_field_op): Use ID_FINIT_P.
5125         * java-tree.h (finit_identifier_node): Changed attached comment.
5126         (finit_leg_identifier_node): New declaration.
5127         (ID_FINIT_P): Take finit_identifier_node and
5128         finit_leg_identifier_node into account. This is a backward
5129         compatibility hack.
5130
5131 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5132
5133         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
5134         Jan 6 2000 patch.
5135         (generate_bytecode_insns): Check `nargs' before emitting it.
5136         * verify.c (merge_type_state): Fixed typo.
5137         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
5138         generate_bytecode_{conditional,insns}.
5139
5140 Sun Aug 13 09:41:49 2000  Anthony Green  <green@redhat.com>
5141
5142         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
5143         for -pg builds).
5144
5145 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5146
5147         * class.c (maybe_layout_super_class): Fixed indentation.
5148         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
5149         (java_check_methods): New function declaration.
5150         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
5151         instead of `str_ptr'.
5152         * jcf-write.c (generate_bytecode_insns): Emit number the of args
5153         of a `invokeinterface' at the right time.
5154         * parse.h (WFL_STRIP_BRACKET): New macro.
5155         (SET_TYPE_FOR_RESOLUTION): Use it.
5156         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
5157         (check_class_interface_creation): Don't check for cross package
5158         innerclass name clashes.
5159         (method_header): Behave properly if MDECL is `error_mark_node'.
5160         (method_declarator): Return `error_mark_node' if bogus current
5161         class.
5162         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
5163         (resolve_and_layout): New local `decl_type', set and used. Call
5164         java_check_methods.
5165         (java_check_methods): New method.
5166         (java_layout_classes): Use it.
5167         (resolve_qualified_expression_name): No EH check necessary in
5168         access$<n>.
5169         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
5170         `case' statement.
5171         (patch_assignment): Set DECL_INITIAL on integral final local.
5172
5173 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5174
5175         * java-tree.h (flag_extraneous_semicolon): New extern.
5176         * lang-options.h: (-Wextraneous-semicolon): New option.
5177         * lang.c (flag_redundant): Fixed typo in leading comment.
5178         (flag_extraneous_semicolon): New global.
5179         (lang_decode_option): Set `flag_extraneous_semicolon' when
5180         -Wall. Decode `-Wextraneous-semicolon'.
5181         * parse.y (type_declaration:): Removed `SC_TK' hack, added
5182         `empty_statement' rule.
5183         (class_body_declaration): Likewise.
5184         (method_body:): Accept `;' as a method body.
5185         (static_initializer:): Removed `SC_TK' hack.
5186         (constructor_block_end:): Likewise.
5187         (empty_statement:): Report deprecated empty declaration. Fixes
5188         gcj/295
5189
5190 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5191
5192         * parse.y (build_dot_class_method_invocation): Changed parameter
5193         name to `type'. Build signature from `type' and convert it to a
5194         STRING_CST if it's an array.
5195         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
5196         to use `ref_type' directly.
5197
5198 Sun Aug  6 00:47:24 2000  Ovidiu Predescu  <ovidiu@cup.hp.com>
5199
5200         * lang-options.h: Added a comma after the last element to avoid
5201         syntax errors when other languages define additional options.
5202
5203 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
5204
5205         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
5206         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
5207         (jc1): Link with $(BACKEND).
5208         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
5209
5210 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
5211
5212         * jvspec.c: Adjust type of second argument to
5213         lang_specific_driver, and update code as necessary.
5214
5215         * class.c (build_dtable_decl): Initialize dummy.
5216
5217 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5218
5219         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
5220         method bodies not to rule out discarding `<clinit>'; don't use
5221         <clinit> to initialize static fields with constant initializers.
5222
5223 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5224
5225         * gjavah.c (print_method_info): Added `synth' parameter. Skip
5226         synthetic methods.
5227         (method_synthetic): New global.
5228         (HANDLE_METHOD): Recognize synthetic method and tell
5229         `print_method_info' about it.
5230         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
5231         processing a synthetic method.
5232         * jcf-reader.c (skip_attribute): New function.
5233         ( skip_attribute): Likewise.
5234
5235 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5236
5237         * parse.y (build_outer_field_access): Fixed comments.
5238         (fix_constructors): Emit the initialization of this$<n> before
5239         calling $finit$.
5240         (resolve_qualified_expression_name): Build an access to `decl' if
5241         necessary.
5242
5243 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5244
5245         * parse-scan.y (curent_class): Non longer const.
5246         (inner_qualifier, inner_qualifier_length): Deleted.
5247         (current_class_length): New global.
5248         (bracket_count): Fixed typo in leading comment.
5249         (anonymous_count): New global.
5250         (class_instance_creation_expression:): Handle anonymous classes.
5251         (anonymous_class_creation:): New rule.
5252         (push_class_context): Rewritten.
5253         (pop_class_context): Likewise.
5254         (INNER_QUALIFIER): Macro deleted.
5255         (report_class_declaration): call `push_class_context' when
5256         entering the function. `fprintf' format modified not to use
5257         INNER_QUALIFIER.
5258         (report_class_declaration): Assign `package_name' and
5259         `current_class' to NULL separately.
5260
5261 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5262
5263         * expr.c (build_invokeinterface): Call layout_class_methods on
5264         target interface.
5265
5266 2000-07-27  Tom Tromey  <tromey@cygnus.com>
5267             Anthony Green  <green@cygnus.com>
5268             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5269
5270         * class.c (make_class_data): Create vtable for abstract classes.
5271         (get_dispatch_table): Changed to cope with abstract classes.
5272
5273 2000-07-27  Tom Tromey  <tromey@cygnus.com>
5274
5275         * parse.y (patch_method_invocation): Don't reverse the argument
5276         list when dealing with anonymous class constructors. Fixed typo in
5277         comment.
5278
5279 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5280
5281         * parse.y (build_alias_initializer_parameter_list): Reverse
5282         crafted list when building aliases for anonymous class
5283         constructors.
5284
5285 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5286
5287         * parse.y (jdep_resolve_class): Don't bother checking potential
5288         innerclass access if `decl' is NULL.
5289         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
5290         WFL.
5291
5292 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5293
5294         * parse.c: Remove (again.)
5295
5296 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5297
5298         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
5299         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
5300         outside the `if' statement, alias to innerclass removed, `decl'
5301         used to mark the class complete.
5302
5303 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5304
5305         * parse.y (simple_name:): Fixed typo in error message.
5306
5307 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5308
5309         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
5310         or its first operand can be error marks.
5311
5312 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5313
5314         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
5315         * parse.y (method_header): Likewise.
5316
5317 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5318
5319         * parse.y (process_imports): Consider that one might be trying to
5320         import an innerclass. Fixes gcj/254
5321
5322 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5323
5324         * parse.y (find_as_inner_class): Handle the case where the
5325         enclosing context of an innerclass has been loaded as bytecode.
5326
5327 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5328
5329         * parse.y (simple_name:): Reject `$' in type names.
5330         (resolve_type_during_patch): Use `type' as a second
5331         argument to resolve_no_layout. Fixes gcj/257.
5332
5333 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
5334
5335         * parse.y (find_most_specific_methods_list): Select the only
5336         non-abstract method even if max has been set.
5337         Fixes gcj/285, gcj/298.
5338
5339 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
5340
5341         * lang-specs.h: Added %(jc1) to java compiler options.
5342
5343 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
5344
5345         * .cvsignore: New file.
5346
5347 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5348
5349         * parse.y (not_accessible_p): Access granted to innerclasses
5350         (indirectly) extending the reference type. Fixes gcj/249.
5351
5352 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5353
5354         * parse.y (patch_method_invocation): Fixed comment.
5355         (maybe_use_access_method): Build this$<n>s to the context of the
5356         target method, or a type that extends it. Fixes gcj/242.
5357
5358 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
5359
5360         * parse.c: Remove.
5361
5362 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5363
5364         * parse.y (fold_constant_for_init): Avoid bullish conversion.
5365
5366 2000-07-13  Tom Tromey  <tromey@cygnus.com>
5367
5368         * lang-specs.h: Added %{I*}.
5369
5370 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
5371
5372         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
5373
5374 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
5375
5376         * parse-scan.c: Remove.
5377
5378 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5379
5380         * class.c (set_super_info): Handled protected inner classes.
5381         (common_enclosing_context_p): Bail early if arguments aren't both
5382         inner classes.
5383         (get_access_flags_from_decl): Handle private and protected inner
5384         classes.
5385         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
5386         (CLASS_PROTECTED): Likewise.
5387         (struct lang_type): New bitfield `poic'.
5388         * parse.y (jdep_resolve_class): Call check_inner_class_access on
5389         inner classes only.
5390         (check_inner_class_access): Renamed arguments, added
5391         comments. Handles protected inner classes (fixes gcj/225)
5392         (not_accessible_p): Fixed comments. Avoid handling inner classes.
5393
5394 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5395
5396         * parse.y (resolve_qualified_expression_name): Verify qualified
5397         access to `this'. Fixes gcj/239.
5398
5399 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5400
5401         * jcf-write.c (generate_classfile): Don't install ConstantValue
5402         for null pointers.
5403
5404 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5405
5406         * parse.y (resolve_qualified_expression_name): Handle inner class
5407         access. Fixes gcj/256.
5408
5409 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5410
5411         * jcf-write.c (generate_classfile): Properly install the
5412         ConstantValue attribute and the initial value constant pool index
5413         on string constants.
5414         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
5415         class files.
5416
5417 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5418
5419         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
5420         construct.
5421         * parse.y (find_as_inner_class): Fixed typo.
5422         (do_resolve_class): Explore enclosing contexts when searching for
5423         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
5424         (check_inner_class_access): Check `decl' which can be null in case
5425         of previous errors.
5426
5427 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5428
5429         * java-tree.h (java_debug_context): Declared `extern'.
5430         (safe_layout_class): Likewise.
5431         * parse.y (resolve_field_access): Field must be `static' in order
5432         to be replaced by its initial value. Added comments.
5433         (find_applicable_accessible_methods_list): Fixed typo.
5434         (find_most_specific_methods_list): Methods found in innerclasses
5435         take over methods founds in the enclosing contexts.
5436         (java_complete_tree): Loosen restrictions on the type of DECLs
5437         that can be replaced by their initialization values.
5438         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
5439
5440 2000-07-05  Tom Tromey  <tromey@cygnus.com>
5441
5442         * Make-lang.in (PARSE_DIR): New macro.
5443         (PARSE_RELDIR): Likewise.
5444         (PARSE_C): Likewise.
5445         (PARSE_SCAN_C): Likewise.
5446         ($(PARSE_C)): New target.
5447         ($(PARSE_SCAN_C)): Likewise.
5448         (SET_BISON): New macro.
5449         (BISONFLAGS): Likewise.
5450         (JAVABISONFLAGS): Likewise.
5451
5452 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
5453
5454         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
5455         argument on the first pass for CNI as well as JNI.
5456         (print_method_info): Set up method name on the first pass only.
5457
5458 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5459
5460         * parse.y (parser_qualified_classname): Removed parameter
5461         `is_static'.
5462         (create_interface): Removed first passed parameter to
5463         parser_qualified_classname.
5464         (create_class): Likewise. Don't install alias on static
5465         innerclasses. Fixes gcj/275.
5466
5467 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5468
5469         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
5470         debugable statement with empty_stmt_node. Fixes gcj/272
5471
5472 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5473
5474         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
5475         gcj/271.
5476
5477 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5478
5479         * jcf-write.c (push_long_const): Appropriately cast short negative
5480         constant to jword.
5481
5482 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5483
5484         * parse.y (verify_constructor_super): Use loop variable
5485         `m_arg_type' initialized with `mdecl_arg_type'.
5486
5487 2000-06-29  Tom Tromey  <tromey@cygnus.com>
5488
5489         * parse.y (resolve_field_access): Handle case where `type_found'
5490         is NULL.
5491
5492 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5493
5494         * expr.c (lookup_field): The same field can be found through two
5495         different interface. Don't declare it ambiguous in that case.
5496
5497 2000-06-27  Tom Tromey  <tromey@cygnus.com>
5498
5499         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
5500         follows \r, then unget it at a lower level.
5501
5502 2000-06-26  Tom Tromey  <tromey@cygnus.com>
5503
5504         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
5505         java_complete_tree.
5506
5507 2000-06-25  Tom Tromey  <tromey@cygnus.com>
5508
5509         * parse.y (for_statement): Wrap expression in a WFL if it is a
5510         constant.  For PR gcj/268.
5511
5512 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5513
5514         * parse.y (do_resolve_class): Minor optimiztion in the package
5515         list search. Removed unnecessary test and return statement.
5516         (valid_ref_assignconv_cast_p): Order of arguments to
5517         enclosing_context_p fixed.
5518
5519 2000-06-24  Tom Tromey  <tromey@cygnus.com>
5520
5521         * expr.c (lookup_field): Print error and return error_mark_node if
5522         field reference is ambiguous.
5523
5524         * parse.y (check_abstract_method_definitions): Also check if
5525         `other_method' is abstract.
5526
5527 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5528
5529         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
5530         classes.
5531         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
5532         (struct lang_type): New field `pic'.
5533         (CLASS_PRIVATE): New macro.
5534         * parse.y (check_inner_class_access): New function.
5535         (jdep_resolve_class): Call it.
5536
5537 2000-06-23  Tom Tromey  <tromey@cygnus.com>
5538
5539         * parse.y (patch_incomplete_class_ref): Initialize the returned
5540         class.  For PR gcj/260.
5541
5542 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5543
5544         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
5545
5546 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5547
5548         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5549         Java specific checks.
5550         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
5551         screened by DECL_P.
5552         * java-tree.def (CASE_EXPR): Marked 'e'.
5553         (DEFAULT_EXPR): Likewise.
5554         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
5555         screened by DECL_P.
5556         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
5557         Java specific checks.
5558         (generate_bytecode_insns): Test try_block for BLOCK before using
5559         BLOCK_EXPR_BODY.
5560         * parse.y (build_wfl_wrap): Added `location' argument. Set
5561         EXPR_WFL_LINECOL accordingly.
5562         (dim_expr:): Wrap constants with WFLs.
5563         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
5564         (resolve_package): Check for `stmt' not being a BLOCK before
5565         building a debuggable statement with it.
5566         (make_qualified_primary): Added extra parameter to build_wfl_wrap
5567         invocation.
5568         (resolve_field_access): Make sure `decl' is a DECL before treating
5569         it as such.
5570         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
5571         IDENTIFIER_NODE before treating it as such.
5572         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
5573         treating it as such.
5574         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
5575         to be applied only on non array types.
5576
5577 2000-06-16  Per Bothner  <per@bothner.com>
5578
5579         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
5580         define in terms of DECL_RESULT, as that fails when --enable-checking.
5581
5582 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5583
5584         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
5585         types the same in comparison.
5586         (CHECK_OP): Add static prototype.
5587
5588 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
5589
5590         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
5591         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
5592         * parse.c: Rebuilt.
5593
5594 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5595
5596         * decl.c (create_primitive_vtable): Prototype.
5597
5598         * jcf-write.c (generate_bytecode_insns): Initialize variable
5599         `saved_context'.
5600
5601         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
5602
5603 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5604
5605         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
5606         to track searched classes, and do not search the same class more than
5607         once. Call find_applicable_accessible_methods_list on immediate
5608         superclass, instead of search_applicable_method_list on all ancestors.
5609         Fix for PR gcj/238.
5610
5611 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
5612
5613         * parse.y (register_fields): Permit static fields in inner classes
5614         if they are final. Fix for PR gcj/255.
5615
5616 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5617
5618         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
5619         * parse.y (find_in_imports): Returned type changed to void,
5620         leading comment fixed.
5621         (register_package): New function.
5622         (qualify_and_find): Likewise.
5623         (package_declaration:): Use `register_package'.
5624         (single_type_import_declaration:): Removed local variable
5625         `node'. Added missing `;' for consistency.
5626         (type_import_on_demand_declaration:): Use `chainon' to link new
5627         entries.
5628         (lookup_field_wrapper): Lookup local variables defined in outer
5629         contexts first.
5630         (java_complete_class): Don't reverse the list of imported on demand.
5631         (do_resolve_class): Reorganized. Removed local variable
5632         `original_name'. Call `qualify_and_find' with the current package
5633         name, invoke `find_in_imports_on_demand' right after. Call
5634         `qualify_and_find' with the packages we've seen so far. Fixed
5635         operations numbering in comments.
5636         (java_expand_class): Don't reverse `package_list'.
5637         (find_most_specific_methods_list): New local variables `abstract'
5638         and `candidates'. Use them to pick the right method.
5639
5640 Tue Jun  6 11:39:05 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
5641
5642         * parse.y (check_modifiers_consistency): Don't subtract out
5643         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
5644
5645 2000-06-04  Philipp Thomas  <pthomas@suse.de>
5646
5647         * Makefile.in (INTLLIBS): New.
5648         (LIBS): Add above.
5649         (DEPLIBS): Ditto.
5650
5651 Fri Jun  2 16:48:55 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5652
5653         * class.c (get_dispatch_table): Build the vtable dummy entry list
5654         element with a null purpose. Fixed leading comment.
5655         (build_dtable_decl): Build an accurate dtable type when appropriate
5656         and use it.
5657
5658 2000-06-02  Richard Henderson  <rth@cygnus.com>
5659
5660         * lang.c (lang_get_alias_set): New.
5661
5662 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5663
5664         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
5665         before using it as the accessed field.
5666
5667 2000-05-31  Tom Tromey  <tromey@cygnus.com>
5668
5669         * java-tree.h (boolean_array_vtable, byte_array_vtable,
5670         char_array_vtable, short_array_vtable, int_array_vtable,
5671         long_array_vtable, float_array_vtable, double_array_vtable):
5672         Declare.
5673         * expr.c (get_primitive_array_vtable): New function.
5674         (create_primitive_vtable): New function.
5675         (java_lang_expand_expr): Enable code to statically generate
5676         arrays.
5677         * decl.c (init_decl_processing): Create primitive vtables.
5678         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
5679         short_array_vtable, int_array_vtable, long_array_vtable,
5680         float_array_vtable, double_array_vtable): Define.
5681
5682 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
5683
5684         * java/parse.y (find_applicable_accessible_methods_list):
5685         Don't add an uninitialized value to the list.
5686
5687 2000-05-25  Tom Tromey  <tromey@cygnus.com>
5688
5689         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
5690         when trying to see if field's class should be initialized.  Always
5691         initialize field's declaring class, not qualified class.
5692         For PR gcj/162.
5693
5694         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
5695         `wfl_operator', to maybe_build_primttype_type_ref.
5696         Fixes PR gcj/235.
5697
5698 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
5699
5700        * parse.y (patch_method_invocation): Don't try to lookup methods
5701        in primitive types.
5702
5703 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5704
5705         * parse.y (resolve_field_access): Call the appropriate <clinit>
5706         before accessing the length of a static array. Craft a decl for
5707         the field while its time. Fixes PR gcj/129.
5708
5709 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5710
5711         * parse.y (resolve_package): Correctly set `*next' (was off by
5712         one.)
5713         (resolve_qualified_expression_name): Fixed comment.
5714
5715 Thu Apr 27 17:47:34 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5716
5717         * jcf-parse.c (jcf_parse_source): Reset current_class and
5718         current_function_decl to NULL before parsing a new file.
5719
5720 Thu Apr 27 17:25:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5721
5722         * parse.y (block_end:): If the collected block doesn't feature a
5723         statement, insert an empty statement.
5724
5725 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5726
5727         * parse.y (maybe_yank_clinit): New function.
5728         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
5729         end of the list of methods belonging to a class.
5730         (java_complete_expand_method): Check whether <clinit> is really
5731         necessary and expand it accordingly.
5732
5733 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5734
5735         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
5736         processed by the method's switch statement.
5737
5738 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5739
5740         * java-tree.h: Added init state enum.
5741         * decl.c (emit_init_test_initialization): Initialize class
5742         initialization check variable by looking at class' state.
5743
5744 2000-05-19  Tom Tromey  <tromey@cygnus.com>
5745
5746         * java-tree.h (build_instanceof): Declare.
5747         (build_get_class): Declare.
5748         * parse.y (patch_binop): Use build_instanceof.
5749         * expr.c (build_instanceof): New function.  If class is final,
5750         don't make a function call.
5751         (expand_java_INSTANCEOF): Use it.
5752         (build_get_class): New function.
5753
5754 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5755
5756         * jcf-write.c (generate_classfile): Scan the source_file for
5757         slashes with the right pointer variable.
5758
5759 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5760
5761         * lang.c (lang_decode_option): Update -Wunused flags by calling
5762         set_Wunused.
5763         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
5764
5765 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
5766
5767         * check_init.c (check_init): Constify local char *.
5768         * class.c (push_class): Constify local char *.
5769         * java_tree.h: Update prototypes.
5770         * jcf-io.c (open_class): Constify filename parameter and
5771         return value.
5772         (find_class): Remove redundant string copy.  Cast return from
5773         open_class.
5774         * jcf-parse.c (read_class, parse_class_file, yyparse):
5775         Constify local char *.
5776         * jcf-write.c (generate_bytecode_insns, generate_classfile):
5777         Constify local char *.
5778         * jcf.h (JCF): Constify filename and classname.
5779         (JCF_FINISH): Cast args to FREE to char * when appropriate.
5780         * lang.c (init_parse): Constify parameter and return value.
5781         * lex.c (java_get_line_col): Constify filename parameter.
5782         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
5783         * parse.y (java_parser_context_suspend,
5784         issue_warning_error_from_context, safe_layout_class): Constify
5785         local char *.
5786         * parse.c: Regenerate.
5787
5788 2000-05-08  Tom Tromey  <tromey@cygnus.com>
5789
5790         * expr.c (build_jni_stub): Cache the result of
5791         _Jv_LookupJNIMethod.
5792
5793 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5794
5795         * decl.c (predef_filenames_size): Now 7.
5796         (predef_filenames): New seventh entry.
5797
5798 2000-05-04  Tom Tromey  <tromey@cygnus.com>
5799
5800         * boehm.c (mark_reference_fields): Don't mark RawData fields.
5801         Keep track of when we've seen a reference field after a
5802         non-reference field.
5803         (get_boehm_type_descriptor): Handle case where we see
5804         non-reference fields but no trailing reference field.
5805         * decl.c (rawdata_ptr_type_node): Define.
5806         (init_decl_processing): Initialize rawdata_ptr_type_node.
5807         * java-tree.h (rawdata_ptr_type_node): Declare.
5808
5809 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5810
5811         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
5812         specifiers in calls to fprintf.
5813
5814 2000-05-03  Andrew Haley  <aph@cygnus.com>
5815
5816         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
5817
5818         * javaop.h (WORD_TO_INT): New function.
5819         (IMMEDIATE_s4): Use WORD_TO_INT.
5820         * jcf.h (JPOOL_INT): Ditto.
5821
5822         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
5823         separator.
5824
5825 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5826
5827         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
5828         on native function.
5829         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
5830         JNI methods.
5831         * expr.c (build_jni_stub): New function.
5832         * lang-specs.h: -fjni and -femit-class-file are incompatible.
5833         * parse.c: Rebuilt.
5834         * parse.y (java_complete_expand_methods): Expand a native method
5835         and call build_jni_stub if -fjni given.
5836         * lang-options.h: Document -fjni.
5837         * lang.c (flag_jni): New global.
5838         (lang_f_options): Added `jni' entry.
5839         * java-tree.h (soft_lookupjnimethod_node,
5840         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
5841         Declare.
5842         (flag_jni): Declare.
5843         (build_jni_stub): Declare.
5844         (struct lang_decl): Added `native' flag.
5845         (METHOD_NATIVE): Redefined to use `native' field of lang specific
5846         structure.
5847         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
5848         soft_jnipopsystemframe_node): New globals.
5849         (init_decl_processing): Set them.  _Jv_InitClass only takes one
5850         argument.
5851
5852         * java-tree.def: Put into `C' mode.
5853
5854 2000-04-27  Tom Tromey  <tromey@cygnus.com>
5855
5856         Fix for PR gcj/2:
5857         * expr.c (expand_invoke): Generate check to see if object pointer
5858         is null in nonvirtual invocation case.
5859         * java-tree.h (soft_nullpointer_node): Declare.
5860         * decl.c (soft_nullpointer_node): New global.
5861         (init_decl_processing): Initialize soft_nullpointer_node.
5862         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5863         or `private' methods.
5864         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5865
5866 Wed Apr 26 14:29:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5867
5868         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
5869         from <clinit>
5870
5871 2000-04-26  Tom Tromey  <tromey@cygnus.com>
5872
5873         * zextract.c (find_zip_file_start): New function.
5874         (read_zip_archive): Use it.
5875
5876 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5877
5878         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
5879
5880 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5881
5882         * class.c (common_enclosing_context_p): New function.
5883         * java-tree.h (common_enclosing_context_p): Added prototype.
5884         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
5885         classes sharing an outer context with the current instance.
5886         * parse.y (build_access_to_thisn): Fixed leading comment.
5887         (verify_constructor_super): New local `supper_inner'. Skip
5888         enclosing context argument in the case of inner class constructors.
5889         (patch_method_invocation): Insert proper context as second
5890         parameter to pure inner class constructor super invocations.
5891
5892 Mon Apr 24 14:59:36 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5893
5894         * parse.y (end_class_declaration): Reset the interface number
5895         counter.
5896
5897 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5898
5899         * parse.y (source_start_java_method): Deleted unnecessary code.
5900         (patch_method_invocation): Fixed comment.
5901
5902 2000-04-24  Robert Lipe <robertlipe@usa.net>
5903
5904         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
5905
5906 2000-04-23  Tom Tromey  <tromey@cygnus.com>
5907
5908         * boehm.c (mark_reference_fields): Use int_byte_position.
5909
5910 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5911
5912         * boehm.c (mark_reference_fields): Only call byte_position on
5913         non-static fields.
5914
5915 2000-04-22  Tom Tromey  <tromey@cygnus.com>
5916
5917         * boehm.c (mark_reference_fields): Added `last_view_index'
5918         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
5919
5920 Thu Apr 20 17:41:28 2000  Mo DeJong  <mdejong@cygnus.com>
5921
5922         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
5923         * parse.y (check_class_interface_creation): Fixed comments. Select
5924         permitted modifiers for (inner) interfaces. Changed error message
5925         to report rejected modifiers used with local classes.
5926
5927 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5928
5929         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
5930         of directly inherited type considered in scope.
5931         * parse.y (do_resolve_class): Search inherited classes for inner
5932         classes.
5933
5934 2000-04-20  Tom Tromey  <tromey@cygnus.com>
5935
5936         * parse.y (not_accessible_p): Use member's class, not current
5937         class, when doing inheritance check for protected reference.
5938         Fixes PR gcj/124.
5939
5940 Thu Apr 20 18:20:58 2000  Jason Schroeder  <shrode@subnature.com>
5941
5942         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
5943
5944 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5945
5946         * parse.y (lookup_field_wrapper): Search for final local aliases.
5947         (resolve_expression_name): Let lookup_field_wrapper search for
5948         final local aliases. Force the value of `name' if one is found.
5949         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
5950         an expression name. Fixed comments.
5951
5952 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5953
5954         * parse.y (yyerror): `msg' can be null, don't use it in that case.
5955
5956 2000-04-19  Tom Tromey  <tromey@cygnus.com>
5957
5958         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
5959
5960 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5961
5962         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
5963
5964 2000-04-18  Tom Tromey  <tromey@cygnus.com>
5965
5966         PR gcj/211:
5967         * gjavah.c (utf8_cmp): Changed return value.
5968         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
5969         result.
5970         (cxx_keywords): New global.
5971         (get_field_name): Handle new result of cxx_keyword_subst.
5972         (print_method_info): Likewise.
5973
5974 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
5975
5976         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
5977         with a newline, for CNI.
5978         (print_stub_or_jni): Print a space or newline before method name for
5979         CNI as well as JNI.
5980         (print_cxx_classname): Don't write leading "::" in CNI stub method.
5981         (process_file): Include gcj/cni.h if generating CNI stubs.
5982
5983 2000-04-16  Tom Tromey  <tromey@cygnus.com>
5984
5985         * gjavah.c (decompile_method): Use print_field_name.
5986         Fixes PR gcj/205.
5987
5988 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5989
5990         * parse.y (java_expand_classes): Reverse the package list once.
5991         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
5992         reduction.
5993         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
5994         the `==' and `!=' operators.
5995
5996 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5997
5998         * jcf-write.c (generate_bytecode_insns): At invokation time,
5999         always relate an interface method to the type of its selector.
6000
6001 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6002
6003         Fix for PR gcj/2:
6004         * expr.c (expand_invoke): Generate check to see if object pointer
6005         is null in nonvirtual invocation case.
6006         * java-tree.h (soft_nullpointer_node): Declare.
6007         * decl.c (soft_nullpointer_node): New global.
6008         (init_decl_processing): Initialize soft_nullpointer_node.
6009         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
6010         or `private' methods.
6011         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
6012
6013 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6014
6015         Fix for PR gcj/140:
6016         * parse.y (check_final_assignment): Recognize assignments to the
6017         `length' field of an array when generating class files.
6018
6019 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6020
6021         * class.c (decl_hash): Prototype removed.
6022         (decl_compare): Likewise.
6023
6024 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6025
6026         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
6027         * parse.y (check_modifiers_consistency): Check for final/volatile
6028         clash.  Fixes PR gcj/164.
6029
6030 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6031
6032         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
6033         made global.
6034         (java_hash_compare_tree_node): Renamed from `decl_compare, made
6035         global.
6036         (add_method_1): Use `java_hash_hash_tree_node' and
6037         `java_hash_compare_tree_node'.
6038         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
6039         (java_hash_compare_tree_node): Likewise.
6040         * parse.y (find_applicable_accessible_methods_list): Create,
6041         delete and use a hash table to remember already searched interfaces.
6042
6043 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
6044
6045         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
6046         with latest entry.
6047
6048 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6049
6050         * boehm.c (mark_reference_fields, set_bit): Prototype.
6051         (set_bit): Un-ANSI-fy definition.
6052
6053         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
6054         Prototype.
6055
6056         * decl.c (emit_init_test_initialization): Likewise.
6057
6058         * gjavah.c (jni_print_char): Likewise.
6059
6060         * parse.y (create_new_parser_context): Likewise.
6061
6062 Thu Mar 30 15:26:56 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6063
6064         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
6065         patch missing hunk. Fixed indentation.
6066
6067 2000-03-30  Tom Tromey  <tromey@cygnus.com>
6068
6069         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
6070         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
6071
6072 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6073
6074         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
6075         when negative *before* using it as an array index.
6076         * ChangeLog: Fixed typo.
6077
6078 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6079
6080         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
6081         to 0 when it reaches -1.
6082
6083 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6084
6085         * jcf-parse.c (get_constant): Properly cast `num' during the
6086         invocation of `add_double'.
6087         * jcf-write.c (push_long_const): Properly cast `lo' before
6088         comparing it to short bounds.
6089         * parse-scan.y (interface_declaration:): Rule re-arrange so that
6090         `interface_body:' is reduced after the current interface is
6091         pushed.
6092
6093 2000-03-26  Tom Tromey  <tromey@cygnus.com>
6094
6095         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
6096         Java-specific `-f' option.
6097
6098 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6099
6100         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
6101         Adjust order of making types.
6102         Make bitsize_*_node values.
6103
6104 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6105
6106         * class.c (make_field_value): Use byte_position.
6107         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
6108         (java_array_data_offset): Likewise.
6109         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
6110         bzero call.
6111
6112 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6113
6114         * parse.y (check_abstract_method_definitions): New local
6115         `end_type_reached'. Make sure we also consider `end_type'.
6116         (java_check_abstract_method_definitions): Make sure we eventually
6117         consider `java.lang.Object'.
6118         (maybe_use_access_method): Don't use access method if not in the
6119         context of a pure inner class or if the method's context is right.
6120         (find_applicable_accessible_methods_list): New static flag
6121         `object_done'. Don't search abstract classes as interfaces. Fixed
6122         indentation. Fixed the `java.lang.Object' only search. Search
6123         class interface(s) first, then fully search enclosing contexts.
6124         (find_most_specific_methods_list): Pick the closest candidate when
6125         they're all abstract.
6126
6127 Mon Mar 20 08:58:51 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6128
6129         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
6130         properly initialize `finished_label'. Don't emit gotos for empty
6131         try statements.
6132
6133 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6134
6135         * except.c (emit_handlers): Clear catch_clauses_last.
6136
6137 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6138
6139         * parse.y (check_method_types_complete): New function.
6140         (create_class): Reset anonymous class counter only when seeing an
6141         non inner classe.
6142         (java_complete_class): JDEP_METHOD: Don't recompute signature
6143         if incomplete.
6144
6145 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6146
6147         * class.c (build_static_ref): Fixed indentation in comment.
6148         * java-tree.def (TRY_EXPR): Fixed typo in name.
6149         (CLASS_LITERAL): Likewise.
6150         * java-tree.h: (TYPE_DOT_CLASS): New macro.
6151         (struct lang_type): New field `dot_class'.
6152         * jcf-write.c (generate_bytecode_insns): Fixed error message.
6153         (generate_classfile): Method `class$' is synthetic.
6154         * parse.y (build_do_class_method): New function.
6155         (build_dot_class_method_invocation): Likewise.
6156         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
6157         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
6158         (qualify_ambiguous_name): Likewise.
6159         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
6160         (build_try_statement): Fixed leading comment.
6161
6162 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6163
6164         * class.c (make_field_value): Properly handle sizes.
6165         (get_dispatch_vector): Use tree_low_cst and host_integerp.
6166         (layout_class_method): Count using trees.
6167         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
6168         * expr.c (java_array_data_offset): Use int_bit_position.
6169         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
6170         (build_invokevirtual): Use tree_low_cst and do computations with trees.
6171
6172 2000-03-16  Tom Tromey  <tromey@cygnus.com>
6173
6174         * lang.c (flag_hash_synchronization): New global.
6175         (lang_f_options): Added `hash-synchronization'.
6176         * lang-options.h: Mention -fhash-synchronization.
6177         * java-tree.h (flag_hash_synchronization): Declare.
6178         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
6179         hash table synchronization is disabled.
6180         * decl.c (init_decl_processing): Only push `sync_info' value when
6181         hash table synchronization is disabled.
6182         * class.c (make_class_data): Only push `sync_info' field when hash
6183         table synchronization is disabled.  Removed dead code.
6184
6185 2000-03-16  Tom Tromey  <tromey@cygnus.com>
6186
6187         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
6188
6189 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6190
6191         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
6192         classes.
6193         * parse.y (patch_method_invocation): Handle anonymous classes
6194         creation in static context.
6195
6196 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6197
6198         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
6199         * parse.y (resolve_qualified_expression_name): Use it.
6200         (patch_method_invocation): Likewise.
6201
6202 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6203
6204         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
6205         depending on the type of dependency which dictates what the
6206         current class is.
6207         (unresolved_type_p): Resolved types limited to the current class.
6208
6209 2000-03-15  Tom Tromey  <tromey@cygnus.com>
6210
6211         * decl.c (init_decl_processing): Set type of `sync_info' to be
6212         pointer to Object.
6213
6214         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
6215         Correctly compute bit number for current slot.  Zero `high' and
6216         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
6217         mark_reference_fields.
6218         (mark_reference_fields): New function.
6219
6220 Tue Mar 14 17:15:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6221
6222         * parse.y (register_incomplete_type): Fixed initialization of
6223         JDEP_ENCLOSING.
6224
6225 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6226
6227         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
6228         static globals.
6229         (push_class_context, pop_class_context): New function.
6230         (class_body:): Call pop_class_context.
6231         (interface_body:): Likewise.
6232         (INNER_QUALIFIER): New macro.
6233         (report_class_declaration): Changed output format and use
6234         INNER_QUALIFIER. Call push_class_context.
6235
6236 2000-02-14  Andrew Haley  <aph@cygnus.com>
6237
6238         * check-init.c (check_init): Add new cases for unary and binary
6239         tree nodes.
6240
6241 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6242
6243         * parse.y (resolve_package): Set `next' once a type name has been
6244         progressively discovered.
6245         (resolve_qualified_expression_name): Propagate resolution only if
6246         there are remaining qualifiers. Take into account `q' might have
6247         been cleared after re-qualification.
6248         * parse.y (patch_method_invocation): New local `resolved'.
6249         Section dealing with qualified expression rewritten to use
6250         resolve_field_access.
6251
6252 Mon Mar 13 12:21:13 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6253
6254         * parse.h (PUSH_CPC): Fixed indentation.
6255         (DEBUG_CPC): New macro.
6256         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
6257         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
6258         * parse.y (class_body_declaration:): Use
6259         SET_CPC_INSTANCE_INITIALIZER_STMT.
6260         (method_declaration:): Check for null current_function_decl.
6261         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
6262         (java_parser_context_pop_initialized_field): Better handling of
6263         empty lists.
6264         (maybe_make_nested_class_name): Mark nested class name as
6265         qualified when necessary.
6266         (end_class_declaration): Don't call java_parse_context_resume when
6267         one or more error occurred.
6268         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
6269         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
6270         SET_CPC_INITIALIZER_STMT.
6271         (method_header): Check for inner classes declaring static methods.
6272         (resolve_qualified_expression_name): Handle situation where `this'
6273         is implied.
6274
6275 Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
6276
6277         * typeck.c (build_prim_array_type): Correctly set the high word too.
6278
6279 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6280
6281         * parse.y (java_complete_expand_methods): Leave <clinit> out of
6282         ordinary methods.
6283         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
6284         list of methods for interfaces.
6285
6286 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6287
6288         * parse.y (qualify_ambiguous_name): Properly handle expressions
6289         using `null'.
6290
6291 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6292
6293         * parse.y (check_final_assignment): Extended to process
6294         COMPOUND_EXPR.
6295         (patch_assignment): Have check_final_assignment called only once.
6296
6297 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6298
6299         * java-tree.h (IS_INIT_CHECKED): New flag.
6300         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
6301         * parse.y (patch_string): Call force_evaluation_order on the
6302         completed string concatenation tree.
6303         * expr.c (force_evaluation_order): Call force_evaluation_order on
6304         function's arguments too.
6305
6306 Mon Mar  6 18:07:07 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6307
6308         * decl.c (emit_init_test_initialization): Mark KEY as unused.
6309         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
6310         (build_anewarray): Likewise.
6311         * parse.y (patch_newarray): Likewise.
6312         * parse.c: Regenerated.
6313
6314 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
6315
6316         * decl.c (init_decl_processing): Added new class fields `depth',
6317         `ancestors', and `idt' to class_type_node. Use
6318         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
6319         * class.c (make_class_data): Push initial values for new fields.
6320         * java-tree.h: Updated prototype for `build_invokeinterface'.
6321         * expr.c (build_invokeinterface): Changed parameters to accept
6322         `method' tree. Calculate index of `method' in its declaring
6323         interface. Build call to _Jv_LookupInterfaceMethodIdx.
6324         (expand_invoke): Call `build_invokeinterface' with new parameters.
6325         * parse.y (patch_invoke): Call `build_invokeinterface' with new
6326         parameters.
6327
6328 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
6329
6330         * typeck.c (lookup_do): Search superinterfaces first
6331         when looking up an interface method. From Godmar Back
6332         <gback@cs.utah.edu>
6333
6334 2000-03-06  Tom Tromey  <tromey@cygnus.com>
6335
6336         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
6337
6338 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6339
6340         * java-tree.h (lookup_argument_method2): Declared.
6341         (safe_layout_class): Prototype moved from parse.h.
6342         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
6343         * parse.y (java_check_regular_methods): Local `super_class' gone.
6344         Call lookup_argument_method2 instead of lookup_argument_method.
6345         Perform modifier match for methods found declared in implemented
6346         interfaces. Fixed indentation problem. Overriding/hiding error
6347         report to take place only for methods found in classes.
6348         * typeck.c (lookup_argument_method): Changed leading
6349         comment. Re-written by calling lookup_do.
6350         (lookup_argument_method2): New function.
6351         (lookup_java_method): Re-written by calling lookup_do.
6352         (lookup_do): New function.
6353
6354 Thu Mar  2 15:18:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6355
6356         * check-init.c (check_init): Removed dead code. Handle (blank)
6357         final variables.
6358         * parse.y (declare_local_variables): New local `final_p', set it
6359         and use it to initialize LOCAL_FINAL.
6360         (check_final_assignment): Only check FIELD_DECLs.
6361
6362 2000-02-17  Tom Tromey  <tromey@cygnus.com>
6363
6364         * Makefile.in (JAVA_OBJS): Added boehm.o.
6365         (boehm.o): New target.
6366         * Make-lang.in (JAVA_SRCS): Added boehm.c.
6367         * java-tree.h (flag_use_boehm_gc): Declare.
6368         (get_boehm_type_descriptor): Declare.
6369         * lang.c (lang_f_options): Added `use-boehm-gc'.
6370         (flag_use_boehm_gc): New global.
6371         * lang-options.h: Added -fuse-boehm-gc.
6372         * boehm.c: New file.
6373         * class.c (get_dispatch_table): If class uses a Boehm type
6374         descriptor, put it in the vtable.
6375         (make_class_data): Removed dead code.
6376
6377 2000-03-03  Per Bothner  <per@bothner.com>
6378
6379         * decl.c (init_decl_processing):  Initialize sizetype properly.
6380
6381 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6382
6383         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
6384         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
6385         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6386         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
6387         (jcf_parse): New local `current'. Load innerclasses seen in outer
6388         context being processed.
6389         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6390         * jcf-write.c (append_innerclasses_attribute): New function.
6391         (append_innerclasses_attribute_entry): Likewise.
6392         (get_access_flags): Handle static classes. Set anonymous and local
6393         classes to be private.
6394         (generate_classfile): Attribute count adjusted. Call
6395         append_innerclasses_attribute.
6396         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
6397         PURE_INNER_CLASS_TYPE_P.
6398         * parse.y (parser_qualified_classname): New parameter `is_static',
6399         produce non qualified name accordingly.
6400         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
6401         (create_interface): Added argument to parser_qualified_classname.
6402         (create_class): Added argument to parser_qualified_classname. Setup
6403         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
6404         (add_inner_class_fields): Fixed indentation.
6405         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
6406         (method_declarator): Fixed typo in comment.
6407         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
6408         (build_current_thisn): Likewise.
6409         (patch_method_invocation): Likewise.
6410
6411 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6412
6413         * decl.c (current_function_decl): Move to toplev.c.
6414
6415 Mon Feb 28 08:20:42 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6416
6417         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
6418         (DECL_BIT_INDEX): Use underlying representation.
6419         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
6420
6421 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6422
6423         * expr.c (build_java_ret): Pass proper type to size_binop.
6424
6425 2000-02-25  Anthony Green  <green@cygnus.com>
6426
6427         * expr.c (build_class_init): Mark the decl to be ignored by
6428         check_init.
6429         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
6430         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
6431         * class.c (init_test_hash_newfunc): New function.
6432         (decl_hash): New function.
6433         (decl_compare): New function.
6434         * decl.c (emit_init_test_initialization): New function.
6435         (complete_start_java_method): Traverse the init test hashtable,
6436         calling emit_init_test_initialization.
6437         (always_initialize_class_p): Define.
6438         * expr.c (build_class_init): Use initialization tests when
6439         emitting class initialization code.
6440         (always_initialize_class_p): Declare.
6441         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
6442         1.
6443         * java-tree.h: Include hash.h.
6444         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
6445         (struct lang_decl): Add init_test_table field.
6446         (init_test_hash_entry): Define.
6447
6448 Fri Feb 25 18:41:31 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6449
6450         * gjavah.c (main): Avoid using `argi' to report unimplemented
6451         options.
6452
6453 Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6454
6455         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
6456         initialize locals to avoid warnings. Local `exception_type' moved
6457         into if statement.
6458
6459 Fri Feb 25 18:00:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6460
6461         * parse.y (resolve_expression_name): Use `orig' as a second
6462         argument to resolve_field_access.
6463         (resolve_field_access): Removed unnecessary code when dealing with
6464         static fields.
6465
6466 Wed Feb 23 17:41:50 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6467
6468         * class.c (push_super_field): Don't push the field twice.
6469         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
6470         * parse.h (java_reorder_fields): Prototyped.
6471         * parse.y (java_reorder_fields): New function.
6472         (java_layout_class): Simplified not to worry about re-ordering.
6473
6474 2000-02-23  Tom Tromey  <tromey@cygnus.com>
6475
6476         * gjavah.c (print_name): In JNI case, correctly quote string.
6477         (print_method_info): Don't handle overrides in JNI mode.
6478
6479 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6480
6481         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
6482         value type set to `boolean_type_node'.
6483
6484 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
6485
6486         * jcf-dump.c (main): Test for correct condition after
6487         output file creation.
6488
6489 2000-02-19  Anthony Green  <green@cygnus.com>
6490
6491         * jcf-depend.c (add_entry): Fix test for first list entry.
6492
6493 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6494
6495         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
6496         * constants.c (build_constants_constructor): Likewise.
6497
6498 2000-02-19  Anthony Green  <green@cygnus.com>
6499
6500         * jcf-depend.c (add_entry): Add entries to the end of the list.
6501
6502 Wed Nov 03 02:16:00 PST 1999  Pekka Nikander  <pekka.nikander@hut.fi>
6503
6504         * decl.c (INT_TYPE_SIZE): Define if necessary.
6505         (expand_java_return): Handle the case of a native integer smaller
6506         than a JVM integer.
6507
6508 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6509
6510         * gjavah.c (help): Use GCCBUGURL.
6511         * jv-scan.c (help): Likewise.
6512         * jcf-dump.c (help): Likewise.
6513
6514 Thu Feb 17 14:30:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6515
6516         * jcf-write.c (generate_bytecode_insns): Don't generate empty
6517         `finally' clauses.
6518
6519 Thu Feb 17 13:20:58 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6520
6521         * jcf-parse.c (load_class): Call `fatal' if no file containing
6522         the target class are found.
6523
6524 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
6525
6526         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
6527         lex.c, lex.h, and PARSE_H to...
6528         (parse.o, parse-scan.o): ...here, respectively.
6529
6530         * lex.c: Split out code that may trigger SIGFPE from yylex()
6531         to its own function.
6532         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
6533
6534 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6535
6536         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
6537
6538 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6539
6540         * parse.y (outer_field_access_p): Stop in time when outer contexts
6541         are exhausted.
6542         (resolve_qualified_expression_name): Properly qualify *everything*
6543         after a package.type to be resoled as expression names.
6544         (find_applicable_accessible_methods_list): Save/restore `class' to
6545         isolate it from a possible outer context search.
6546
6547 2000-02-15  Tom Tromey  <tromey@cygnus.com>
6548
6549         * gjavah.c (jni_print_char): New function.
6550         (print_full_cxx_name): Use it.
6551         (decode_signature_piece): Likewise.
6552         (print_cxx_classname): Likewise.
6553
6554 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6555
6556         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
6557         version.o.
6558         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
6559
6560         * gjavah.c: Include version.h.
6561
6562         * jcf-dump.c: Likewise.
6563
6564         * jv-scan.c: Likewise.
6565
6566 Sat Feb 12 04:34:04 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6567
6568         * parse.y (outer_field_access_fix): First parameter now a tree
6569         node. Check for assignement to final. First argument to
6570         build_outer_field_access_fix modified to accommodate prototype.
6571         (build_outer_field_access): Don't check for assignment to final
6572         here.
6573         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
6574         possibly returned by outer_field_access_fix. Changed
6575         outer_field_access_fix's first argument.
6576         (check_final_assignment): $finit$'s context is OK.
6577         (patch_unaryop): Use node instead of its line/column value when
6578         calling outer_field_access_fix.
6579
6580 Fri Feb 11 17:38:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6581
6582         * parse.y (interface_declaration:): No longer tagged
6583         <node>. Re-installed default action.
6584         (class_member_declaration:): Handle inner interfaces.
6585         (interface_member_declaration): Handle inner interfaces and
6586         classes.
6587         (create_interface): Push error if one seen. Suspend parsing
6588         context when processing an inner interface.
6589         (register_fields): Inner class static field limitations not to
6590         apply to inner interfaces.
6591
6592 Thu Feb 10 22:07:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6593
6594         * jcf-parse.c (load_class): Update `java_error_count' when a
6595         class' file can't be found.
6596         (parse.y): Avoid (byte)code generation when errors seen.
6597
6598 Thu Feb 10 20:10:43 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6599
6600         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
6601         decodes a valid node.
6602         (patch_binop): Handle TRUNC_DIV_EXPR.
6603
6604 Thu Feb 10 16:04:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6605
6606         * parse.y (resolve_package): New local `acc'. Try to progressively
6607         build and guess a package and type name.
6608
6609 Thu Feb 10 12:52:09 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6610
6611         * parse.y (find_applicable_accessible_methods_list): Load and
6612         layout the search class if necessary.
6613         (java_complete_tree): Keep to original type of the folded initial
6614         value.
6615
6616 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6617
6618         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
6619         Generate error message if circularity is detected. New static
6620         local `list'.
6621         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
6622         * jcf-write.c (generate_bytecode_insns): Very simply handle
6623         SAVE_EXPR.
6624         * parse.y (java_check_circular_reference): Use
6625         `cyclic_inheritance_report' during report, if necessary.
6626         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
6627         walking NEW_ARRAY_INIT twice.
6628
6629 2000-02-09  Tom Tromey  <tromey@cygnus.com>
6630
6631         * parse.y (check_class_interface_creation): Allow inner classes to
6632         be `private' or `protected', check modifiers' consistency. Prevent
6633         block local classes from bearing any modifiers.
6634
6635 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6636
6637         * except.c (check_start_handlers): Re-add prototype lost in last
6638         patch.
6639         (maybe_start_try): Remove excess argument to `check_start_handlers'.
6640
6641 2000-02-09  Andrew Haley  <aph@cygnus.com>
6642
6643         * decl.c (clear_binding_level): Remove excess initializer.
6644         (maybe_poplevels): Remove unused variable.
6645         (force_poplevels): Ditto.
6646         (struct binding_level): Add comment.
6647
6648 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6649
6650         * jcf-write.c (generate_classfile): Don't consider
6651         pre-initialization with reference value (use <clinit> instead.)
6652         * parse.y (java_fix_constructors): No generated constructor for
6653         interfaces.
6654         (build_outer_field_access): Removed debug message.
6655         (outer_field_expanded_access_p): Adapted to bytecode generation.
6656         (build_outer_field_access_method): Use fix_method_argument_names.
6657         (build_outer_method_access_method): Fixed indentation. Added
6658         comment. Handle access method generation for static and also void
6659         methods.
6660         (build_access_to_thisn): Inserted debug message.
6661         (maybe_build_thisn_access_method): Use fix_method_argument_names.
6662         (resolve_qualified_expression_name): Fixed comment.
6663         (not_accessible_p): Adapted to bytecode generation. Added comment.
6664         (patch_method_invocation): Added comment.
6665         (maybe_use_access_method): Fixed leading comment. Handle static
6666         methods.
6667         (java_complete_lhs): Don't shortcut handling of initialized upon
6668         declaration String type static fields when generating bytecode.
6669         (patch_unaryop): Handle outer field access when generating
6670         bytecode.
6671
6672 Thu Feb  3 20:23:19 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6673
6674         * java-tree.h (FIELD_THISN): New macro.
6675         * jcf-write.c (append_synthetic_attribute): New function.
6676         (generate_classfile): Set "Synthetic" attribute on this$<n>,
6677         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
6678         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
6679         this$<n> fields.
6680         (build_outer_field_access): Turned on access functions usage and
6681         generation when compiling to bytecode.
6682         (maybe_use_access_method): Likewise.
6683
6684 2000-01-25  Andrew Haley  <aph@cygnus.com>
6685
6686         * java-except.h (struct eh_range): Add `expanded' field.
6687         (maybe_start_try): Add end_pc arg.
6688         (maybe_end_try): Ditto.
6689         * java-tree.h (force_poplevels): new function.
6690         * expr.c (expand_byte_code): Don't call maybe_start_try or
6691         maybe_end_try.
6692         * except.c (add_handler): Reset expanded.
6693         (expand_start_java_handler): Set expanded.
6694         (check_start_handlers): Don't expand a start handler that's
6695         already been expanded.
6696         (maybe_start_try): Add end_pc arg.  Only expand a handler which
6697         ends after end_pc.
6698         (expand_end_java_handler): call force_poplevels.
6699         (force_poplevels): new function.
6700         * decl.c (binding_level): Add start_pc of binding level.
6701         (maybe_pushlevels): Call maybe_start_try when pushing binding
6702         levels.
6703         (maybe_poplevels): Call maybe_end_try when popping binding levels.
6704         (LARGEST_PC): Define.
6705         (clear_binding_level): Use LARGEST_PC.
6706
6707         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
6708         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
6709         (binding_depth, is_class_level, current_pc): new variables.
6710         (struct binding_level): ditto.
6711         (indent): new function.
6712         (push_jvm_slot): add debugging info.
6713         (maybe_pushlevels): ditto.
6714         (maybe_poplevels): ditto.
6715         (pushlevel): ditto.
6716         (poplevel): ditto.
6717         (start_java_method): ditto.
6718         (give_name_to_locals): comment only.
6719         * except.c (binding_depth, is_class_level, current_pc):
6720         new variables.
6721         (expand_start_java_handler): add debugging info.
6722         (expand_end_java_handler): ditto.
6723
6724 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6725
6726         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
6727         (print_name_for_stub_or_jni, process_file): Constify a char*.
6728
6729 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6730
6731         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
6732
6733 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6734
6735         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
6736         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
6737         defined to be 1.
6738
6739 Wed Feb  2 18:43:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6740
6741         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
6742         * java-tree.h (TYPE_II_STMT_LIST): New macro.
6743         (struct lang_type): New field `ii_block'.
6744         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
6745         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
6746         * parse.h (struct parser_ctxt): New field `instance_initializers'.
6747         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
6748         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
6749         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
6750         macros.
6751         * parse.y (add_instance_initializer): New function.
6752         (in_instance_initializer): New static global.
6753         (class_body_declaration:): Link instance initializer block.
6754         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
6755         (array_creation_expression:): Remove unused local.
6756         (java_parser_context_push_initialized_field): Fixed leading
6757         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
6758         CPC_INSTANCE_INITIALIZER_LIST.
6759         (java_parser_context_pop_initialized_field): Likewise.
6760         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
6761         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
6762         CPC_INITIALIZER_STMT.
6763         (fix_constructors): New local `class_type'. Use it. Call
6764         add_instance_initializer.
6765         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
6766         (patch_return): Forbid return in instance initializers.
6767         (patch_throw_statement): Enforce exception handling in the context
6768         of instance initializers.
6769
6770 2000-02-03  Tom Tromey  <tromey@cygnus.com>
6771
6772         * Make-lang.in (java.mostlyclean): Remove executables in
6773         `mostlyclean'.
6774
6775 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
6776
6777         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
6778         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
6779         (java_float_finite): Convert to use union Word from javaop.h.
6780         (java_double_finite): Convert to use union DWord from javaop.h.
6781
6782 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6783
6784         * gjavah.c (options): Added `jni' entry.
6785         (help): Document -jni.
6786         (flag_jni): New global.
6787         (process_file): Handle JNI output.  Don't print text from
6788         -prepend, -add, etc, when generating stubs.  Only remove `.class'
6789         suffix if it actually exists.
6790         (main): Create a `.c' file when run with `--jni --stubs'.  Create
6791         correct output file name with `--jni'.
6792         (print_include): Mangle header name differently in JNI case.
6793         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
6794         method list.
6795         (print_method_info): Handle JNI case.  Put signature info into
6796         method name.  Handle case when STREAM is NULL.
6797         (print_name_for_stub_or_jni): New function.
6798         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
6799         (print_cxx_classname): Handle JNI.
6800         (print_full_cxx_name): Likewise.
6801         (decode_signature_piece): Likewise.
6802         (overloaded_jni_method_exists_p): New function.
6803         (struct method_name): Added `signature' and `sig_length' fields.
6804         (HANDLE_END_FIELD): Do nothing in JNI mode.
6805
6806 2000-02-02  Tom Tromey  <tromey@cygnus.com>
6807
6808         * jv-scan.c: Include version.c, <getopt.h>.
6809         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
6810         (options): New array.
6811         (usage): New function.
6812         (version): New function.
6813         (main): Use getopt_long to parse command line.
6814         * jcf-dump.c: Include version.c, <getopt.h>.
6815         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
6816         OPT_JAVAP): New macros.
6817         (options): New array.
6818         (usage): Return `void'.  Changed message.
6819         (help): New function.
6820         (version): New function.
6821         (main): Use getopt_long_only to parse command line.
6822         * gjavah.c: Include <getopt.h>.
6823         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
6824         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
6825         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
6826         (options): New array.
6827         (java_no_argument): Removed.
6828         (help): Updated with missing options.
6829         (main): Use getopt_long_only to parse command line.
6830         (usage): Changed message.
6831
6832 Tue Feb  1 22:23:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6833
6834         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
6835         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
6836         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
6837         * parse.y (array_creation_expression:): Handle anonymous arrays.
6838         (build_array_from_name): Don't set `ret_name' if null.
6839         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
6840         (qualify_ambiguous_name): Likewise.
6841         (java_complete_expand_class): Likewise.
6842
6843 Tue Feb  1 14:59:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6844
6845         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
6846         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
6847         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
6848         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
6849         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
6850         AIPL_FUNCTION_COMPLETED_INVOCATION.
6851         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
6852         AIPL_FUNCTION_INVOCATION_READY.
6853         (AIPL_FUNCTION_DECLARATION): New enum entry.
6854         * parse.y (reorder_static_initialized): New function.
6855         (java_parser_context_pop_initialized_field): Use it.
6856         (add_inner_class_fields): Use
6857         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
6858         augmented. Install marker after last alias initializer, if any.
6859         (generate_finit): Fixed typo. Don't try to retain only the used
6860         fields.
6861         (method_header): Compute and set DECL_FUNCTION_NAP.
6862         (method_declarator): Fixed comment. Insert alias initializer in
6863         parameter list.
6864         (build_alias_initializer_parameter_list): Fixed leading
6865         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
6866         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
6867         (java_complete_expand_class): Code to retain only used aliases
6868         removed.
6869         (java_complete_expand_methods): New local `first_decl'. Generate
6870         $finit$ first, then expand the constructors, regular methods and
6871         <clinit>.
6872         (java_complete_expand_method): Don't report error on missing
6873         return statement if previously detected bogus.
6874         (fix_constructors): Don't patch constructor parameters list.
6875         (patch_method_invocation): Use new AIPL enum values. Reverse
6876         alias initializer list for anonymous classes.
6877
6878 2000-01-30  Anthony Green  <green@redhat.com>
6879
6880         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
6881         determine how many stack slots to pop.
6882
6883 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6884
6885         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
6886         error handling/recovery.
6887         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
6888
6889 Fri Jan 28 20:10:57 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6890
6891         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
6892         FIELD_LOCAL_ALIAS_USED): New macros.
6893         (DECL_FUNCTION_NAP): New macro.
6894         (struct lang_decl): New field `nap'.
6895         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
6896         (struct lang_type): New fields `finit_stmt_list' and
6897         `clinit_stmt_list'.
6898         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
6899         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
6900         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
6901         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
6902         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
6903         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
6904         (BUILD_THROW): Macro line separator re-indented.
6905         * parse.y (end_class_declaration): New function.
6906         (maybe_generate_pre_expand_clinit): New name for
6907         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
6908         pre-expand static fields.
6909         (maybe_generate_clinit): Function deleted.
6910         (check_for_static_method_reference): Prototype's parameter list
6911         indented.
6912         (generate_finit): New name for maybe_generate_finit. Changed
6913         leading comment. Function rewritten to use
6914         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
6915         (build_alias_initializer_parameter_list): New function.
6916         (java_parser_context_pop_initialized_field): Likewise.
6917         (add_inner_class_fields): Likewise.
6918         (type_declaration:): Call end_class_declaration.
6919         (class_member_declaration:): Likewise.
6920         (formal_parameter_list:): Fixed typos.
6921         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
6922         element. Improved error handling.
6923         (block_statement:): Call end_class_declaration.
6924         (anonymous_class_creation:): Likewise.
6925         (create_anonymous_class): Fixed comments.
6926         (create_class): Call add_inner_class_fields.
6927         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
6928         (method_header): Use MARK_FINAL_PARMS.
6929         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
6930         (method_declarator): Propagate final argument flag.
6931         (craft_constructor): New local `artificial'. Call
6932         build_alias_initializer_parameter_list. Use
6933         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
6934         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
6935         necessary.
6936         (complete_expand_class): Get rid of unused outer context local
6937         alias fields.
6938         (java_complete_expand_methods): Fixed leading
6939         comment. Generate/pre-expand <clinit> first. Changed method
6940         expansion order to regular, $finit$, constructors, <clinit>.
6941         (java_complete_expand_method): Set current_function_decl.
6942         (fix_constructors): Fix constructor parameter list to account for
6943         outer context local alias initializers.
6944         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6945         (resolve_expression_name): Lookup outer context local aliases. New
6946         local `access', use it.
6947         (patch_method_invocation): Patch inner class ctor invocation with
6948         outer context local aliases initialization values. $finit$
6949         invocation patching now includes things generated with
6950         build_alias_initializer_parameter_list.
6951         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
6952         (build_super_invocation): Likewise.
6953         (patch_assignment): Changed comment.
6954
6955 2000-01-27  Andrew Haley  <aph@cygnus.com>
6956
6957         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
6958         (emit_if): Ditto.
6959         (emit_jsr): Ditto.
6960
6961 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6962
6963         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
6964         concatenation.
6965         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
6966
6967         * parse.y (register_fields): Don't pass a format specifier to
6968         OBSOLETE_MODIFIER_WARNING.
6969         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
6970         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
6971         specifier.
6972         (check_modifiers): Change function into a macro.
6973         (check_class_interface_creation): Pass a literal format string.
6974
6975 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6976
6977         * buffer.h: PROTO -> PARAMS.
6978         * check-init.c: Likewise.
6979         * class.c: Likewise.
6980         * constants.c: Likewise.
6981         * convert.h: Likewise.
6982         * decl.c: Likewise.
6983         * except.c: Likewise.
6984         * expr.c: Likewise.
6985         * gjavah.c: Likewise.
6986         * java-except.h: Likewise.
6987         * java-tree.h: Likewise.
6988         * jcf-depend.c: Likewise.
6989         * jcf-dump.c: Likewise.
6990         * jcf-parse.c: Likewise.
6991         * jcf-path.c: Likewise.
6992         * jcf-reader.c: Likewise.
6993         * jcf-write.c: Likewise.
6994         * jcf.h: Likewise.
6995         * jv-scan.c: Likewise.
6996         * jvgenmain.c: Likewise.
6997         * jvspec.c: Likewise.
6998         * lang.c: Likewise.
6999         * lex.c: Likewise.
7000         * lex.h: Likewise.
7001         * parse-scan.y: Likewise.
7002         * parse.h: Likewise.
7003         * parse.y: Likewise.
7004         * typeck.c: Likewise.
7005         * verify.c: Likewise.
7006         * xref.c: Likewise.
7007         * xref.h: Likewise.
7008         * zextract.c: Likewise.
7009         * zipfile.h: Likewise.
7010
7011 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7012
7013         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
7014         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
7015         * constants.c (build_constant_data_ref): Check for cached
7016         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
7017         in TYPE_CPOOL_DATE_REF.
7018         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
7019         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
7020         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
7021         (LOCAL_FINAL): New macro.
7022         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
7023         constant pool -- don't try to reuse.
7024         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
7025         TYPE_LANG_SPECIFIC.
7026         (find_in_current_zip): Use TYPE_JCF.
7027         * parse.h (java_check_final): Prototype removed.
7028         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
7029         (maybe_create_class_interface_decl,
7030         check_class_interface_creation): Likewise.
7031         (java_expand_finals): Function removed.
7032         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
7033         (block_statement:): Fixed comment.
7034         (anonymous_class_creation:): Likewise.
7035         (check_class_interface_creation): Reversed Jan 12, 2000 extra
7036         argument patch.
7037         (check_class_interface_creation): Loosened error report on (inner)
7038         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
7039         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
7040         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
7041         argument patch.
7042         (create_interface): Likewise.
7043         (anonymous_class_counter): New static global.
7044         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
7045         patch. Fixed comments.
7046         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
7047         anonymous_class_counter when declaring a toplevel class.
7048         (craft_constructor): Fixed constructor name when handling
7049         anonymous classes. Anonymous class constructors to feature hidden
7050         this$<n> parameter.
7051         (java_fix_constructors): Added comment.
7052         (java_check_final): Function removed.
7053         (java_complete_expand_methods): Fixed comment. Don't generate
7054         class data, save its outgoing constant pool instead.
7055         (verify_constructor_super): Skip anonymous class constructor
7056         hidden this$<n> parameter.
7057         (java_expand_classes): New local `saved_ctxp'. Removed call to
7058         java_expand_finals and java_check_final. Expand anonymous class
7059         constructors. Generate class data.
7060         (build_super_invocation): Skip anonymous class hidden this$<n>
7061         parameter.
7062         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
7063         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
7064         (set_java_signature): Likewise.
7065
7066 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7067
7068         * gjavah.c: Delete ACC_VISIBILITY define.
7069         * jcf.h: Add ACC_VISIBILITY define.
7070         * parse.y: final: rule tagged <value>.
7071         (java_check_regular_methods): Use ACC_VISIBILITY define for
7072         default package access check.
7073         (local_variable_declaration_statement): Use final: rule.
7074
7075 Mon Jan 17 11:58:17 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7076
7077         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
7078         (final:): New rule.
7079
7080 2000-01-17  Tom Tromey  <tromey@cygnus.com>
7081
7082         * gjavah.c (print_field_info): Allow non-static final fields.
7083
7084 Fri Jan 14 18:03:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7085
7086         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
7087         * parse.y (patch_anonymous_class): New function.
7088         (create_anonymous_class): Register incomplete type when the
7089         class/interface to extends/implement isn't known yet.
7090         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
7091         (verify_constructor_super): Tuned error message.
7092
7093 Fri Jan 14 00:14:24 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7094
7095         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
7096         (ANONYMOUS_CLASS_P): New macro.
7097         (TYPE_SIGNATURE, TYPE_JCF): New macros.
7098         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
7099         * parse.y (create_class): Added leading argument.
7100         (maybe_create_class_interface_decl,
7101         check_class_interface_creation): Likewise.
7102         (craft_constructor): New function.
7103         (verify_constructor_super): Added argument in prototype.
7104         (class_declaration:): Inserted leading argument.
7105         (for_begin:): Use FOR_LOOP_P.
7106         (anonymous_class_creation): Create WFL of the anonymous class to
7107         instantiate. Call build_new_invocation. Added comments.
7108         (check_class_interface_creation): Handle parameter `anonymous' in
7109         verbose mode class creation announce.
7110         (link_nested_class_to_enclosing): Exclude anonymous classes.
7111         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
7112         anonymous class, even though they appear to have an enclosing
7113         context.
7114         (create_interface): Pass extra argument to
7115         check_class_interface_creation.
7116         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
7117         (create_class): Call check_class_interface_creation and
7118         maybe_create_class_interface_decl with extra new argument. Don't
7119         add private this$<n> to anonymous classes.
7120         (method_declarator): Insert hidden this$<n> to anonymous class
7121         constructors.
7122         (java_fix_constructors): Deleted code creating default
7123         constructor. Call craft_constructor instead.
7124         (java_check_regular_methods): Set `saw_constructor' to 1 for
7125         anonymous classes.
7126         (fix_constructors): Pass extra argument to verify_constructor_super.
7127         (verify_constructor_super): New local `sdecl', use it. Search for
7128         matching constructor (possibly featuring arguments) in super
7129         class.
7130         (lookup_method_invoke): Craft constructor according to arguments
7131         list when dealing with anonymous class constructors.
7132         (build_super_invocation): Pass arguments to anonymous class super
7133         constructors.
7134         (search_loop): Use FOR_LOOP_P.
7135         (labeled_block_contains_loop_p): Likewise.
7136
7137 Wed Jan 12 00:38:47 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7138
7139         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
7140         (enclosing_context_p): New function.
7141         (get_access_flags_from_decl): Handle CLASS_STATIC.
7142         (maybe_layout_super_class): Extra first argument passed to
7143         do_resolve_class.
7144         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
7145         ID_INIT_P.
7146         * decl.c (access0_identifier_node): New global.
7147         (init_decl_processing): access0_identifier_node initialized.
7148         (pushdecl): Set DECL_CONTEXT only on non type decls.
7149         * expr.c (lookup_field): Lookup inner class fields in enclosing
7150         contexts.
7151         (expand_invoke): Use ID_INIT_P.
7152         (expand_java_field_op): Use DECL_CLINIT_P.
7153         * java-tree.def (CLASS_LITERAL): New tree code.
7154         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
7155         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
7156         (struct lang_decl): New field `inner_access'.
7157         (enclosing_context_p): Prototyped.
7158         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
7159         ID_CLINIT_P): New macros.
7160         (CLASS_STATIC): New macro.
7161         (CLASS_ACCESS0_GENERATED_P): New macro.
7162         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
7163         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
7164         INNER_CLASS_P): New macros.
7165         (DECL_INNER_CLASS_LIST): New macro.
7166         * jcf-parse.c (yyparse): Avoid the use of ANSI string
7167         concatenation.
7168         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
7169         the shift value to int. Fixed typo in comment.
7170         * lex.c (inst_id, wpv_id): Initialize.
7171         * mangle.c (unicode_mangling_length): Take `$' into account.
7172         * parse.h (DRECOVER, RECOVER): Terminate properly.
7173         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
7174         (typedef struct _jdep): New field `enclosing'.
7175         (JDEP_ENCLOSING): New macro.
7176         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
7177         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
7178         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
7179         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
7180         GET_ENCLOSING_CPC_CONTEXT): New macros.
7181         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
7182         (do_resolve_class): Added extra argument in prototype.
7183         * parse.y (resolve_class): Added extra argument in prototype.
7184         (maybe_create_class_interface_decl): Likewise.
7185         (maybe_use_access_method, build_wfl_wrap): New functions.
7186         (java_complete_expand_classes, java_complete_expand_class):
7187         Likewise.
7188         (java_parser_context_push_initialized_field,
7189         java_parser_context_suspend, java_parser_context_resume):
7190         Likewise.
7191         (maybe_make_nested_class_name, make_nested_class_name,
7192         set_nested_class_simple_name_value,
7193         link_nested_class_to_enclosing, find_as_inner_class,
7194         find_as_inner_class_do, check_inner_class_redefinition,
7195         build_thisn_assign, build_current_thisn, build_access_to_thisn,
7196         maybe_build_thisn_access_method, build_outer_field_access,
7197         build_outer_field_access_methods, build_outer_field_access_expr,
7198         build_outer_method_access_method, build_new_access_id,
7199         build_outer_field_access_method, outer_field_access_p,
7200         outer_field_expanded_access_p, outer_field_access_fix,
7201         build_incomplete_class_ref, patch_incomplete_class_ref,
7202         create_anonymous_class): Likewise.
7203         (inst_id, wpv_id): New static global variables.
7204         (synchronized:): New rule, tagged <node>.
7205         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
7206         rules.
7207         (anonymous_class_creation:): New rule, tagged <node>.
7208         (NEW_TK): Tagged <node>.
7209         (type_literals, array_type_literal): New rules, tagged <node>.
7210         (class_declaration:): Removed action when reducing by class_body:
7211         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
7212         using GET_CPC in sub-rules.
7213         (class_member_declaration): Handle inner classes.
7214         (method_declaration): When reducing method_header:, reset
7215         current_function_decl when appropriate.
7216         (method_declarator:): Set the number of formal parameter to 0 for
7217         method declared without arguments.
7218         (constructor_declarator:): Likewise.
7219         (static_initializer:): List of elements kept in a list.
7220         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
7221         use of the keyword `static' for type declarations.
7222         (block_statement:): Handle inner class declarations.
7223         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
7224         type qualified `this'.
7225         (class_instance_creation_expression): Use anonymous_class_creation:
7226         to handle inner class instances creation. Handle qualified `new'.
7227         (something_dot_new): Added appropriate actions.
7228         (create_new_parser_context): New function.
7229         (java_push_parser_context, java_parser_context_save_global,
7230         java_parser_context_suspend): Use create_new_parser_context.
7231         (check_modifiers): Changed leading comment.
7232         (check_class_interface_creation): Handle interclasses.
7233         (add_superinterfaces): Fixed comment.
7234         (create_interface): Build qualified name from the raw_name instead
7235         of its matching WFL. Push the initialized fields list. raw_name added
7236         as an extra argument to maybe_create_class_interface_decl.
7237         (create_class): Build qualified name from the raw_name instead of
7238         its matching WFL. Removed assignment to current_parsed_class_un.
7239         Call PUSH_ERROR before returning an error. Suspend the current
7240         parser context when processing an inner class. Push the
7241         initialized fields list. raw_name added as an extra argument to
7242         maybe_create_class_interface_decl. Add the private this$<n>
7243         field.
7244         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
7245         (register_fields): Get the class type from GET_CPC and handle
7246         previous errors.  Added code to handle the creation of static
7247         fields in inner classes. Initialized fields initialization
7248         statements kept in a list of lists.
7249         (maybe_generate_finit): Initialized fields initialization
7250         statements kept in a list of lists. Use GET_CPC.
7251         (maybe_generate_clinit): Likewise.
7252         (method_header): Use GET_CPC and GET_CPC_UN.
7253         (parser_qualified_classname): Handle inner classes.
7254         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
7255         (java_fix_constructors): Hide pointer to enclosing context
7256         instance in constructor list when dealing with inner classes.
7257         (jdep_resolve_class): Call resolve_class with extra first argument
7258         JDEP_ENCLOSING.
7259         (resolve_class): Add enclosing context as a first extra argument
7260         to do_resolve_class.
7261         (do_resolve_class): Call find_as_inner_class. Handle WFLs
7262         properly.
7263         (resolve_no_layout): Extra argument added to resolve_class
7264         invocation.
7265         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
7266         (java_get_real_method_name): Use GET_CPC_UN.
7267         (check_abstract_method_definitions): Use DECL_CLINIT_P.
7268         (java_check_abstract_methods): Handle static method declared in
7269         inner classes by an error.
7270         (java_check_regular_methods): Use DECL_CLINIT_P.
7271         (source_start_java_method): Also set DECL_MAX_LOCALS.
7272         (create_artificial_method): Call java_parser_context_save_global
7273         and java_parser_context_restore_global instead of saving/restoring
7274         the context by hand.
7275         (expand_start_java_method): Improved verbose mode message.
7276         (java_complete_expand_methods): Fixed leading comment. Use
7277         DECL_CLINIT_P.
7278         (fix_constructors): Added assignment to this$<n> if necessary.
7279         (java_expand_classes): Call java_complete_expand_classes instead
7280         of java_complete_expand_methods.
7281         (make_qualified_primary): Simplified.
7282         (merge_qualified_name): Optimized for missing left or right parts.
7283         (resolve_expression_name): Handle access to outer class fields from
7284         interclasses.
7285         (resolve_qualified_expression_name): New macro
7286         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
7287         classes. Report error on non appropriate qualification of
7288         `new'. Handle qualified `this'.
7289         (not_accessible_p): Allow access to outer class private fields from
7290         inner classes.
7291         (patch_method_invocation): Handle method invocations through
7292         access methods and inner class constructor invocations.
7293         (find_applicable_accessible_methods_list): Search enclosing
7294         contexts of an inner class.
7295         (search_applicable_methods_list): Fixed typo.
7296         (argument_types_convertible): Handle inner class constructors'
7297         hidden outer context reference argument.
7298         (qualify_ambiguous_name): Handle qualified `this'.
7299         (java_complete_lhs): Handle use of field accessed through
7300         artificial access methods in various cases of assignments. Handle
7301         CLASS_LITERAL node.
7302         (check_final_assignment): Use DECL_CLINIT_P.
7303         (valid_ref_assignconv_cast_p): Handle the destination being an
7304         enclosing context of the source.
7305         (patch_unaryop): Handle use of field accessed through artificial
7306         access methods.
7307         (patch_return): Use DECL_CLINIT_P.
7308         (patch_throw_statement): Use DECL_CLINIT_P.
7309         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
7310         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
7311         ID_INIT_P.
7312
7313 2000-01-16  Anthony Green  <green@cygnus.com>
7314
7315         * parse.y (build_string_concatenation): Only use
7316         StringBuffer(String) shortcut if String arg is constant.
7317
7318 Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7319
7320         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
7321         the shift value to int. Fixed typo in comment.
7322
7323 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
7324
7325         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
7326         * jcf-write.c: Likewise.
7327         * parse.y: Likewise.
7328         * parse.c: Regenerate.
7329
7330 2000-01-09  Anthony Green  <green@cygnus.com>
7331
7332         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
7333         bytecodes in the correct order.
7334
7335 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7336
7337         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
7338
7339 Thu Jan  6 16:31:28 2000  Anthony Green  <green@cygnus.com>
7340
7341         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7342         before building constant array decl.
7343
7344 Thu Jan  6 00:54:10 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7345
7346         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
7347         method invocation and typo in conditional expression.
7348         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
7349         the appropriate NOTE_POP.
7350         * parse.y (patch_binop): Shift value mask to feature the right
7351         type.
7352
7353 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7354
7355         * class.c (assume_compiled, assume_compiled_node): Add static
7356         prototype.
7357         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
7358
7359         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
7360
7361         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
7362
7363         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
7364         to `__modifier' to avoid stringifying it.
7365
7366         * parse.y (verify_constructor_circularity): Don't call a variadic
7367         function with a non-literal format string.
7368         (java_check_abstract_methods): Move unreachable code inside
7369         `continue' statement.
7370         (lookup_method_invoke): Call xstrdup, not strdup.
7371
7372         * expr.c (expand_java_field_op): Avoid the use of ANSI string
7373         concatenation.
7374
7375         * jcf-parse.c (yyparse): Likewise.
7376
7377         * jv-scan.c (main): Likewise.
7378
7379 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7380
7381         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
7382         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
7383         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
7384         concatenation.
7385
7386         * parse.y (synchronized, variable_redefinition_error,
7387         check_class_interface_creation, create_interface, create_class,
7388         method_header, finish_method_declaration,
7389         check_modifiers_consistency, method_declarator,
7390         complete_class_report_errors, check_abstract_method_definitions,
7391         java_check_regular_methods, check_throws_clauses,
7392         java_check_abstract_methods, read_import_dir,
7393         check_pkg_class_access, declare_local_variables, fix_constructors,
7394         cut_identifier_in_qualified, resolve_expression_name,
7395         resolve_qualified_expression_name, patch_method_invocation,
7396         java_complete_lhs, patch_assignment, try_builtin_assignconv,
7397         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
7398         patch_exit_expr, patch_exit_expr, patch_switch_statement,
7399         patch_try_statement, patch_synchronized_statement,
7400         patch_throw_statement, check_thrown_exceptions,
7401         patch_conditional_expr): Likewise.
7402
7403 Fri Dec 24 00:25:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7404
7405         * Makefile.in (LIBDEPS): Added gcc's errors.o
7406         (../jcf-dump$(exeext):): Link with gcc's errors.o
7407         (../gcjh$(exeext):): Likewise.
7408         * expr.c (expand_java_NEW): Layout the entire target type instead of
7409         laying out its methods only.
7410         (lookup_field): Layout the class after having loaded it.
7411         * java-tree.h (java_debug_context): Declared.
7412         * jcf-io.c (toplev.h): Included.
7413         (find_class): Removed assignment to jcf's outofsynch
7414         field. Force source file to be read if newer than its matching
7415         class file. Tweaked debug messages.
7416         * jcf-parse.c (jcf_out_of_synch): Deleted.
7417         (read_class): Call to jcf_out_of_synch removed.
7418         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
7419         (jcf_out_of_synch): Prototype deleted.
7420         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
7421         `deprecated' and `class_err': integer turned into bit-fields.
7422         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
7423         * parse.y (package_list): New global.
7424         (package_declaration:): Record newly parsed package name.
7425         (extra_ctxp_pushed_p): Static global deleted.
7426         (java_parser_context_save_global): Create buffer context for the
7427         purpose of saving globals, if necessary.
7428         (java_parser_context_restore_global): Pop context pushed for the
7429         purpose of saving globals, if necessary.
7430         (java_debug_context_do): New prototype and function.
7431         (java_debug_context): Likewise.
7432         (do_resolve_class): Use already parsed package names to qualify
7433         and lookup class candidate.
7434         (java_pre_expand_clinit): Removed unnecessary local variable.
7435
7436 1999-12-17  Tom Tromey  <tromey@cygnus.com>
7437
7438         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
7439         fixes PR gcj/119.
7440         (process_file): Use `\n\' at end of each line in string.
7441
7442 Thu Dec 16 00:09:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7443
7444         * expr.c (expand_invoke): Layout the loaded class before
7445         attempting to use it.
7446         (expand_java_field_op): Allow final field assignments to take
7447         place in $finit$.
7448         * typeck.c (convert): Return error_mark_node if expr is null.
7449
7450 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7451
7452         * class.c (class_depth): Return -1 if the class doesn't load
7453         properly.
7454         * expr.c (can_widen_reference_to): Check for errors during depth
7455         computation and return 0 accordingly.
7456         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
7457         create default constructors and add an other error check.
7458         * parse.h (java_fix_constructors): Prototyped.
7459         * parse.y (java_pre_expand_clinit): Likewise.
7460         (build_super_invocation): Re-prototyped to feature one argument.
7461         (java_check_circular_reference): Directly use `current'.
7462         (java_fix_constructors): New function.
7463         (java_check_regular_methods): Don't create default constructors
7464         here, but abort if none were found.
7465         (java_complete_expand_methods): Pre-process <clinit> calling
7466         java_pre_expand_clinit.
7467         (java_pre_expand_clinit): New function.
7468         (fix_constructors): build_super_invocation invoked with the
7469         current method declaration as an argument.
7470         (build_super_invocation): Use the context of the processed method
7471         decl argument instead of current_class.
7472         * typeck.c (lookup_java_method): Take WFLs in method names into
7473         account.
7474
7475 Tue Dec 14 14:20:16 1999  Per Bothner  <per@bothner.com>
7476
7477         * class.c (make_class_data): flag_keep_inline_functions to keep
7478         private methods in the method array.
7479
7480 1999-12-15  Anthony Green  <green@cygnus.com>
7481
7482         * check-init.c (check_init): Take into account both types of
7483         `throw's when checking for uninitialized variables.
7484
7485 Fri Dec 10 21:53:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7486
7487         * parse.y (java_complete_lhs): Force convertion of array
7488         dimensions to int_type_node, that's what runtime's ABI expects.
7489
7490 Fri Dec 10 16:13:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7491
7492         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
7493         operand of a WFL, until the Java front-end gets fixed with regard
7494         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
7495
7496 1999-12-10  Andrew Haley  <aph@cygnus.com>
7497
7498         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
7499         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
7500         expr.c (build_java_athrow): Add support for sjlj-exceptions.
7501         java-tree.h: Ditto.
7502         jcf-write.c: Ditto.
7503
7504 Wed Dec  8 15:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7505
7506         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7507         before calling expand_eh_region_start and expand_start_all_catch.
7508         * except.c (expand_start_java_handler): Switch to permanent
7509         obstack before calling expand_eh_region_start.
7510         (expand_end_java_handler): Switch to permanent obstack before
7511         calling expand_start_all_catch.
7512
7513 1999-12-5  Anthony Green  <green@cygnus.com>
7514
7515         * decl.c (init_decl_processing): Mark throw_node as a noreturn
7516         function with side effects.
7517         (init_decl_processing): Mark all memory allocating DECLs with
7518         DECL_IS_MALLOC.
7519
7520 Wed Dec  1 04:25:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7521
7522         * except.c (expand_end_java_handler): Call
7523         expand_resume_after_catch and end_catch_handler.
7524
7525 Tue Nov 30 12:36:15 1999  Anthony Green  <green@cygnus.com>
7526
7527         * verify.c (verify_jvm_instructions): Create new return label
7528         chain if non existent (don't rely on the verified state of the jsr
7529         target.)
7530
7531 Tue Nov 30 12:28:34 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7532
7533         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
7534         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
7535
7536         * parse.y (patch_assignment): Removed bogus final class test on
7537         lhs when checking on whether to emit an ArrayStoreException runtime
7538         check.
7539         * expr.c (expand_java_arraystore): Likewise.
7540
7541 1999-11-28 Anthony Green <green@cygnus.com>
7542
7543         * decl.c (find_local_variable): Reuse single slot decls when
7544           appropriate.
7545
7546 Wed Nov 24 17:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7547
7548         * jcf-parse.c (saw_java_source): Global variable removed.
7549         (read_class): Don't use `saw_java_source'. Added extra braces.
7550         (yyparse): Code setting `saw_java_source' removed.
7551
7552 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
7553
7554         * except.c (emit_handlers): Zero catch_clauses after emitting them.
7555
7556 Tue Nov 23 17:29:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7557
7558         * verify.c (merge_type_state): Non verified subroutines being
7559         considered more than once to trigger passive type merge.
7560
7561 Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7562
7563         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
7564         in case of error. Error message tuned.
7565
7566 1999-11-21  Anthony Green  <green@cygnus.com>
7567
7568         * constants.c (find_methodref_index): Unwrap method names before
7569         inserting them in the constant pool.
7570
7571         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
7572
7573         * class.c (assume_compiled_node): New typedef.
7574         (assume_compiled_tree): New static data.
7575         (find_assume_compiled_node): New function.
7576         (add_assume_compiled): New function.
7577         (assume_compiled): New function.
7578         * class.c (make_class_data): Use assume_compiled.
7579         (is_compiled_class): Use assume_compiled.
7580
7581         * java-tree.h (add_assume_compiled): Declare.
7582
7583         * lang.c (lang_decode_option): Parse new options.
7584
7585 Wed Nov 17 21:09:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7586
7587         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
7588         int_type_node: that's what `_Jv_AllocObject' expects.
7589
7590 Thu Nov 11 01:57:14 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7591
7592         * parse.y (lookup_method_invoke): Use lang_printable_name to
7593         reliably build the type name during error report. Fixes PR gcj/97.
7594
7595 1999-11-09  Tom Tromey  <tromey@cygnus.com>
7596
7597         * jcf-path.c: Include <sys/stat.h>.
7598         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
7599         (DIR_UP): New macro.
7600
7601 Tue Nov  9 12:12:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7602
7603         * parse.y (source_end_java_method): Resume permanent allocation,
7604         reversing Apr 27 1998 patch.
7605         (patch_string_cst): Pop obstacks after having pushed the permanent
7606         ones.
7607
7608 1999-11-05  Tom Tromey  <tromey@cygnus.com>
7609
7610         * class.c (finish_class): Emit inlined methods if any native
7611         methods exist in the class.  Fixes PR gcj/85.
7612
7613 Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7614
7615         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
7616         (qualify_ambiguous_name): Likewise.
7617
7618 Wed Nov  3 15:20:02 MST 1999  Godmar Back <gback@cs.utah.edu>
7619
7620         * typeck.c: (lookup_java_method):  search all inherited
7621         interfaces when looking up interface method.
7622
7623 Mon Nov  1 23:42:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7624
7625         * parse.y (method_header:): Issue error message for rule `type
7626         error'.
7627         (synchronized:): Error report when not using synchronized.
7628
7629 Mon Nov  1 01:32:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7630
7631         * parse.y (resolve_qualified_expression_name): Prevent `this' from
7632         being used before the superclass constructor has been called.
7633         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
7634         instead of `CALL_THIS_CONSTRUCTOR_P'.
7635
7636 Sat Oct 30 21:35:13 1999  Todd T. Fries <todd@lighthouse.fries.net>
7637
7638         * check-init.c: Fix typo in comment.
7639
7640 Fri Oct 29 14:35:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7641
7642         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
7643         and final method.
7644
7645 Fri Oct 29 14:23:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7646
7647         * parse.y (expression_statement:): Call function to report
7648         improper invocation of a constructor.
7649         (parse_ctor_invocation_error): New function.
7650
7651 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
7652
7653         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
7654         remember_end_note.
7655
7656 1999-10-21  Tom Tromey  <tromey@cygnus.com>
7657
7658         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
7659         in generated `main'.
7660
7661 Thu Oct 21 01:27:31 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7662
7663         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
7664         (qualify_ambiguous_name): Likewise.
7665
7666 Wed Oct 20 01:41:47 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7667
7668         * parse.y (java_complete_tree): fold_constant_for_init to work on
7669         permanent_obstack.
7670         (java_complete_lhs): Likewise.
7671         (array_constructor_check_entry): Complete an initializer element
7672         on permanent_obstack.
7673
7674 1999-10-19  Tom Tromey  <tromey@cygnus.com>
7675
7676         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
7677         From Mike Moreton <mike@pillim.demon.co.uk>.
7678
7679 1999-10-15  Greg McGary  <gkm@gnu.org>
7680
7681         * java-tree.h (flag_bounds_check): Remove extern decl.
7682         * lang.c (flag_bounds_check): Remove global variable.
7683         (lang_f_options): Remove "bounds-check" entry.
7684         (lang_init_options): Default flag_bounds_check to "on".
7685
7686 1999-10-14  Tom Tromey  <tromey@cygnus.com>
7687
7688         * jvgenmain.c (usage): New function.
7689         (main): Use it.  Also, handle `-D' options.
7690         * jvspec.c (lang_specific_driver): Recognize -D.
7691         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
7692
7693         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
7694
7695 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7696
7697         * jcf-dump.c (print_constant, disassemble_method): Don't call a
7698         variadic function with a non-literal format string.
7699
7700         * parse-scan.y (report_main_declaration): Likewise.
7701
7702         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
7703
7704         * parse.y (read_import_dir, patch_assignment, patch_binop,
7705         patch_array_ref): Likewise.
7706
7707         * typeck.c (build_java_array_type): Likewise.
7708
7709         * verify.c (verify_jvm_instructions): Likewise.
7710
7711 Tue Oct 12 22:28:10 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7712
7713         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
7714
7715 1999-10-07  Anthony Green  <green@cygnus.com>
7716
7717         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
7718         where CHECK_PUT may fail for valid reasons.
7719
7720         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
7721         UNSAFE_PUTN): New macros.
7722
7723 1999-10-04  Tom Tromey  <tromey@cygnus.com>
7724
7725         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
7726         well.  Fixes Java PR gcj/59.
7727         * parse-scan.y (yyerror): Report errors.
7728
7729 Fri Sep 24 12:23:05 1999  Glenn Chambers  <GChambers@provsol.com>
7730
7731         * decl.c (insert_block): Remove unconditional `abort'.
7732
7733 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7734
7735         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
7736         FUNCTION_CODE now of type int.  All callers changed.
7737         Set the builtin's DECL_BUILT_IN_CLASS.
7738
7739 1999-09-23  Tom Tromey  <tromey@cygnus.com>
7740
7741         * jvspec.c (lang_specific_driver): Don't read spec file if
7742         -fsyntax-only given.
7743
7744 1999-09-22  Tom Tromey  <tromey@cygnus.com>
7745
7746         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
7747
7748         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
7749         (WORDS_TO_LONG): Likewise.
7750         (WORDS_TO_DOUBLE): Likewise.
7751
7752 Tue Sep 14 16:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7753
7754         * jcf-write.c (RELOCATION_VALUE_0): New macro.
7755         (RELOCATION_VALUE_1): Likewise.
7756         (emit_iinc, emit_reloc, push_constant1, push_constant2,
7757         push_in_const, push_long_const): Prototyped.
7758         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
7759         (push_constant2): Likewise.
7760         (push_int_const): Cast find_constant1's integer arguments to `jword'.
7761         (find_constant_wide): Cast find_constant2's integer arguments to
7762         `jword'.
7763         (find_constant_index): Cast find_constant2's and find_constant2's
7764         integer arguments to `jword'.
7765         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
7766         (emit_switch_reloc): Use RELOCATION_VALUE_0.
7767         (emit_if): Use RELOCATION_VALUE_1.
7768         (emit_goto): Likewise.
7769         (emit_jsr): Likewise.
7770         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
7771         argument to push_long_const to HOST_WIDE_INT.
7772
7773 1999-09-15  Andreas Schwab  <schwab@suse.de>
7774
7775         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
7776
7777 1999-09-20  Nick Clifton  <nickc@cygnus.com>
7778
7779         * lang.c (lang_decode_option): Extend comment.
7780
7781 Thu Sep 16 15:42:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7782
7783         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
7784         instead of fndecl.
7785
7786 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7787
7788         * gjavah.c (get_field_name, print_method_info, print_include,
7789         add_namelet): Use xmalloc, not malloc.
7790
7791         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
7792         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
7793         NULL pointer.
7794
7795         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
7796
7797         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
7798
7799         * jcf-path.c (add_entry): Likewise.
7800
7801         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
7802
7803         * jv-scan.c (xmalloc): Remove definition.
7804
7805         * jvgenmain.c (xmalloc): Likewise.
7806
7807         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
7808
7809         * lex.c (java_store_unicode): Use xrealloc, not realloc.
7810
7811         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
7812         concat, not xmalloc/sprintf.
7813         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
7814         (xstrdup): Remove definition.
7815
7816         * parse.y (duplicate_declaration_error_p,
7817         constructor_circularity_msg, verify_constructor_circularity,
7818         check_abstract_method_definitions, java_check_regular_methods,
7819         java_check_abstract_methods, patch_method_invocation,
7820         check_for_static_method_reference, patch_assignment, patch_binop,
7821         patch_cast, array_constructor_check_entry, patch_return,
7822         patch_conditional_expr): Use xstrdup, not strdup.
7823
7824         * zextract.c (ALLOC): Use xmalloc, not malloc.
7825
7826 Sun Sep 12 23:30:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7827
7828         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
7829
7830         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
7831         (do_spec, lang_specific_pre_link, lang_specific_driver,
7832         input_filename, input_filename_length): Don't declare.
7833         (main_class_name, jvgenmain_spec, lang_specific_driver):
7834         Constify a char*.
7835         (lang_specific_driver): All calls to the function pointer
7836         parameter now explicitly call `fatal'.
7837
7838 Sat Sep 11 16:46:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7839
7840         * parse.y (find_applicable_accessible_methods_list): Search
7841         abstract classes as interfaces.
7842
7843 Thu Sep  9 17:33:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7844
7845         * class.c (finish_class): We're now outside a valid method
7846         declaration. Tell the rest of gcc so.
7847
7848 1999-09-08  Bruce Korb  autogen@linuxbox.com
7849
7850         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
7851
7852 1999-09-07  Tom Tromey  <tromey@cygnus.com>
7853
7854         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
7855         java-array.h.
7856         (decode_signature_piece): Don't emit "::" in JArray<>.
7857         (print_namelet): Only print trailing `;' when printing a class.
7858
7859 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
7860
7861         * java-tree.h: Delete declarations for all tree nodes now moved to
7862         global_trees.
7863         * decl.c: Delete their definitions.
7864
7865 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
7866
7867         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
7868         * Makefile.in (OBJS): Add ggc-callbacks.o.
7869         (OBJDEPS): Likewise.
7870
7871 1999-09-03  Tom Tromey  <tromey@cygnus.com>
7872
7873         * parse.y (strip_out_static_field_access_decl): Return operand if
7874         it satisfies JDECL_P.
7875
7876 1999-09-02  Tom Tromey  <tromey@cygnus.com>
7877
7878         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
7879         Handle nested arrays, like `[[I'.
7880
7881 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7882
7883         * class.c (finish_class): Remove unused parameter, all callers
7884         changed.
7885
7886         * expr.c (build_java_athrow): Change return type to void.
7887         (java_lang_expand_expr): Make sure each case in switch returns a
7888         value.
7889
7890         * java-tree.h (finish_class): Fix prototype to take void args.
7891
7892         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
7893         (main): Issue return from main, not exit.
7894
7895         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
7896
7897         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
7898
7899         * jv-scan.c (main): Issue return from main, not exit.
7900
7901         * parse.y (check_abstract_method_definitions,
7902         java_check_abstract_method_definitions): Add static prototypes.
7903         (java_complete_expand_methods): Fix call to `finish_class'.
7904
7905         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
7906         and `prevpc'.
7907
7908 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7909
7910         * lang.c (language_string): Constify.
7911
7912 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7913
7914         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
7915         Remove hacks for stuff which comes from libiberty.
7916
7917         * Make-lang.in: Likewise.
7918
7919 Mon Aug 30 16:41:41 1999  Hans-Peter Nilsson  <hp@axis.se>
7920
7921         * Makefile.in (xref.o): Depend on xref.c explicitly.
7922
7923 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7924
7925         * java-tree.h (lang_printable_name): Constify a char*.
7926
7927         * lang.c (lang_printable_name): Likewise.
7928
7929 Fri Aug 27 23:31:57 1999  Jeffrey A Law  (law@cygnus.com)
7930
7931         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
7932         comments in C code.
7933
7934 1999-08-26  Tom Tromey  <tromey@cygnus.com>
7935
7936         * gjavah.c (print_cxx_classname): Print "::" before qualified
7937         name.
7938
7939 Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7940
7941         * parse.y (lookup_cl): Changed leading comment. Now does its best
7942         to set the column number.
7943         (qualify_ambiguous_name): Take WFL wrappers into account.
7944
7945 Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
7946
7947         * verify.c (verify_jvm_instructions): Don't check instruction
7948         validity beyond end of method.
7949
7950 1999-08-25  Tom Tromey  <tromey@cygnus.com>
7951
7952         * jvspec.c (lang_specific_driver): Correctly handle --help again.
7953
7954 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7955
7956         * gjavah.c (print_name, print_base_classname, utf8_cmp,
7957         cxx_keyword_subst, generate_access, name_is_method_p,
7958         get_field_name, print_field_name, super_class_name, print_include,
7959         decode_signature_piece, print_class_decls, usage, help,
7960         java_no_argument, version, add_namelet, print_namelet): Add static
7961         prototype.
7962         (print_base_classname, utf8_cmp, cxx_keyword_subst,
7963         name_is_method_p): Constify a char*.
7964         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
7965         Provide a final else clause in an if-else-if.
7966         (print_field_info): Add missing final arg in function call to
7967         `print_field_name'.
7968         (print_method_info, decompile_method, decode_signature_piece,
7969         print_c_decl, print_full_cxx_name, print_stub,
7970         print_mangled_classname, super_class_name, print_include,
7971         add_namelet, add_class_decl, print_class_decls, process_file,
7972         help): Constify a char*.
7973
7974         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
7975         push_int_const, find_constant_wide, find_constant_index,
7976         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
7977         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
7978         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
7979         emit_if, emit_goto, emit_jsr, call_cleanups,
7980         make_class_file_name): Add static prototypes.
7981         (generate_bytecode_return, generate_bytecode_insns): Pass a
7982         NULL_PTR, not a NULL_TREE.
7983
7984         * jv-scan.c: Include "jcf.h".
7985         (main): Declare using DEFUN macro.
7986
7987         * jvspec.c (find_spec_file, lang_specific_pre_link,
7988         lang_specific_driver): Add prototypes.
7989         (find_spec_file): Constify a char*.
7990
7991         * keyword.gperf (hash, java_keyword): Add prototypes.
7992
7993         * lang.c (lang_print_error): Add static prototype.
7994         (lang_init): Prefer memcpy over bcopy to avoid casts.
7995
7996         * lex.c (yylex): Add static prototype.
7997
7998         * parse-scan.y: Include "lex.c" earlier.
7999
8000         * parse.h: Remove redundant declaration for `yylex'.
8001
8002         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
8003         labeled_block_contains_loop_p): Add static prototypes.
8004         (not_accessible_p): Make static to match prototype.
8005
8006         * verify.c (start_pc_cmp): Don't needlessly cast away const.
8007
8008 Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8009
8010         * parse.y (check_method_redefinition): Changed leading comment.
8011         (check_abstract_method_definitions): New function.
8012         (java_check_abstract_method_definitions): New function.
8013         (java_check_regular_methods): Call it.
8014         (verify_constructor_super): Fixed indentation.
8015         (lookup_method_invoke): Likewise.
8016
8017 Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8018
8019         * parse.y (method_header): Return a null pointer if the current
8020         class node is null.
8021         (finish_method_declaration): Return if the current function decl
8022         is null.
8023         (source_start_java_method): Likewise.
8024         (java_method_add_stmt): Likewise.
8025
8026 Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8027
8028         * class.c (emit_register_class): Removed unnecessary call to
8029         start_sequence.
8030         * parse.y (labeled_block_contains_loop_p): Removed unused local
8031         variable.
8032
8033 Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8034
8035         * parse.y (java_refold): Added prototype.
8036
8037 Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8038
8039         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
8040         (java_stabilize_reference): Removed unnecessary `else'.
8041         (java_complete_lhs): Set flag to remember boolean. Call
8042         java_refold. Added comments.
8043         (java_decl_equiv): New function.
8044         (binop_compound_p): Likewise.
8045         (java_refold): Likewise.
8046         (patch_unaryop): Striped static field access assigned to decl and
8047         op. Changed promotion scheme for ++/-- operators.
8048         (search_loop): New function.
8049         (labeled_block_contains_loop_p): Likewise.
8050         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
8051         comment.
8052         (patch_bc_statement): Call search_loop. Fixed comment.
8053
8054 1999-08-14  Anthony Green  <green@cygnus.com>
8055
8056         * expr.c (java_lang_expand_expr): Mark static array data as
8057         referenced.
8058
8059 Tue Aug 10 00:28:31 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8060
8061         * jvgenmain.c (main): NUL-terminate name_obstack.
8062
8063 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8064
8065         * check-init.c (check_bool2_init, done_alternative): Add static
8066         prototypes.
8067
8068         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
8069         (add_method, build_utf8_ref, build_class_ref,
8070         append_gpp_mangled_type, layout_class_method): Constify a char*.
8071
8072         * decl.c (push_promoted_type, make_binding_level): Add static
8073         prototypes.
8074         (push_promoted_type, pushdecl): Constify a char*.
8075
8076         * except.c (find_handler_in_range, link_handler,
8077         check_start_handlers): Add static prototypes.
8078
8079         * expr.c (process_jvm_instruction): Constify a char*.
8080
8081         * gjavah.c (main): Constify a char*.
8082
8083         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
8084         Constify a char*.
8085
8086         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
8087         static prototypes.
8088         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
8089         munge, print_ents): Constify a char*.
8090
8091         * jcf-dump.c (disassemble_method): Constify a char*.
8092         (print_constant_pool, print_exception_table): Add static prototypes.
8093         (print_constant, print_exception_table, main, disassemble_method):
8094         Constify a char*.
8095
8096         * jcf-io.c (find_classfile, find_class): Likewise.
8097
8098         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
8099         (set_source_filename, predefined_filename_p): Add static prototypes.
8100         (set_source_filename, get_constant, get_class_constant,
8101         find_in_current_zip): Constify a char*.
8102
8103         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
8104         static prototypes.
8105         (add_entry, add_path, jcf_path_classpath_arg,
8106         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
8107
8108         * jcf-reader.c (get_attribute, jcf_parse_preamble,
8109         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
8110         jcf_parse_one_method, jcf_parse_methods,
8111         jcf_parse_final_attributes): Add static prototypes.
8112         (get_attribute): Constify a char*.
8113
8114         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
8115         jcf_dependency_add_target, jcf_path_classpath_arg,
8116         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
8117
8118         * jv-scan.c (main): Constify a char*.
8119         (gcc_obstack_init): Add prototype arguments.
8120
8121         * jvgenmain.c (gcc_obstack_init): Likewise.
8122         (main): Constify a char*.
8123
8124         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
8125         static prototypes.
8126         (put_decl_string, lang_print_error): Constify a char*.
8127         (lang_init): Remove redundant extern prototype.
8128
8129         * mangle.c (emit_unicode_mangled_name): Constify a char*.
8130
8131         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
8132         Add static prototypes.
8133         (get_type_from_signature): Constify a char*.
8134
8135         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
8136         Add static prototypes.
8137         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
8138         (verify_jvm_instructions): Constify a char*.
8139
8140         * xref.c (xref_flag_value): Likewise.
8141
8142         * xref.h (xref_flag_value): Likewise.
8143
8144         * zextract.c (makeword, makelong): Add static prototypes.
8145         (makeword, makelong): Constify a uch*.
8146
8147 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8148
8149         * lang.c (java_dummy_print): Constify a char*.
8150         (lang_print_error): Likewise.
8151         (lang_init): Remove redundant prototype for `print_error_function'.
8152         (lang_init_source): Likewise.
8153         (lang_identify): Constify a char*.
8154
8155 1999-08-09  Tom Tromey  <tromey@cygnus.com>
8156
8157         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
8158         (WORDS_TO_LONG): Likewise.
8159         (WORDS_TO_DOUBLE): Likewise.
8160
8161 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8162
8163         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
8164
8165         * expr.c (java_stack_pop, java_array_data_offset,
8166         build_java_throw_out_of_bounds_exception, case_identity,
8167         build_java_check_indexed_type): Add static prototypes.
8168         (linenumber_table, expand_invoke, expand_java_field_op,
8169         build_primtype_type_ref, expand_byte_code): Constify a char*.
8170
8171         * java-tree.h (build_primtype_type_ref, linenumber_table):
8172         Constify a char*.
8173         (java_lang_expand_expr): Add prototype.
8174
8175         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
8176         `java_lang_expand_expr'.
8177
8178         * lex.c (java_lex_error): Constify a char*.
8179         (java_get_unicode, java_read_char, java_allocate_new_line,
8180         java_unget_unicode, java_sneak_unicode): Prototype.
8181
8182         * parse-scan.y (current_class, package_name, method_declarator,
8183         report_class_declaration, yyerror): Constify a char*.
8184
8185         * parse.h (java_report_errors): Prototype.
8186         (yyerror): Constify a char*.
8187
8188         * parse.y (classitf_redefinition_error, check_modifiers,
8189         parse_jdk1_1_error, lookup_package_type,
8190         lookup_package_type_and_set_next, get_printable_method_name,
8191         purify_type_name): Constify a char*.
8192         (build_super_invocation, maybe_generate_finit,
8193         verify_constructor_super, parser_add_interface,
8194         add_superinterfaces, jdep_resolve_class, note_possible_classname,
8195         java_complete_expand_methods, java_expand_finals,
8196         cut_identifier_in_qualified, java_stabilize_reference,
8197         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
8198         merge_string_cste): Prototype.
8199         (single_type_import_declaration, yyerror,
8200         variable_redefinition_error, build_array_from_name,
8201         build_unresolved_array_type, check_class_interface_creation,
8202         resolve_class, complete_class_report_errors,
8203         note_possible_classname, read_import_dir,
8204         find_in_imports_on_demand, resolve_package, fix_constructors,
8205         check_deprecation, lookup_method_invoke,
8206         maybe_build_primttype_type_ref, array_constructor_check_entry):
8207         Constify a char*.
8208         (java_complete_expand_methods, java_expand_finals): Make static.
8209         (convert_narrow): Remove static prototype.
8210
8211 Tue Aug  3 20:21:20 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
8212
8213         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
8214
8215 1999-08-02  Richard Henderson  <rth@cygnus.com>
8216
8217         * decl.c: Include defaults.h instead of expr.h.
8218         * parse.y: Likewise.
8219
8220 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
8221
8222         * java/decl.c (start_java_method): Change all uses of
8223         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8224         Ensure expr.h is included.
8225         * java/expr.c (pop_arguments): Ditto.
8226         * java/parse.y (expand_start_java_method): Ditto.
8227
8228 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8229
8230         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8231
8232 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
8233
8234         * decl.c: Include "function.h".
8235         * except.c: Likewise.
8236         * parse.y: Likewise.
8237         * Makefile.in: Update dependencies.
8238
8239 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8240
8241         * expr.c (build_java_soft_divmod): Provide a default case in switch.
8242         (java_lang_expand_expr): Mark parameters `target', `tmode' and
8243         `modifier' with ATTRIBUTE_UNUSED.
8244
8245         * gjavah.c (process_file): Add braces around ambiguous `else'.
8246
8247         * jcf-dump.c (print_access_flags, localvar_free): Change return
8248         type to void.
8249
8250         * parse.y (java_complete_expand_method): Initialize variable
8251         `exception_copy'.
8252         (resolve_qualified_expression_name): Likewise for `field_decl'.
8253         (patch_method_invocation): Likewise for `class_to_search'.
8254         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
8255         (patch_assignment): Likewise for `lhs_type'.
8256
8257         * verify.c (verify_jvm_instructions): Remove unused variable
8258         `caller'.
8259
8260 1999-07-25  Richard Henderson  <rth@cygnus.com>
8261
8262         * decl.c (va_list_type_node): New.
8263
8264 1999-07-25  Anthony Green  <green@cygnus.com>
8265
8266         * gjavah.c (print_stub): New function.
8267         (METHOD_IS_NATIVE): New macro.
8268         (print_mangled_classname): Make static.
8269         (HANDLE_END_FIELD): Don't emit fields during stub generation.
8270         (process_file): Perform stub generation.
8271         (HANDLE_METHOD): Don't emit class decls during stub
8272         generation.
8273         (HANDLE_END_METHOD): Take into account stub generation.
8274         (print_method_info): Handle stub generation.
8275         (print_stub): New function.
8276         (print_cxx_classname): Make signature consistant with others.
8277         (help): Describe -stubs option.
8278         (main): Create stub file.
8279         (version): Use version.c.
8280         (print_full_cxx_name): New function.
8281         (print_c_decl): Use print_full_cxx_name.
8282
8283 Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8284
8285         * check-init.c (check_init): Handle MAX_EXPR.
8286
8287 1999-07-15  Andrew Haley  <aph@cygnus.com>
8288
8289         * lang.c (flag_use_divide_subroutine): New variable.
8290         * typeck.c: (convert_ieee_real_to_integer): Bounds check
8291         fp-to-integer conversion.
8292         (convert): Call convert_ieee_real_to_integer when flag_fast_math
8293         is not set.
8294
8295         * expr.c (build_java_soft_divmod): New function.
8296         (build_java_binop): Call build_java_soft_divmod if
8297         flag_use_divide_subroutine is set.
8298         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
8299         soft_lrem_node: new builtin functions.
8300         (init_decl_processing) Initialize the new builtins.
8301         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
8302         soft_lrem_node: new builtin functions.
8303         (build_java_soft_divmod): New function.
8304         * parse.y: Call build_java_soft_divmod if
8305         flag_use_divide_subroutine is set.
8306         * parse.c: Rebuilt.
8307
8308         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
8309         a --specs= arg) even if not linking.
8310         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
8311         -fuse-divide-subroutine
8312
8313 Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8314
8315         * parse.y (resolve_and_layout): Check methods only once.
8316         (resolve_qualified_expression_name): Verify thrown exceptions
8317         compatibility.
8318         (check_thrown_exceptions): Reject exceptions thrown in
8319         initializer. Error message tuned.
8320
8321 1999-07-14  Andrew Haley  <aph@cygnus.com>
8322
8323         * expr.c (expand_expr): Do not return the last statement in a
8324         block as the block's value.
8325
8326 Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8327
8328         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
8329         CALL_EXPR, to avoid order of evaluation changes.
8330
8331 Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8332
8333         * parse.y (qualify_ambiguous_name): Do not use
8334         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
8335
8336 Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8337
8338         * check-init.c (check_init): Handle MAX_EXPR.
8339         * expr.c (force_evaluation_order): Force method call arguments to
8340         be evaluated in left-to-right order.
8341         * parse.y (qualify_ambiguous_name): Loop again to qualify
8342         NEW_ARRAY_EXPR properly.
8343
8344 Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8345
8346         * parse.y (patch_invoke): Resolve unresolved invoked method
8347         returned type.
8348         (qualify_ambiguous_name): STRING_CST to qualify expression for
8349         type name resolution.
8350
8351 1999-06-24  Andrew Haley  <aph@cygnus.com>
8352
8353         * class.c (finish_class): Whenever a deferred method is
8354         output, rescan the list of methods to see if a new candidate for
8355         output can be found.
8356
8357 1999-06-28  Tom Tromey  <tromey@cygnus.com>
8358
8359         * jvspec.c (lang_specific_driver): Recognize --help.
8360
8361 Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8362
8363         * parse.y (resolve_package): Fixed bogus return statement.
8364         (patch_method_invocation): Resolve method invocation beginning with
8365         a package name qualifier.
8366
8367 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8368
8369         * Make-lang.in (java.stage1): Depend on stage1-start.
8370         (java.stage2): Likewise for stage2-start.
8371         (java.stage3): Likewise for stage3-start.
8372         (java.stage4): Likewise for stage4-start.
8373
8374 Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8375
8376         * parse.y (java_complete_lhs): When doing cross referencing, don't
8377         try to keep file location on a WFL expanded as a CALL_EXPR.
8378
8379 Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8380
8381         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
8382         compiling to class file a void method with an empty method body.
8383         As a side effect, the bytecode backend will generate the
8384         appropriate `return' instruction.
8385
8386 Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8387
8388         * parse.y (lookup_package_type_and_set_next): New function prototype.
8389         (resolve_package): Search current and imported packages.
8390         (lookup_package_type_and_set_next): New function.
8391
8392 1999-06-22  Andrew Haley  <aph@cygnus.com>
8393
8394         * verify.c (verify_jvm_instructions): Check for pending blocks
8395         before invalid PC test and opcode switch, not after.
8396
8397 1999-06-21  Andrew Haley  <aph@cygnus.com>
8398
8399         * except.c (find_handler_in_range): The upper limit for exception
8400         ranges is exclusive, not inclusive: (start <= pc < end).
8401         (link_handler): find child pointer which points to outer by
8402         searching sibling list: previous code incorrectly assumed that
8403         outer->outer->first_child must point to outer.
8404         * verify.c (verify_jvm_instructions): FIXME added to code for
8405         `athrow'.
8406         (verify_jvm_instructions): Do not assume that the last block
8407         processed in a subroutine is a block which ends with a `ret'
8408         instruction.  With some control flows it is possible that the last
8409         block ends with an `athrow'.
8410
8411 Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8412
8413         * parse.y (qualify_ambiguous_name): Reorganized the post
8414         evaluation of non WFL leading expression nodes.
8415
8416 Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8417
8418         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
8419         CONVERT_EXPR.
8420
8421 Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8422
8423         * parse.y (qualify_ambiguous_name): Handle qualified expression
8424         beginning with a STRING_CST.
8425
8426 Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8427
8428         * parse.y (register_fields): Set DECL_INITIAL on both
8429         pre-initialized static and public fields.
8430         (resolve_field_access): Static field access expressions to always
8431         use pointer types.
8432         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
8433         qualification. CONVERT_EXPR to be resolved as an expression name.
8434         (java_complete_lhs): Identify and access qualified final
8435         initialized field in switch statement case expression.
8436         (fold_constant_for_init): Pre-initialized field decl constant to
8437         be folded.
8438
8439 Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8440
8441         * parse.y (note_possible_classname): Mark returned node with
8442         QUALIFIED_P only if the original class name contained a '/'.
8443
8444 Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
8445
8446         * Make-lang.in (gcjh): More parallel build fixes.
8447
8448 1999-06-03  Mike Stump  <mrs@wrs.com>
8449
8450         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
8451
8452 Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
8453
8454         * except.c (link_handler): Chain exception handlers in order.
8455
8456 Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
8457
8458         * expr.c (expand_byte_code): Fill unreachable bytecode regions
8459         with nops and process as usual in order to always set correct EH
8460         ranges.  Emit detailed warnings about unreachable bytecodes.
8461
8462 Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
8463
8464         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
8465         constant.
8466
8467 Fri May 28 18:22:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8468
8469         * parse.y (lookup_field_wrapper): Unified returned value to NULL
8470           or the searched field decl.
8471
8472 Fri May 28 11:34:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8473
8474         * parse.y (fold_constant_for_init): Convert numerical constant
8475         values to the type of the assigned field.
8476
8477 Thu May 27 19:57:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8478
8479         * expr.c (lookup_field): Relaxed the test on class loading error
8480         detection.
8481         * parse.y (fold_constant_for_init): Enabeled old code.
8482
8483 Wed May 26 18:06:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8484
8485         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
8486         decide the validity of the cast of a java.lang.Cloneable reference
8487         to an array.
8488         (patch_conditional_expr): Fixed first argument passed to
8489         binary_numeric_promotion.
8490
8491 Wed May 26 15:33:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8492
8493         * parse.y (qualify_ambiguous_name): Take into account that a
8494         CONVERT_EXPR might specify a type as a WFL.
8495
8496 Tue May 25 15:06:13 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8497
8498         * parse.y (patch_assignment): Save the rhs before using it as an
8499         argument to _Jv_CheckArrayStore.
8500
8501 Tue May 25 11:23:59 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8502
8503         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
8504
8505 Mon May 24 13:26:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8506
8507         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
8508         floating point litteral only when the exponent indicator has been
8509         parsed.
8510
8511 Sat May 22 13:54:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8512
8513         * parse.y (formal_parameter:): Construct argument tree list
8514         element even if a yet unsupported final parameter was encountered.
8515
8516 Tue May 18 00:28:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8517
8518         * parse.y (finish_method_declaration): Issue errors for native or
8519         abstract methods declared with a method body, as well as for non
8520         native or non abstract methods with no method body.
8521
8522 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8523
8524         * class.c (build_utf8_ref): Initialize variable `field'.
8525
8526         * decl.c (init_decl_processing): Initialize variable `field'.
8527
8528         * expr.c (build_known_method_ref): Mark parameters `method_type',
8529         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
8530         (process_jvm_instruction): Likewise for parameter `length'.
8531
8532         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
8533         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
8534         ATTRIBUTE_UNUSED.
8535
8536         * parse.y (maybe_generate_clinit): Remove unused variable
8537         `has_non_primitive_fields'.
8538         (find_in_imports_on_demand): Initialize variables `node_to_use'
8539         and `cl'.
8540         (patch_binop): Likewise for variable `prom_type'.
8541         (patch_unaryop): Likewise for variable `prom_type'.
8542
8543         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
8544
8545         * xref.c (xref_table): Add missing initializer.
8546
8547 1999-05-14  Tom Tromey  <tromey@cygnus.com>
8548
8549         * java-except.h (struct eh_range): Removed unused `next' member.
8550         * verify.c (verify_jvm_instructions): Call check_nested_ranges
8551         after adding all exception handlers.  Sort exception ranges in
8552         order of start PC.
8553         (struct pc_index): New structure.
8554         (start_pc_cmp): New function.
8555         * except.c (add_handler): Return `void'.  Don't call link_handler;
8556         instead construct an ordinary linked list and do range
8557         coalescing.
8558         (check_nested_ranges): New function.
8559         (link_handler): Changed interface to allow merging of eh_ranges.
8560         Split overlapping ranges.  Return `void'.
8561
8562 Mon May 17 19:20:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8563
8564         * parse.y (constructor_block_end:): New rule, tagged <node>.
8565         (constructor_body:): Use `constructor_block_end' instead of
8566         `block_end'.
8567
8568 Mon May 17 18:01:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8569
8570         * parse.y (statement_nsi:): Pop `for' statement block.
8571         (java_complete_lhs): Labeled blocks containing no statement are
8572         marked as completing normally.
8573
8574 Fri May 14 12:31:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8575
8576         * xref.c (xref_set_current_fp): New function, defined.
8577         * xref.h (xref_set_current_fp): New function, prototyped.
8578
8579 Fri May 14 11:57:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8580
8581         * check-init.c (check_init): Take into account that
8582         LABELED_BLOCK_STMT can be empty.
8583
8584 Thu May 13 18:30:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8585
8586         * parse.y (java_check_regular_methods): Warning check on not
8587         overriding methods with default access in other packages does not
8588         apply to `<clinit>'.
8589         (java_complete_lhs): If block body is an empty_stmt_node, replace
8590         it by NULL_TREE. This prevents gcc from generating an irrelevant
8591         warning.
8592
8593 Thu May 13 13:23:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8594
8595         * check-init.c (check_init): Removed code accepting to see things
8596         falling through default:, when doing xrefs.
8597         * java-tree.h (do_not_fold): New global variable, declared.
8598         * parse.y (do_not_fold): New global variable, defined.
8599         (java_complete_expand_method): Set `do_not_fold' to the value of
8600         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
8601         and reinstall them after them have been purged; do not check for
8602         initializations; do not issue missing return errors.
8603         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
8604         when doing xrefs.
8605         (patch_binop): Skip the fold part when doing xrefs.
8606         (build_string_concatenation): Skip the concatenation part when
8607         doing xrefs.
8608         (patch_synchronized_statement): Do not generate a try-finally when
8609         doing xrefs.
8610         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
8611         and keep the location where the throw was seen.
8612         * typeck.c (convert): When `do_not_fold' is set, do not attempt
8613         any treatment on the converted node an simply return a NOP_EXPR of
8614         the targeted type.
8615         * xref.c (xref_get_data): New function, defined.
8616         * xref.h (xref_get_data): New function, declared.
8617         (XREF_GET_DATA): Use xref_get_data.
8618
8619 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8620
8621         * gjavah.c (print_include): Cast the result of `strlen' to int
8622         when comparing against a signed value.
8623         (add_namelet): Likewise.
8624
8625 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8626
8627         * expr.c (expand_invoke): Mark parameter `nargs' with
8628         ATTRIBUTE_UNUSED.
8629         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
8630
8631         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
8632         ATTRIBUTE_UNUSED.
8633
8634         * jcf-reader.c (get_attribute): Cast a value to long
8635         when comparing against a signed expression.  Likewise.
8636
8637         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
8638         HOST_BITS_PER_CHAR.
8639
8640 1999-05-11  Andrew Haley  <aph@cygnus.com>
8641
8642         * parse.y (source_end_java_method): If the current method contains
8643         any exception handlers, force asynchronous_exceptions: this is
8644         necessary because signal handlers in libjava may throw exceptions.
8645         * decl.c (end_java_method): Ditto.
8646
8647 1999-05-11  Tom Tromey  <tromey@cygnus.com>
8648
8649         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
8650         flags.
8651         * jvspec.c (THREAD_NAME): Removed.
8652         (GC_NAME): Likewise.
8653         (MATHLIB): Likewise.
8654         (WITHLIBC): Likewise.
8655         (GCLIB): Likewise.
8656         (THREADLIB): Likewise.
8657         (MATH_LIBRARY): Likewise.
8658         (lang_specific_driver): Don't add `-l' options to command line.
8659         Instead, add a single --specs option.  Recognize `-L' options and
8660         use them to search for spec file.
8661         (find_spec_file): New function.
8662         (SPEC_FILE): New define.
8663
8664 Tue May 11 11:46:36 1999  Dave Brolley  <brolley@cygnus.com>
8665
8666         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
8667         cpplib-enabled build.
8668
8669 1999-05-05  Per Bothner  <bothner@cygnus.com>
8670
8671         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
8672         temporarily zero it while calling rest_of_decl_compilation.
8673
8674         * java-tree.h (string_ptr_type_node):  Add declaration.
8675         * decl.c:  Define and initialize string_ptr_type_node.
8676         * parse.y (patch_string_cst):  Use string_ptr_type_node.
8677
8678         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
8679         * parse.y (for_statement):  Now unconditionally exit_block.
8680         (finish_labeled_statement):  No longer exit_block if for-loop.
8681         (patch_loop_statement):  Check harder if the loop is already labeled.
8682
8683         * parse.y (patch_initialized_static_field):  Removed function.
8684         (maybe_generate_clinit):  Removed special handling for interfaces.
8685         (java_complete_expand_methods):  Do a preliminary java_complete_tree
8686         on <clinit> to determine if it can be removed.
8687         (java_complete_expand_method):  Remove special handling for <clinit>.
8688         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
8689         optimize if we get back empty_stmt_node.
8690         For MODIFY_EXPR, re-do checking of static initializers.
8691         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
8692         For VAR_DECL, pass correct context.
8693
8694         * verify.c (verify_jvm_instructions):  Better error messages.
8695
8696 1999-05-03  Tom Tromey  <tromey@cygnus.com>
8697
8698         * parse-scan.y (interface_declaration): Call
8699         report_class_declaration for interfaces.
8700
8701 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
8702
8703         * Makefile.in: Remove -v from bison command lines.
8704
8705 Fri Apr 30 17:54:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8706
8707         * check-init.c (check_init): Exclude a case of error when doing
8708         xrefs.
8709         * class.c (layout_class_method): Don't generate the error message
8710         twice when compiling from source.
8711         * lang-options.h: Added `-Wredundant-modifers' and
8712         `-Wunusupported-jdk11' flags and help text.
8713         * lang.c (lang_decode_option): Added support for
8714         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
8715         flag_static_local_jdk11 and flag_redundant set accordingly.
8716         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
8717         * parse.h (EXPR_WFL_ADD_COL): New macro.
8718         (DECL_END_SOURCE_LINE): Likewise.
8719         (DECL_INHERITED_SOURCE_LINE): Likewise.
8720         * parse.y (static_ref_err): New function, prototyped.
8721         (CCB_TK): Now tagged <operator>.
8722         (class_body:): Remember the location of the closing '}' of a class
8723         definition when doing xrefs.
8724         (block:): Likewise.
8725         (block_end:): Likewise.
8726         (create_class): Remember the location of the inherited class
8727         identifier when doing xrefs.
8728         (register_fields): Added test on first operand of `init' before
8729         testing it TREE_CODE.
8730         (method_header): Store the location of the class identifier in the
8731         class decl when doing xrefs.
8732         (finish_method_declaration): Don't combine first/last method line
8733         when doing xref.
8734         (java_check_regular_methods): Warning check on not overriding
8735         methods with default access on other packages move before check on
8736         static methods. Initialization of `aflags' also moved up.
8737         (resolve_expression_name): Call static_ref_err to report the error.
8738         (static_ref_err): New function, implemented.
8739         (resolve_field_access): Returned simplified static field access
8740         when doing xrefs.
8741         (resolve_qualified_expression_name): Check for illegal use of
8742         static fields in a non static context. Call static_ref_err to
8743         report error in various places.
8744         (java_complete_tree): Do not fold initialized static fields when
8745         doing xrefs.
8746         (java_complete_lhs): Likewise.
8747
8748 1999-04-29  Anthony Green  <green@cygnus.com>
8749
8750         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
8751         create internal labels.
8752         (lookup_label): Ditto.
8753
8754 Sat Apr 24 16:50:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8755
8756         * class.c (layout_class_method): Generate <clinit>'s rtl for
8757         interfaces.
8758         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8759         for interfaces' <clinit>.
8760         * expr.c (lookup_field): Search for fields in interfaces.
8761         (expand_invoke): Fixed indentation.
8762         (expand_java_field_op): Likewise. Use IS_CLINIT.
8763         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
8764         (IS_CLINIT): New macro.
8765         * parse.y (type_declaration:): Call maybe_generate_clinit after an
8766         interface was parsed.
8767         (maybe_generate_clinit): Don't generate if the current class is an
8768         interface with only fields of primitive types.
8769         (reset_method_name): Use IS_CLINIT.
8770         (java_complete_expand_method): Expand <clinit> when it exists for
8771         interfaces. Use IS_CLINIT.
8772         (resolve_expression_name): Use DECL_CONTEXT instead of
8773         current_class to build static field references.
8774         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
8775         ARRAY_REF when doing xreferencing.
8776         (check_final_assignment): Fixed typo in leading comment. Use
8777         IS_CLINIT.
8778         (patch_array_ref): Don't fully expand array references when
8779         xreferencing.
8780         (patch_return): Use IS_CLINIT.
8781         (patch_throw_statement): Likewise.
8782
8783 1999-04-22  Tom Tromey  <tromey@cygnus.com>
8784
8785         * Make-lang.in (JAVA_SRCS): Added check-init.c.
8786
8787 Wed Apr 21 11:13:36 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8788
8789         * decl.c (predef_filenames, predef_filenames_size): New globals
8790         (init_decl_processing): predef_filenames and predef_filenames_size
8791         initialized.
8792         * java-tree.h (predef_filenames, predef_filenames_size): Declared
8793         extern.
8794         * jcf-parse.c (predefined_filename_p): New function.
8795         (yyparse): Check that files on the command line are specified only
8796         once and issue a warning otherwise.
8797         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
8798         * parse.y (source_end_java_method): Nullify NOP method bodies, to
8799         avoid a gcc warning with -W -Wall turned on.
8800         (java_expand_classes): Abort if errors were encountered.
8801         (java_complete_lhs): If the cross reference flag is set, wrap
8802         field DECL node around a WFL when resolving expression name.
8803
8804 Mon Apr 19 14:44:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8805
8806         * lang.c (lang_decode_option): Fixed returned value when parsing
8807         `-fxref=...' and `-Wall'.
8808         * parse.y (source_end_java_method): Do not generate code when
8809         flag_emit_xref is set.
8810         (resolve_expression_name): Do not build static field access when
8811         flag_emit_xref is set.
8812         (resolve_field_access): No special treatment on `length' when
8813         flag_emit_xref is set. Do not build qualified static field access
8814         when flag_emit_xref is set.
8815         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
8816         when flag_emit_xref is set.
8817         (patch_assignment): Do not generate array store runtime check when
8818         flag_emit_xref is set.
8819         * xref.c (xref_flag_value): Fixed function declaration
8820         indentation.
8821         (xset_set_data): New function.
8822         * xref.h (xref_set_data): Added prototype for new function.
8823         (typedef struct xref_flag_table): New field data.
8824         (XREF_GET_DATA): New macro.
8825
8826 1999-04-19  Tom Tromey  <tromey@cygnus.com>
8827
8828         * xref.h (enum): Removed trailing comma.
8829
8830         * parse.y (resolve_qualified_expression_name): Added missing
8831         `break'.
8832
8833 Thu Apr 15 13:08:03 1999  Anthony Green  <green@cygnus.com>
8834
8835         * gjavah.c: New prototypes for java_float_finite and
8836         java_double_finite.
8837
8838 Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8839
8840         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
8841         references.
8842
8843 Tue Apr  6 23:15:52 1999  Jeffrey A Law  (law@cygnus.com)
8844
8845         * Makefile.in (TREE_H): Add tree-check.h.
8846         (RTL_H): Add genrtl.h.
8847
8848 Tue Apr  6 15:15:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8849
8850         * parse.y (patch_assignment): Added ArrayStoreException runtime
8851         check.
8852
8853 1999-04-06  Per Bothner  <bothner@cygnus.com>
8854
8855         * expr.c (pop_type_0):  New function.
8856         (pop_type):  Use pop_type_0.
8857         * java-tree.h (pop_type_0):  New declaration.
8858         * verify.c (verify_jvm_instructions):  Check return instructions.
8859
8860         * parse.y (patch_binop):  Don't fold if non-constant and emiting
8861         class files.
8862
8863 Mon Apr  5 16:06:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8864
8865         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
8866
8867         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
8868         (main_jcf): Don't define.
8869         (process_file): Don't set `main_jcf'.
8870
8871         * java-tree.h (main_jcf): Don't declare.
8872
8873         * jcf-parse.c (main_jcf): Add static definition.
8874
8875         * lang.c (main_jcf): Don't define.
8876
8877 Mon Apr  5 15:43:51 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8878
8879         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
8880
8881         * decl.c (copy_lang_decl): Likewise for `bcopy'.
8882
8883         * jcf-depend.c: Include "config.h", not <config.h>.
8884
8885         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
8886         `bcopy' to PTR.
8887
8888         * jcf-path.c: Include "config.h", not <config.h>.
8889
8890         * lex.c: Don't include various system header files.
8891         (java_init_lex): Cast the argument of `bzero' to PTR
8892
8893         * parse-scan.y (java_push_parser_context): Likewise.
8894
8895         * parse.y (java_push_parser_context): Likewise.
8896         (patch_bc_statement): Match format specifier to variable argument.
8897
8898         * xref.c: Don't include <stdio.h>.
8899
8900 Mon Apr  5 11:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8901
8902         * parse.y (struct parser_ctxt *ctxp): Now global.
8903         (declare_local_variables): Use WFL compound value for the
8904         declaration source line value, when doing cross-referencing.
8905
8906 1999-03-31  Tom Tromey  <tromey@cygnus.com>
8907
8908         * gjavah.c (print_field_info): Allow constants of other types.
8909         (print_include): Generate include when new name is proper prefix
8910         of already printed name.
8911         (add_namelet): Likewise.
8912         (cxx_keyword_subst): New function.
8913         (print_method_info): Use it.
8914         (print_field_name): New function.
8915         (get_field_name): New function.
8916         (print_field_info): Use get_field_name and print_field_name.
8917
8918 Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8919
8920         * Makefile.in (keyword.h): Generate using gperf language 'C', not
8921         'KR-C', so gperf uses the `const' keyword on strings.
8922
8923         * keyword.gperf (java_keyword): Const-ify a char*.
8924
8925 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8926
8927         * parse.y (patch_bc_statement): Fixed identation and a bogus
8928         `printf' format.
8929
8930 Tue Mar 30 11:29:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8931
8932         * parse.y (patch_assignment): Allow static variables in other
8933         classes to be assigned.
8934
8935 Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8936
8937         * class.c (maybe_add_interface): Remove unused variable
8938         `interface_binfo'.
8939         (make_class_data): Use = for assignment, not ==.  Likewise.
8940         (emit_register_classes): Remove unused variable `decl'.
8941
8942         * lex.c: Fix comment so as not to contain an embedded `/*'.
8943
8944         * verify.c (verify_jvm_instructions): Remove unused variable
8945         `self_type'.
8946
8947 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
8948
8949         * parse.y (complete_loop_body):  Rename to finish_loop_body.
8950         (complete_labeled_statement):  Rename to finish_labeled_statement.
8951         (complete_for_loop):  Rename to finish_for_loop.
8952         (complete_method_declaration):  Rename to finish_method_declaration.
8953
8954         * java-tree.h (continue_identifier_node):  New global node.
8955         * decl.c:  Define and initialize continue_identifier_node.
8956         * parse.y (generate_labeled_block):  Remove - no longer needed.
8957         (build_loop_body):  Use continue_identifier_node for continue block.
8958         (finish_labeled_statement):  Also do pop_labeled_block actions.
8959         (java_complete_lhs):  POP_LOOP even if error.
8960         (build_labeled_block):  Special handling for continue_identifier_node.
8961         (patch_loop_statement):  Re-organize.
8962         (patch_bc_statement):  Re-write.
8963
8964 Sat Mar 27 15:13:21 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8965
8966         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
8967         using a WFL compound value.
8968         * parse.y (xref.h): Include.
8969         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
8970         WFL compound value.
8971         (register_fields): Set WFL compound value to lineno if doing
8972         xrefs.
8973         (java_complete_expand_method): Call expand_xref if flag_emit_xref
8974         is set.
8975         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
8976         * xref.h (expand_xref): Prototype renamed from xref_generate.
8977
8978 Sat Mar 27 14:16:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8979
8980         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
8981         (GET_CURRENT_BLOCK): New macro.
8982         * parse.y (current_static_block): New global variable.
8983         (method_body:): Define action.
8984         (complete_method_declaration): Set current_function_decl to NULL
8985         when work on the current method is done.
8986         (declare_local_variables): Use GET_CURRENT_BLOCK.
8987         (java_method_add_stmt): Likewise.
8988         (java_complete_expand_method): Disable the use of `this' when
8989         expanding <clinit>.
8990         (enter_a_block): If no current method exist, use
8991         current_static_block to link static initializer blocks.
8992         (exit_block): Rewritten to use current_static_block when no current
8993         method decl exists.
8994         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
8995         (patch_return): Forbid the use of `return' in static initializers.
8996         (patch_throw_statement): Fixed indentation. Issue specific error
8997         for uncaught thrown checked exception in static initializer
8998         blocks. Removed FIXME.
8999
9000 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
9001
9002         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
9003         Link gcj from gcc.o.
9004
9005 Tue Mar 23 10:48:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9006
9007         * parse.y (find_applicable_accessible_methods_list): When dealing
9008         with interface: ensure that a given interface or java.lang.Object
9009         are searched only once.
9010
9011 Tue Mar 23 10:05:27 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9012
9013         * gjavah.c (print_c_decl): Remove unused argument `flags'.
9014
9015         * jcf-dump.c (print_access_flags): Add braces around if-else.
9016
9017         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
9018         COMBINE_INPUTS.
9019
9020         * lex.c (build_wfl_node): Add static prototype.
9021
9022         * lex.h (build_wfl_node): Remove static prototype.
9023
9024         * parse.y: Include lex.c early enough to declare everything needed.
9025         Ensure calls to `build_wfl_node' pass the proper arguments.
9026         (create_class): Remove unused variable `super_decl'.
9027         (get_printable_method_name): Initialize variable `name'.
9028
9029 Mon Mar 22 20:14:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9030
9031         * Changelog: Fixed 1999-03-22 typos.
9032         * lang.c (lang_decode_option): Fixed typo in error string in the
9033         XARG section.
9034
9035 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9036
9037         * Makefile.in (JAVA_OBJS): Added entry xref.o.
9038         (xref.o): New rule.
9039         * java-tree.h (flag_emit_xref): Declared extern.
9040         * lang.c (xref.h): Included.
9041         (flag_emit_xref): New global variable.
9042         (lang_decode_option): Added support for -fxref.
9043         * xref.c: Created.
9044         * xref.h: Likewise.
9045
9046 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
9047
9048         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
9049         linked with.
9050
9051 Sun Mar 21 08:30:30 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9052
9053         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
9054         $(srcdir)/../system.h and $(JAVA_TREE_H).
9055         (jcf-io.o): Depend on $(JAVA_TREE_H).
9056         (mangle.o): Likewise.
9057
9058         * check-init.c (check_cond_init): Add static prototype.
9059
9060         * class.c (build_java_method_type, hashUtf8String,
9061         make_field_value, get_dispatch_vector, get_dispatch_table,
9062         append_gpp_mangled_type, mangle_static_field): Likewise.
9063         (strLengthUtf8): Hide unused definition.
9064         (hashUtf8String): Const-ify.
9065         (make_field_value): Un-ANSI-fy.
9066
9067         * constants.c: Move inclusion of jcf.h above java-tree.h.
9068         (set_constant_entry, find_class_or_string_constant,
9069         find_name_and_type_constant, get_tag_node,
9070         build_constant_data_ref): Add static prototype.
9071
9072         * decl.c (push_jvm_slot, builtin_function,
9073         lookup_name_current_level): Likewise.
9074         (builtin_function): Const-ify.
9075
9076         * except.c (expand_start_java_handler, expand_end_java_handler):
9077         Add static prototype.
9078
9079         * expr.c (flush_quick_stack, push_value, pop_value,
9080         java_stack_swap, java_stack_dup, build_java_athrow,
9081         build_java_jsr, build_java_ret, expand_java_multianewarray,
9082         expand_java_arraystore, expand_java_arrayload,
9083         expand_java_array_length, build_java_monitor, expand_java_pushc,
9084         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
9085         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
9086         expand_compare, expand_test, expand_cond, expand_java_goto,
9087         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
9088         expand_java_field_op, java_push_constant_from_pool): Likewise.
9089
9090         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
9091         (build_java_arraynull_check): Mark parameters `node' and `type'
9092         with ATTRIBUTE_UNUSED.
9093         (note_label): Likewise for parameter `current_pc'.
9094         (expand_java_call, expand_java_ret): Hide unused definition.
9095
9096         * java-tree.h (make_class, build_constants_constructor,
9097         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
9098         init_outgoing_cpool, register_class, emit_register_classes,
9099         java_layout_seen_class_methods): Prototype.
9100         (unicode_mangling_length): Const-ify.
9101         (append_gpp_mangled_name, append_gpp_mangled_classtype,
9102         emit_unicode_mangled_name, format_int, format_uint,
9103         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
9104         jcf_print_utf8_replace, open_class): Prototype.
9105
9106         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
9107         <stdio.h>.  Include tree.h/java-tree.h.
9108         (utf8_equal_string usage, process_class): Add static prototype.
9109         (open_class): Don't prototype this here.
9110         (utf8_equal_string): Match arguments to format specifiers.
9111         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
9112         TABLE_SWITCH, disassemble_method): Likewise.
9113
9114         * jcf-io.c: Include tree.h/java-tree.h.
9115         (open_class, find_classfile, jcf_print_utf8,
9116         jcf_print_utf8_replace): Const-ify.
9117
9118         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
9119         parse_class_file): Add static prototype.
9120         (find_in_current_zip): Match definition to existing static
9121         prototype.
9122
9123         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
9124         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
9125         finish_jcf_block, define_jcf_label, get_jcf_label_here,
9126         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
9127         write_chunks, adjust_typed_op, generate_bytecode_conditional,
9128         generate_bytecode_return, perform_relocations, init_jcf_state,
9129         init_jcf_method, release_jcf_state, generate_classfile):
9130         Add static prototype.
9131         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
9132         (make_class_file_name): Const-ify.
9133
9134         * jcf.h (find_classfile): Const-ify.
9135
9136         * jv-scan.c (reset_report): Remove prototype.
9137
9138         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
9139         (error): Rewrite to allow varargs.
9140
9141         * lang.c (lang_f_options): Const-ify.
9142
9143         * lex.c (java_parse_escape_sequence): Add static prototype.
9144         (java_allocate_new_line): Match definition to existing static
9145         prototype.
9146
9147         * mangle.c Include tree.h/java-tree.h.
9148         (unicode_mangling_length, emit_unicode_mangled_name,
9149         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
9150
9151         * parse.h (jdep_code): Remove trailing comma in enumeration.
9152         (java_get_line_col): Move prototype outside of !JC1_LITE test.
9153         (reset_report): Add prototype.
9154
9155         * verify.c (push_pending_label, merge_types): Add static
9156         prototypes.
9157
9158         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
9159
9160 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9161
9162         * parse.y (find_applicable_accessible_methods_list): Extend the
9163         search to superinterfaces when relevant.
9164         (search_applicable_methods_list): New function.
9165
9166 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9167
9168         * class.c (unmangle_classname): Implemented stricter testing
9169         before setting the QUALIFIED_P flag on an identifier.
9170
9171 Tue Mar 16 15:15:41 1999  Per Bothner  <bothner@cygnus.com>
9172
9173         * parse.y (java_complete_lhs):  Call force_evaluation_order
9174         after patch_newarray.
9175         (patch_binop):  Don't call fold if there are side effects.
9176
9177 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9178
9179         * parse.y (java_stabilize_reference): Use save_expr instead of
9180         building a SAVE_EXPR node.
9181         (java_complete_lhs): Patch the resulting string of the `+='
9182         operator (if necessary) and complete the RHS after having built
9183         the cast.
9184
9185 Mon Mar 15 12:18:29 1999  Per Bothner  <bothner@cygnus.com>
9186
9187         * class.c (make_class):  Don't set CLASS_P here (because
9188         this function is also called by build_java_array_type).
9189         (push_class):  Set CLASS_P here instead.
9190         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
9191
9192         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
9193         context.  If the context is class, perfer "super" over "synchronized".
9194         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
9195
9196         * parse.y (create_class):  Don't call parser_check_super here;
9197         it is not robust.  Always wait until later.
9198
9199         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
9200         match what JDK 1.2 does), but don't set ACC_PUBLIC.
9201
9202 Sat Mar 13 18:16:34 1999  Per Bothner  <bothner@cygnus.com>
9203
9204         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
9205         * lex.h (UNGETC):  Change misleading macro.
9206
9207 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9208
9209         * parse.y (java_stabilize_reference): Return NODE when patching a
9210         COMPOUND_EXPR.
9211         (java_complete_lhs): Put parenthesis around truth values.
9212
9213 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9214
9215         * class.c (layout_class_method): Don't make rtl for interface
9216         methods.
9217         * parse.h (GET_TYPE_NAME): New macro.
9218         * parse.y (if_then_statement:): Fixed indentation.
9219         (if_then_else_statement:): Likewise.
9220         (for_statement:): Fixed spacing.
9221         (try_statement:): Fixed indentation.
9222         (create_interface): Don't force interfaces to be abstract.
9223         (method_header): Abstract methods are OK in interfaces.
9224         (declare_local_variables): Fixed typo in comment.
9225         (java_complete_expand_method): Fixed indentation.
9226         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
9227         non accessible fields.
9228         (java_stabilize_reference): New function.
9229         (java_complete_lhs): Fixed indentation. Use
9230         java_stabilize_reference in compound assignement. Insert the
9231         cast. If not processing `+' fix string constants before processing
9232         binop.
9233
9234 Fri Mar 12 19:42:55 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9235
9236         * constants.c (find_class_or_string_constant): Cast variable `j'
9237         to a `jword' when comparing against one.
9238
9239         * expr.c (java_lang_expand_expr): Remove unused variables
9240         `has_finally_p' and `op0'.
9241
9242         * gjavah.c (print_field_info): Cast a value to jint when comparing
9243         against one.  Likewise for a jlong.
9244         (add_namelet): Likewise cast a `sizeof' to an int when comparing
9245         against a signed quantity.
9246
9247         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
9248         (print_signature): Don't needlessly dereference variable `str'
9249
9250         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
9251         `max_locals' with ATTRIBUTE_UNUSED.
9252         (jcf_parse_class): Likewise for variable `index'.
9253
9254         * parse.h (reverse_jdep_list): Remove static prototype.
9255
9256         * parse.y (build_jump_to_finally): Remove prototype and definition.
9257         (reverse_jdep_list): Add static prototype.
9258
9259         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
9260         `assignment' and `expr_decl'.
9261
9262         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
9263
9264 1999-03-12  Andrew Haley  <aph@cygnus.com>
9265
9266         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
9267         we'll need a directory separator and a null character.
9268
9269 Wed Mar 10 23:20:11 1999  Per Bothner  <bothner@cygnus.com>
9270
9271         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
9272
9273   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9274
9275         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
9276         interfaces.
9277
9278 Fri Mar  5 15:17:29 1999  Per Bothner  <bothner@cygnus.com>
9279
9280         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
9281
9282         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
9283
9284         * class.c (layout_class_method):  A static method in a base class
9285         is never overridden, so treat it like it doesn't exist.
9286         However, do complain about private non-static method overriding
9287         public static method.
9288
9289         * parse.y:  Don't set unused INITIALIZED_P flag.
9290         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
9291
9292         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
9293         (build_array_from_name):  Re-order &index[string] to &string[index].
9294
9295         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
9296         error_mark (it might catch more errors, but it is more likely to lose).
9297
9298 Sat Mar  6 11:17:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9299
9300         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
9301         (parse-scan.o): Depend on toplev.h.
9302
9303         * class.c (make_method_value): Add prototype.  Make it static.
9304         Remove unused second argument, caller changed.
9305
9306         * expr.c (java_lang_expand_expr): Remove unused variable
9307         `return_label'.
9308
9309         * java-tree.h: Don't prototype find_in_current_zip.
9310         Add prototypes for verify_constant_pool, start_java_method,
9311         end_java_method, give_name_to_locals, expand_byte_code,
9312         open_in_zip, set_constant_value, find_constant1, find_constant2,
9313         find_utf8_constant, find_string_constant, find_class_constant,
9314         find_fieldref_index, find_methodref_index, write_constant_pool,
9315         count_constant_pool_bytes and encode_newarray_type.
9316
9317         * jcf-dump.c: Remove unused variable `LONG_temp'.
9318
9319         * jcf-parse.c: Include parse.h.
9320         (jcf_parse_source): Remove unused parameter, all callers changed.
9321         (jcf_figure_file_type): Add static prototype.
9322         (find_in_current_zip): Likewise.  Also remove unused parameter,
9323         all callers changed.
9324         (read_class): Initialize variable `saved_pos'.
9325
9326         * jcf-reader.c (jcf_parse_preamble): Mark variables
9327         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
9328
9329         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
9330         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
9331         (java_parse_doc_section): Initialize variable `seen_star'.
9332         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
9333         (java_lex_error): Mark parameters `msg' and `forward' with
9334         ATTRIBUTE_UNUSED.
9335         (java_get_line_col): Mark parameters `filename' and `line' with
9336         ATTRIBUTE_UNUSED.
9337
9338         * parse-scan.y: Include toplev.h.
9339         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
9340
9341         * parse.h: use `struct JCF', not plain `JCF'.
9342         (java_parser_context_save_global, java_expand_classes
9343         java_parser_context_restore_global, java_parse): Add prototypes.
9344
9345         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
9346         `node'.
9347
9348 Wed Feb 24 16:13:59 1999  Per Bothner  <bothner@deneb.cygnus.com>
9349
9350         *  check-init.c (check_init):  COPYN takes word count, not bit count.
9351
9352 Fri Feb 26 14:06:21 1999  Per Bothner  <bothner@cygnus.com>
9353
9354         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
9355         explicit build_decl.  (Avoids crash in reload when optimizing.)
9356
9357 Thu Feb 25 21:05:04 1999  Per Bothner  <bothner@cygnus.com>
9358
9359         * decl.c (complete_start_java_method):  Handle synchronized method
9360         even when compiling from bytecode.
9361
9362 1999-02-26  Tom Tromey  <tromey@cygnus.com>
9363
9364         * gjavah.c (add_class_decl): Only generate `#include' if outer
9365         class is not the name of the class we are processing.  Correctly
9366         append `.h' in #include.
9367         (process_file): Clean up newlines around generated `#include's.
9368         (decode_signature_piece): Correctly handle inner classes.
9369         (struct include): New structure.
9370         (all_includes): New global.
9371         (print_include): New function.
9372         (add_class_decl): Use it.
9373         (process_file): Likewise.
9374         (add_class_decl): Generate include for java-array.h if array
9375         seen.
9376         (process_file): Don't generate java-array.h include.
9377
9378         * gjavah.c (add_namelet): Check for standard package names here.
9379         (add_class_decl): Don't check for standard package names here.
9380
9381 1999-02-25  Tom Tromey  <tromey@cygnus.com>
9382
9383         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
9384         When reading a zip file, only use strncmp if both strings are
9385         bigger than the buffer length.  Initialize `k' when looping
9386         through zip file.
9387
9388 1999-02-24  Tom Tromey  <tromey@cygnus.com>
9389
9390         * gjavah.c (struct namelet): New structure.
9391         (add_namelet): New function.
9392         (print_namelet): New function.
9393         (print_class_decls): Use add_namelet and print_namelet to generate
9394         namespaces and not classes.
9395         (method_printed): New global.
9396         (HANDLE_END_METHOD): Examine method_printed.
9397         (print_method_info): Set method_printed when required.  Print
9398         error if function to be ignored is marked virtual.  Handle $finit$
9399         method.
9400         (METHOD_IS_FINAL): New macro.
9401         (print_field_info): Use it.
9402         (HANDLE_METHOD): Clear method_printed.
9403         (method_pass): New global.
9404         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
9405         (process_file): Do two passes over both fields and methods.
9406         (HANDLE_METHOD): Examine method_pass.
9407         (root): New global.
9408         (add_class_decl): New function.
9409         (print_class_decls): Don't scan over entire constant pool.
9410
9411 1999-02-23  Tom Tromey  <tromey@cygnus.com>
9412
9413         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
9414         disable linking in that case.
9415
9416 1999-02-20  Tom Tromey  <tromey@cygnus.com>
9417
9418         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
9419         not 0x1f.
9420
9421 Sun Feb 21 14:56:11 1999  Per Bothner  <bothner@cygnus.com>
9422
9423         * decl.c (build_result_decl), java-tree.h:  New method.
9424         (complete_start_java_method):  Handle synchronized methods.
9425         Don't build DECL_RESULT here.  (Ordering dependency problem.)
9426         (start_java_method):  Call build_result_decl here instead  ...
9427         * parse.y (java_complete_expand_method):  ... and here.
9428         (expand_start_java_method): Don't call complete_start_java_method here.
9429         (java_complete_expand_method):  Call it here instead.
9430         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
9431         * java-tree.h:  ... here.
9432
9433         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
9434         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
9435         for ARRAY_REF - it doesn't work when array bounds are checked.
9436         (patch_array_ref):  Handle it here instead.
9437
9438         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
9439
9440 Fri Feb 19 15:35:01 1999  Per Bothner  <bothner@cygnus.com>
9441
9442         Force left-to-right evaluation of binary operations etc.
9443         * expr.c (force_evaluation_order), java-tree.h:  New function.
9444         * parse.y (java_complete_lhs):  Pass binary operations, procedure
9445         calls, and ARRAY_REFs to force_evaluation_order.
9446         (various):  Set TREE_SIDE_EFFECTS more carefully.
9447
9448         Tolerate random (non-UTF8) encoding in comments without complaining.
9449         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
9450         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
9451
9452         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
9453         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
9454
9455         * parse.y (java_complete_lhs):  Ignore an empty statement in a
9456         COMPOUND_EXPR.  Don't complain about empty statement after return.
9457
9458 Fri Feb 19 13:00:56 1999  Per Bothner  <bothner@cygnus.com>
9459
9460         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
9461         in TREE_LIST - just chain the POINTER_TYPEs together.
9462         (resolve_class):  If type already resolved, return decl.
9463         After resolving, update TREE_TYPE(class_type), and name (if array).
9464         * parse.h (do_resolve_class), parse.y:  Make non-static.
9465         * class.c (maybe_layout_super_class):  Take this_class argument.
9466         Do do_resolve_class if necessary.
9467         (layout_class, layout_class_methods): Adjust calls appropriately.
9468         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
9469         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
9470         * typeck.c (build_java_array_type):  Don't call layout_class.
9471
9472 Wed Feb 17 15:47:20 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9473
9474         * parse.y (check_pkg_class_access): Allow private class access
9475         within the same package.
9476         (strip_out_static_field_access_decl): New function.
9477         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
9478         operator argument before testing its nature.
9479
9480 Wed Feb  3 12:38:43 1999  Per Bothner  <bothner@cygnus.com>
9481
9482         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
9483         (TRY_EXPR):  Simplify - it no longer has a finally clause.
9484         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
9485         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9486         * expr.c (java_lang_expand_expr):  Likewise.
9487         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
9488         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
9489         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
9490         (build_try_statement):  Remove finally parameter and handling.
9491         (build_try_finally_statement):  New function.
9492         (patch_try_statement):   No longer need to support finally clause.
9493         (try_statement):  Update grammar action rules.
9494         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
9495         Simpler handling of TRY_EXPR, which no longer has a finally clause.
9496
9497 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
9498
9499         * jcf-parse.c (get_constant): Add braces around computation of 'd'
9500         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
9501
9502 1999-02-17  Andrew Haley  <aph@cygnus.com>
9503
9504         * class.c (build_utf8_ref): Back out broken patch which was
9505         intended to to output signatures using '.' as a separator.
9506
9507         * class.c (make_class_data): Output signatures using '.' as a
9508         separator, rather than '/'.
9509         (mangled_classname): Likewise.
9510         (make_field_value): Likewise.
9511         (make_method_value): Likewise.
9512         * constants.c (alloc_class_constant): Likewise.
9513         * expr.c (build_invokeinterface): Likewise.
9514
9515 Thu Feb 11 21:25:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9516
9517         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
9518         of an ancient workaround.
9519
9520 Wed Feb 10 23:27:33 1999  Jeffrey A Law  (law@cygnus.com)
9521
9522         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
9523         here anymore.
9524
9525 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9526
9527         * lex.c (yylex): Encode \0 as UTF8.
9528
9529 1999-02-10  Tom Tromey  <tromey@cygnus.com>
9530
9531         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
9532         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
9533         (libgcj_zip): Renamed.
9534         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
9535         LIBJAVA_ZIP_FILE.
9536         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
9537
9538         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
9539         (GC_NAME): Renamed -lgc to -lgcjgc.
9540
9541 Tue Feb  9 19:31:09 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9542
9543         * lex.c (java_lang_cloneable): Initialize.
9544         * parse.y (java_lang_cloneable): New static variable.
9545         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
9546         doing one more qualification round.
9547         (valid_ref_assignconv_cast_p): Reject null source or
9548         destination. Allow an array to be cast into java.lang.Cloneable.
9549         (patch_cast): Swapped two first arguments to first call to
9550         valid_ref_assignconv_cast_p.
9551
9552 Mon Feb  8 11:50:50 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9553
9554         * parse.h: DECL_P renamed JDECL_P.
9555         * parse.y: DECL_P replaced by JDECL_P.
9556         (build_array_from_name): Always use pointer's type.
9557         (patch_bc_statement): Extra code to search continue target in a
9558         for loop. Fixed comments. Continue target is current loop when
9559         unlabeled.
9560
9561 1999-02-05  Andrew Haley  <aph@cygnus.com>
9562
9563         * class.c (make_class_data): The superclass of an interface should
9564         be null, not class Object.
9565
9566         * lex.c (java_lex): Sign extend hex literals.
9567
9568 1999-02-04  Andrew Haley  <aph@cygnus.com>
9569
9570         * class.c (build_utf8_ref): Output signatures using '.' as a
9571         separator, rather than '/'.
9572         (make_class_data): Likewise.
9573
9574 Wed Feb  3 22:50:17 1999  Marc Espie <Marc.Espie@liafa.jussieu.fr>
9575
9576         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
9577         mkstemp.o.  Get them from libiberty now.
9578
9579 Tue Feb  2 19:49:12 1999  Jeffrey A Law  (law@cygnus.com)
9580
9581         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
9582
9583 Tue Feb  2 20:04:50 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9584
9585         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
9586         from libiberty.h
9587
9588 Tue Feb  2 10:39:47 1999  Per Bothner  <bothner@cygnus.com>
9589
9590         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
9591         * jcf-write.c (generate_bytecode_return):  New function.
9592         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
9593
9594         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
9595         generate special [fd]const_[01] instructions.
9596
9597         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
9598
9599         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
9600         handling OPCODE_lookupswitch or OPCODE_tableswitch.
9601
9602 Mon Feb  1 20:44:47 1999  Per Bothner  <bothner@cygnus.com>
9603
9604         * parse.y (patch_method_invocation):  Handle calling static methods,
9605         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
9606
9607         * parse.y (java_complete_lhs):  Don't complain about unreachable
9608         exit condition in a do-while statement.
9609
9610 Fri Jan 29 18:19:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9611
9612         * lex.c (java_read_char): Fixed utf8 decoding.
9613         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
9614         range.
9615         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
9616         comments. Local variable `all_primitive' is gone. Broadened
9617         acceptance of `0' to floating point targets. `long' can now be
9618         widened to `double' or `float'.
9619         (valid_method_invocation_conversion_p): Added leading
9620         comment. Fixed tabulation.
9621         (build_string_concatenation): Optimize out left or right empty
9622         string constants.
9623
9624 Thu Jan 28 18:51:26 1999  Per Bothner  <bothner@cygnus.com>
9625
9626         * jcf-write.c (localvar_alloc):  Only emit entry for
9627         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
9628         (generate_bytecode_insns):  Only call put_linenumber if
9629         debug_info_level > DINFO_LEVEL_NONE.
9630         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
9631         is specified, add -g1 (for compatibility wih javac).
9632
9633 Thu Jan 28 09:17:51 1999  Hans-Peter Nilsson  <hp@axis.se>
9634
9635         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
9636         gjavah.o, check-init.o, jv-scan.o
9637
9638 Mon Feb  1 09:50:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9639
9640         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
9641
9642         * gjavah.c: Include config.h and system.h.
9643
9644         * javaop.h (inline): Don't define, its handled by system.h.
9645         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
9646         from `inline' to `static inline'.
9647
9648         * jcf.h (inline): Don't define, its handled by system.h.
9649
9650         * lex.c (inline): Likewise.
9651
9652 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
9653
9654         * lang-specs.h: Map -Qn to -fno-ident.
9655
9656 Fri Jan 29 16:51:56 1999  Richard Henderson  <rth@cygnus.com>
9657
9658         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
9659
9660 1999-01-29  Tom Tromey  <tromey@cygnus.com>
9661
9662         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
9663         then cast it to Object before calling `append' method.
9664
9665 Thu Jan 28 14:45:39 1999  Per Bothner  <bothner@cygnus.com>
9666
9667         * check-init.c (check_bool2_init, check_bool_init, check_init):
9668         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
9669         * jcf-write.c (generate_bytecode_insns):  Likewise.
9670
9671 Thu Jan 28 11:50:11 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9672
9673         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
9674         * parse.y (patch_cast): Allow a boolean to be cast into a
9675         boolean.
9676
9677 Wed Jan 27 10:19:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9678
9679         * parse.y: (class_declaration:): Fixed indentation.
9680         (class_member_declaration:): Extra `;' after field declaration now
9681         accepted.
9682         (interface_declaration:): Removed debug messages in error reports.
9683         (patch_binop): Nodes created and returned inherit the orignal
9684         node's COMPOUND_ASSIGN_P flag value.
9685         (patch_cast): Fix cast from char to floating point.
9686
9687 Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
9688
9689         * except.c, java-except.h (expand_resume_after_catch): new
9690         function.
9691         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
9692         to branch back to main flow of control after a catch block.
9693
9694 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9695
9696         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
9697         $(srcdir)/../system.h.
9698         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
9699         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
9700         (jcf-write.o): Likewise.
9701         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9702         (mangle.o): Depend on $(srcdir)/../toplev.h.
9703         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9704         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
9705
9706         * class.c: Include output.h and parse.h.
9707         (mangled_classname): Add the `const' keyword to a char*.
9708         (find_named_method): Hide unused function definition.
9709         (build_utf8_ref): Change type of variable `c' to unsigned char.
9710         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
9711         (build_class_ref): Add the `const' keyword to a char*.
9712         (layout_class_method): Remove unused variable `buf'.
9713
9714         * decl.c (find_local_variable): Remove unused variable `rtl'.
9715         (pushdecl): Likewise for variables `different_binding_level' and
9716         `oldglobal'.
9717         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
9718         (maybe_build_cleanup): Likewise for parameter `decl'.
9719
9720         * except.c (expand_start_java_handler): Mark parameter `range'
9721         with ATTRIBUTE_UNUSED.
9722
9723         * expr.c: Include except.h.
9724         (pop_type): Remove unused variable `i'.
9725         (pop_value): Likewise for variables `n_words' and `i'.
9726         (expand_java_arrayload): Likewise for variable `convert'.
9727         (java_lang_expand_expr): Likewise for variables `op0', `type',
9728         `mode', `unsignedp', `node' and `elements'.
9729         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
9730         `eh_ranges'.
9731         (process_jvm_instruction): Add a `const' qualifier to a char*.
9732
9733         * gjavah.c (output_directory): Add the `const' keyword to a char*.
9734         (temp_directory): Likewise.
9735         (print_c_decl): Likewise.
9736         (print_method_info): Likewise.
9737         (decode_signature_piece): Likewise.
9738         (print_mangled_classname): Likewise.
9739
9740         * java-except.h: Provide prototypes for maybe_start_try,
9741         maybe_end_try and add_handler.
9742
9743         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
9744         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
9745         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
9746         init_expr_processing, push_super_field, init_class_processing,
9747         can_widen_reference_to, class_depth, verify_jvm_instructions,
9748         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
9749         set_local_type, merge_type_state, push_type, load_type_state,
9750         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
9751         emit_unicode_mangled_name): Add prototypes.
9752
9753         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
9754         (print_signature_type): Use ISDIGIT, not isdigit.
9755         (print_signature): Remove unused variable `j'.
9756
9757         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
9758         int when comparing against one.
9759
9760         * jcf-parse.c: Include toplev.h.
9761
9762         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
9763         (localvar_free): Remove unused variable `i'.
9764         (generate_bytecode_conditional): Likewise for variable `kind'.
9765
9766         * jv-scan.c: Include config.h and system.h.  Remove redundant
9767         OS header and gansidecl.h includes.
9768         (warning): Add the `const' keyword to a char*.  Also add
9769         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
9770         __STDC__, when determining whether to use ANSI-isms.
9771         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
9772         (xmalloc): Don't redundantly prototype here.
9773         (main): Remove unused parameter `envp'.  Also fix the arguments
9774         passed to function `fatal' to match the format specifier.
9775
9776         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
9777
9778         * mangle.c: Include toplev.h.
9779         (emit_unicode_mangled_name): Declare parameter `len'.
9780
9781         * parse.y (parse_warning_context): Add the `const' keyword to a
9782         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
9783         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
9784         (issue_warning_error_from_context): Add the `const' keyword to
9785         a char*.
9786         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
9787         not `__STDC__' for whether to use ANSI-isms.
9788
9789         * typeck.c (incomplete_type_error): Mark parameters `value' and
9790         `type' with ATTRIBUTE_UNUSED.
9791         (parse_signature_type): Use ISDIGIT, not isdigit.
9792
9793         * verify.c (check_pending_block): Add the `const' keyword to a char*.
9794         (verify_jvm_instructions): Likewise.  Remove unused variables
9795         `field_name' and `default_val'.
9796
9797         * zextract.c: Include config.h and system.h.  Remove redundant
9798         OS header includes.
9799
9800         * zipfile.h: Prototype `read_zip_archive'.
9801
9802 Thu Jan 21 16:00:06 1999  Andrew Haley  <aph@cygnus.com>
9803
9804         * typeck.c (convert): Allow conversions to void type: some
9805         optimizations in gcc do this.
9806
9807 Thu Jan 21 15:21:49 1999  Andrew Haley  <aph@cygnus.com>
9808
9809         * typeck.c (convert_ieee_real_to_integer): New function.
9810         (convert): When not using fast-math and using hardware fp, convert
9811         an IEEE NaN to zero.
9812
9813 1999-01-18  Andrew Haley  <aph@cygnus.com>
9814
9815         * parse.y (patch_binop): Do a type conversion from signed to
9816         unsigned and then back to signed when a ">>>" is found.
9817
9818 Sun Jan 17 22:34:22 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9819
9820         * java-tree.h: (check_for_initialization): Added prototype.
9821         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
9822         * parse.y (do_resolve_class): Removed unused locals.
9823         (read_import_dir): Likewise.
9824         (resolve_qualified_expression_name): Array creation
9825         expressions are valid primary expressions.
9826         (qualify_ambiguous_name): Likewise.
9827         (patch_synchronized_statement): Removed unused local.
9828
9829 Sun Jan 17 21:55:42 1999  Jeffrey A Law  (law@cygnus.com)
9830
9831         * Makefile.in (zextract.o): Add dependencies.
9832
9833         * Makefile.in: Do not put ^Ls at the start of a line.
9834
9835 Fri Jan 15 20:16:20 1999  Per Bothner  <bothner@cygnus.com>
9836
9837         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
9838         sub-type the result of the call that gets the exception value.
9839
9840         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
9841         don't call finish_class.
9842
9843         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
9844         clear found before continuing.
9845
9846         * verify.c (verify_jvm_instructions):  On an array load, allow
9847         and handle top of stack to be TYPE_NULL.
9848
9849         * gjavah.c (generate_access):  Translate Java package private or
9850         protected access to C++ public, but with a comment.
9851
9852 1999-01-13  Andrew Haley  <aph@cygnus.com>
9853
9854         * expr.c (generate_name): Name prefix changed to avoid clashes
9855         with assembler temp labels.
9856
9857         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
9858         MODIFY_EXPR.  Without this, code for the assignement may not be
9859         generated at all and the synchronized statement will read an
9860         uninitialized variable.
9861
9862 Wed Jan 13 01:24:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9863
9864         * class.c (maybe_layout_super_class): Fixed returned value.
9865         * lex.c: Added 1999 to the copyright.
9866         (java_init_lex): Initialize java_lang_imported.
9867         * lex.h: Added 1999 to the copyright.
9868         * parse.h: Added 1999 to the copyright.
9869         (REGISTER_IMPORT): Fixed typo in trailing macro.
9870         (CURRENT_OSB): New macro.
9871         (struct parser_ctxt): New fields osb_depth, osb_limit.
9872         * parse.y (java_lang_id): New global variable.
9873         (type_import_on_demand_declaration): Don't import java.lang.* twice.
9874         (array_creation_expression:): Use CURRENT_OSB.
9875         (dims:): Uses a stack to keep track of array dimensions.
9876         (cast_expression:): Use CURRENT_OSB.
9877         (find_expr_with_wfl): Return NULL if node found doesn't meet the
9878         conditions.
9879         (register_fields): Fixed typos in comment.
9880         (check_method_redefinition): Fixed comment indentation.
9881         (java_check_regular_methods): Set saved found wfl to NULL after
9882         having reinstalled it in the previously found DECL_NAME.
9883
9884 Sun Jan 10 13:36:14 1999  Richard Henderson  <rth@cygnus.com>
9885
9886         * gjavah.c (java_float_finite): Use a union to do type punning.
9887         (java_double_finite): Likewise.
9888
9889 Sat Jan  9 11:25:00 1999  Per Bothner  <bothner@cygnus.com>
9890
9891         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
9892         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
9893         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
9894         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
9895         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
9896         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
9897
9898 Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
9899
9900         * check-init.c (check_init):  If compiling to native, we don't
9901         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
9902
9903 1999-01-08  Tom Tromey  <tromey@cygnus.com>
9904
9905         * parse-scan.y (variable_declarator_id): Set or increment
9906         bracket_count.
9907         (bracket_count): New global.
9908         (formal_parameter): Handle case where bracket pairs trail variable
9909         declarator id.
9910
9911 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
9912
9913         * jcf-parse.c (yyparse): variable len changed from a char to an
9914         int to prevent overflow.
9915
9916 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
9917
9918         * java-tree.h:  Declare read_class.
9919         * jcf-parse.c (read_class):  New function.
9920         (load_class):  Now just call read_class.
9921
9922         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
9923         * jcf-parse.c (parse_source_file):  Declare save_error_count,
9924         which is needed by java_parse_abort_on_error macro,
9925         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
9926
9927         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
9928         constructor, if initializing a static field.
9929         (patch_new_array_init):  Set TREE_CONSTANT if it is.
9930         * expr.c (java_lang_expand_expr):  For a static array constructor
9931         of primitive elements, allocate the array itself statically.
9932         Disabled until we can set the vtable field statically.
9933
9934         * check-init.c:  New file.  Checks for definite assignment.
9935         * Makefile.in (JAVA_OBJS):  Add check-init.o.
9936         * parse.y (java_complete_expand_method): Call check_for_initialization.
9937         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
9938
9939 Wed Jan  6 14:53:10 1999  Graham <grahams@rcp.co.uk>
9940
9941         * parse.y : include system.h instead of including
9942         standard headers directly with the exception of <dirent.h>.
9943
9944 Wed Jan  6 16:20:06 1999  Per Bothner  <bothner@cygnus.com>
9945
9946         * lex.h:  Moved static function declarations to lex.c,
9947         to shut up some -Wall warnings.
9948         * lex.c:  Static function declarations moved here.
9949         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
9950
9951 Tue Jan  5 22:15:40 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9952
9953         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
9954
9955 Tue Dec 22 11:25:19 1998  Per Bothner  <bothner@cygnus.com>
9956
9957         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
9958         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
9959
9960         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
9961         (localvar_alloc):  Change return type to void,
9962         (emit_unop):  Remove unused variable size.
9963
9964         * jcf-write.c (struct jcf_block):  Add new union.
9965         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
9966         (call_cleanups):  New functions.
9967         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
9968         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
9969         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
9970         * lang.c (lang_init):  Call using_eh_for_cleanups.
9971         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
9972         completing operands to patch_synchronized_statement.
9973         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
9974         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
9975         WITH_CLEANUP_EXPR instead of TRY_EXPR.
9976
9977 Sun Dec 20 16:15:44 1998  John F. Carr  <jfc@mit.edu>
9978
9979         * Make-lang.in: Comment out control-Ls; they upset some makes.
9980
9981 1998-12-18  Tom Tromey  <tromey@cygnus.com>
9982
9983         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
9984         consistently.
9985
9986 1998-12-17  Tom Tromey  <tromey@cygnus.com>
9987
9988         * parse.y (DIR_SEPARATOR): New define.
9989         (check_class_interface_creation): Use it.
9990
9991         * parse-scan.y (report_main_declaration): Recognize
9992         `java.lang.String' in argument to main.
9993
9994 Wed Dec 16 16:18:59 1998  Per Bothner  <bothner@cygnus.com>
9995
9996         * parse.y (create_interface):  Remove bogus test.
9997
9998 Wed Dec 16 14:42:19 1998  Per Bothner  <bothner@cygnus.com>
9999
10000         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
10001         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
10002
10003 1998-12-16  Tom Tromey  <tromey@cygnus.com>
10004
10005         * parse-scan.y (qualified_name): Use correct sprintf format.
10006
10007 1998-12-15  Tom Tromey  <tromey@cygnus.com>
10008
10009         * gjavah.c (print_field_info): Changed how most negative number is
10010         printed.
10011
10012 Mon Dec 14 18:49:29 1998  Per Bothner  <bothner@cygnus.com>
10013
10014         * parse.y (fold_constant_for_init):  New function.
10015         (resolve_expression_name):  Don't replace static final
10016         constant-initialized fields by its value.
10017         (java_complete_lhs):  New.  Same as java_complete_tree, except does
10018         not replace static final constant-initialized fields by their values.
10019         (register_fields):  If there is an initializer, set DECL_INITIAL and
10020         MODIFY_EXPR_FROM_INITIALIZATION_P.
10021         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
10022         Only call patch_initialized_static_field if
10023         MODIFY_EXPR_FROM_INITIALIZATION_P.
10024         (patch_initialized_static_field):  If not valid constant, clear
10025         DECL_INITIAL.
10026
10027         * parse.y (lookup_field_wrapper):  Fix thinko.
10028
10029         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
10030         set and restore global lineno.
10031
10032 1998-12-14  Tom Tromey  <tromey@cygnus.com>
10033
10034         * gjavah.c (print_field_info): If value to print is the smallest
10035         value of its size, then print as hex to avoid later warnings from
10036         C++ compiler.
10037
10038 1998-12-14  Tom Tromey  <tromey@cygnus.com>
10039
10040         * gjavah.c (decompile_method): Decompile `return null'.
10041         (process_file): Generate `#pragma interface'.
10042         (method_declared): New global.
10043         (print_method_info): Set it.
10044         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
10045         (print_method_info): Handle abstract methods.
10046
10047 Sun Dec 13 17:31:40 1998  Per Bothner  <bothner@cygnus.com>
10048
10049         * parse.y (patch_method_invocation):  If class_decl is null
10050         (e.g. an array type), use original type.
10051
10052         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
10053         errors about uncaught exception from clone (of array, specifically).
10054
10055 1998-12-13  Tom Tromey  <tromey@cygnus.com>
10056
10057         * gjavah.c (decompile_method): Handle all types of `return'
10058         opcode.  Decompile `return this' and `return'.
10059         (method_access): New global.
10060         (print_method_info): Set it.
10061         (decompile_method): Don't decompile a synchronized method.
10062
10063 1998-12-13  Tom Tromey  <tromey@cygnus.com>
10064
10065         * jcf-reader.c (jcf_parse_one_method): Recognize
10066         HANDLE_END_METHOD.
10067         * gjavah.c (HANDLE_END_METHOD): New macro.
10068         (HANDLE_CODE_ATTRIBUTE): New macro.
10069         (decompile_method): New function.
10070         (print_method_info): Don't print `;\n' at end of function decl.
10071         Include java-opcodes.h.
10072         (decompiled): New global.
10073
10074 Sat Dec 12 20:13:19 1998  Per Bothner  <bothner@cygnus.com>
10075
10076         * class.c (build_class_ref):  Handle PRIMTYPE.class if
10077         flag_emit_class_files.
10078         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
10079         if flag_emit_class_files.
10080         * parse.y (java_complete_tree):  Pre-liminary support for
10081         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
10082
10083         * parse.y (patch_synchronized_statement):   Don't call monitorexit
10084         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
10085
10086         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
10087
10088         * zipfile.h (opendir_in_zip):  New declaration.
10089         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
10090         (opendir_in_zip):  New function, using code from open_in_zip.
10091         (open_in_zip):  Call opendir_in_zip.
10092         (find_class):  Remove no-longer-used do_class_file parameter,
10093         but add source_ok parameter.  Change logic so if we find a .java file,
10094         we don't look for .class in later classpath emtries.
10095         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
10096         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
10097         * gjavah.c: Update call to find_class.
10098         * jcf-dump.c:  Likewise.
10099
10100         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
10101         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
10102         nothing if body is empty_stmt_node.
10103         Various little fixes so SP gets correctly adjusted.
10104         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
10105         For CALL_EXPR, test if static first.
10106         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
10107         such as the ones we create for Object and Class.
10108         Set and restore current_function_decl.
10109         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
10110         (note_possible_classname):  New function.
10111         (read_import_entry):  Removed.  Merged with read_import_dir.
10112         (read_import_dir):  Don't call find_class - that only gives us
10113         the first classpath entry having the needed package.
10114         Use the struct buffer data structure from buffer.h.
10115         (read_import_dir, find_in_imports_on_demand):  The remembered
10116         class names now use '.' (not '/') as package separator.
10117
10118         * parse.y (java_complete_expand_methods):  Call write_classfile
10119         here, and not in java_expand_classes (which only gets first class).
10120
10121 Sat Dec 12 19:46:04 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10122
10123         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
10124         (register_fields):  If a static fields has an initializer, just
10125         chain it on ctxp->static_initialized, and handle later.
10126         (java_complete_expand_methods):  Force <clinit> first.
10127         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
10128         - it's already been completed.
10129         (patch_initialized_static_field):  New function.
10130         (java_complete_field):  Call it.
10131
10132 Sat Dec 12 19:21:11 1998  Per Bothner  <bothner@cygnus.com>
10133
10134         * expr.c (encode_newarray_type, build_new_array):  New functions.
10135         * java-tree.h:  Declare build_new_array.
10136         * jcf-write.c (patch_newarray):  Use build_new_array.
10137
10138         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
10139         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
10140
10141         * parse.y (patch_new_array_init):  Re-organize.
10142         Now is passed the actual array (pointer) type of the value.
10143         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
10144         (patch_array_constructor):  Removed - merged into patch_new_array_init.
10145         (java_complete_tree):  Update patch_new_array_init.
10146
10147         * jcf-write.c (find_constant_index):  New function.
10148         (generate_bytecode_insns):  Use find_constant_index.
10149         (generate_classfile):  Use find_constant_index for ConstantValue.
10150
10151 1998-12-11  Tom Tromey  <tromey@cygnus.com>
10152
10153         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
10154         * decl.c (init_decl_processing): Renamed dtable -> vtable.
10155         * class.c (make_class_data): Renamed dtable -> vtable, and
10156         dtable_method_count -> vtable_method_count.
10157
10158 Thu Dec 10 20:00:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10159
10160         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
10161         global variables, initialized.
10162         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
10163         Declared new global variables.
10164         * lex.c (java_lex): Return long_zero_node, float_zero_node,
10165         double_zero_node, integer_zero_node upon direct matching.
10166         * parse.y (purify_type_name): Added function prototype.
10167         (duplicate_declaration_error_p): Consider new_type as potentially
10168         being a incomplete type. Use purify_type_name on type string.
10169         (method_header): saved_type: unused variable removed. Don't figure
10170         return type if method name is invalid.
10171         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
10172         processed by patch_unaryop.
10173         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
10174         increment/decrement node into its original type after binary
10175         numeric promotion on its operands.
10176
10177 Thu Dec 10 11:02:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10178
10179         * parse.y (array_initializer:): Array init operand is NULL_TREE
10180         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
10181         now an error. Fixed indentation problems.
10182         (patch_string): Handle error_mark_node as an argument.
10183         (patch_new_array_init): Fixed indentation problems.
10184         (array_constructor_check_entry): Removed check on null wfl_value.
10185         Return an error if wfl_value's walk returns an error.
10186
10187 Wed Dec  9 15:37:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10188
10189         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
10190         * lex.c (java_lex): Remember column position before advancing one
10191         token. Retain location information on OCB_TK.
10192         * lex.h (typedef struct java_lc): Added new field.
10193         * parse.h (GET_SKIP_TYPE): New macro.
10194         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
10195         * parse.y (build_new_array_init, patch_new_array_init,
10196         patch_array_constructor, maybe_build_array_element_wfl,
10197         array_constructor_check_entry): New function prototypes.
10198         (switch_block:): Tagged <node>.
10199         (OCB_TK): Tagged <operator>.
10200         (array_initializer:): Installed actions.
10201         (variable_initializer): Build location information on element if
10202         necessary.
10203         (switch_statement:): Fixed indentation typo.
10204         (switch_block:): Redefined default action.
10205         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
10206         (patch_assignment): Removed duplicate code.
10207         (maybe_build_array_element_wfl, build_new_array_init,
10208         patch_new_array_init, patch_array_constructor,
10209         array_constructor_check_entry): New functions.
10210
10211 Mon Dec  7 15:13:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10212
10213         * parse.y (array_initializer): Tagged <node>.
10214         (variable_initializer:): Use default rule.
10215         (array_initializer:): Defined actions.
10216         (variable_initializers:): Likewise.
10217         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
10218         non-static field accesses.
10219         (patch_invoke): Fixed indentation typo.
10220         (java_complete_tree): Likewise.
10221         (build_labeled_block): Changed leading comment. Generate an error
10222         in case of duplicate loop labels.
10223         (patch_conditional_expr): Patch results of string concatenation
10224         operations.
10225
10226 Sun Dec  6 13:45:00 1998  Per Bothner  <bothner@cygnus.com>
10227
10228         * constants.c (find_methodref_index):  When the class is an interface,
10229         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
10230
10231         * decl.c (finit_identifier_node):  Use "$finit$", rather than
10232         "<finit>" (which Sun's verifier rejects).
10233         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
10234         (generate_field_initialization_code):  Removed.
10235         (fix_constructors)  Don't add call to $finit$ here (wrong order).
10236         (patch_method_invocation):  Add $finit$ call here.
10237
10238         * java-tree.h (CALL_USING_SUPER):  New macro.
10239         * parse.y (patch_invoke):  Remove im local variable.
10240         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
10241         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
10242         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
10243
10244         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
10245
10246         * parse.y (java_complete_tree):  Don't complain about unreachable
10247         statement if it is empty_stmt_node.
10248
10249         * jcf-write.c (find_constant_wide):  New function.
10250         (push_long_const):  Use find_constant_wide.
10251
10252         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
10253         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
10254         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
10255         Emit invokeinterface when calling an interface method.
10256         Emit invokespecial also when calling super or private methods.
10257
10258         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
10259
10260 Sun Dec  6 13:21:18 1998  Per Bothner  <bothner@cygnus.com>
10261
10262         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
10263
10264 Thu Dec  3 17:11:12 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10265
10266         * java-tree.h (java_layout_seen_class_methods): New function
10267         prototype.
10268         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
10269         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
10270         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
10271         * parse.y (method_declarator:): Defined action.
10272         (issue_warning_error_from_context): input_filename saved, set to
10273         the appropriate value and restored after java_error is called.
10274         (build_unresolved_array_type): Fixed comment.
10275         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
10276         (method_header): Deal with return type the same way type are
10277         handled for fields and method's parameters and local variables
10278         types are handled.
10279         (check_method_redefinition): Removed extra CR.
10280         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
10281         (java_layout_seen_class_methods): New function.
10282         (java_layout_classes): Call java_layout_seen_class_methods.
10283
10284 Thu Dec  3 15:56:50 1998  Per Bothner  <bothner@cygnus.com>
10285
10286         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
10287
10288 Thu Dec  3 15:08:30 1998  Per Bothner  <bothner@cygnus.com>
10289
10290         * jcf-dump.c (main):  Fix error message.
10291         * jcf-path.c (add_entry):  Style fix.
10292
10293 Wed Dec  2 15:52:25 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10294
10295         * class.c (layout_class_method): Call build_java_argument_signature
10296         on constructors too.
10297         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
10298         (patch_method_invocation): Define a primary when resolving an
10299         expression name. Augmented comment on code checking illegal `this'
10300         usage. Loosened it test by accepting NEW_CLASS_EXPR.
10301
10302 Tue Dec  1 13:53:24 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10303
10304         * class.c (layout_class_method): Don't report error on non-static
10305         overriding static if the method is private.
10306         * java-tree.h (finish_class): Prototype added.
10307         * lex.c (java_get_line_col): Handle col argument -2 value.
10308         * parse.h: All static method declarations moved to parse.y.
10309         * parse.y: Now contains all static method declarations previously
10310         found in parse.h.
10311         (find_expr_with_wfl, missing_return_error,
10312         unreachable_stmt_error): New functions.
10313         (java_get_real_method_name): Identify constructors bearing class
10314         names in source code compiled classes only.
10315         (java_complete_expand_methods): Call missing_return_error.
10316         (invocation_mode): Private methods invoked as static methods.
10317         (java_complete_tree): Call unreachable_stmt_error.
10318
10319 1998-12-01  Tom Tromey  <tromey@cygnus.com>
10320
10321         * Makefile.in (+target): Removed.
10322         (+xmake_file): Likewise.
10323         (+tmake_file): Likewise.
10324         (.NOEXPORT): Removed duplicate.
10325
10326 Fri Nov 27 13:20:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10327
10328         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
10329
10330         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
10331
10332         * jvgenmain.c: Remove the xmalloc prototype, we get it from
10333         libiberty.h.  Provide an xmalloc definition.
10334
10335         * jvspec.c: Remove the xmalloc prototype.
10336
10337         * parse-scan.y: Include config.h and system.h.  Don't include
10338         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
10339         Provide an xstrdup definition.
10340
10341 Thu Nov 26 22:03:58 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
10342
10343         * jcf-path.c (add_entry): Recognize ".jar" too.
10344         * lang-specs.h: Likewise.
10345
10346 Thu Nov 26 12:44:07 1998  Per Bothner  <bothner@cygnus.com>
10347
10348         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
10349         soft_monitorenter_node, soft_monitorexit_node, throw_node.
10350
10351         * jcf-write.c (generate_bytecode_insns):
10352         Handle pre/post-increment/decrement of long.
10353
10354         * jcf-write.c (generate_bytecode_insns):
10355         Handle missing exception handler (finally for synchronized).
10356
10357 Wed Nov 25 09:47:15 1998  Per Bothner  <bothner@cygnus.com>
10358
10359         * java-tree.h (end_params_node):  Declare global.
10360         * decl.c (end_params_node):  New global.
10361         (init_decl_processing, start_java_method):  Use end_params_node for
10362         end of list of parameter types.  Follows correct gcc conventions.
10363         * expr.c (pop_argument_types, pop_arguments):  Likewise.
10364         * lang.c (put_decl_node):  Likewise.
10365         * typeck.c (various places):  Likewise.
10366         * class.y (various places):  Likewise.
10367         * parse.y (various places):  Likewise.
10368
10369         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
10370         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
10371
10372         * class.c:  Add #include flags.h, remove no-longer needed declaration.
10373
10374         * class.c (layout_class_method):  Remove commented-out code, re-format.
10375         Don't add vtable entry (or index) for private methods.
10376         * expr.c (expand_invoke):  A private method is implicitly final.
10377         * class.c (make_class_data):  If inlining or optimizing,
10378         skip private methods.
10379
10380         * class.c (finish_class):  New function.  Calls existing methods,
10381         but alls emits deferred inline functions.
10382         * jcf-parse.c (parse_class_file):  Call finish_class.
10383         * parse.y (java_complete_expand_methods):  Likewise.
10384
10385         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
10386
10387         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
10388
10389 Wed Nov 25 00:50:58 1998  Marc Espie <espie@quatramaran.ens.fr>
10390
10391         * jcf-write.c (generate_bytecode_conditional): Fix typo.
10392
10393 Tue Nov 24 17:06:38 1998  Per Bothner  <bothner@cygnus.com>
10394
10395         * (generate_classfile): Always write class access flag with
10396         ACC_SUPER set.
10397
10398 Tue Nov 24 16:34:33 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10399
10400         * class.c (maybe_layout_super_class): New function.
10401         (layout_class): Reorganized. Loop on class methods dispatched into
10402         a new function. Call maybe_layout_super_class.
10403         (layout_class_methods, layout_class_method): New functions.
10404         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
10405         class.
10406         (expand_invoke): Likewise.
10407         * java-tree.h (all_class_list): New global variable declared.
10408         (layout_class_methods, layout_class_method): New function
10409         prototypes.
10410         (LAYOUT_SEEN_CLASS_METHODS): New macro.
10411         * jcf-parse.c (all_class_list): New global variable.
10412         (load_class): Extended what class_or_name can be. Use parser
10413         context mechanism to save globals before calling jcf_parse.
10414         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
10415         is set on the file name.
10416         (jcf_parse): Layout class methods when Object is loaded, otherwise
10417         record class in all_class_list for delayed method layout.
10418         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
10419         * lang.c (put_decl_node): Decode <init> into the decl context
10420         class name.
10421         * lex.c (java_allocate_new_line): Use xmalloc.
10422         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
10423         pointers, not TREE_LIST elements.
10424         (struct parser_ctxt): Fixed comment indentations, added comments
10425         and reordered some fields.
10426         (java_check_methods): Function prototype removed.
10427         * parse.y (java_push_parser_context): Use xmalloc.
10428         (java_parser_context_restore_global): Pop extra pushed ctxp only
10429         when there's nothing next.
10430         (maybe_create_class_interface_decl): Fixed comment, add new
10431         created class decl to all_class_list.
10432         (method_header): Use GET_REAL_TYPE on argument's types.
10433         (method_declarator): Use GET_REAL_TYPE, change type to the real
10434         type in TREE_LIST dependency node. Build argument list with the
10435         real type.
10436         (create_jdep_list): Use xmalloc. Removed allocation error message.
10437         (obtain_incomplete_type): Fixed leading comment. Broadened
10438         incoming argument meaning.
10439         (register_incomplete_type): Use xmalloc. Removed allocation error
10440         message.
10441         (safe_layout_class): Fixed leading comment.
10442         (jdep_resolve_class): Reversed if statement condition and switch
10443         if and else bodies.
10444         (resolve_and_layout): Fixed leading comment. Broadened incoming
10445         argument meaning.
10446         (complete_class_report_errors): New local variable name, for
10447         clarity. purify_type_name used for all error cases.
10448         (java_get_real_method_name): Stricter check on constructors.
10449         (java_check_regular_methods): Reverse methods list only if not
10450         already laid out. Layout artificial constructor.
10451         (java_check_methods): Deleted.
10452         (source_start_java_method): Obtain incomplete type for patchable
10453         method arguments.
10454         (java_layout_classes): Fixed leading comment. Use
10455         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
10456         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
10457         before returning. Fixed comments.
10458         (java_expand_classes): Check for errors up front.
10459         (patch_method_invocation): Class to search is resolved and laid
10460         out.
10461
10462 Tue Nov 24 12:57:13 1998  Per Bothner  <bothner@cygnus.com>
10463
10464         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
10465
10466         * javaop.h (int8):  Removed - not used.
10467         (jbyte):  Redefine portably with correct signedness.
10468
10469         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
10470
10471         * jcf-write.c (generate_bytecode_insns):  Fix typo
10472         OPCODE_getstatic to OPCODE_getfield.
10473
10474         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
10475         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
10476         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
10477
10478 Thu Nov 19 11:16:55 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10479
10480         * jcf-parse.c (jcf_parse_source): Function returned type is
10481         void. Added prototype.
10482         (jcf_parse): Function returned type is void.
10483         (yyparse): Remove call to fclose on the last parsed file.
10484
10485         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
10486
10487 Wed Nov 18 23:54:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10488
10489         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
10490         (layout_class): Cope with methods featuring WFL in decl names.
10491         * decl.c (unqualified_object_id_node): New global variable,
10492         initialized.
10493         (build_decl_no_layout): Removed.
10494         * expr.c (build_primtype_type_ref): Handle Double.
10495         (java_lang_expand_expr): Fixed indentations.
10496         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
10497         (flag_wall, flag_redundant, flag_not_overriding,
10498         flag_static_local_jdk1_1, unqualified_object_id_node): Global
10499         variable declarations.
10500         (build_decl_no_layout): Removed prototype.
10501         (java_get_real_method_name): Added prototype.
10502         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
10503         (java_parse_abort_on_error): Macro now just returns.
10504         * jcf-parse.c (jcf_parse_source): Check fclose returned
10505         value. Call emit_register_classes if java_report_errors returns
10506         zero.
10507         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
10508         flag_static_local_jdk1_1): New integer flags.
10509         (lang_decode_option): New flags set here.
10510         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
10511         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
10512         the flag_redundant variable.
10513         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
10514         when parsing java.lang.Object class.
10515         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
10516         NULL_TREE to build.
10517         (resolve_qualified_expression_name): Fixed indentation.
10518         (patch_array_ref): Changed prototype.
10519         (not_initialized_as_it_should_p): Prototype removed.
10520         (java_report_errors): Added function prototype.
10521         * parse.y (formal_parameter:): Changed error message for not yet
10522         supported final parameters.
10523         (class_type_list:): Set both PURPOSE and VALUE of created
10524         TREE_LIST to be class_type.
10525         (primary_no_new_array:): Handle class literals on primitive types.
10526         (parse_warning_context): Reinstalled correct force_error and
10527         do_warning flags setups.
10528         (java_report_errors): Changed prototype. Return java_error_count
10529         value.
10530         (variable_redefinition_error): Consider treating variable type as
10531         a fake pointer.
10532         (create_interface): Warn about redundant abstract modifier if
10533         flag_redundant is set. Changed error message.
10534         (lookup_field_wrapper): Save/restore globals before/after looking
10535         up field.
10536         (duplicate_declaration_error_p): Consider treating declaration
10537         type as a fake pointer.
10538         (register_fields): Extract real type from dependency node. Check
10539         for duplicate field declaration after type adjustment. Use
10540         DECL_INITIAL to store static final initialized values.
10541         (method_header): Extract real function type from dependency node.
10542         (check_abstract_method_header): Use GET_METHOD_NAME.
10543         (obtain_incomplete_type): Layout fake pointer type.
10544         (safe_layout_class): Don't try to check for methods before layout.
10545         (java_complete_class): Don't check for correct throws clause
10546         elements inheritance here.
10547         (resolve_and_layout): Broadened name parameter meaning.
10548         (reset_method_name): Use GET_METHOD_NAME.
10549         (java_get_real_method_name): New function.
10550         (java_check_regular_methods): Don't check methods in
10551         java.lang.Object.  Verify lineage of throws clause elements. Use
10552         flag_no_overriding in warning report.
10553         (check_throws_clauses): Don't check if class was from
10554         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
10555         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
10556         (declare_local_variables): Use flag_static_local_jdk1_1 to report
10557         warning on unsupported final local variables. Use build_decl
10558         instead of build_decl_no_layout. Get real local variable type from
10559         dependency node.
10560         (source_start_java_method): Get real parameter type from
10561         dependency node. Call build_decl instead of build_decl_no_layout.
10562         (java_layout_classes): Reverse tree and layout type and class as
10563         required. Mark class as loaded when done.
10564         (resolve_field_access): Fixed indentation. Restricted condition
10565         leading to static field access code generation. Set field_type
10566         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
10567         (resolve_qualified_expression_name): Initialize type_found to
10568         null. Handle static field resolved during qualification. Fixed
10569         layout on non primitive field decl types.
10570         (not_accessible_p): Fixed typo in comment.
10571         (patch_method_invocation): Resolve and layout class to search from
10572         type.
10573         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
10574         layout non primitive type, if necessary. Make method node only to
10575         report errors.
10576         (find_applicable_accessible_methods_list): Consider WFL'ed method
10577         decl names. Fixed indentation.
10578         (argument_types_convertible): Resolve and layout target type if
10579         necessary.
10580         (java_complete_tree): Fixed indentation problems. Rewrote
10581         CALL_EXPR thrown exceptions check. Re-installed further processing
10582         of the assignment in certain cases.
10583         (patch_assignment): Call maybe_build_primttype_type_ref to perform
10584         inlining on class literals.
10585         (valid_builtin_assignconv_identity_widening_p): Cope with constant
10586         0 literal.
10587         (valid_method_invocation_conversion_p): Likewise.
10588         (patch_string): Temporary disable forbidden use of `this' in
10589         explicit constructor invocations when doing string concatenation
10590         within their scope.
10591         (patch_unaryop): Added comment. Reinstalled code to disable
10592         further check on assignment operation with cast expression RHS.
10593         (patch_switch_statement): Fixed indentation.
10594         (build_try_statement): Call build_decl instead of
10595         build_decl_no_layout.
10596         (patch_synchronized_statement): Likewise.
10597         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
10598         IS_UNCHECKED_EXPRESSION_P.
10599         (check_thrown_exceptions_do): Changed leading comment. Resolve and
10600         layout argument exception type.
10601         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
10602         of IS_UNCHECKED_EXPRESSION_P.
10603
10604 Wed Nov 18 14:21:48 1998  Anthony Green  <green@cygnus.com>
10605
10606         * jcf-parse.c (yyparse): Open class file in binary mode.
10607
10608 Sun Nov 15 17:14:17 1998  Per Bothner  <bothner@cygnus.com>
10609
10610         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
10611
10612         * jcf-write.c (perform_relocations):  Move check out one loop.
10613
10614 Sun Nov 15 15:09:56 1998  Anthony Green  <green@hoser.cygnus.com>
10615
10616         * Make-lang.in: Fix reference to srcdir.
10617         * jv-scan.c: Add missing xmalloc prototype.
10618         * jvgenmain.c: Ditto.
10619
10620 Sun Nov 15 14:36:29 1998  Per Bothner  <bothner@cygnus.com>
10621
10622         * decl.c (error_mark_node), java-tree.h:  New global.
10623         * parse.y:  Use empty_stmt_node instead of size_zero_node.
10624         (build_if_else_statement):  If missing else, use empty_stmt_node.
10625
10626         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
10627         (java_complete_expand_method):  Complain if return is missing.
10628         (java_check_regular_methods):  Comment out incorrect error check.
10629         (not_accessible_p):  Fix incorrect handling of protected methods.
10630         (patch_method_invocation):  Pass correct context to not_accessible_p.
10631         (find_applicable_accessible_methods_list):  Likewise.
10632         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
10633         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
10634         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
10635         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
10636
10637         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
10638         (push_int_const):  Remove reundant NOTE_PUSH.
10639         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
10640         (- case SWITCH_EXPR):  Fix code generation bug.
10641         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
10642         (generate_classfile):  More robust for abstract methods.
10643
10644 Sun Nov 15 13:52:39 1998  Anthony Green  <green@cygnus.com>
10645
10646         * Makefile.in: jv-scan and jvgenmain all require libiberty.
10647         * Make-lang.in: Ditto.
10648
10649         * jv-scan.c: Remove xmalloc and xstrdup definitions.
10650         * jvgenmain: Ditto.
10651
10652 Sun Nov 15 14:10:56 1998  Per Bothner  <bothner@cygnus.com>
10653
10654         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
10655
10656         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
10657
10658 Sat Nov 14 17:19:18 1998  Per Bothner  <bothner@cygnus.com>
10659
10660         Allow uses of interface types to verify.  This is not really
10661         type-safe, but it matches what Sun does, and is OK as long as
10662         there are appropriate run-time checks.
10663         * verify.c (merge_types):  If merging two interface types,
10664         just set the result to java.lang.Object.
10665         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
10666
10667 1998-11-13  Tom Tromey  <tromey@cygnus.com>
10668
10669         * gjavah.c (main): Handle --output-class-directory argument.
10670         * jvspec.c (lang_specific_driver): Translate `-d' into
10671         -foutput-class-dir.
10672         * jcf.h (jcf_write_base_directory): Declare.
10673         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
10674         * lang-options.h: Mention -foutput-class-dir.
10675         * jcf-write.c (jcf_write_base_directory): New global.
10676         (make_class_file_name): Put generated .class file into `-d'
10677         directory, or into source directory if -d not given.  Function now
10678         static.
10679         (write_classfile): Free class file name.  Handle case where class
10680         file name is NULL.
10681         (DIR_SEPARATOR): New macro.
10682         Include <sys/stat.h>
10683
10684         * Makefile.in (prefix): New macro.
10685
10686 Thu Nov 12 14:15:07 1998  Per Bothner  <bothner@cygnus.com>
10687
10688         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
10689         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
10690         here (done in patch_invoke instead).
10691         (case_identity):  Moved here from parse.y.
10692
10693         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
10694         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
10695         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
10696         so they can be efficiently scanned without recursion.
10697         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
10698         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
10699         in BLOCK iteratively, rather than recursively.
10700
10701         * parse.y (do_unary_numeric_promotion):  New function.
10702         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
10703
10704         * parse.y (patch_newarray):  Various fixes.
10705
10706         Re-do handling of switch statements (for proper block scoping).
10707         * parse.y:  Add just a single block for the enture switch block,
10708         but don't create any "case blocks".
10709         (group_of_labels):  Rmeoved unneeded non-terminal.
10710         CASE_EXPR and DEFAULT_EXPR are added to current block.
10711         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
10712         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
10713         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
10714         * parse.y (wfl_operator, print_int_node): Make non-static.
10715         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
10716         as part of recursive scan of block.
10717         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
10718         (patch_switch_statement):  Most tests move dinto java_complete_tree.
10719
10720         * parse.y:  Make various production be non-typed (void).
10721         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
10722         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
10723         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
10724
10725         * jcf-write.c (struct jcf_handler):  New type.
10726         (struct jcf_switch_state):  New type.
10727         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
10728         (alloc_handler, emit_unop, emit_reloc):  New functions.
10729         (adjust_typed_op):  Add extra parameter ("max type" offset).
10730         (emit_switch_reloc, emit_case-reloc):  New function.
10731         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
10732         (generate_bytecode_insns):  Support REAL_CST, switch statements,
10733         exception handling, method calls, object/array creation, and more.
10734
10735         * class.c:  Remove some unused variables.
10736         * constants.c (find_string_constant):  New function.
10737         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
10738         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
10739         if flag_emit_class_files.
10740
10741 1998-11-12  Tom Tromey  <tromey@cygnus.com>
10742
10743         * jcf-io.c (find_class): Added explanatory comment.
10744
10745         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
10746         trailing slash to `.zip' entries.
10747
10748         * jvspec.c (lang_specific_driver): Correctly handle case where
10749         GC_NAME not defined.
10750
10751 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10752
10753         * jvspec.c (GC_NAME): New define.
10754         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
10755         if required.
10756         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
10757
10758 Wed Nov 11 19:08:52 1998  Per Bothner  <bothner@cygnus.com>
10759
10760         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
10761
10762 1998-11-11  Tom Tromey  <tromey@cygnus.com>
10763
10764         * jcf-dump.c (main): Correctly recognize `--'-style long options.
10765
10766 Tue Nov 10 12:34:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10767
10768         * class.c (is_compiled_class): Call safe_layout_class for class
10769         compiled from source.
10770         * conver.h (convert_to_integer, convert_to_real,
10771         convert_to_pointer): Added prototypes.
10772         * decl.c (init_decl_processing): Non longer push the decls of
10773         `methodtable', `constants', `Class', `Field', `dispatchTable'
10774         `jexception' and `Method'.
10775         * expr.c (build_invokeinterface): New function.
10776         (expand_invoke): static variable CLASS_IDENT now in
10777         build_invokeinterface. Use build_invokeinterface.
10778         (expand_java_field_op): Moved code to inline
10779         java.lang.PRIMTYPE.TYPE into a function.
10780         (build_primtype_type_ref): New function.
10781         * java-tree.def (INSTANCEOF_EXPR): New tree code.
10782         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
10783         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
10784         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
10785         (DECL_LOCAL_STATIC_VALUE): New macro.
10786         (build_invokeinterface, build_primtype_type_ref): New function
10787         prototypes.
10788         (java_parse_abort_on_error): Macro rewritten.
10789         * jcf-parse.c (current_method): Add comment to declaration.
10790         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
10791         Function prototypes fixed.
10792         (jcf_parse_source): push/pop parser context. save/restore global.
10793         (parse_source_file): Fixed leading comment. Now take a
10794         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
10795         classes and pop the parser context anymore.
10796         (yyparse): Push parser context, save globals, parse the source
10797         file, restore globals and pop the parser context when processing a
10798         source file.
10799         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
10800         * lex.c (java_parse_doc_section): New function.
10801         (java_lex): Call java_parse_doc_section when appropriate. Build an
10802         operator around INSTANCEOF_TK.
10803         * lex.h (java_lineterminator, java_sprint_unicode,
10804         java_unicode_2_utf8, java_lex_error, java_store_unicode):
10805         Prototypes rewritten.
10806         (java_parse_escape_sequence, java_letter_or_digit_p,
10807         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
10808         java_read_unicode, java_store_unicode, java_read_char,
10809         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
10810         Added function prototypes.
10811         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
10812         define.
10813         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
10814         New macros
10815         (struct parser_ctxt): New fields: deprecated,
10816         current_parsed_class_un, gclass_list.
10817         (fix_method_argument_names, issue_warning_error_from_context,
10818         resolve_package, lookup_package_type): New function prototypes.
10819         (resolve_expression_name): Fixed function prototype.
10820         (find_applicable_accessible_methods_list): Fixed indentation, added
10821         extra argument in prototype.
10822         (check_final_assignment, build_null_of_type, check_deprecation,
10823         check_method_redefinition, reset_method_name,
10824         java_check_regular_methods, java_check_abstract_methods,
10825         maybe_build_primttype_type_ref): New function prototype.
10826         * parse.y (conver.h): Include.
10827         (INSTANCEOF_TK): Tagged <operator>.
10828         (single_type_import_declaration): Use REGISTER_IMPORT macro.
10829         (relational_expression:): Build binop for instanceof.
10830         (java_push_parser_context): Remember ctxp->gclass_list across
10831         contexts.
10832         (java_pop_parser_context): Simply return if no context
10833         exists. Remember gclass_list across contexts.
10834         (issue_warning_error_from_context): New function.
10835         (parse_error_context): Don't setup ctxp->elc here. Call
10836         issue_warning_error_from_context instead.
10837         (parse_warning_context): Likewise.
10838         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
10839         setup. Link new class/interface to ctxp->gclass_list.
10840         (add_superinterfaces): Register interface as incomplete if not
10841         loaded.
10842         (create_class): Remember class unqualified name in
10843         ctxp->current_parsed_class_un. Check class deprecation.
10844         (register_fields): Check field deprecation. Remember static final
10845         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
10846         processing INIT.
10847         (method_header): New local variable ORIG_ARG. Use unqualified
10848         current class name for check on constructor errors. Promote return
10849         type if of record type. Argument list fix moved in
10850         fix_method_argument_names, called here. Check method deprecation.
10851         (fix_method_argument_names): New function.
10852         (method_declarator): Promote record typed arguments.
10853         (safe_layout_class): Check class methods before layout.
10854         (java_complete_class): Compute field layout when patched.
10855         (do_resolve_class): Try to load class after having it renamed
10856         after the package name.
10857         (get_printable_method_name): Use DECL_CONTEXT.
10858         (reset_method_name): New function.
10859         (check_method_redefinition): Use reset_method_name.
10860         (java_check_regular_methods): New local variable
10861         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
10862         names for error report. Check for compile-time error when method
10863         found has default (package) access.
10864         (java_check_abstract_methods): Now takes an interface DECL node as
10865         an argument. Also reinstall real name on unchecked
10866         overriding/hiding methods for error report.
10867         (java_check_methods): Fixed leading comment. Get classes to verify
10868         from ctxp->gclass_list. Use CHECK_METHODS macro and set
10869         CLASS_METHOD_CHECKED_P on class verification.
10870         (lookup_java_method2): Get real method name if necessary.
10871         (find_in_imports): Don't check package class access here.
10872         (resolve_package, lookup_package_type): New functions.
10873         (java_layout_classes): Fixed leading comment. Take classes to be
10874         laid out from ctxp->gclass_list.
10875         (java_complete_expand_methods): Don't expand native and abstract
10876         methods.
10877         (java_expand_classes): New function.
10878         (resolve_expression_name): Use additional argument ORIG.  Retrieve
10879         values of static final field of primitive types.
10880         (resolve_field_access): Handles static final field of promotive
10881         type.
10882         (resolve_qualified_expression_name): Handle STRING_CST as
10883         primaries and package name resolution. Check deprecation on found
10884         decls. Set where_found and type_found on non static field resolved
10885         during qualification. Layout non primitive field decl types.
10886         (check_deprecation): New function.
10887         (maybe_access_field): Simplified.
10888         (patch_method_invocation_stmt): Local variable CLASS_TYPE
10889         removed. Reverse method's argument when primary is a type. Don't
10890         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
10891         instead. Include abstract class in the list of class searchable
10892         for constructors. Use DECL_CONTEXT of found method for access
10893         checks. Check method deprecation.
10894         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
10895         converting arguments. Handle INVOKE_INTERFACE.
10896         (lookup_method_invoke): Search constructor using existing
10897         infrastructure (don't rely on lookup_java_constructor anymore).
10898         (find_applicable_accessible_methods_list): Extra argument flag
10899         LC. Now include constructor in the search.
10900         (qualify_ambiguous_name): Conditional expression are primaries.
10901         (not_initialized_as_it_should_p): static final are always
10902         initialized.
10903         (java_complete_tree): Pass extra NULL argument to
10904         resolve_expression_name. Stricter test to carry on patching
10905         assignments. New case for INSTANCEOF_EXPR.
10906         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
10907         (check_final_assignment, maybe_build_primttype_type_ref): New
10908         functions.
10909         (patch_assignment): Detect resolved static finals and carry normal
10910         assignment error check on them. Inline PRIMTYPE.TYPE read access.
10911         (try_builtin_assignconv): Access constant 0 on all primitive
10912         types.
10913         (valid_builtin_assignconv_identity_widening_p): Accept identical
10914         types. Accept all promoted type on int type.
10915         (valid_ref_assignconv_cast_p): Accept a null pointer to be
10916         assigned to a reference.
10917         (valid_method_invocation_conversion_p): Accept to check null
10918         pointers.
10919         (build_binop): Merge declaration and initialization of local
10920         variable BINOP.
10921         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
10922         numeric types. Improved validity test for qualify operators on
10923         references.
10924         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
10925         and PREINCREMENT_EXPR. Also detect resolved static finals of a
10926         primitive type and issue the appropriate error message.
10927         (resolve_type_during_patch): Mark class loaded when resolved.
10928         (patch_cast): Allow null to be cased to reference types.
10929         (build_null_of_type): New function.
10930         (patch_array_ref): Handle array on references correctly.
10931         (patch_return): Removed unused local variable MODIFY. Force
10932         boolean to be returned as integers. Allows null to be returned by
10933         a function returning a reference.
10934         * typeck.c (convert_to_integer, convert_to_real,
10935         convert_to_pointer): Prototypes moved to convert.h
10936         (lookup_argument_method): Use method real name, if necessary.
10937
10938 1998-10-30  Tom Tromey  <tromey@cygnus.com>
10939
10940         * class.c (build_class_ref): Changed name of primitive classes to
10941         start with `_Jv_'.
10942
10943         * class.c (make_class_data): Renamed fields: nmethods to
10944         method_count, method_count to dtable_method_count.  Always set
10945         `state' field to 0.
10946         * decl.c (init_decl_processing): Likewise.
10947
10948 Wed Oct 28 08:03:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10949
10950         * class.c (layout_class): Don't mangle <finit>, produce
10951         __finit<class> instead. Don't verify artificial methods.
10952         * decl.c (finit_identifier_node): New declared global.
10953         (init_decl_processing): finit_identifier_node initialized.
10954         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
10955         * java-tree.h (finit_identifier_node): Declared as extern.
10956         (struct lang_decl): New field called_constructor.
10957         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
10958         (CLASS_HAS_FINIT_P): New macro.
10959         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
10960         explicit constructor invocation.
10961         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
10962         CALL_SUPER_CONSTRUCTOR_P): New macros.
10963         (write_classfile): Added prototype.
10964         * jcf-parse.c (jcf_parse_source): Parse and remember for
10965         generation if the file was seen on the command line.
10966         (parse_source_file): Don't write the class file here.
10967         (yyparse): Loop on files rewritten. Set current_jcf.
10968         (parse_zip_file_entries): Parse class file only if it was found.
10969         * lang.c (init_parse): Don't open command line provided filename
10970         here.
10971         (lang_parse): Don't set main_jcf anymore.
10972         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
10973         (JCONSTRUCTOR_CHECK): New macro.
10974         (JBSC_TYPE_P): New macro.
10975         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
10976         (COMPLETE_CHECK_OP_2): New macro.
10977         (struct parse_ctxt): New field explicit_constructor_p.
10978         (check_class_interface_creation): Fixed prototype indentation.
10979         (patch_method_invocation_stmt): Prototype reflects added argument.
10980         (patch_invoke): Likewise.
10981         (complete_method_declaration, build_super_invocation,
10982         verify_constructor_circularity,
10983         build_this_super_qualified_invocation, get_printable_method_name,
10984         patch_conditional_expr, maybe_generate_finit, fix_constructors,
10985         verify_constructor_super, create_artificial_method,
10986         start_artificial_method_body, end_artificial_method_body,
10987         generate_field_initialization_code): New function prototypes.
10988         * parse.y: Fixed leading comment
10989         (constructor_header:, constructor_body:, block_end:): Rules tagged
10990         <node>.
10991         (type_declaration:): Call maybe_generate_finit.
10992         (method_declaration:): Action for method_body: placed in new
10993         function complete_method_declaration, called here.
10994         (constructor_declaration:): Defined actions. Removed leading
10995         FIXME.
10996         (constructor_header:): New rule with action.
10997         (constructor_body:): Rule rewritten using block_begin: and
10998         block_end:. Defined actions.
10999         (constructor_declarator:, explicit_constructor_invocation:):
11000         Defined actions.
11001         (block:): Use new rules block_begin: block_end:.
11002         (block_begin:, block_end:): New rules and actions.
11003         (block_statements:): Fixed error message for explicit
11004         constructors.
11005         (method_invocation:): Call build_this_super_qualified_invocation
11006         if primary is `this' or `super' was seen.
11007         (conditional_expression:): Action defined.
11008         (extra_ctxp_pushed_p): New static global flag.
11009         (java_parser_context_save_global): Create parser context if
11010         necessary. Use extra_ctxp_pushed_p to remember it.
11011         (java_parser_context_restore_global): Pop extra parser context if
11012         one exists.
11013         (build_array_from_name): Array on primitive types are marked
11014         loaded.
11015         (register_fields): Restore new name in field initializer
11016         expression if type was altered. Non static fields initialized upon
11017         declaration marked initialized.
11018         (maybe_generate_finit): New function.
11019         (maybe_generate_clinit): Use create_artificial_method,
11020         start_artificial_method_body, end_artificial_method_body. Generate
11021         debug info for enclosed initialization statements.
11022         (method_header): Fixed leading comment. Check constructor
11023         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
11024         accordingly.
11025         (complete_method_declaration, constructor_circularity_msg,
11026         verify_constructor_circularity): New functions.
11027         (get_printable_method_name): New function.
11028         (check_method_redefinition): Don't rename <finit> methods. Fix
11029         declared constructor names. Error message for
11030         constructors modified.
11031         (java_check_regular_methods): Local variable seen_constructor
11032         renamed saw_constructor. Skip verification on constructors. Create
11033         default constructor with create_artificial_method.
11034         (java_check_methods): Removed unnecessary empty line.
11035         (create_artificial_method, start_artificial_method_body,
11036         end_artificial_method_body): New functions.
11037         (java_layout_classes): Changed leading comment. Reverse fields
11038         list if necessary. Always layout java.lang.Object if being
11039         defined.
11040         (java_complete_expand_methods): Verify constructor circularity.
11041         (java_complete_expand_method): Call fix_constructor on
11042         constructors.  Local variable no_ac_found removed. Restore
11043         bindings if method body expansion failed.
11044         (fix_constructors, verify_constructor_super,
11045         generate_field_initialization_code): New function.
11046         (java_expand_classes): Fixed leading comment. Write class file
11047         here.
11048         (resolve_expression_name): Check for illegal instance variable
11049         usage within the argument scope of an explicit constructor
11050         invocation.
11051         (resolve_qualified_expression_name): Pass extra from_super flag
11052         when invoking patch_method_invocation_stmt. New case for
11053         conditional expression when used as a primary. Check for error
11054         when acquiring super.
11055         (patch_method_invocation_stmt): Added extra argument super. New
11056         local variable is_static_flag. Set class_to_search according to
11057         the nature of the constructor invocation. Don't add `this'
11058         argument when expanding NEW_CLASS_EXPR. Check for illegal method
11059         invocation within the argument scope of explicit constructor
11060         invocation. Set is_static according to is_static_flag. Provide
11061         extra `super' argument to patch_invoke invocation.
11062         (patch_invoke): New argument from_super. Loop on arguments
11063         indentation fixed. Pass from_super to invocation_mode. New switch
11064         case INVOKE_SUPER. Fixed error message in switch default case.
11065         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
11066         value.
11067         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
11068         (lookup_method_invoke): Fixed prototypes in candidates list. Error
11069         message takes constructors into account.
11070         (find_applicable_accessible_methods_list): Fixed indentation.
11071         (qualify_ambiguous_name): Take explicit constructor invocation
11072         into account. Deal with a conditional expression as a primary to
11073         a method call.
11074         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
11075         case. Added extra argument to patch_method_invocation_stmt.
11076         Register calls made to explicit constructor `this'. Don't call
11077         save_expr in ARRAY_REF case when emitting class files. Check for
11078         illegal use of this when expanding explicit constructor invocation
11079         arguments.
11080         (complete_function_arguments): Set and reset parser context
11081         explicit_constructor_p field value when appropriate.
11082         (build_super_invocation, build_this_super_qualified_invocation):
11083         New functions.
11084         (patch_assignment): Fixed typo.
11085         (patch_unaryop): Check on final fields occurs only when a decl
11086         exits.
11087         (patch_return): Take constructors into account.
11088         (patch_conditional_expr): New function.
11089         * typeck.c (build_java_signature): Removed unnecessary empty line.
11090
11091 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
11092
11093         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
11094
11095 1998-10-28  Tom Tromey  <tromey@cygnus.com>
11096
11097         * decl.c (init_decl_processing): Renamed fields.
11098         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
11099         interface_len, msize fields.
11100
11101         * class.c (make_class_data): Removed subclass_head and
11102         subclass_next fields.
11103         * decl.c (init_decl_processing): Removed subclass_head and
11104         subclass_next fields.
11105
11106 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
11107
11108         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
11109         * mangle.c (emit_unicode_mangled_name): Similarly.
11110
11111 Mon Oct 26 12:17:23 1998  Nick Clifton  <nickc@cygnus.com>
11112
11113         * jcf-parse.c (get_constant): Place braces around code to compute
11114         'd' when REAL_ARITHMETIC is not defined.
11115
11116 Sun Oct 25 14:58:05 1998  H.J. Lu  (hjl@gnu.org)
11117
11118         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
11119         dependency.
11120
11121 1998-10-23  Tom Tromey  <tromey@cygnus.com>
11122
11123         * lang-specs.h: `.zip' files are input to jc1.
11124
11125 Thu Oct 22 23:01:54 1998  Per Bothner  <bothner@cygnus.com>
11126
11127         * jvspecs.c:  Add (but don't enable) support for combining multiple
11128         .class and .java input filenames to a single jc1 invocation.
11129         Add support for -C flag (copile to .class files).
11130         Translate -classpath and -CLASSPATH arguments.
11131         * lang-specs.h:  Don't set %2 spec.
11132
11133 1998-10-22  Tom Tromey  <tromey@cygnus.com>
11134
11135         * jcf-path.c (add_entry): Don't add trailing separator if entry is
11136         a .zip file.
11137         (add_path): Don't add trailing separator to non-empty path
11138         elements.
11139
11140         * lang.c (lang_decode_option): Check for -fclasspath and
11141         -fCLASSPATH before examining other `-f' options.
11142
11143         * java-tree.h (finalize_identifier_node): Don't declare.
11144         * class.c (make_class_data): Don't push "final" field.
11145         * decl.c (init_decl_processing): Don't push "final" field.
11146         (finalize_identifier_node): Removed.
11147         (init_decl_processing): Don't set finalize_identifier_node.
11148
11149         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
11150
11151 Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
11152
11153         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
11154         (JV_SCAN_SOURCES): New macro.
11155         (JCF_DUMP_SOURCES): Likewise.
11156         (jcf-dump$(exeext)): New target.
11157         (jv-scan$(exeext)): New target.
11158
11159 1998-10-22  Tom Tromey  <tromey@cygnus.com>
11160
11161         * Makefile.in (LEX): Removed.
11162         (LEXFLAGS): Likewise.
11163         (SET_BISON): New macro.
11164         (BISON): Removed.
11165         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
11166         spurious diffs in parse.c.
11167         ($(PARSE_SCAN_C)): Likewise.
11168         (PARSE_DIR): New macro.
11169         (PARSE_C): Use it.
11170         (PARSE_SCAN_C): Likewise.
11171         (PARSE_RELDIR): New macro.
11172
11173         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
11174
11175         * jcf-io.c (find_class): Use saw_java_source to determine when to
11176         look for `.java' file.
11177         * jcf-parse.c (saw_java_source): New global.
11178         (yyparse): Set it if `.java' file seen.
11179
11180         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
11181         (GCJH_SOURCES): Likewise.
11182         * Makefile.in (datadir): New macro.
11183         (libjava_zip): Likewise.
11184         (JAVA_OBJS): Added jcf-path.o.
11185         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
11186         (../gcjh$(exeext)): Likewise.
11187         (jcf-path.o): New target.
11188         * java-tree.h (fix_classpath): Removed decl.
11189         * jcf-parse.c (fix_classpath): Removed.
11190         (load_class): Don't call fix_classpath.
11191         * parse.y (read_import_dir): Don't call fix_classpath.
11192         * lex.h: Don't mention classpath.
11193         * lex.c (java_init_lex): Don't initialize classpath.
11194         * jcf-io.c (classpath): Removed global.
11195         (find_class): Use jcf_path iteration functions.  Correctly search
11196         class path for .java file.
11197         (open_in_zip): New argument `is_system'.
11198         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
11199         classpath-related options.
11200         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
11201         and -I.
11202         (lang_init): Call jcf_path_init.
11203         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
11204         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
11205         Correctly put braces around second string in each entry.
11206         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
11207         classpath-related options.
11208         (help): Updated for new options.
11209         * jcf.h: Declare functions from jcf-path.c.  Don't mention
11210         `classpath' global.
11211         * jcf-path.c: New file.
11212
11213         * jcf-depend.c: Include jcf.h.
11214
11215         * jcf-write.c (localvar_alloc): Returns `void'.
11216         (localvar_free): Removed unused variable.
11217
11218         * lang.c (OBJECT_SUFFIX): Define if not already defined.
11219         (init_parse): Use OBJECT_SUFFIX, not ".o".
11220
11221 Wed Oct 21 07:54:11 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11222
11223         * class.c (emit_register_classes): Renamed from
11224         emit_register_class.
11225         * java-tree.h (emit_register_classes): Prototype renamed from
11226         emit_register_class.
11227         * jcf-parse.c (yyparse): Call emit_register_classes once before
11228         returning.
11229         * parse.y (java_expand_classes): No longer register classes.
11230
11231 Tue Oct 20 09:15:38 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11232
11233         * class.c (is_compiled_class): New local variable
11234         seen_in_zip. Identify classes found in currently compiled source
11235         file(s).
11236         * decl.c (complete_start_java_method): Fixed typo.
11237         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
11238         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
11239         (CLASS_P): Moved around.
11240         (java_parse_abort_on_error): Macro moved from jcf-parse.c
11241         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
11242         java-parse.h
11243         (jcf_parse_source): Changed leading comment. Removed unnecessary
11244         fclose and CLASS_FROM_SOURCE_P marking.
11245         (parse_source_file): New local variables remember_for_generation
11246         and filename. Mark parsed file name identifier node. Removed block
11247         executed when parse_only was null. Set remember_for_generation.
11248         Use it as an argument to java_pop_parser_context.
11249         (yyparse): New local variables several_files, list, next node and
11250         current_file_list. Split ampersand separated file names into
11251         current_file_list. Iterate through the list and parse accordingly.
11252         * parse.h (java_pop_parser_context): New function prototype.
11253         * parse.y (ctxp_for_generation): New static global variable.
11254         (java_pop_parser_context): New argument generate. Link popped ctxp
11255         to ctxp_for_generation list accordingly.
11256         (java_complete_expand_methods): Fixed indentation.
11257         (java_expand_classes): New function.
11258
11259 Sat Oct 17 11:25:21 1998  Per Bothner  <bothner@cygnus.com>
11260
11261         * Makefile.in:  Link with libiberty.a instead of memmove.o.
11262
11263 Fri Oct 16 10:59:01 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11264
11265         * lex.c (setjmp.h): No longer included.
11266         * lex.h (setjmp.h): Included.
11267         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
11268         (duplicate_declaration_error_p): Renamed from
11269         duplicate_declaration_error.
11270         (build_array_from_name): New function prototype.
11271         * parse.y (setjmp.h): No longer included.
11272         (variable_declarator_id): Define action.
11273         (build_array_from_name): New function.
11274         (duplicate_declaration_error_p): Renamed from
11275         duplicate_declaration_error.  Fixed leading comment.
11276         (register_fields): Main `for' loop reorganized. Uses
11277         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
11278         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
11279         build_array_from_name.
11280         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
11281         types.
11282         (read_import_dir): Don't try to skip `.' and `..'.
11283         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
11284         build_array_from_name. Main `for' loop reorganized.
11285         (resolve_qualified_expression_name): When building access to a
11286         field, use the type where the field was found, not its own type.
11287         (maybe_access_field): Use field DECL_CONTEXT if the type where the
11288         field was found is null.
11289         (qualify_ambiguous_name): Sweep through all successive array
11290         dimensions.
11291
11292 Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11293
11294         * java-tree.h (pop_labeled_block, lang_printable_name,
11295         maybe_add_interface, set_super_info, get_access_flags_from_decl,
11296         interface_of_p, inherits_from_p, fix_classpath,
11297         complete_start_java_method, emit_handlers, init_outgoing_cpool,
11298         make_class_data, register_class, alloc_name_constant): New
11299         function prototypes.
11300         * lang.c (lang_decode_option): Set argc argument unused. Fixed
11301         indentation. Added cast to remove warning.
11302         (lang_printable_name): Set v argument unused.
11303         (lang_print_error): Added argument to lang_printable_name call.
11304         (java_dummy_print, print_lang_decl, print_lang_type,
11305         print_lang_identifier, lang_print_xnode): All argument marked
11306         unused.
11307         * lex.c (java_unget_unicode): Removed unnecessary argument.
11308         (java_allocate_new_line): Unused local variable is gone.
11309         (java_read_char): Added parenthesis in expressions to remove
11310         warnings.  Added final return statement.
11311         (java_read_unicode): Added parenthesis in expression to remove
11312         warning.
11313         (java_parse_end_comment): Fixed java_unget_unicode invocation.
11314         (java_parse_escape_sequence): Likewise.
11315         (java_lex): Unused local variables are gone. Fixed
11316         java_unget_unicode invocation.
11317         * lex.h (set_float_handler): Prototype added when JC1_LITE not
11318         defined.
11319         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
11320         lang_printable_name invocation in macro.
11321         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
11322         Likewise.
11323         (duplicate_declaration_error): Suppressed unused argument in
11324         prototype.
11325         (identical_subpath_p): Function declaration is gone.
11326         (patch_invoke): Suppressed unused argument in prototype.
11327         (patch_cast, build_labeled_block, check_thrown_exceptions):
11328         Likewise.
11329         * parse.y (setjmp.h): Included
11330         (toplev.h): Likewise.
11331         (field_declaration:): Suppressed unused local
11332         (label_decl:): Fixed build_labeled_block invocation.
11333         (java_pop_parser_context): Put extra parenthesis around assignment
11334         in if.
11335         (yyerror): Suppressed unused local variables.
11336         (variable_redefinition_error): Fixed lang_printable_name
11337         invocation.
11338         (create_interface): Suppressed unused local variables.
11339         (create_class): Likewise.
11340         (duplicate_declaration_error): Suppressed unused argument. Fixed
11341         lang_printable_name invocation.
11342         (register_fields): Suppressed unused local variable. Fixed
11343         duplicate_declaration_error invocation.
11344         (method_header): Suppressed unused local variable.
11345         (method_declarator, parser_check_super): Likewise.
11346         (java_complete_class): Suppressed unused local variable. Fixed
11347         fatal error message.
11348         (complete_class_report_errors): Added default: in switch.
11349         (java_check_regular_methods): Fixed lang_printable_name
11350         invocations.
11351         (check_throws_clauses): Likewise.
11352         (java_check_abstract_methods): Suppressed unused local
11353         variable. Fixed lang_printable_name invocation.
11354         (read_import_entry): Added supplemental return statement.
11355         (read_import_dir): Suppressed unused local variables.
11356         (check_pkg_class_access, declare_local_variables): Likewise.
11357         (source_start_java_method): Suppressed unused extern variable
11358         declarations
11359         (expand_start_java_method): Suppressed unused extern and local
11360         variable declarations.
11361         (java_complete_expand_methods): Likewise.
11362         (java_complete_expand_method): Suppressed unused local variables.
11363         (make_qualified_name): Likewise.
11364         (resolve_qualified_expression_name): Added default: in
11365         switch. Fixed lang_printable_name invocation.
11366         (class_instance_creation_expression): Added parenthesis around
11367         expressions.
11368         (patch_method_invocation_stmt): Fixed lang_printable_name and
11369         patch_invoke invocations.
11370         (check_for_static_method_reference): Fixed lang_printable_name
11371         invocation.
11372         (patch_invoke): Suppressed unused arguments and local variables.
11373         (lookup_method_invoke): Suppressed unused local variables.
11374         (qualify_ambiguous_name): Added default: in switch.
11375         (identical_subpath_p): Function removed.
11376         (patch_assignment): Suppressed unused local variables. Suppressed
11377         unnecessary if statement. Fixed lang_printable_name invocations.
11378         (try_builtin_assignconv): Fixed lang_printable_name invocations.
11379         (valid_ref_assignconv_cast_p): Parenthesis around
11380         expression. Suppressed unused local variables.
11381         (build_binop): Suppressed unused local variables. fixed
11382         lang_printable_name invocations.
11383         (string_constant_concatenation): Suppressed unused local
11384         variables.
11385         (patch_unaryop): Fixed lang_printable_name invocation.
11386         (patch_cast): Suppressed unnecessary argument. Fixed
11387         lang_printable_name invocation.
11388         (patch_array_ref): Fixed lang_printable_name invocation.
11389         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
11390         (build_labeled_block): Suppressed unused argument.
11391         (generate_labeled_block): Fixed build_labeled_block invocation.
11392         (build_loop_body): Suppressed unused local variables.
11393         (patch_loop_statement): Likewise.
11394         (patch_exit): Fixed lang_printable_name invocation.
11395         (patch_switch_statement): Likewise.
11396         (case_identity): First argument marked unused.
11397         (patch_try_statement): Fixed lang_printable_name invocations.
11398         (patch_synchronized_statement, patch_throw_statement): Likewise.
11399         (check_thrown_exceptions): Fixed check_thrown_exceptions and
11400         lang_printable_name invocations.
11401         (check_thrown_exceptions_do): Suppressed unused argument.
11402
11403 1998-10-14  Tom Tromey  <tromey@cygnus.com>
11404
11405         * jcf-write.c (write_classfile): Add output class file as target.
11406         * lang-options.h: Added -MD, -MMD, -M, and -MM.
11407         * jcf.h: Added declarations for dependency-tracking functions.
11408         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
11409         * lang.c (lang_decode_option): Recognize -MD and -MMD.
11410         (finish_parse): Call jcf_dependency_write.
11411         (dependency_tracking): New global.
11412         (DEPEND_SET_FILE): New define.
11413         (DEPEND_ENABLE): New define.
11414         (init_parse): Enable dependency tracking if required.
11415         Include "flags.h".
11416         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
11417         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
11418         (../gcjh$(exeext)): Likewise.
11419         (jcf-depend.o): New target.
11420         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
11421         (GCJH_SOURCES): Likewise.
11422         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
11423         dep_name argument.
11424         (find_classfile): Added dep_name argument.
11425         (find_class): Compute name of dependency.
11426         (open_in_zip): Call jcf_dependency_add_file.
11427         * gjavah.c (output_file): No longer global.
11428         (usage): Don't mention "gjavah".
11429         (help): Likewise.
11430         (java_no_argument): Likewise.
11431         (version): Likewise.
11432         (main): Recognize and handle -M family of options.
11433         (print_mangled_classname): Return is void.
11434         (process_file): Handle case where output is suppressed.
11435         (HANDLE_END_FIELD): Likewise.
11436         (HANDLE_METHOD): Likewise.
11437         * jcf-depend.c: New file.
11438
11439 Tue Oct 13 23:34:12 1998  Jeffrey A Law  (law@cygnus.com)
11440
11441         * java-tree.def: Add missing newline at EOF.
11442
11443 1998-10-13  Tom Tromey  <tromey@cygnus.com>
11444
11445         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
11446         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
11447         function.
11448         Include <config.h> and "system.h".
11449         (disassemble_method): Undefine RET to avoid clash with
11450         config/i386/i386.h.
11451
11452 Tue Oct 13 03:50:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11453
11454         * decl.c (runtime_exception_type_node, error_exception_type_node):
11455         New global variables.
11456         (init_decl_processing): Initialized.
11457         * expr.c (java_lang_expand_expr): Set caught exception type to
11458         null if catch handler argument doesn't exit.
11459         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
11460         tree codes.
11461         * java-tree.h (runtime_exception_type_node,
11462         error_exception_type_node): Global variables declared.
11463         (DECL_FUNCTION_THROWS): New macro.
11464         (DECL_FUNCTION_BODY): Modified comment.
11465         (DECL_SPECIFIC_COUNT): Likewise.
11466         (struct lang_decl): New field throws_list.
11467         (IS_UNCHECKED_EXPRESSION_P): New macro.
11468         * lex.c (java_lex): Generate location information for THROW_TK.
11469         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
11470         EXCEPTIONS_P): New macros.
11471         (enum jdep_code): New value JDEP_EXCEPTION.
11472         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
11473         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
11474         PATCH_METHOD_RETURN_ERROR): New macros.
11475         (patch_method_invocation_stmt): Added new argument to prototype.
11476         (patch_synchronized_statement, patch_throw_statement,
11477         check_thrown_exceptions, check_thrown_exceptions_do,
11478         purge_unchecked_exceptions, check_throws_clauses): New function
11479         prototypes.
11480         * parse.y Fixed typo in keyword section.
11481         (throw:): Rule tagged <node>.
11482         (THROW_TK): Keyword tagged <operator>.
11483         (method_header:): Last argument to call to method_header passed
11484         from throws: rule.
11485         (throws:, class_type_list:, throw_statement:,
11486         synchronized_statement:, synchronized:): Defined actions.
11487         (method_header): New local variable current. Register exceptions
11488         from throws clause.
11489         (java_complete_tree): Complete and verify exceptions from throws
11490         clause.
11491         (complete_class_report_errors): Error message on exceptions not
11492         found
11493         (java_check_regular_methods): Fixed typo. Shortcut on private
11494         overriding methods. Changed error message on method
11495         redefinition. Check for throws clause compatibility.
11496         (check_throws_clauses): New function.
11497         (java_check_abstract_methods): Use DECL_NAME for wfl or current
11498         method. Changed error message on method redefinition.
11499         (currently_caught_type_list): New static variable.
11500         (java_complete_expand_methods): Purge unchecked exceptions from
11501         throws clause list. Call PUSH_EXCEPTIONS before walk and
11502         POP_EXCEPTIONS after.
11503         (resolve_qualified_expression_name): Pass new argument as NULL to
11504         patch_method_invocation_stmt.
11505         (patch_method_invocation_stmt): New argument ref_decl. Invoke
11506         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
11507         argument list when appropriate. Use new argument if non null to
11508         store selected method decl.
11509         (patch_invoke): Convert if necessary args of builtin types before
11510         forming CALL_EXPR. Argument list no longer reversed here.
11511         (invocation_mode): Treat final methods as static methods.
11512         (java_complete_tree): New cases for THROW_EXPR: and
11513         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
11514         function call.
11515         (complete_function_arguments): No more RECORD_TYPE
11516         conversion. Function parameter nodes no longer saved.
11517         (valid_ref_assignconv_cast_p): Avoid handling null type.
11518         (patch_binop): Fixed null constant reference handling.
11519         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
11520         BUILD_THROW macros.
11521         (patch_try_statement): Fixed comments. Record caught types in
11522         list, push the list, expand try block and pop the list.
11523         (patch_synchronized_statement, patch_throw_statement,
11524         check_thrown_exceptions, check_thrown_exceptions_do,
11525         purge_unchecked_exceptions): New functions.
11526         * typeck.c (lookup_argument_method): Allow WFL in place of method
11527         DECL_NAME during method definition check
11528
11529 1998-10-09  Tom Tromey  <tromey@cygnus.com>
11530
11531         * gjavah.c (decode_signature_piece): New function.
11532         (print_c_decl): Use it.  Added `name_override' argument.
11533         (print_method_info): Use name_override argument to print_c_decl.
11534         (seen_fields): Removed.
11535         (print_field_info): Don't update seen_fields.
11536         (struct method_name): New structure.
11537         (method_name_list): New global.
11538         (print_method_info): Add new method to list of methods.
11539         (name_is_method_p): New function.
11540         (print_field_info): If field name has same name as method, then
11541         change field name.
11542         (process_file): Parse methods before fields.
11543         (field_pass): New global.
11544         (HANDLE_END_FIELD): Take field_pass into account.
11545
11546 Wed Oct  7 12:10:48 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11547
11548         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
11549         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11550
11551 Sat Oct  3 13:29:46 1998  Anthony Green  <green@cygnus.com>
11552
11553         * jvspec.c: Fix bug in jvgenmain_spec patch.
11554
11555 Fri Oct  2 17:22:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11556
11557         * Makefile.in (lang.o:): Install dependency on java-tree.def.
11558         * decl.c (soft_exceptioninfo_call_node): New global variable.
11559         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
11560         takes extra integer argument. soft_exceptioninfo_call_node
11561         initialized.
11562         * except.c (java_set_exception_lang_code): New function
11563         (method_init_exceptions): Called here.
11564         (prepare_eh_table_type): New function.
11565         (expand_end_java_handler): Called here.
11566         * expr.c (build_java_throw_out_of_bounds_exception): Now features
11567         one argument. Modified generation of call to
11568         soft_badarrayindex_node to use new argument.
11569         (build_java_arrayaccess): Pass faulty index value to
11570         build_java_throw_out_of_bounds_exception.
11571         (generate_name): New function.
11572         (java_lang_expand_expr): New local variables node, current,
11573         has_finally_p. Expand TRY_EXPR node.
11574         (process_jvm_instruction): Replace top of the stack with thrown
11575         object reference when entering exception handler.
11576         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
11577         specific tree codes.
11578         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
11579         global.
11580         (DECL_SPECIFIC_COUNT): New macro.
11581         (prepare_eh_table_type, java_set_exception_lang_code,
11582         generate_name): New function declarations.
11583         (match_java_method): Declaration deleted.
11584         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
11585         macros.
11586         * lex.c (TRY_TK, CATCH_TK): Generate location information.
11587         * parse.h (redefinition_error, refine_accessible_methods_list,
11588         can_cast_to_p): Function declaration removed.
11589         (classitf_redefinition_error, variable_redefinition_error,
11590         parse_jdk1_1_error, find_applicable_accessible_methods_list,
11591         find_most_specific_methods_list, argument_types_convertible,
11592         enter_a_block, valid_builtin_assignconv_identity_widening_p,
11593         valid_cast_to_p, valid_method_invocation_conversion_p,
11594         try_reference_assignconv, add_stmt_to_compound,
11595         build_jump_to_finally, build_tree_list, patch_try_statement,
11596         java_get_catch_block): New function declarations.
11597         * parse.y (string_buffer_type): Global variable deleted.
11598         (group_of_labels, catches, catch_clause, catch_clause_parameter,
11599         finally): Rules tagged <node>.
11600         (TRY_TK, CATCH_TK): Token tagged <operator>.
11601         (class_body_declaration:, class_member_declaration:,
11602         formal_parameter:, explicit_constructor_invocation:,
11603         interface_member_declaration:, constant_declaration:,
11604         primary_no_new_array:, class_instance_creation_expression:,
11605         array_creation_expression:): Issue error on unsuported JDK1.1
11606         features.
11607         (try_statement:, catches:, finally:): Define actions.
11608         (catch_clause_parameter): New rule.
11609         (catch_clause:): Use new rule catch_clause_parameter.
11610         (parse_jdk1_1_error): New function.
11611         (redefinition_error): Renamed classitf_redefinition_error.
11612         (variable_redefinition_error): New function.
11613         (check_class_interface_creation): Call
11614         classitf_redefinition_error.
11615         (java_complete_tree): Added error message on JDEP_TYPE: case.
11616         (complete_class_report_errors): Fixed indentation.
11617         (declare_local_variables): Call variable_redefinition_error.
11618         (source_end_java_method): Call java_set_exception_lang_code and
11619         emit_handlers where appropriate.
11620         (java_method_add_stmt): Call add_stmt_to_block.
11621         (add_stmt_to_block): New function.
11622         (lookup_method_invoke): Fixed outside comment. new local variable
11623         candicates.  Call find_applicable_accessible_methods_list and
11624         find_most_specific_methods_list when searching for a
11625         method. Modified error report to list possible candidates when
11626         applicable.
11627         (find_applicable_accessible_methods_list,
11628         find_most_specific_methods_list, argument_types_convertible): New
11629         function.
11630         (refine_accessible_methods_list): Function deleted.
11631         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
11632         expr (if applicable) before calling patch_array_ref.
11633         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
11634         (enter_block): Fixed comment.
11635         (enter_a_block): New function.
11636         (patch_assignment): Reorganized. Call try_reference_assignconv for
11637         references. Call valid_cast_to_p instead of can_cast_to_p.
11638         (try_reference_assignconv,
11639         valid_builtin_assignconv_identity_widening_p): New functions.
11640         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
11641         (valid_cast_to_p, valid_method_invocation_conversion_p): New
11642         functions.
11643         (build_string_concatenation): Don't resolve StringBuffer.
11644         (patch_cast): Fixed inverted arguments.
11645         (patch_array_ref): Code to save array expr deleted. Call
11646         valid_cast_to_p instead of can_cast_to_p.
11647         (generate_labeled_block): Call generate_name.
11648         (build_jump_to_finally, build_try_statement, java_get_catch_block,
11649         patch_try_statement): New functions.
11650         * typeck.c (match_java_method): Function deleted.
11651
11652 Fri Oct  2 13:48:36 1998  Anthony Green  <green@cygnus.com>
11653
11654         * jvspec.c: jvgenmain_spec uses different temporary file names.
11655
11656 Fri Oct  2 12:50:19 1998  Anthony Green  <green@cygnus.com>
11657
11658         * jvspec.c (lang_specific_driver): Fail if user specifies
11659         --main= when not linking.
11660
11661 Mon Sep 28 13:48:33 1998  Tom Tromey  <tromey@cygnus.com>
11662
11663         * class.c (make_class_data): Push value for `thread' field.
11664         * decl.c (init_decl_processing): Added `thread' field to class.
11665
11666         * class.c (add_field): Always make static fields externally
11667         visible.
11668
11669 Sat Sep 26 08:22:47 1998  Anthony Green  <green@cygnus.com>
11670
11671         * expr.c (build_java_athrow,
11672         build_java_throw_out_of_bounds_exception, expand_invoke,
11673         build_newarray, expand_java_multianewarray, build_java_monitor):
11674         Update comments to reflect _Jv_* function names.
11675
11676 Fri Sep 25 16:03:02 1998  Per Bothner  <bothner@cygnus.com>
11677
11678         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
11679         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
11680         * parse.y (expand_start_java_method):  Likewise.
11681
11682 Thu Sep 24 12:20:35 1998  Per Bothner  <bothner@cygnus.com>
11683
11684         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
11685
11686         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
11687         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
11688         * expr.c:  Remove no-longer-needed calls to promote_type.
11689         * decl.c (give_name_to_locals):  Liekwise.
11690         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
11691         * parse.y:  Add/remove promote_type calls as appropriate.
11692         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
11693         (parse_signature_string):  Likewise.
11694         (build_java_array_type):  Fix for now signature convenions.
11695
11696         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
11697
11698 Wed Sep 23 14:49:35 1998  Tom Tromey  <tromey@cygnus.com>
11699
11700         * class.c (init_class_processing): libjava function renamed to
11701         _Jv_RegisterClass.
11702
11703 Tue Sep 22 12:00:02 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11704
11705         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
11706         * java-tree.def: Fixed DEFTREECODE third argument.
11707         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
11708         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
11709         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
11710         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
11711         JAVA_THIS_EXPR): Now replaced by tree code definitions.
11712         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
11713         * lang.c (java_tree_code_type, java_tree_code_length,
11714         java_tree_code_name): New arrays.
11715         (lang_init): Append Java tree node definitions to Gcc ones.
11716         * lex.c (expression_obstack): Declared as extern when JC1_LITE
11717         defined.
11718         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
11719         wfl_to_string.
11720         (java_lex): Allow declaration of empty string constants. Retain
11721         location information on CASE_TK and DEFAULT_TK.
11722         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
11723         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
11724         Modified to be more robust.
11725         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
11726         (build_new_invocation, try_builtin_assignconv,
11727         patch_switch_statement, string_constant_concatenation,
11728         build_string_concatenation, patch_string_cst, patch_string,
11729         java_expand_switch): New function declarations.
11730         * parse.y: Rules related to switch and EH tagged <node>.
11731         (label_id): Set to NULL_TREE
11732         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
11733         tree nodes.
11734         (this_or_super:): Fixed indentation.
11735         (statement:, statement_nsi:, statement_without_trailing_substatement:,
11736         statement_expression:): Removed call to RULE on all sub-rules.
11737         (switch_expression:, switch_labels:): New rules.
11738         (switch_statement:, switch_block:, switch_block_statement_groups:,
11739         switch_block_statement_group:, switch_labels:, switch_label:):
11740         Defined actions.
11741         (throw_statement:, synchronized_statement:, try_statement:):
11742         Defined temporary actions.
11743         (class_instance_creation_expression:): Call
11744         build_new_invocation. Fixed indentation.
11745         (field_access): Fixed indentation.
11746         (method_invocation): Likewise.
11747         (make_qualified_primary): Use THIS_EXPR.
11748         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
11749         resolving from SUPER, set *type_found.
11750         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
11751         (java_complete_tree): Removed unused local variable `location'. Case
11752         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
11753         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
11754         on MODIFY_EXPR: and all binary operator tree code cases. Removed
11755         STRING_CST: case. default: checks for patchable strings.
11756         (complete_function_arguments): Transform string constant or
11757         crafted StringBuffer if necessary.
11758         (build_method_invocation): Fixed comments.
11759         (build_new_invocation): New function.
11760         (patch_assignment): Call try_builtin_assignconv to figure a valid
11761         assignment conversion between builtin types.
11762         (try_builtin_assignconv): New function.
11763         (build_binop): Use URSHIFT_EXPR directly to call build.
11764         (operator_string): Use UNARY_PLUS_EXPR.
11765         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
11766         operator.
11767         (do_merge_string_cste, merge_string_cste,
11768         string_constant_concatenation, build_string_concatenation,
11769         patch_string, patch_string_cst): New function.
11770         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
11771         (patch_unaryop): Likewise. New test of valid ++/-- operands.
11772         (build_newarray_node): Use NEW_ARRAY_EXPR.
11773         (build_this): Use THIS_EXPR.
11774         (build_return): Enable debug information on return statement.
11775         (build_if_else_statement): Likewise.
11776         (complete_labeled_statement): Fixed related comment.
11777         (build_loop_body): Fixed comment.
11778         (build_bc_statement): Enable debug information on break/continue
11779         statements.
11780         (patch_bc_statement): Fixed typos. Handle SWITCH statement
11781         context.
11782         (patch_switch_statement, case_identity, java_expand_switch): New
11783         functions.
11784
11785 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11786
11787         * buffer.h (BUFFER_INIT):  New macro.
11788         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
11789         Pass (struct jcf_partial *state) to most functions.
11790         (jcf_block, jcf_relocation):  New types.
11791         Support labels, branches, conditionals, loops.
11792
11793 Mon Sep 21 15:08:48 1998  Tom Tromey  <tromey@cygnus.com>
11794
11795         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
11796
11797 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
11798
11799         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
11800         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
11801         not integer_type_node (INT_TYPE_SIZ bits).
11802
11803         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
11804
11805         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
11806         * jcf-dump.c (print_exception_table):  New function.
11807         (disassemble_method):  Better handling of wide instructions.
11808         Make more robust for bad input.
11809
11810 Wed Sep 30 20:53:51 1998  Jeffrey A Law  (law@cygnus.com)
11811
11812         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
11813         FreeBSD.
11814
11815 Thu Sep 17 19:45:01 1998  Jeffrey A Law  (law@cygnus.com)
11816
11817         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
11818
11819 Thu Sep 17 16:21:52 1998  Tom Tromey  <tromey@cygnus.com>
11820
11821         * Makefile.in ($(PARSE_H)): Removed target.
11822
11823 Thu Sep 17 01:57:07 1998  Jeffrey A Law  (law@cygnus.com)
11824
11825         * Makefile.in (JAVA_OBJS): Add memmove.o
11826         (memmove.o): New target & rules.
11827
11828 Tue Sep 15 23:21:55 1998  Tom Tromey  <tromey@cygnus.com>
11829
11830         * expr.c (expand_invoke): Don't generate a call to the class init
11831         code.
11832
11833 Mon Sep 14 10:14:47 1998  Jeffrey A Law  (law@cygnus.com)
11834
11835         * Makefile.in: Add many missing dependencies.
11836         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
11837         as appropriate.
11838         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
11839         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
11840
11841 Fri Sep 11 14:05:21 1998  Per Bothner  <bothner@cygnus.com>
11842
11843         * decl.c (complete_start_java_method):  If method is static (and
11844         not private) call _Jv_InitClass.
11845         * expr.c (expand_invoke):  Don't call build_class_init.
11846
11847         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
11848
11849 Thu Sep 10 10:33:31 1998  Jeffrey A Law  (law@cygnus.com)
11850
11851         * Make-lang.in (GCJ): Define before using.
11852
11853 Wed Sep  9 21:23:10 1998  Jeffrey A Law  (law@cygnus.com)
11854
11855         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
11856         losing due to namespace pollution in GNU getopt.h
11857
11858 Wed Sep  9 13:33:39 1998  Tom Tromey  <tromey@cygnus.com>
11859
11860         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
11861         (java.all.cross): Likewise.
11862         (java.rest.encap): Likewise.
11863
11864 Tue Sep  8 10:34:05 1998  Jeffrey A Law  (law@cygnus.com)
11865
11866         * gjavah.c (print_class_decls): Fix thinko in arglist
11867         * jcv-io.c (find_classfile): Similarly.
11868
11869 Mon Sep  7 13:59:49 1998  Jeffrey A Law  (law@cygnus.com)
11870
11871         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
11872
11873 Sat Sep  5 16:08:01 1998  Tom Tromey  <tromey@cygnus.com>
11874
11875         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
11876         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
11877         * Makefile.in (PARSE_C): New macro.
11878         (PARSE_H): Likewise.
11879         (PARSE_SCAN_C): Likewise.
11880         ($(PARSE_C)): Target renamed from parse.c.
11881         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
11882         (clean): Remove parse-scan.c as well.
11883         (parse.o): Depend on $(PARSE_C).
11884
11885 Sat Sep  5 08:48:40 1998  Anthony Green  <green@cygnus.com>
11886
11887         * README, license.terms: Removed.
11888
11889         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
11890         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
11891         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
11892         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
11893         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
11894         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
11895         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
11896         and Java trademark attribution.
11897
11898 Fri Sep  4 10:42:05 1998  Tom Tromey  <tromey@cygnus.com>
11899
11900         * Makefile.in: Use gcjh, not gjavah.
11901         * config-lang.in (stagestuff): Use gcjh, not gjavah.
11902         * Make-lang.in: Changed gjavah to gcjh everywhere.
11903
11904 Thu Sep  3 18:04:09 1998  Per Bothner  <bothner@cygnus.com>
11905
11906         * gjavah.c:  Support new -prepend -add -append flags.
11907         (print_method_info):  Method is not virtual if class is final.
11908
11909 Thu Sep  3 12:03:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11910
11911         * jv-scan.c: Fixed copyright assignment.
11912         * keyword.gperf: Likewise.
11913         * keyword.h: Likewise.
11914         * lex.c: Fixed copyright assignment.
11915         (java_lex): Push unicode back when parsing '<'.
11916         * lex.h: Fixed copyright assignment.
11917         * parse-scan.y: Likewise.
11918         * parse.h: Fixed copyright assignment.
11919         (build_debugable_stmt, complete_for_loop): New function prototypes.
11920         * parse.y: Fixed copyright assignment.
11921         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
11922         size_zero_node when completing a loop with no exit condition.
11923         (for_statement_nsi:): Define action.
11924         (for_init:, for_update:): Return size_zero_node when empty.
11925         (declare_local_variables): Call build_debugable_stmt.
11926         (build_debugable_stmt): New function.
11927         (build_loop_body): Build debugable statement around loop
11928         condition part.
11929         (complete_loop_body): Take into account the debugable statement
11930         around the EXIT_EXPR.
11931         (complete_loop_body): New function.
11932         (patch_exit_expr): Fixed condition inversion.
11933
11934 Wed Sep  2 11:53:58 1998  Tom Tromey  <tromey@cygnus.com>
11935
11936         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
11937         name of thread define.
11938         * jvspec.c (THREAD_NAME): New macro.
11939         (GCLIB): Likewise.
11940         (THREADLIB): Likewise.
11941         (lang_specific_driver): Recognize attempt to link with thread
11942         library or gc library.  Recognize -ljava on command line so it
11943         isn't linked against more than once.
11944
11945 Wed Sep  2 11:28:35 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11946
11947         * parse-scan.y (report_main_declaration): Name of the class
11948         containing `main' can be a qualified name.
11949
11950 Mon Aug 31 13:25:58 1998  Tom Tromey  <tromey@cygnus.com>
11951
11952         * config-lang.in: Changed gjavac to gjc everywhere.
11953         * Make-lang.in: Changed gjavac to gjc everywhere.
11954
11955 Thu Aug 27 02:28:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11956
11957         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
11958         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
11959         and install the files.
11960         * Makefile.in (JAVA_OBJS_LITE): New variable.
11961         (compiler:): Now include jv-scan as a dependency.
11962         (../jv-scan$(exeext), parse-scan.c): New targets.
11963         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
11964         * config-lang.in (compilers): Removed gcj, gjavah from the list.
11965         * jcf-parse.c (parse_source_file): Call java_layout_classes and
11966         check for errors even if parse_only.
11967         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
11968         defined.
11969         (yylex): New function. Uses java_lex body.
11970         (java_lex): Removed commented out statement. Remove local variable
11971         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
11972         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
11973         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
11974         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
11975         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
11976         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
11977         where appropriate.
11978         (java_lex_error): Empty if JC1_LITE is defined.
11979         (java_get_line_col): Return 0 if JC1_LITE is defined.
11980         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
11981         SET_MODIFIER_CTX): Moved into the section containing the macros
11982         conditionally defined by JC1_LITE.
11983         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
11984         argument if JC1_LITE is defined.
11985         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
11986         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
11987         is defined.
11988         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
11989         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
11990         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
11991         to different values according to JC1_LITE.
11992         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
11993         declared if JC1_LITE set.
11994         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
11995         defined if JC1_LITE not set.
11996         (struct parser_ctx): Reorganized and skip the jc1 front end part
11997         if JC1_LITE set.
11998         (java_layout_classes): New function definition.
11999         (java_push_parser_context, java_init_lex, yyparse, yylex,
12000         yyerror): Prototype always declared. All other static function
12001         prototypes declared only if JC1_LITE is not set.
12002         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
12003         declared in parse.h.
12004         (java_layout_classes): New function.
12005         (java_complete_expand_methods): No longer layout the class here.
12006         * parse-scan.y: New file.
12007         * jv-scan.c: New file.
12008
12009 Tue Aug 25 10:17:54 1998  Tom Tromey  <tromey@cygnus.com>
12010
12011         * gjavah.c (main): Handle -friend option.
12012         (friend_specs): New global.
12013         (generate_access): Handle friend_specs.
12014         (process_file): Likewise.
12015         (MAX_FRIENDS): New macro.
12016         (friend_count): New global.
12017         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
12018         Changed all callers.
12019
12020 Mon Aug 24 20:19:27 1998  Per Bothner  <bothner@cygnus.com>
12021
12022         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
12023         (main):  Handle processing all the entries of a named .zip archive.
12024         * jcf-io.c (jcf_trim_old_input):  New function.
12025         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
12026
12027 Mon Aug 24 07:35:13 1998  Per Bothner  <bothner@cygnus.com>
12028
12029         * lang.c (flag_assume_compiled):  Make default be on.
12030
12031 Fri Aug 21 17:29:04 1998  Per Bothner  <bothner@cygnus.com>
12032
12033         * jcf-dump.c:  Add bunches of flags to control output more.
12034         (process_class):  New function;  support printing more than one class.
12035         (main): Support new --print-main and --javap flags.
12036         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
12037         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
12038
12039 Thu Aug 20 14:24:47 1998  Per Bothner  <bothner@cygnus.com>
12040
12041         Change mangling of dispatch table to match C++ vtable (w/thunks).
12042         * class.c (build_dtable_decl), java-tree.h:  New function.
12043         (make_class_data):  Call it.
12044         * decl.c (init_decl_processing):  Likewise.
12045
12046 Wed Aug 19 17:57:07 1998  Warren Levy  <warrenl@cygnus.com>
12047
12048         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
12049         soft_anewarray; adjust args passed.
12050         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
12051         match _Jv_NewObjectArray.
12052
12053 Wed Aug 19 09:33:23 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12054
12055         * decl.c (push_labeled_block, pop_labeled_block): New functions.
12056         * expr.c (loopup_label): Call create_label_decl.
12057         (create_label_decl): New function.
12058         (java_lang_expand_expr): Call expand_start_bindings with argument
12059         set to zero.
12060         * java-tree.h Added space after PROTO in function declarations
12061         when necessary.
12062         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
12063         (create_label_decl, push_labeled_block): New function
12064         declarations.
12065         * lex.c (label_id): Initialize.
12066         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
12067         switch.
12068         * parse.h Added space after PROTO in function declarations when
12069         necessary.
12070         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
12071         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
12072         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
12073         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
12074         macros.
12075         (struct parser_ctxt): New fields current_loop,
12076         current_labeled_block.
12077         (build_if_else_statement, patch_if_else_statement,
12078         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
12079         generate_labeled_block, complete_labeled_statement,
12080         build_bc_statement, patch_bc_statement, patch_loop_statement,
12081         build_new_loop, build_loop_body, complete_loop_body): New function
12082         declarations.
12083         * parse.y (java_warning_count): New global variable.
12084         (label_id): New static variable.
12085         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
12086         (block:): Return size_zero_node when block is empty.
12087         (empty_statement:): Return size_zero_node.
12088         (statement:): Implement supplemental action when for_statement: is
12089         reduced.
12090         (label_decl:): New rule.
12091         (labeled_statement:): Rewritten using label_decl. Actions
12092         implemented.
12093         (labeled_statement_nsi:): Likewise.
12094         (if_then_statement): Actions implemented.
12095         (while_expression): New rule.
12096         (while_statement:): Rewritten using while_expression. Actions
12097         implemented.
12098         (while_statement_nsi:): Likewise.
12099         (do_statement_begin:): New rule.
12100         (do_statement:): Rewritten using do_statement_begin. Actions
12101         implemented.
12102         (for_statement:): Rewritten using for_begin. Actions implemented.
12103         (for_statement_nsi:): Likewise.
12104         (for_header:, for_begin:): New rules.
12105         (for_init:): Actions implemented.
12106         (statement_expression_list:, break_statement:,
12107         continue_statement:): Likewise.
12108         (yyerror): Count number of issued warning(s).
12109         (java_report_errors): Report error(s) and/or warning(s).
12110         (java_complete_class): Use build_java_argument_signature to
12111         recompute completed method signature.
12112         (java_check_regular_methods): New locals method_wfl and aflags.
12113         Use method_wfl instead of lookup_cl during error reports. Fixed
12114         indentation and modified some error messages. Use
12115         lang_printable_name in method instead of the DECL_NAME. New code
12116         to issue warnings on methods not overriding corresponding methods
12117         private to a different package.
12118         (java_method_add_stmt): Call add_stmt_to_compound.
12119         (add_stmt_to_compound): New function.
12120         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
12121         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
12122         (build_if_else_statement, patch_if_else_statement,
12123         build_labeled_block, generate_labeled_block,
12124         complete_labeled_statement, build_new_loop, build_loop_body,
12125         complete_loop_body, patch_loop_statement, build_bc_statement,
12126         patch_bc_statement, patch_exit_expr): New functions.
12127         * typeck.c (build_java_signature): Build argument signature before
12128         enclosing it in between parenthesis.
12129
12130 Mon Aug 17 17:44:24 1998  Warren Levy  <warrenl@cygnus.com>
12131
12132         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
12133         (JAVA_OBJS): Added reminder comment
12134
12135 Thu Aug 13 10:01:45 1998  Nick Clifton  <nickc@cygnus.com>
12136
12137         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
12138         be interpreted as a long long.
12139
12140 Thu Aug 13 14:34:07 1998  Warren Levy  <warrenl@cygnus.com>
12141
12142         * decl.c (init_decl_processing): Use _Jv_InitClass, not
12143         soft_initialise_class.  Use _Jv_NewMultiArray, not
12144         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
12145         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
12146         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
12147         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
12148
12149 Wed Aug 12 14:23:13 1998  Per Bothner  <bothner@cygnus.com>
12150
12151         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
12152         length_identifier_node):  New global tree node constants.
12153         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
12154         Replace uses by super_identifier_node etc.
12155         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
12156
12157         * parse.y (resolve_field_access):  Don't special-case ".length" if
12158         flag_emit_class_files.
12159         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
12160         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
12161         and ARRAY.length.
12162
12163 Tue Aug 11 11:31:55 1998  Per Bothner  <bothner@cygnus.com>
12164
12165         * decl.c (init_decl_processing): Remove unused method_type_node fields.
12166         * class.c (make_method_value):  Remove init for removed fields.
12167
12168         * class.c (layout_class):  Use build_java_argument_signature.
12169         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
12170
12171         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
12172         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
12173         (build_java_signature):  Don't use push_java_argument_signature.
12174
12175         * typeck.c (lookup_argument_method):  New function.
12176         * parse.y (java_check_regular_methods):  Use lookup_argument_method
12177         instead of lookup_java_method2 followed by lookup_java_method.
12178
12179         * parse.y (check_method_redefinition):  Minor optimization.
12180
12181         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
12182         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
12183
12184 Mon Aug 10 09:57:15 1998  Tom Tromey  <tromey@cygnus.com>
12185
12186         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
12187         c-pragma.o.
12188
12189         * gjavah.c (java_float_finite): Use K&R-style definition.
12190         (java_double_finite): Likewise.
12191         (generate_access): Now returns void.  Changed all callers.
12192         (last_access_generated): Removed.
12193         (process_file): Only make a single pass over the .class file.
12194
12195 Wed Jul 29 17:50:23 1998  Per Bothner  <bothner@cygnus.com>
12196
12197         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
12198         for compatibility for G++ (with -fvtable-thunks).
12199         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
12200
12201         * gjavah.c (process_file):  Use public inheritance for super-class.
12202
12203 Wed Jul 29 13:19:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12204
12205         * lex.c (java_init_lex): Initialize ctxp->package.
12206         * parse.h (struct parser_ctxt): package and package_len replaced
12207         by tree package, an identifier node. Field method_decl_list is
12208         gone. Fixed comments.
12209         (lookup_field_wrapper, merge_qualified_name, not_accessible,
12210         class_in_current_package): New function prototypes.
12211         * parse.y (array_type:): Set class loaded flag on primitive type
12212         arrays.
12213         (package_declaration:): Assign ctxp->package to the
12214         identifier node.
12215         (method_invocation:): Handle invocation of method qualified by
12216         `super'.
12217         (single_type_import_declaration:): Removed ambiguity check.
12218         (java_pop_parser_context): New local variable `next'. Reset and
12219         set IMPORT_CLASSFILE_NAME flags on current and previous import
12220         list.
12221         (java_accstring_lookup): Use new local macro COPY_RETURN.
12222         (lookup_field_wrapper): New function.
12223         (parser_qualified_classname): Use merge_qualified_name.
12224         (parser_check_super_interface): Broaden error message.
12225         (do_resolve_class): Check for qualified class name in the current
12226         compilation unit if appropriate.
12227         (process_imports): Check for already defined classes.
12228         (check_pkg_class_access): Got rid of call to
12229         get_access_flags_from_decl.
12230         (java_complete_expand_methods): Call safe_layout_class based on
12231         the current class size.
12232         (make_qualified_primary): Build a WFL qualification on primary if
12233         none exists.
12234         (merge_qualified_name): New function.
12235         (make_qualified_name): Use merge_qualified_name.
12236         (resolve_expression_name): Use safe_lookup_field.
12237         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
12238         (resolve_qualified_expression_name): Likewise. Check on resolved
12239         element accessibility.
12240         (not_accessible_p, class_in_current_package): New functions.
12241         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
12242         (patch_method_invocation_stmt): Merged common pieces. Check
12243         accessibility of invoked method.
12244         (check_for_static_method_reference): Add returned type in error
12245         message.
12246         (invocation_mode): Get rid of bogus check on PRIVATE methods.
12247         (refine_accessible_methods_list): Merged two conditions in test.
12248         (java_complete_class): Sanity check on stabilize_ref gone.
12249         * zextract.c (read_zip_archive): Cast lseek second argument to long.
12250
12251 Tue Jul 28 21:39:22 1998  Per Bothner  <bothner@cygnus.com>
12252
12253         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
12254
12255 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
12256
12257         * gjavah.c (F_NAN): Removed.
12258         (F_NAN_MASK): New macro.
12259         (F_POSITIVE_INFINITY): Removed.
12260         (F_NEGATIVE_INFINITY): Likewise.
12261         (java_float_finite): Rewrote.
12262         (D_NAN_MASK): Renamed.
12263         (java_double_finite): Rewrote.
12264         (D_POSITIVE_INFINITY): Removed.
12265         (D_NEGATIVE_INFINITY): Likewise.
12266
12267         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
12268         If verbose, print underlying representation of value in hex.
12269
12270 Fri Jul 24 14:14:32 1998  Per Bothner  <bothner@cygnus.com>
12271
12272         * buffer.h, buffer.c:  New files.
12273         * Makefile.in (JAVA_OBJS):  Add buffer.o.
12274
12275         Support locals variables and writing their debug entries to .class.
12276         * jcf-write.c:  Simplify some by user new buffer type.
12277         (vode_buffer_grow):  Removed.
12278         (struct localvar_info):  New type.
12279         (localsvars, localvartable):  New buffers.
12280         (localvar_alloc, localvar_free):  New functions.
12281         (generate_bytecode_insns):  Handle local variables.
12282         (generate_classfile):  Write LocalVariableTable attribute.
12283
12284 Fri Jul 24 13:46:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12285
12286         * jcf-io.c (open_in_zip): Check the zipfile magic number.
12287         * zipfile.h (ZIPMAGIC): New macro.
12288
12289 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
12290
12291         * Makefile.in (gjavah.o): Updated dependencies.
12292         (jcf-dump.o): Likewise.
12293         (all.indirect): Use ../gjavah.
12294         (../gjavah$(exeext)): Likewise.
12295         (clean): Don't remove gjavah.
12296         (clean): Remove parse.c, not java/parse.c.
12297         * Make-lang.in (java): Added gjavah.
12298         (gjavah$(exeext)): New target.
12299         (GJAVAH_SOURCES): New macro.
12300         (java.all.build): Added gjavah.
12301         (java.all.cross): Likewise.
12302         (java.rest.encap): Likewise.
12303         * config-lang.in (compilers, stagestuff): Added gjavah.
12304
12305 Thu Jul 23 18:33:56 1998  Tom Tromey  <tromey@cygnus.com>
12306
12307         * gjavah.c (java_float_finite): New function.
12308         (java_double_finite): Likewise.
12309         (F_POSITIVE_INFINITY): New macro.
12310         (F_NEGATIVE_INFINITY): Likewise.
12311         (F_NAN): Likewise.
12312         (D_POSITIVE_INFINITY): Likewise.
12313         (D_NEGATIVE_INFINITY): Likewise.
12314         (D_NAN): Likewise.
12315         (print_field_info): Use java_float_finite and java_double_finite.
12316
12317 Thu Jul 23 15:28:24 1998  Per Bothner  <bothner@cygnus.com>
12318
12319         * parse.y (method_header):  Name "this" implicit argument.
12320
12321 Wed Jul 22 15:47:30 1998  Per Bothner  <bothner@cygnus.com>
12322
12323         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
12324         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
12325         (put_linenumber):  New function.
12326         (generate_bytecode_insns, generate_classfile):  Write line numbers.
12327
12328 Wed Jul 22 14:39:00 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12329
12330         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
12331         (lookup_name, build_known_method_ref, build_class_init,
12332         build_invokevirtual, invoke_build_dtable, match_java_method,
12333         build_field_ref, pushdecl_force_head, build_java_binop,
12334         binary_numeric_promotion, build_decl_no_layout,
12335         build_java_arrayaccess, build_newarray, build_anewarray,
12336         build_java_array_length_access, build_java_arraynull_check): New
12337         extern function prototypes.
12338         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12339         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
12340         java-tree.h.
12341         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
12342         to NULL
12343         * jcf.h (jcf_out_of_synch): New extern function prototype.
12344         * parse.h: Static/global function implemented in parse.y
12345         prototyped and declarations moved at the end of the file.
12346         (DECL_P): Check that the argument isn't null.
12347         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12348         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
12349         (QUAL_DECL_TYPE): New macro.
12350         (PARAMS): Macro definition removed.
12351         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
12352         (return_statement:): Call build_return.
12353         (field_access:): Call make_qualified_primary in sub rule.
12354         (method_invocation:): Build method invocation and call
12355         make_qualified_primary when processing primaries.
12356         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
12357         get_type_from_signature.
12358         (java_check_regular_method): Extra integer 0 argument when calling
12359         lookup_java_method2.
12360         (lookup_java_interface_method2): Extra method DECL argument when
12361         calling lookup_java_interface_method2.
12362         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
12363         COMPOUND_EXPR node.
12364         (java_complete_expand_method): Layout current class iff not
12365         already done. Don't process interface's methods.
12366         (java_complete_expand_method): Use super class only if it
12367         exists. Use current class otherwise.
12368         (make_qualified_primary): New function.
12369         (resolve_expression_name): Process qualified expression or
12370         expression from primary the same way.
12371         (resolve_expression_name): Two last arguments to
12372         resolve_field_access are now NULL_TREEs.
12373         (resolve_field_access): New variable is_static. Local field must
12374         be DECLs. is_static computed on field DECLs only. Append code in
12375         where_found to the field access if necessary. Use QUAL_DECL_TYPE
12376         to initialize field_type.
12377         (resolve_qualified_expression_name): New local variable,
12378         previous_call_static and is_static. Handle primaries with function
12379         calls, casts, array references and `this'. `super' now handled as
12380         `(super_class)this'. Use is_static to clarify boolean expressions.
12381         Added code to handle case where a proper handle is required to
12382         access a field. Use QUAL_DECL_TYPE where applicable.
12383         (maybe_access_field): New function.
12384         (patch_method_invocation_stmt): New arguments primary, where,
12385         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
12386         deleted. Use `where' as a type to search from if specified. Check
12387         for static method reference where forbidden. Append primary or
12388         current_this to the argument list if not calling constructor nor
12389         static methods.
12390         (check_for_static_method_reference): New function.
12391         (patch_invoke): Layout the class on which new is done if
12392         necessary.
12393         (lookup_method_invoke): Changed format to report errors on
12394         methods.
12395         (qualify_ambiguous_name): New local variable this_found. Now
12396         handle things from primaries. Method call are considered
12397         expression names.
12398         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
12399         changed into NULLs.
12400         (not_initialized_as_it_should_p): Comply with the new DECL_P.
12401         (java_complete_tree): New case fo RETURN_EXPR. Process function
12402         call arguments in separate function.
12403         (complete_function_arguments): New function.
12404         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
12405         anymore.
12406         (patch_assignment): Take the return function slot into account as
12407         a RHS. Distinguish assignment from a return.
12408         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
12409         when checking methods in interfaces.
12410         (resolve_type_during_patch): NULL argument to unresolve_type_p
12411         instead of NULL_TREE.
12412         (patch_newarray): Fixed typo in comment.
12413         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
12414         (build_return, patch_return): New functions.
12415         * typeck.c (lookup_java_constructor): Fixed typo in comment.
12416
12417 Tue Jul 21 12:10:04 1998  Per Bothner  <bothner@cygnus.com>
12418
12419         * constants.c (find_name_and_type_constant, find_fieldref_index,
12420         find_methodref_index):  New methods.
12421         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
12422         just return given method.  Also, rename to build_known_method_ref.
12423         (expand_invoke):  Rename call to build_invoke_non_interface.
12424         * java-tree.h, parse.h:  Update prototype.
12425         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
12426         (such as expand_expr_stmt) if flag_emit_class_files.
12427         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
12428         STACK_TARGET, IGNORE_TARGET):  New macros.
12429         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
12430         (generate_bytecode_insn):  New function to generate method's bytecode.
12431         (generate_classfile):  Node generate Code attribute for a method.
12432         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
12433         push_long_const, field_op, adjust_typed_op, maybe_wide):
12434         New functions used by generate_bytecode_insn.
12435
12436         * typeck.c (signature_include_return):  Remove variable.
12437         (push_java_argument_signature, build_java_argument_signature):  New.
12438         (build_java_signature):  Use push_java_argument_signature.
12439         * parse.y:  Use build_java_argument_signature instead of fiddling
12440         with signature_include_return.
12441
12442 Fri Jul 17 09:48:51 1998  Tom Tromey  <tromey@cygnus.com>
12443
12444         * gjavah.c (print_c_decl): Always generate JArray<>* for array
12445         types.
12446
12447         * Makefile.in (all.indirect): Added gjavah$(exeext).
12448         (gjavah$(exeext)): Added $(exeext).
12449         (clean): Likewise.
12450
12451 Thu Jul 16 15:29:20 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12452
12453         * class.c (layout_class): Call to java_layout_parsed_class replace
12454         by safe_layout_class.
12455         * expr.c (build_java_array_length_access): Removed static storage
12456         class in the function definition.
12457         (build_java_arraynull_check): Likewise.
12458         Also fixed typos in two comments.
12459         * lex.c (java_init_lex): Initialize static global kw_length.
12460         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
12461         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
12462         java_lex_error.
12463         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
12464         * parse.h (resolve_no_layout): New static function declaration.
12465         (get_identifier_in_static): Declaration removed.
12466         (java_layout_parsed_class): Function name declaration changed to
12467         safe_layout_class.
12468         (build_newarray_node, patch_newarray, resolve_type_during_patch,
12469         not_initialized_as_it_should_p, build_this): New static function
12470         declarations.
12471         (pushdecl_force_head, build_java_binop, int_fits_type_p,
12472         binary_numeric_promotion, stabilize_reference,
12473         build_decl_no_layout, build_java_arrayaccess): Extern function
12474         declarations moved into their own section.
12475         (build_newarray, build_anewarray, build_java_array_length_access,
12476         build_java_arraynull_check): New extern function declarations.
12477         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
12478         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
12479         fake tree codes.
12480         (CALL_CONSTRUCTOR_P): New macro.
12481         * parse.y (kw_length): New static global tree node.
12482         (return_statement): Tagged <node>.
12483         (RETURN_TK): Tagged <operator>.
12484         (variable_declarator_id:): Build variable declaration with an
12485         empty initialization value if a syntax error was found in the
12486         initialization part of the variable declaration.
12487         (statement_without_trailing_substatement:): return_statement: now
12488         uses the default rule.
12489         (return_statement:): Temporarily fixed to return NULL_TREE.
12490         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
12491         (class_instance_creation_expression:): Class creation rules now
12492         call build_method_invocation upon reduction.
12493         (array_creation_expression:): Rules call build_newarray_node upon
12494         reduction.
12495         (dim_exprs:): Build a list of dimension expressions.
12496         (dim_expr:): Store location of the OSB_TK in the dimension
12497         expression node.
12498         (method_invocation:): Added a new error rule.
12499         (build_unresolved_array_type): WFL argument may also be an array
12500         on a primitive type. Name of the argument changed to reflect this.
12501         (method_declarator): Insert argument type at the beginning of the
12502         argument type list and later reverse the list.
12503         (unresolved_type_p): Argument 'returned' may be optionally
12504         NULL_TREE.
12505         (java_layout_class_from_source): Function renamed
12506         safe_layout_class.
12507         (resolve_and_layout): Now call resolve_no_layout and
12508         safe_layout_class.
12509         (resolve_no_layout): New function.
12510         (purify_type_name): New function.
12511         (complete_class_report_errors): Call purify_type_name during error
12512         report on a type not found.
12513         (process_imports): error_found local variable doesn't need to be
12514         initialized to zero.
12515         (declare_local_variables): New local type_wfl. Fixed typo in error
12516         message. type_wfl assigned to unresolved type and used to register
12517         incomplete type. Build a WFL around the variable initialization
12518         statement so that debug info can be generated on it.
12519         (source_start_java_method): Reverse argument list after they've
12520         been processed.
12521         (current_this): New static global variable.
12522         (java_complete_expand_methods): Set current_this when appropriate.
12523         (resolve_expression_name): Build correct static and non static
12524         field access bearing a simple name.
12525         (resolve_field_access): Resolve the length field of arrays. Handle
12526         f.m() cases.
12527         (patch_method_invocation_stmt): Set the type of the method
12528         invocation to error_mark_node. This value is later overridden by a
12529         valid type, if any. Don't handle qualified constructor invocation
12530         as qualified method invocation. Call lookup_method_invoke with its
12531         new flag. It's no longer necessary to access the selected method
12532         as the value of a tree list. Handle constructor invocation.
12533         (patch_invoke): Reverse argument list when invoking non interface
12534         methods. Insert call to new as the first argument of the
12535         constructor.
12536         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
12537         defined within a final class. Return INVOKE_STATIC if the invoked
12538         method is a constructor.
12539         (lookup_method_invoke): New lc argument is a flag to indicate a
12540         constructor lookup. Now handle constructor lookup. Choose the most
12541         specific method in case several were matching the invocation
12542         requirements. Return a method decl instead of a tree list featuring
12543         one single method decl element.
12544         (refine_accessible_methods_list): New lc flag argument to
12545         indicate that a constructor is being looked up.
12546         (not_initialized_as_it_should_p): New function.
12547         (java_complete_tree): Now process fake tree codes
12548         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
12549         save_expr on resolved function call arguments. Case on
12550         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
12551         (patch_assignment): LHS can be a field access expression. When
12552         dealing with reference, lhs_type is the promoted type of the
12553         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
12554         applicable.
12555         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12556         (patch_binop): Use not_initialized_as_it_should_p where
12557         applicable.
12558         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
12559         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
12560         where applicable.
12561         (resolve_type_during_patch): New function.
12562         (patch_cast): Call resolve_type_during_patch to resolve type and
12563         report error accordingly.
12564         (patch_array_ref): Use not_initialized_as_it_should_p where
12565         applicable. Array base expression is saved before being
12566         used. Promote the type of an array elements if it contains non
12567         builtin types.
12568         (build_newarray_node, patch_newarray, build_this): New functions.
12569
12570 Thu Jul 16 10:46:47 1998  Tom Tromey  <tromey@cygnus.com>
12571
12572         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
12573         increment it in `for' statement.
12574         (print_field_info): If number is inf or nan, don't print it.
12575         (print_method_info): If method name is `delete', just ignore it.
12576         (print_c_decl): Special-case jstringArray.
12577
12578         * gjavah.c (help): New function.
12579         (no_argument): New function.
12580         (usage): Changed text.
12581         (main): Rewrote argument handling.  Now handles -v, --help,
12582         --version.
12583         (version): New function.
12584         (found_error): New global.
12585         (main): Return found_error.
12586         (generate_access): Set found_error.
12587         (print_c_decl): Likewise.
12588
12589 Wed Jul 15 10:36:27 1998  Tom Tromey  <tromey@cygnus.com>
12590
12591         * gjavah.c (print_c_decl): Don't print "," when examining field.
12592         Skip type name when looking at "[L" types.
12593         (process_file): Now static.
12594         (generate_access): Now returns int.
12595         (last_access_generated): New global.
12596         (process_file): Clear last_access_generated; make multiple passes
12597         over the class.
12598         (print_field_info): Just return if generate_access returns true.
12599         (print_method_info): Likewise.  Also, allow <init> functions to
12600         pass through.
12601         (print_c_decl): Added is_init argument.  Print constructors
12602         properly.
12603         (print_cxx_classname): Use UTF8_GET to extract characters from
12604         string.
12605         (print_base_classname): New function.
12606         (print_class_decls): New function.
12607         (process_file): Use it.
12608         (utf8_cmp): New function.
12609
12610 Mon Jul 13 14:21:47 1998  Nick Clifton  <nickc@cygnus.com>
12611
12612         * lang-options.h: Format changed to match changes in gcc/toplev.c
12613         to implement a --help option.
12614
12615 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
12616
12617         * decl.c (init_decl_processing): Revert change to dtable_type.
12618
12619 Thu Jul  9 18:22:12 1998  Per Bothner  <bothner@cygnus.com>
12620
12621         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
12622
12623 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
12624
12625         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
12626
12627         * lang.c (lang_init): Default flag_exceptions to 1, without
12628         checking to see if it's 2 first.
12629
12630 Wed Jul  8 03:01:32 1998  Jeffrey A Law  (law@cygnus.com)
12631
12632         * constants.c: Include "system.h".
12633         * decl.c: Likewise.
12634         * lang.c (flag_new_exceptions): Get via extern now.
12635         (lang_init_options): New functions.  Turn on flag_new_exceptions.
12636
12637 Tue Jul  7 12:56:48 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12638
12639         * lex.c (java_lex): Return 0 when we see an invalid character in
12640         the input.
12641
12642         * lex.c (java_read_char): Specify extra argument when calling
12643         java_lex_error.
12644         (java_read_unicode, java_parse_end_comment,
12645         java_parse_escape_sequence): Likewise,
12646         (java_lex): Specify extra argument when calling
12647         java_lex_error. Test that IDs are beginning with a legal character
12648         for IDs. Handle invalid characters with an error message and a
12649         call to java_lex_error.
12650         (java_lex_error): Adjust column position by new argument
12651         `forward'. Issue an error even if in the middle of reporting an
12652         other error.
12653
12654 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
12655
12656         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
12657         we don't explicitly put a null pointer when we're copying it.
12658
12659 Tue Jul  7 09:38:38 1998  Tom Tromey  <tromey@cygnus.com>
12660
12661         * gjavah.c (print_cxx_classname): New function.
12662         (super_class_name): Likewise.
12663         (print_super_fields): Removed.
12664         (in_super): Removed.
12665         (print_field_info): Never generate #defines.
12666         (print_c_decl): Changed generated types to match JNI.  No longer
12667         print class name before method name.
12668         (print_method_info): Print "static" before static methods.
12669         Print "virtual" before non-final methods.
12670         (usage): Use exit(1), not exit(-1).
12671         (main): Likewise.
12672         (print_field_info): Use %.17g to print a double.
12673         (last_access): New globals.
12674         (process_file): Initialize last_access.
12675         (usage): Now static.
12676         (ACC_VISIBILITY): New define.
12677         (generate_access): New function.
12678         (print_field_info): Call it.
12679         (print_method_info): Likewise.  Also, generate information for all
12680         methods, not just native methods.  Return void.
12681         (print_c_decl): Return void.
12682         (print_field_info): Return void.
12683
12684 Thu Jul  2 16:53:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12685
12686         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
12687         processing the jc1 grammar file. Prefix bison functions and
12688         variables with java_.
12689         (parse.c): Dependencies on parse.h and lex.h
12690         * expr.c (build_java_arrayaccess): Function now global.
12691         * java-tree.h: Comment reorganized to carry on previous
12692         classification effort.
12693         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
12694         RESOLVE_TYPE_NAME_P): New flags on WFLs.
12695         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
12696         java_parse (new prefix java_ generated by bison).
12697         (java_layout_parsed_class, java_register_parsed_class): Function
12698         call removed.
12699         (yyparse): Removed unnecessary call to init_outgoing_cpool.
12700         * lex.c (static tree wfl_op): Variable deleted.
12701         (java_init_lex): Initialize kw_super and kw_this. Initialize more
12702         ctxp fields to NULL_TREE.
12703         (java_lex): No longer create WFL for operators. Filename caching
12704         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
12705         created as STRING_CST and later expanded. Removed extra argument
12706         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
12707         and SUPER.
12708         (build_wfl_node): Removed code in comments.
12709         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
12710         store token and location data in the current bison token.
12711         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
12712         static/extern function declaration at the beginning of the file.
12713         (struct qualification): Data structure definition deleted.
12714         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
12715         (qualify_ambiguous_name): Function declaration modified. Function
12716         now returns nothing.
12717         (build_array_ref, patch_array_ref, make_qualified_name,
12718         resolve_qualified_expression_name, maybe_generate_clinit,
12719         resolve_field_access): New static function declarations.
12720         (build_java_arrayaccess): New extern function declaration.
12721         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
12722         (CALL_EXPR_PRIMARY): Macro deleted.
12723         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
12724         (struct parser_ctxt): Field initialized_final
12725         removed. non_static_initialized, static_initialized: New fields.
12726         * parse.y (static tree kw_super, static tree kw_this): New global
12727         static.
12728         (%union): tree wfl field of operator member replaced by int
12729         location. WFLs are non longer created for operators.
12730         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
12731         (qualified_name:): Now calls make_qualified_name to build the
12732         identifier.
12733         (type_declaration:): Consider generating <clinit> when class
12734         parsing completed.
12735         (variable_declarator:): Directly build an assignment node when the
12736         variable is initialized when declared.
12737         (this_or_super:): Build a WFL and set current location when THIS
12738         or SUPER are parsed.
12739         (expression_statement:): Wrap statement around a WFL.
12740         (primary_no_new_array:): Fixed typo. Changed value returned by
12741         THIS_TK because of its new type (temporary).
12742         (dim_exprs:): Temporary fix because of OSB_TK's new type.
12743         (field_access:): Build qualified name with SUPER.
12744         (method_invocation:): Fixed returned value because of SUPER's new
12745         type.
12746         (array_access:): Use OSB_TK location information.
12747         (post_increment_expression:, post_decrement_expression:,
12748         unary_expression:, pre_increment_expression:,
12749         pre_decrement_expression:, unary_expression_not_plus_minus:,
12750         cast_expression:, multiplicative_expression:,
12751         additive_expression:, shift_expression:, relational_expression:,
12752         equality_expression:, and_expression:, exclusive_or_expression:,
12753         inclusive_or_expression:, conditional_and_expression:,
12754         conditional_or_expression:, assignment:): Use new location/token
12755         information available on operators.
12756         (create_class): Set super_decl_type to NULL_TREE when processing
12757         java.lang.Object.
12758         (register_fields): Field initialization is now a MODIFY_EXPR
12759         node. Chain initialization code to the matching lists (according
12760         the the field declaration modifiers).
12761         (maybe_generate_clinit): New function.
12762         (method_header): Don't set method's DECL_NAME to a WFL when adding
12763         methods to java.lang.Object.
12764         (resolve_and_layout): Now can return NULL_TREE if the type
12765         resolution fails. Otherwise, return the class DECL instead of its
12766         TYPE.
12767         (check_method_redefinition): Don't patch method DECL_NAME if it
12768         belongs to java.lang.Object.
12769         (process_imports): Simply assign error_found to the value returned
12770         by check_pkg_class_access.
12771         (declare_local_variables): Don't use their init statements (if
12772         any) when parsing error were previously found. Reuse MODIFY_EXPR
12773         build during parsing as an init statement.
12774         (java_method_add_stmt): Now return the current method body.
12775         (java_layout_parsed_class, java_register_parsed_class): Functions
12776         removed.
12777         (java_complete_expand_methods): Initialize the constant pool on a
12778         per class basis. Layout the classes before expanding their method
12779         bodies. Don't try expand artificial constructor code if error were
12780         found. Make the classes data and register them if no error were
12781         found.
12782         (java_complete_expand_method): Retrieve an artificial constructor
12783         argument list before entering its body. Assign the top block to
12784         the artificial constructor function body and set types of declared
12785         blocks and compound statements to void. Walk method body if not an
12786         artificial constructor.
12787         (make_qualified_name, cut_identifier_in_qualified): New functions.
12788         (resolve_expression_name): Fixed comments. Save/restore the
12789         current class CLASS_LOADED_P flag value. Build non qualified
12790         static field access and handle qualified expression names.
12791         (resolve_field_access, resolve_qualified_expression_name): New
12792         functions.
12793         (patch_method_invocation_stmt): Use the new expression resolution
12794         scheme, calling resolve_field_access when the function call is
12795         resolved as an expression.
12796         (qualify_ambiguous_name): Function rewritten to work on qualified
12797         expression produced by make_qualified_name.
12798         (java_complete_tree): Promote type when function's argument are
12799         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
12800         the assignment to discover further errors if RHS is a expression
12801         name that fails to evaluate. Declare LHS initialized even though
12802         the assignment failed. Don't use the location variable and removed
12803         extra argument in patch function calls. Now handle the ARRAY_REF
12804         case and build internal string representation when STRING_CSTs are
12805         walked.
12806         (build_method_invocation): Don't wrap function call around a WFL.
12807         (build_assignment): Likewise. Use the operator location
12808         information.
12809         (patch_assignment): Handle array access LHSs. Handle error
12810         provenance, resulting in a better error report.
12811         (build_binop): Use op_location from operator as binop location
12812         information.
12813         (build_unaryop, build_incdec, build_cast): Likewise.
12814         (patch_binop): Extract location information from the node. Fixed
12815         typo in error message.
12816         (patch_unary_op): Extract location information from the node.
12817         (build_array_ref, patch_array_ref): New functions.
12818
12819 Wed Jul  1 13:11:36 1998  Tom Tromey  <tromey@cygnus.com>
12820
12821         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
12822         match _Jv_IsInstanceOf.
12823         * decl.c (init_decl_processing): Use _Jv_NewArray, not
12824         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
12825
12826 Tue Jun 30 14:12:54 1998  Tom Tromey  <tromey@cygnus.com>
12827
12828         * decl.c (init_decl_processing): Functions are now named
12829         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
12830
12831 Mon Jun 29 14:47:10 1998  Per Bothner  <bothner@cygnus.com>
12832
12833         * java-tree.h (load_class):  Add prototype.
12834         * class.c (is_compiled_class):  Add missing arg to load_class.
12835         * expr.c (expand_java_NEW):  Call load_class.
12836         * parse.y (process_import):  Removed bogus use of void return value.
12837
12838 Thu Jun 25 11:50:48 1998  Per Bothner  <bothner@cygnus.com>
12839
12840         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
12841         Function name is "_Jv_Throw" instead of "soft_athrow".
12842         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
12843         Function name is "_Jv_AllocObject" instead of "soft_new".
12844         Takes an extra parameter (object size).
12845         * expr.c:  Update calls.
12846
12847 Wed Jun 24 13:59:02 1998  Per Bothner  <bothner@cygnus.com>
12848
12849         * lex.c (java_get_line_col):  Handle end-of-file.
12850         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
12851
12852 Wed Jun 24 09:22:34 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12853
12854         * lang.c (lang_init): Make -fexceptions the default.
12855         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
12856         exception handling is not turned on.
12857
12858 Tue Jun 23 10:17:09 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
12859
12860         * lang.c (flag_new_exceptions): Make this this default.
12861         * decl.c (end_java_method): Call emit_handlers.
12862         * except.c (method_init_exceptions): Set language code and version.
12863         (expand_start_java_handler): Enable exception, and call
12864         expand_eh_region_start.
12865         (expand_end_java_handler): Enable exception, and set up catch blocks.
12866         (emit_handlers): New routine to generate the saved handlers.
12867         * java-except.h (emit_handlers): Add prototype.
12868
12869 Fri Jun 12 11:31:24 1998  Per Bothner  <bothner@cygnus.com>
12870
12871         We used to have three different representations of the constant pool:
12872         the CPool structure, the tree_constant_pool, and the constructures
12873         used to build the Class object (which may need class and string
12874         constants) in compiled code.  None were appropriate for compiling
12875         to .class files, so I did a major overhaul.
12876
12877         First, the tree_constant_pool array was removed.  Things were
12878         modified to the CPool structure in the JCF could be used.
12879         Second, a "capacity" field was added to the CPool, and functions
12880         written to search for a matching constant, adding one if not found.
12881         The code that generated the Class object was changed to use a CPool.
12882         The actual TREE_LISTs used to build the CONSTRUCTORs used for
12883         the static Class object are now only in build_constants_constructor.
12884         Finally, I wrote code which can generate a .class file (including its
12885         constant pool) from the RECORD_TYPE of a class.  This is a big step
12886         on the way to compiling Java source into .class files.
12887
12888         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
12889         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
12890
12891         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
12892         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
12893         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
12894         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
12895         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
12896         (lang_type):  Removed constant_pool field.
12897         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
12898         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
12899         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
12900         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
12901
12902         * constants.c (current_constant_pool_tags, current_constant_pool_data,
12903         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
12904         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
12905         (set_constant_entry, find_constant1, find_constant2,
12906         find_class_constant, count_constant_pool_bytes, write_constant_pool,
12907         find_utf8_constant, find_class_or_string_constant):  New functions.
12908
12909         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
12910         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
12911         (give_name_to_class, get_class_constant):  Likewise.
12912         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
12913         (get_name_and_type_constant, get_ref_constant):  Removed.
12914         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
12915         * parse.y:  Don't save/restore tree_constant_pool.
12916         * verify.c (verify_jvm_instructions):  Update for new approach.
12917         * expr.c (expand_invoke, expand_java_field_op): Likewise.
12918
12919         * lang-options.h:  Added -femit-class-file, -femit-class-files.
12920         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
12921         (lang_f_options):  Added "emit-class-file(s)".
12922
12923         * expr.c (build_java_arrayaccess):  Generate more efficient array
12924         bounds checking, by using unsigned compare.
12925
12926         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
12927
12928 Wed Jun 10 17:34:42 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12929
12930         * parse.h: New comment on the handling of unresolved type
12931         identifiers. JDEPs are now part of the jdep_code enum.
12932         (typedef struct jdep): Now use enum jdep_code or int, depending on
12933         availability. Both are narrowed down to an 8 bits bitfield.
12934         (CALL_EXPR_PRIMARY): Fixed comment.
12935
12936 Wed Jun 10 10:54:39 1998  Tom Tromey  <tromey@cygnus.com>
12937
12938         * Make-lang.in (java): Added gjavac and jvgenmain.
12939         (java.start.encap): Depend on gjavac.
12940         (java.rest.encap): Depend on jvgenmain.
12941
12942         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
12943         (JAVA_CROSS_NAME): Likewise.
12944         (java.all.build): Depend on jvgenmain and gjavac.
12945         (java.all.cross): Depend on jvgenmain and gjavac-cross.
12946         (jvgenmain$(exeext)): New target.
12947         (java.install-common): Wrote.
12948         * config-lang.in (compilers, stagestuff): Added gjavac and
12949         jvgenmain.
12950
12951 Wed Jun 10 12:19:04 1998  Dave Brolley  <brolley@cygnus.com>
12952
12953         * lang.c (lang_decode_option): New argc/argv interface.
12954
12955 Tue Jun  9 18:12:46 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12956
12957         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
12958         * decl.c (build_decl_no_layout): New function.
12959         * expr.c (java_lang_expand_expr): Layout declarations found in
12960         blocks before they're pushed.
12961         * jcf-parse.c (load_class): Save current line when parsing class
12962         file.
12963         (parse_source_file): Register class before expanding their
12964         methods.
12965         * lang.c (put_decl_node): Produce `null' when `void *' is
12966         processed.
12967         * lex.c (static tree wfl_op): New static global, for error report
12968         on casts.
12969         (java_init_lex): wfl_operator and wfl_op initialized
12970         here. Filename caching added for wfl_op. Return wfl_op when `(' is
12971         parsed.
12972         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
12973         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
12974         build_unresolved_array_type): New static function definitions.
12975         (build_decl_no_layout): New extern function declared.
12976         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
12977         faulty modifier exists.
12978         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
12979         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
12980         (UNARY_PLUS_EXPR): New fake operator.
12981         (struct parser_ctxt): New field osb_number.
12982         * parse.y (static tree wfl_operator): New static WFL for operator
12983         bound error messages.
12984         (DECR_TK, INCR_TK): Moved.
12985         (OP_TK): Tagged <operator>.
12986         (array_type:): Now call build_unresolved_array_type.
12987         (dim_expr:): Count the number of '[' seen.
12988         (post_increment_expression, post_decrement_expression,
12989         pre_increment_expression, pre_decrement_expression,
12990         unary_expression_not_plus_minus, unary_expression:): Actions are
12991         now building the corresponding unary expressions.
12992         (cast_expression:): Actions are now building cast expressions.
12993         (build_unresolved_array_type): New function.
12994         (create_interface): Reset the number of declared interfaces.
12995         (create_class): Likewise.
12996         (method_header): Methods declared within the scope of an interface
12997         are now implicitly set public and abstract.
12998         (java_complete_class): Variable's and parameter's type are patched
12999         with a promoted type.
13000         (declare_local_variables): Resolved non builtin types are promoted
13001         before being used to build a variable decl. Removed type patch
13002         posted on variable initialization statement.
13003         (source_start_java_method): Use build_decl_no_layout to build the
13004         decl of a parameter of incomplete type.
13005         (java_register_parsed_class): Process interfaces too. Call
13006         rest_of_decl_compilation on each processed class declarations.
13007         (java_complete_expand_methods): Don't attempt to expand things in
13008         interfaces.
13009         (java_complete_tree): Process CONVERT_EXPR, even though it always
13010         has a type. Propagate error_mark_node to node's type too. Promote
13011         method's call argument type and return error_mark_node if
13012         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
13013         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
13014         handle unary operator nodes.
13015         (build_assignment): Added comment.
13016         (print_int_node): New function.
13017         (patch_assignment): New second argument. New error handling. Use
13018         print_int_node. Handle references. Use can_cast_to_p to issue
13019         different error message according to the context and check upon
13020         the initialization of the RHS.
13021         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
13022         (operator_string): Handle more operators.
13023         (patch_binop): No longer use a function static
13024         wfl_operator. Improved error message on shift distance.
13025         (build_unaryop, build_incdec, build_cast, patch_unaryop,
13026         patch_cast): New functions.
13027
13028 Fri Jun  5 18:03:07 1998  Per Bothner  <bothner@cygnus.com>
13029
13030         * jvspec.c:  New file.
13031         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
13032
13033         * java-tree.h (identifier_subst):  Add declaration.
13034
13035 Thu Jun  4 13:44:23 1998  Tom Tromey  <tromey@cygnus.com>
13036
13037         * jvgenmain.c (main): Generate call to JvRunMain.
13038
13039         * class.c (make_class_data): Push value for "sync_info" field.
13040         * decl.c (init_decl_processing): Push "sync_info" field.
13041
13042 Wed Jun  3 20:39:14 1998  Per Bothner  <bothner@cygnus.com>
13043
13044         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
13045         Java (source) name, not signature.
13046         Set TYPE_ALIGN to (at least) that of element_type.
13047
13048 Tue Jun  2 15:19:19 1998  Per Bothner  <bothner@cygnus.com>
13049
13050         * class.c:  Moved classname-mangling-rekated code to ...
13051         * mangle.c:  ... this new file.
13052         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
13053         * Makefile.in:  Update for above changes.
13054
13055 Mon Jun  1 09:58:36 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13056
13057         * expr.c (truthvalue_conversion): Convert integer and floating
13058         point value to their truth value.
13059         * lex.c (java_lex): Handle the `null' literal.
13060         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
13061         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13062         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
13063         New macros.
13064
13065         * parse.y: Reorganization/documentation on token declaration.
13066         (binop_lookup[]): New added new tree codes.
13067         (relational_expression): Build corresponding binary operators.
13068         (equality_expression, conditional_and_expression,
13069         conditional_or_expression): Likewise.
13070         (java_complete_class): Fix crash in debug message.
13071         (java_complete_tree): Check initialization of method call
13072         arguments. Further bogus node evaluation to detect more error
13073         during assignments. Handles more binary operators.
13074         (patch_assignment): Use DECL_P.
13075         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
13076         code.
13077         (operator_string): Handle more case. Compacted source.
13078         (patch_binop): Changed function comment. Checking for
13079         uninitialized first operand takes the compound assignment into
13080         account and uses DECL_P. Checking for uninitialized second operand
13081         delayed to routine's end. Use macros to issue type bound error
13082         messages and issue messages on both operands if their types are
13083         different. Force fixed type into node. Handle all binary
13084         operators.
13085
13086 Wed May 27 10:30:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13087
13088         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
13089         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
13090         build operator node and return tokens.
13091         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
13092         * parse.h (java_complete_tree): Changed returned type in prototype.
13093         (build_method_invocation, build_assignment, patch_assignment,
13094         patch_binop): New static function declarations.
13095         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
13096         BUILD_EXPR_WFL): New macros.
13097         * parse.y (enum tree_code binop_lookup[]): New static for token to
13098         TREE_CODE lookup.
13099         (%union): Parser union has new sub-structure `operator'.
13100         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
13101         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
13102         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
13103         ASSIGN_ANY_TK): Tokens tagged `operator'.
13104         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
13105         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
13106         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
13107         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
13108         (assignment_operator:): Rule tagged `operator'.
13109         (expression_statement:): Re-installed default rule.
13110         (method_invocation:): Sub rules call build_method_invocation.
13111         (postfix_expression:): Don't attempt to resolve name here. Just
13112         return an ID.
13113         (multiplicative_expression:): Sub-rules build corresponding binop
13114         expression node.
13115         (additive_expression:, shift_expression:, and_expression:,
13116         exclusive_or_expression:, inclusive_or_expression:): Likewise.
13117         (assignment:): Sub rule invoke build_assignment.
13118         (assignment_operator:): Default rules on sub rules.
13119         (force_error): Added documentation on this variable.
13120         (declare_local_variables): Build initialization calling
13121         build_assignment.
13122         (expand_start_java_method): Removed unused rtx declaration. Mark
13123         arguments as already initialized.
13124         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
13125         (java_complete_expand_methods): Don't process next method if
13126         completion of the previous one triggered errors.
13127         (java_complete_expand_method): Call source_end_java_method if no
13128         error were found during completion.
13129         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
13130         locals declaratilon. Handle names found within a class. Return
13131         error_mark_node when things aren't found.
13132         (patch_method_invocation_stmt): Return error_mark_node on failures.
13133         (patch_invoke): Removed unused local. Return the correct node.
13134         (java_complete_tree): Now returns a value. The BLOCK section binds
13135         local identifiers and the type of a BLOCK is now void. Assign the
13136         result of operand completion on COMPOUND_EXPR. Assign the
13137         encapsulated node of a WFL to the result of its completion, except
13138         when the node is an identifier. Now handle MODIFY_EXPR and several
13139         binary operators. Return error_mark_node on errors.
13140         (build_method_invocation, build_assignment, patch_assignment,
13141         build_binop, operator_string, patch_binop): New functions.
13142         * typeck.c (binary_numeric_promotion): New function.
13143
13144 Thu May 21 12:01:04 1998  Per Bothner  <bothner@cygnus.com>
13145
13146         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
13147         Replace most uses of ident_subst by identifier_subst.
13148
13149         * class.c (push_class_static_dummy_field):  Removed function.
13150         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
13151         instead of looking got "class" static field.  Create that decl here.
13152         (class_identifier_node):  Removed;  no longer needed.
13153         (init_class_processing):  Don't init class_identifier_node.
13154         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
13155         Do nreverse 0 times (instead of twice) for Object and Class.
13156         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
13157
13158 Wed May 20 16:35:04 1998  Per Bothner  <bothner@cygnus.com>
13159
13160         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
13161         while initializing linenumber_count and linenumber_table.
13162         Do it before init_function_start (which calls emit_line_note).
13163         * expr.c (expand_byte_code):  Don't need to clear lineno here.
13164
13165 Mon May 18 16:23:32 1998  Tom Tromey  <tromey@cygnus.com>
13166
13167         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
13168         then mangle number as _N_.
13169
13170         * class.c (mangle_class_field): New function.
13171         (build_class_ref): Set assembler name of class reference using
13172         mangle_class_field.
13173         (push_class_static_dummy_field): Likewise.
13174
13175 Sun May 17 12:52:35 1998  Michael Tiemann <tiemann@cygnus.com>
13176
13177         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
13178         of assigning to TREE_CODE.  The latter method exploits a feature
13179         of GCC that is not ANSI compliant.
13180
13181 Thu May 12 13:44:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13182
13183         * decl.c (pushdecl_force_head): New function.
13184         (pushlevel): Removed conditional printf.
13185         (complete_start_java_method): Don't enter local variable scope if
13186         function is compiled from source code.
13187         * expr.c: parse.h now included
13188         (java_lang_expand_expr): New function.
13189         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
13190         printf. Terminate buffer when doing directories.
13191         * jcf-parse.c (parse_source_file): Call lang_init_source before
13192         parsing and before code generation.
13193         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
13194         use printf if the macro is defined.
13195         * lang.c (lang_init): Install lang_expand_expr hook on
13196         java_lang_expand_expr.
13197         (java_dummy_print): New function.
13198         (lang_init_source): New function.
13199         * lex.c (java_lex): Remember location of an opening brace at the
13200         second nesting level.
13201         (java_is_eol): Unget character seen after a CR if it is EOF.
13202         * parse.h: Now includes lex.h
13203         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
13204         printf if the macro is defined.
13205         (expand_start_java_method, build_expr_block, enter_block,
13206         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
13207         New static function declarations.
13208         (pushdecl_force_head): New extern function declaration.
13209         (INCOMPLETE_TYPE_P): New macro.
13210         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
13211         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
13212         BLOCK_EXPR_ORIGIN): New macros.
13213         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
13214         DECL_SOURCE_LINE_LAST): New macros.
13215         (struct parser_ctxt): Removed field current_method_decl, redundant
13216         with the field current_function_decl. Added fields
13217         first_ccb_indent1 and pending_block.
13218         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
13219         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
13220         tagged <node>
13221         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
13222         (compilation_unit:): Cosmetic on sub rule.
13223         (type_declaration:): Cosmetic on sub rules. Added an error rule.
13224         (variable_initializer:): Installed default rule on expression:.
13225         (method_declaration:): method_header: starts a new
13226         method. method_body: installs the function body, absorbs blocks
13227         emitted for temporary variable scopings, pops function's body block
13228         and merges function's last statement lineno in DECL_SOURCE_LINE.
13229         (method_body:): Installed default rules.
13230         (block:): Call enter_block when an opening brace is seen.  Absorb
13231         scoping blocks and call exit_block when a closing brace is seen.
13232         (block_statement:): Cosmetic changes.
13233         (method_invocation:): Create WFL around CALL_EXPR node.
13234         (patch_stage): Added comment around definition.
13235         (method_header): Try to use first_ccb_indent1 as the first line of
13236         the method, so BP debug info are emitted at the first opening
13237         brace of the function. If the function has no body, use the
13238         location of the function's name. Override currently defined method
13239         name with the matching WFL so we can point redefinition errors
13240         using the location where the function's name was declared.
13241         (check_abstract_method_header): Interprets DECL_NAME as an
13242         identifier or as a WFL, accordingly.
13243         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
13244         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
13245         location and name information out of it and reinstall DECL_NAME to
13246         its original identifier node value.
13247         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
13248         function's source code).
13249         (read_import_dir): Test the value returned by find_class and issue
13250         a fatal accordingly.
13251         (declare_local_variables): Push a new block for the scope of the
13252         new variable(s) if code has been already generated at that nesting
13253         level. Pinpoint redefinition errors using the variable id
13254         WFLs. Generate initialization code if necessary. If the variable
13255         type is incomplete, register a patch on its decl.
13256         (source_start_java_method): Rewritten. Define a new block for the
13257         function's parameters. Build parameter decl out of function's
13258         arguments and register them for a patch if their types are
13259         incomplete.
13260         (expand_start_java_method): Includes the part of
13261         source_start_java_method that was pushing the parameter decls and
13262         completing the method start code.
13263         (source_end_java_method): Removed call the expand_end_bindings and
13264         poplevel (already taken care of). Reinstall function's arguments
13265         and get function's last line of code before calling
13266         expand_function_end.
13267         (java_method_add_stmt): New comment before the function's
13268         code. Complement the second operand of the current COMPOUND_EXPR
13269         if necessary.
13270         (java_complete_expand_methods): Don't generate debug info on line
13271         zero when expanding a generated constructor.
13272         (java_complete_expand_method): Set start and end line numbers for
13273         a artificially generated constructor to one and manually call
13274         enter_block and exit_block when defining it. For all methods:
13275         expand function's start calling the new expand_start_java_method
13276         and invoke java_complete_tree on the effective method's body, if
13277         any.
13278         (resolve_expression_name): Now use lookup_name_in_blocks to search
13279         local variable decls and print out an error when variables are
13280         undefined.
13281         (patch_method_invocation_stmt): Inserted comment before the
13282         function's code.
13283         (lookup_method_invoke): Chain method's arguments using chainon
13284         with the current arg list as a second argument. Inserted missing
13285         IDENTIFIER_POINTER when reporting an error on methods not found.
13286         (refine_accessible_methods_list): Don't retain constructors.
13287         (patch_arguments): Function removed.
13288         (java_complete_tree): Inserted comment before the function's
13289         code. New case for BLOCKs. Moved the WFL case a bit
13290         further. Complete function's arguments.
13291         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
13292         maybe_absorb_scoping_blocks): New functions.
13293
13294 Mon Apr 27 10:50:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13295
13296         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
13297         previously set.
13298         * jcf-parse.c (parse_source_file, java_error_count): New forward
13299         and extern declarations.
13300         (java_parse_abort_on_error): Macro moved.
13301         (jcf_parse_source): fatal called if fopen fails. Now calls
13302         parse_source_file.
13303         (parse_source_file): New parse_only parameter. Reflects the
13304         elimination of the second pass.
13305         (yyparse): parse_source_file called with argument set to 0.
13306         * jcf.h (JCF_ZERO): Sets java_source to zero.
13307         * lex.c (java_init_lex): pass argument is gone. Function modified
13308         to be called once during the analysis of a file.
13309         (java_unget_unicode): Fixed typo in fatal message.
13310         (java_get_line_col): Likewise.
13311         (java_lval): Likewise. String literals no longer built during
13312         second pass.
13313         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
13314         account.
13315         * parse.h (MODIFIER_WFL): New macro.
13316         (parse_check_super, parser_check_super_interface): Now return int.
13317         (parser_chain_incomplete_item, not_builtin_p,
13318         complete_method_decl): Declarations removed.
13319         (build_method_invocation_stmt, build_invoke): Renamed using the
13320         `patch' instead of `build'
13321         (register-incomplete_type, obtain_incomplete_type,
13322         java_complete_tree, java_complete_expand_method,
13323         unresolved_type_p, create_jdep_list): New function declarations.
13324         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
13325         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
13326         (jdep): New typedef on new struct _jdep.
13327         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
13328         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
13329         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13330         JDEP_RESOLVED_P): New macros.
13331         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
13332         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
13333         JDEP_VARIABLE): New enum values and jdep kinds.
13334         (jdeplist): New typedef on struct _jdeplist.
13335         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
13336         macros.
13337         (CALL_EXPR_PRIMARY): New macro.
13338         (struct parser_ctxt): Fields java_pass, current_method_decl,
13339         method_decl_list deleted. New field jdeplist.
13340         (INCOMPLETE_P): Macro deleted.
13341         * parse.y (single_type_import_declaration:): Removed pass switch.
13342         (type_import_on_demand_declaration): Likewise.
13343         (field_declaration:): Removed pass switch on all sub rules.
13344         (class_declaration:): Call the complete_class_decl removed on
13345         class_body rules.
13346         (method_declaration:): Removed second pass switch. No longer chain
13347         methods decl when method_header reduced.
13348         (method_header:): Sub rules no longer depend on pass switch.
13349         (method_declarator:): Likewise.
13350         (method_body:): Likewise.
13351         (abstract_method_declaration:): Likewise.
13352         (block_statement:): Likewise.
13353         (local_variable_declaration:): Likewise.
13354         (argument_list:): Likewise.
13355         (method_invocation:): Likewise. Call to build_method_invocation_stmt
13356         removed. Partial CLASS_EXPR tree node built instead.
13357         (postfix_expression:): Removed pass switch on all sub rules.
13358         (java_pop_parser_context): Free classd_list content.
13359         (yyerror): Call obstrack_grow0 to finalize error message.
13360         (check_class_interface_creation): Comment modified to reflect new
13361         returned value meaning. Removed second pass switch. Return 1 if an
13362         error was found, 0 otherwise. Adjust pointer on filename if a
13363         leading path separator was found.
13364         (maybe_create_class_interface_decl): Removed first pass switch
13365         when linking the class decl to the class_list. Install a new
13366         jdep_list for the class.
13367         (add_superinterfaces): List of unresolved interfaces is
13368         gone. Unresolved interfaces are directly added to the current
13369         dependencies list.
13370         (create_interface): Second pass shortcut removed.
13371         ctpx->modifier_ctx access through MODIFIER_WFL.
13372         (create_class): Second pass shortcut removed. Call to
13373         register_incomplete_type replaces the call to
13374         parser_chain_incomplete_item.
13375         (complete_class_decl): Function removed.
13376         (duplicate_declaration_error): New way of retrieving redeclared
13377         item type.
13378         (register_fields): Call to lookup_modifier_cl replaced by
13379         MODIFIER_WFL. New way of handling unresolved type, using
13380         unresolved_type_p and obtain_incomplete_type.
13381         register_incomplete_type replaces call to parser_chain_incomplete_item.
13382         (patch_stage): New static global variable.
13383         (method_header): New way of handling unresolved type, using
13384         unresolved_type_p and obtain_incomplete_type. patch_stage used to
13385         indicates that the method decl needs to be patched.
13386         (check_abstract_method_header): Call to lookup_modifier_cl
13387         replaced by MODIFIER_WFL.
13388         (method_declarator): Incomplete argument type are registered
13389         calling register_incomplete_type. Patch on the declared method is
13390         issued in that case.
13391         (unresolved_type_p): New function.
13392         (parser_check_super_interface): New comment to reflect function's
13393         modified returned type (int). Function and has a new argument
13394         this_wfl. Call to parse_error_context uses this_wfl instead of
13395         relying on lookup_cl.
13396         (parser_check_super): Comment reflects function's new returned
13397         type (int). Function returns nonzero value on error.
13398         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
13399         register_incomplete_type, jdep_resolve_class): New functions to
13400         handle incomplete types in declarations.
13401         (java_complete_class): Rewritten to work with the new incomplete
13402         type handling scheme.
13403         (complete_class_report_errors): Likewise.
13404         (complete_method_decl): Removed: it jobs is now handled by
13405         java_complete_class.
13406         (do_resolve_class): Class loaded in not already loaded and not
13407         found in Java source code.
13408         (java_check_regular_methods, java_check_abstract_methods): Don't
13409         call complete_method_decl anymore.
13410         (lookup_modifier_cl, not_builtin_p): Functions deleted.
13411         (read_import_dir): Got rid of the pass number dependency.
13412         (declare_local_variables): New handling of unresolved types (patch
13413         issued).
13414         (source_start_java_method): New parameter level. Function called
13415         with level set to 1 when argument types are potentially
13416         unresolved.  Called to complete the job with level set to 2 once
13417         types are complete.
13418         (source_end_java_method): Call to permanent_allocation
13419         removed. Waiting to be replaced by a more suitable obstack
13420         management.
13421         (java_complete_expand_methods, java_complete_expand_method,
13422         java_expand_finals): New functions.
13423         (build_method_invocation_stmt): Renamed
13424         patch_method_invocation_stmt. Extracts function call expression
13425         (wfl) and arguments (args) from CALL_EXPR tree operands.
13426         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
13427         call. Patch the function and argument operand of the CALL_EXPR
13428         tree argument.
13429         (patch_argument, java_complete_tree): New functions.
13430
13431 Mon Apr 20 18:26:57 1998  Per Bothner  <bothner@cygnus.com>
13432
13433         Recover from missing fields and methods (i.e. error instead of fatal).
13434         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
13435         * expr.c (expand_invoke):  Recover from missing method.
13436         (expand_java_field_op):  Recover from missing field.
13437         Inline references to java.lang.{Integer,Char,...}.TYPE.
13438         * typeck.c (get_type_from_signature), java-tree.h:  New function.
13439         * class.c (add_method):  Use get_type_from_signature.
13440         (build_class_ref):  Handle a class that was not found.
13441         * typeck.c (convert):  Handle conversion to pointers (for convenience).
13442         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
13443         instead of lookup_field to handle missing fields.
13444
13445         * jcf-parse.c (process_zip_dir):  Set java_source.
13446
13447 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
13448
13449         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
13450
13451 Tue Apr 14 15:59:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13452
13453         * jcf-parse.c (load_class): Don't change input_filename before
13454         calling jcf_parse_source (but still do it before calling
13455         jcf_parse).
13456         (jcf_parse_source): Assign input_filename after having saved the
13457         parser context.
13458         * lex.c (java_init_lex): Chain a WFL node to the import on demand
13459         list. ctxp->modifier_ctx zeroed according to its new
13460         definition. ctxp->filename initialized. Removed
13461         JAVA_MODIFIER_CTX_UNMARK.
13462         (java_unget_unicode): Update the character based column position.
13463         (java_allocate_new_line): ref_count not used anymore. Always free
13464         ctxp->p_line. Initialize c_line->char_col to 0.
13465         (java_get_unicode): Update the character based column position.
13466         (java_lex): Use ctxp->elc to store current position in source
13467         file, at the beginning of the parsed token. Set modifier_ctx entry
13468         corresponding to the parse modifier to a WFL node. Return a WFL
13469         node when an identifier is parsed.
13470         (java_lex_error): Now uses ctxp->elc to store current position in
13471         source.
13472         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
13473         * lex.h (build_wfl_node): New function definitions.
13474         (struct java_line): ref_count and next fields are gone. New field
13475         char_col.
13476         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13477         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
13478         (JAVA_COLUMN_DELTA): New macro.
13479         (java_lc): New typedef on new struct _java_lc.
13480         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
13481         (parse_error_context, parse_warning_context): Changed prototypes.
13482         (java_get_line_col): Added as an available global function.
13483         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
13484         (IC_DECL): Replaced by macro IC_TYPE
13485         (DEPEND_WFL): New macro.
13486         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
13487         wrong modifier.
13488         (exit_java_complete_class): Removed a commented out statement.
13489         (struct parser_ctxt): Added comments on fields. modifier_ctx is
13490         now an array of tree nodes. Deleted fields line_list and
13491         e_line. New field elc, to replace e_line.
13492         * parse.y (array_type:): Build WFL node.
13493         (qualified_name:): Build a single WFL node out of two. Retain
13494         the location information of the first node in the resulting node.
13495         (package_declaration:): Use package name as a WFL node
13496         (single_type_import_declaration:): Use imported name as a WFL node.
13497         (type_import_on_demand_declaration:): Use root of the imported
13498         packages as a WFL node.
13499         (field_declaration:): Removed unused local variable cl.
13500         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
13501         (yyerror): New static elc. Removed static error_line, error_pos.
13502         New local code_from_source. Save ctxp->elc into elc at the first
13503         pass. Call java_get_line_col to get a string of the line where
13504         the error occurred.
13505         (debug_line): Removed static function.
13506         (parse_error_context, parse_warning_context): Parameter cl is now
13507         a WFL node. Use its value to initialize ctxp->elc.
13508         (redefinition_error): Parameter cl is now a WFL node.
13509         (parse_add_interface): New parameter wfl. No longer call
13510         lookup_cl, use wfl instead.
13511         (check_class_interface_creation): Parameter cl is now a WFL node.
13512         (maybe_create_class_interface_decl): Likewise.
13513         (add_superinterfaces): New function.
13514         (create_interface): Removed local cl, node, super_decl,
13515         super_decl_type.  Function now uses id as a WFL node. Better
13516         warning/error report on obsolete or forbidden mix of
13517         modifiers. Now calls add_superinterfaces to register interfaces.
13518         (create_class): Removed local cl, node. Local variable id is used
13519         as a WFL node. Better error report on forbidden modifier
13520         mix. Uses add_superinterfaces to register interfaces.
13521         (find_field): Argument cl is now a WFL node. Now store the WFL
13522         node of a fields that needs to be checked for their
13523         initialization.
13524         (method_header): Local variable node non longer used. Local
13525         variable id replaces cl.
13526         (check_modifiers_consistency): Local variable cl is now a WFL
13527         node.
13528         (method_declarator): Local variable cl replaced by parameter id.
13529         (parser_qualified_name): Now uses parameter name as a WFL node.
13530         (parser_check_super_interface): New parameter wfl, for achieve
13531         greater accuracy during error reports.
13532         (parser_chain_incomplete_item): New parameter named location. Used,
13533         along the decl, to construct the incomplete item node.
13534         (java_complete_class): resolve_class now uses WFL node extracted
13535         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
13536         where appropriate.
13537         (complete_method_decl): Unresolved function's argument types are WFL.
13538         (resolve_class): Parameter cl is now a WFL node.
13539         (resolve_and_layout): Likewise.
13540         (do_resolve_class): Likewise. Try first to use cl and then do the
13541         lookup on the decl when calling check_pkg_class_access.
13542         (complete_class_report_errors): Use IC_TYPE in place of
13543         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
13544         instead of doing a lookup over the decl.
13545         (java_check_final): Use WFL info from field tree list.
13546         (lookup_cl): Rewritten and returns a statically defined WFL node.
13547         (lookup_modifier_cl): Now uses information from WFL nodes.
13548         (process_imports): Likewise.
13549         (read_import_dir): name and cl arguments replaced by a single WFL
13550         node. Function modified accordingly.
13551         (find_in_imports_on_demand): Now uses WFL node.
13552         (check_pkg_class_access): cl argument is now a WFL node.
13553         (declare_local_variables): Fixed to use WFL nodes.
13554         (resolve_expression_name): Likewise.
13555         (build_method_invocation_stmt): name_combo argument renamed
13556         wfl. Function modified to use WFL nodes.
13557         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
13558         (lookup_method_invoke): cl is now a WFL node. Added missing
13559         IDENTIFIER_POINTER to class type decl name.
13560
13561 Tue Apr 14 15:23:29 1998  Dave Brolley  <brolley@cygnus.com>
13562
13563         * lang.c (init_parse): Now returns char* containing the filename.
13564
13565 Fri Apr 10 11:36:04 1998  Per Bothner  <bothner@cygnus.com>
13566
13567         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
13568
13569         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
13570         * class.c (make_class_data):  If flag_assume_compiled, initial class
13571         state is CSTATE_PREPARED; make superclass and interfaces direct
13572         references, rather than constant pool indexes.
13573
13574 Thu Apr  9 16:10:56 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13575
13576         * parser.y: Include flags.h. Removed debug variable pl.
13577         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
13578         (block:): Likewise.
13579         (labeled_statement_nsi:): Generate debug info when reducing
13580         expression_statement:.
13581         (check_pkg_class_access): get_access_flags_from_decl invokation
13582         fixed for new CLASS_* flags location.
13583         (source_end_java_method): Save/restore parser context when
13584         entering/leaving this routine. Restore lineno to its right value
13585         before calling expand_end_bindings.
13586         (build_method_invocation_stmt): build_invoke called with the
13587         current line information.
13588         (build_invoke): New argument cl. Wrap the function call around a
13589         wfl node.
13590         (refine_accessible_methods_list): Changed comment, removed
13591         unnecessary code.
13592         * parse.h: Fixed typo in comments.
13593         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
13594         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
13595         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
13596         parser_ccb_indent.
13597         * lex.c (java_lex): Record the last closing curly bracket of a
13598         function.
13599         * jcf-parse.c (jcf_parse_source): Now calls
13600         java_check_methods. Clarified comment, fixed typo.
13601
13602 1998-04-09  Dave Brolley  <brolley@cygnus.com>
13603
13604         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
13605         (finish_parse): Expose for non USE_CPPLIB builds.
13606
13607 Wed Apr  8 13:06:23 1998  Jeffrey A Law  (law@cygnus.com)
13608
13609         * lang.c (lang_print_xnode): New function.
13610
13611 Fri Apr  3 13:22:41 1998  Per Bothner  <bothner@cygnus.com>
13612
13613         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
13614         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
13615         used to build a class's dispatch table.
13616         (make_class_data):  Generate dispatch table if flag_assume_compiled.
13617         Set dtable of class object to address of class_dtable_decl.
13618
13619         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
13620         be volatile and have side effects - generates better code.
13621
13622         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
13623         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
13624
13625         * expr.c (expand_invoke):  If class is final, method is
13626         effectively final, so can call it directly.
13627
13628         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
13629
13630         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
13631
13632 Thu Mar 19 16:59:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13633
13634         * parse.y (build_method_invocation_stmt): Removed extra argument
13635         to build_invoke.
13636
13637 Mon Mar 16 17:25:19 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13638
13639         * expr.c (dtable_indent): Now static global.
13640         (expand_invoke): Now call invoke_build_dtable and
13641         build_invokevirtual.
13642         (invoke_build_dtable, build_invokevirtual): New functions.
13643         * jcf-io.c (find_class): Defer issuing a warning by setting
13644         jcf->outofsynch to 1.
13645         * jcf-parse.c (jcf_out_of_synch): New function.
13646         (load_class): Test this_jcf.outofsynch flag and call
13647         jcf_out_of_synch accordingly.
13648         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
13649         comment indentation.
13650         * lex.c (java_get_unicode): Fixed code indentation.
13651         (java_lex): Create string literal. Fixed typo. Removed several
13652         premature obstack_free.
13653         * parse.h: New enums for name resolution and invocation mode.
13654         (struct qualification): New data structure.
13655         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
13656         (do_resolve_class, build_method_invocation_stmt,
13657         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
13658         debug_line, identical_subpath_p, invocation_mode,
13659         refine_accessible_methods_list, build_invoke,
13660         lookup_method_invoke): New functions declared.
13661         (build_invokevirtual, invoke_build_dtable, match_java_method,
13662         build_field_ref, jcf_out_of_synch): New references to external
13663         functions.
13664         (struct parse_ctxt): Removed artificial_constructor field.
13665         * parse.y: (array_type:): Type defined for this rule.
13666         (class_type:): Installed default rule for interface_type:.
13667         (array_type:): Now build Java array type.
13668         (qualified_name:): Now use obstack_grow0.
13669         (method_declaration:): Skip the artificial constructor added to
13670         the list, if any.
13671         (abstract_method_declaration:): Execute the code only during pass 1.
13672         (block:): Installed default rule in block_statements:.
13673         (block_statement:): Add the statement to the method during pass 2.
13674         (statement_expression): Installed default rule for
13675         method_invocation:.
13676         (argument_list:): Added code to build the argument list.
13677         (method_invocation:): Added call to create the method invocation
13678         node.
13679         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
13680         (debug_line): New function for debug.
13681         (complete_class_decl): No longer do something during pass 1.
13682         (method_header): Use BUILD_PTR_FROM_NAME.
13683         (parser_qualified_classname): Use obstack_grow0. Removed bogus
13684         obstack_free.
13685         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
13686         function's main comment.
13687         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
13688         classes.
13689         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
13690         (resolve_class): Now works with arrays.
13691         (do_resolve_class, resolve_and_layout): New functions.
13692         (java_check_regular_methods): Reverse method list before and after
13693         having processed it. No longer set ctxp->artificial_constructor.
13694         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
13695         accordingly. Fixed typo in issued error message. Now use
13696         obstack_grow0.
13697         (find_in_imports_on_demand): Now use obstack_grow0.
13698         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
13699         (source_end_java_method): Call expand_expr_stmt instead of
13700         expand_expr. Calls it before calling expand_function_end.
13701         (java_method_add_stmt): Do nothing if errors were found during
13702         parsing.
13703         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
13704         (build_method_invocation_stmt, build_invoke, invocation_mode,
13705         lookup_method_invoke, refine_accessible_methods_list,
13706         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
13707         New functions.
13708         * typeck.c (build_java_signature): Properly end method signature
13709         if return type skipped.
13710         (match_java_method): New function.
13711
13712 Mon Mar 16 10:40:47 1998  Per Bothner  <bothner@cygnus.com>
13713
13714         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
13715
13716 Wed Feb 25 08:55:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13717
13718         * expr.c (build_invoke_non_interface): New function.
13719         (methods_ident, ncode_ident): Now static globals.
13720         (expand_invoke): Use build_invoke_non_interface.
13721         * java-tree.h (struct lang_decl): New field function_decl_body.
13722         (DECL_FUNCTION_BODY): New macro.
13723         * jcf-parse.c (jcf_parse_source): Deeper check before setting
13724         CLASS_FROM_SOURCE_P.
13725         (parse_source_file): Fixed typos. Call java_layout_parsed_class
13726         before starting pass 2. Call to java_generate_parsed_class replaced
13727         by java_register_parsed_class.
13728         * lex.c: Fixed typo in header. Some line width related formating.
13729         * lex.h: Some line width related formating.
13730         * parse.h (source_end_java_method, resolve_expression_name,
13731         complete_class_decl, maybe_create_class_interface_decl,
13732         check_class_interface_creation): New static function declarations.
13733         (java_layout_parsed_class, java_method_add_stmt): New function
13734         declarations.
13735         (struct parser_ctxt): Field mark_class_generate removed. New
13736         fields class_list and artificial_constructor.
13737         * parse.y: Fixed typo in header.
13738         (class_declaration:): Call complete_class_decl when class body
13739         parsed.
13740         (method_declaration:): Call source_end_java_method in pass 2 when
13741         the method body is defined.
13742         (postfix_expression:): Do expression name resolution on sub-rule
13743         name during pass 2.
13744         (create_class, create_interface): Merged common pieces.
13745         (check_class_interface_creation, maybe_create_class_interface_decl):
13746         New functions.
13747         (complete_class_decl): New function.
13748         (register_fields): Fixed line width related typo.
13749         (method_header): Correctly skip first argument when fixing
13750         argument line. Changed the loop.
13751         (java_check_circular_reference): Now use ctxp->class_list.
13752         (java_complete_class): Removed start/stop marking.
13753         (java_check_regular_methods): Now takes a class decl as an
13754         argument.  Add default constructor if none were encountered.
13755         (java_check_methods): Now use ctxp->class_list. Changed call to
13756         java_check_regular_methods.
13757         (source_start_java_method): Set DECL_ARG_TYPE for each function
13758         arguments.
13759         (source_end_java_method, java_method_add_stmt): New functions.
13760         (java_generate_parsed_class): No longer exists.
13761         (java_layout_parsed_class, java_register_parsed_class): New functions.
13762         (resolve_expression_name): New function.
13763
13764 Thu Feb 12 11:54:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13765
13766         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
13767         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
13768         until pass initializations are done. Call read_import_dir with
13769         pass set to 0.
13770         * parse.h: (lookup_modifier_cl): New function declared.
13771         (INTERFACE_FIELD_MODIFIERS): New macro.
13772         (OBSOLETE_MODIFIER_WARNING): New macro.
13773         * parse.y: (register_fields): Class type and current field name in
13774         local variables. Check modifier(s) if adding field(s) to an interface.
13775         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
13776         and report errors using the faulty modifier line context.
13777         (lookup_modifier_cl): New function.
13778         (read_import_dir): Detect and report default import processing
13779         failure.
13780
13781 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
13782
13783         Add a pair of -fassume-compiled/-fno-assume-compiled options.
13784         * class.c (is_compiled_class): Return 1 after making sure it
13785         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
13786         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
13787         * java-tree.h (flag_assume_compiled): Add decl.
13788         * lang.c (lang_f_options): Add the flag.
13789         (flag_assume_compiled): Add decl, default to 0.
13790
13791 Wed Feb 11 11:27:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13792
13793         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
13794         (is_compiled_class): Likewise.
13795         (layout_class): Likewise.
13796         (layout_class): Detect and lay out classes defined in source code.
13797         (interface_of_p, add_interface_do, may_add_interface): New
13798         function.
13799         (add_interface): Now use add_interface_do.
13800         (add_method_1): New function.
13801         (add_method): Now use add_method_1.
13802         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
13803         (complete_start_java_method): New function.
13804         (start_java_mehod): Now call complete_start_java_method.
13805         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
13806         (expand_invoke): Likewise and fixed typo.
13807         *gjava.c: (print_super_field): Use new argument to find_class
13808         DO_CLASS_FILE.
13809         (main): Likewise.
13810         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
13811         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
13812         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
13813         IDENTIFIER_NODE.
13814         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
13815         (add_method_1, push_class): New prototypes.
13816         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
13817         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
13818         directory where the class was found.
13819         (find_class): New argument DO_CLASS_FILE. Function find_class
13820         modified accordingly.
13821         *jcf-parse.c: (fix_class_path): New function.
13822         (load_class): Use new VERBOSE argument. load_class now finds and
13823         loads/parses .class/.java files. Save read_state of current_jcf
13824         if necessary.
13825         (java_parser_abort_on_error): New macro.
13826         (jcf_parse_source, parse_source_file): New function.
13827         (jcf_parse): Fixed typo.
13828         (yyparse): Call parse_source_file () only.
13829         (process_zip_dir): Fixed typo, fix zdir->filename_length when
13830         writing the real class name back in the zip directory entry.
13831         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
13832         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
13833         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
13834         (find_class): Prototype fixed.
13835         *lex.c: Added 1998 time stamp.
13836         Removed all static global variables, moved into the parser
13837         context data structure.. Now include unistd.h if SEEK_SET not
13838         defined.
13839         (java_init_lex): Rewritten.
13840         (java_sneak_unicode): Modified current unicode access in current line.
13841         (java_unget_unicode): Likewise.
13842         (java_allocate_new_line): New allocation management.
13843         (java_read_char): Modified access and storage of unget_utf8_value.
13844         New way of processing current unicode.
13845         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
13846         (java_get_unicode): Now use the parser context.
13847         (java_lineterminator): Likewise.
13848         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
13849         of the reentrant parser implementation. Function now use the
13850         parser context data structure and java_lval. Fixed production of
13851         the float and double constant "out of range" error message. Fixed
13852         obstack use. Return integer value when hitting a modifier. Now
13853         return type for TRUE, FALSE and other predefined types. Return
13854         identifier as a TREE_LIST list containing the current line context
13855         as the TREE_VALUE sub-node.
13856         (java_unicode_2_utf8): Fixed typo in declaration.
13857         (java_lex_error): Now use the parser context data structure.
13858         *lex.h: Added 1998 time stamp.
13859         (struct java_line): New fields ref_count and next.
13860         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
13861         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
13862         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
13863         *parse.h: Added 1998 time stamp.
13864         (java_parse_source_file): Renamed from parse_source_file.
13865         (YYERROR_NOW, YYNOT_TWICE): Fixed.
13866         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
13867         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
13868         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
13869         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
13870         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
13871         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
13872         (struct parser_ctxt): New data structure to keep the parser context.
13873         *parse.y: Added 1998 time stamp, got rid of static global variables.
13874         (java_error_count, ctxp): New global variables.
13875         (%union): New value field.
13876         (numeric_type, integral_type): Rules removed.
13877         (primitive_type): Rule defined to handle integral, float, double and
13878         boolean types.
13879         (qualified_name, package_declaration,
13880         single_type_import_declaration, type_import_on_demand_declaration,
13881         modifiers, class_declaration, super, interfaces,
13882         interface_type_list, class_body, field_declaration,
13883         field_declaration, variable_declarators, variable_declarator,
13884         variable_declarator_id, method_declaration, method_header,
13885         formal_parameter_list, formal_parameter, method_body, block,
13886         static, interface_declaration, extends_interfaces,
13887         abstract_method_declaration, local_variable_declarators): Rules now
13888         define actions.
13889         (force_error, do_warning): New global statics.
13890         (push_parser_context, parser_context_save_global,
13891         parser_context_restore_global, pop_parser_context): New functions.
13892         (yyerror): Now uses the global parser context. Fixed use of obstack.
13893         (parse_error, parse_error_context, parse_warning_context,
13894         java_accstring_lookup, redefinition_error, check_modifiers,
13895         parser_add_interface, create_interface, create_class, find_field,
13896         duplicate_declaration_error, register_fields, method_header,
13897         check_modifiers_consistency, check_abstract_method_header,
13898         method_declarator, parser_qualified_classname,
13899         parser_check_super_interface, parser_check_super,
13900         parser_chain_incomplete_item, java_check_circular_reference,
13901         layout_class_from_source, java_complete_class,
13902         complete_method_decl, resolve_class, complete_class_report_errors,
13903         java_check_final, check_method_redefinition,
13904         java_check_regular_methods, java_check_abstract_methods,
13905         java_check_methods, lookup_java_interface_method2,
13906         lookup_java_method2, lookup_cl, find_name_in_single_imports,
13907         process_imports, find_in_imports, read_import_entry,
13908         read_import_dir, find_in_imports_on_demand,
13909         check_pkg_class_access, not_builtin_p, declare_local_variables,
13910         source_start_java_method, java_generate_parsed_class): New
13911         functions.
13912         *typeck.c: (signature_include_return): New global variable.
13913         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
13914         to add the function returned type in the signature.
13915
13916 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
13917
13918         * jcf-io.c (open_in_zip): Use strncmp and LEN.
13919
13920 Thu Jan 29 16:12:13 1998  Dave Brolley  <brolley@cygnus.com>
13921
13922         * Make-lang.in (java.info): Added.
13923         (java.install-info): Added
13924
13925 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
13926
13927         * Makefile.in (clean): Also remove java/parse.c.
13928
13929 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
13930
13931         Add a pair of -fbounds-check/-fno-bounds-check options.
13932         * lang.c (lang_decode_option): Add code to grok arguments.
13933         (flag_bounds_check): Add decl.
13934         (lang_f_options): New array w/ the option in it.
13935         * java-tree.h (flag_bounds_check): Add decl.
13936         * lang-options.h: New file.
13937         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
13938         of a static macro value.
13939         (JAVA_ARRAY_EXCEPTION): Delete macro.
13940
13941 Fri Jan 23 14:19:47 1998  Per Bothner  <bothner@cygnus.com>
13942
13943         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
13944         * expr.c (build_anewarray):  Add missing promote_type.
13945
13946 Thu Jan 22 17:43:45 1998  Per Bothner  <bothner@cygnus.com>
13947
13948         Add array types with known length to optimize bounds checking.
13949         * typeck.c (build_java_array_type):  Take length parameter.
13950         (java_array_type_length, build_prim_array_type):  New functions.
13951         * java-tree.h:  Update for new functions.
13952         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
13953         * class.c:  Use build_prim_array_type.
13954         * expr.c (can_widen_reference_to):  Handle known-length array types.
13955         (verify_jvm_instructions):  Keep track of integer push instructions
13956         followed by newarray/anewarray, so we can build known-length arrays.
13957         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
13958         (java_array_data_offset):  New function.
13959         (build_java_array_length_access):  New function.  Optimize if constant.
13960         (build_java_arrayaccess):  Constant fold bounds check.
13961         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
13962         (build_newarray, build_anewarray):  New functions.
13963         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
13964         * verify.c (merge_types):  Handle known-lengh array types.
13965
13966 Mon Jan 19 13:09:25 1998  Per Bothner  <bothner@cygnus.com>
13967
13968         * expr.c (expand_byte_code):  Fix performace bug, which caused
13969         searching linenumber_table to be linear rather than constant.
13970
13971 Fri Dec 12 19:18:42 1997  Per Bothner  <bothner@cygnus.com>
13972
13973         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
13974
13975         * decl.c, java-tree.h (soft_fmod_node):  New global.
13976         * decl.c (init_decl_processing):  Define __builtin_fmod.
13977         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
13978         using __builtin_fmod.
13979
13980 Thu Dec  4 13:22:59 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13981
13982         * keyword.h: New file, output of keyword.gperf as processed by
13983         gperf.
13984         * lex.c (java_lex_init): Initialize java_error_flag.
13985         * parse.c (YYERROR_NOW): Uses java_error_flag.
13986         * parse.y: New static java_error_flag. Useless definition of
13987         buffer_error gone.
13988         * parse.y (java_error): Portable error recovery using
13989         java_error_flag (not yet completely tuned).
13990
13991 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
13992
13993         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
13994
13995 Wed Dec  3 18:37:42 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13996
13997         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
13998         (parse.c, lex.c, keyword.h): New rules for Java source code
13999         front-end.
14000         * parse.c: Renamed into jcf-parse.c.
14001         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
14002         * keyword.gperf: New file, Java keywords.
14003         * parse.y: New file, Java language grammar.
14004         * parse.h: New file, Java language grammar definitions.
14005         * lex.c: New file, Java language lexer.
14006         * lex.h: New file, Java language lexer definitions.
14007
14008 Wed Dec  3 17:00:17 1997  Per Bothner  <bothner@cygnus.com>
14009
14010         * decl.c (clinit_identifier_node), java-tree.h:  New global.
14011         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
14012         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
14013         * expr.c (expand_java_field_op):  Check for invalid assignment
14014         to final field.
14015
14016         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
14017
14018 Mon Oct 27 17:46:36 1997  Per Bothner  <bothner@cygnus.com>
14019
14020         * verify.c (verify_jvm_instructions):  When processing a handler,
14021         attempt to set the current_subr to the right value.
14022         (More complicated code combines Sep 17 and Oct 22 versions.)
14023
14024 Fri Oct 24 11:36:54 1997  Per Bothner  <bothner@cygnus.com>
14025
14026         * class.c (push_class):  Figure out (guess) name of source file.
14027         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
14028         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
14029         (parse_class_file):  Change return type from int to void.
14030         Call debug_start_source_file/debug_end_source_file.
14031
14032         * expr.c (build_java_binop):  Fix masking 2nd operand.
14033         * decl.c (init_decl_processing):  Set sizetype first.
14034
14035 Wed Oct 22 19:39:05 1997  Per Bothner  <bothner@cygnus.com>
14036
14037         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
14038         (Revert Sep 17 change.)
14039
14040 Tue Oct 21 15:09:02 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14041
14042         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
14043         .class extension in their name and fix thing so we don't process
14044         them parse_zip_file_entries().
14045         (parse_zip_file_entries): Cleaned unused local variables.
14046
14047 Mon Oct 20 14:52:42 1997  Per Bothner  <bothner@cygnus.com>
14048
14049         * expr.c (can_widen_reference_to):  Allows equal array element types.
14050         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
14051         * jcf-dump.c (RET):  Get (and print) index.
14052
14053         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
14054         Promote element type to POINTER_TYPE.
14055
14056 Mon Oct 20 13:40:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14057
14058         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
14059         find_in_current_zip, jcf_figure_file_type): Moved from
14060         jcf-reader.c to parse.c.
14061         * zextract.c: (read_zip_archive): takes file_comment_length possible
14062         field into account.
14063
14064 Mon Oct 20 11:45:06 1997  Per Bothner  <bothner@cygnus.com>
14065
14066         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
14067
14068         * verify.c (merge_types):  Handle array types even better ...
14069
14070 Fri Oct 17 15:56:37 1997  Per Bothner  <bothner@cygnus.com>
14071
14072         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
14073
14074         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
14075         * class.c (make_class_data):  Don't build fields_decl if no fields.
14076         When building fields_decl, skip if DECL_ARTIFICIAL.
14077
14078         * expr.c (java_stack_swap):  Update stack_type_map.
14079         * verify.c (merge_types):  Handle array types better.
14080
14081 Wed Oct 15 18:09:45 1997  Per Bothner  <bothner@cygnus.com>
14082
14083         * class.c (add_field):  Don't promote short integral fields to
14084         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
14085         * expr.c (push_value):  Promote and convert short integral values.
14086
14087         * decl.c, java-tree.h (integer_two_node):  New constant node.
14088         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
14089
14090 Wed Oct 15 17:04:50 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14091
14092         * class.c (append_gpp_mangled_type): Use function argument
14093         unpromoted type to generate mangled name.
14094
14095 Mon Oct 13 16:52:55 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14096
14097         * constants.c (build_constant_data_ref): Now uses current_class
14098         instead of main_class.
14099         (build_constants_constructor): Now uses current_class instead of
14100         main_class.
14101         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
14102         of the global variable SeepZipFiles done here.
14103         * zextract.c (read_zip_archive): extra_field optional field taken
14104         into account while computing the position of the class file in the
14105         archive.
14106         * verify.c (verify_jvm_instructions): Use current_jcf to search
14107         the constant pool.
14108         * parse.c (load_class): First search for the class to load in the
14109         current zip file. Saves current_jcf (restored before returning
14110         from that function). Don't call JCF_FINISH in the class was found
14111         in the current ZIP file.
14112         (jcf_parse): If the class was found in the current ZIP file, save
14113         its tree_constant_pool (for later reuse).
14114         (parse_class_file): New function. Process each method defined in
14115         the current class and record the class as to be later registered.
14116         (yyparse): Rewritten. Figure the type of the current file and switch
14117         accordingly.
14118         * lang.c: New global variable current_jcf.
14119         (lang_init): Removed compiling_from_source test (done later, in
14120         yyparse). Removed call the jcf_parse ().
14121         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
14122         (typedef struct JCF): New fields seen_in_zip (to mark a class found
14123         in the current ZIP file) and zip_offset (offset to the class data in
14124         the current zip file).
14125         * jcf-reader.c: zipfile.h included.
14126         localToFile: New ZipFileCache static global variable
14127         (parse_zip_file_entries): New function. Browse the current ZIP
14128         file directory and process each class found.
14129         (process_zip_dir): New function. Register each class found in the
14130         ZIP file directory. The class aren't parsed but a valid JCF is
14131         link to each of them.
14132         (find_in_current_zip): New function. Search for a class in the
14133         current ZIP file directory. If found, prepare the class so that it
14134         can be loaded.
14135         (jcf_figure_file_type): New function. Examine the file structure
14136         to figure a class file, a ZIP file. If none of these categories are
14137         matched, a source file is assumed.
14138         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
14139         SeenZipFile: New global variable.
14140         (open_in_zip): Use zipmember's length to accelerate the search for
14141         a member. If zipmember was NULL and zip file successfully read,
14142         return 0.
14143         * java-tree.h: New global variable current_jcf declared.  Added
14144         declaration for current_constant_pool_tags, current_constant_pool_data,
14145         current_constant_pool_length, current_constant_pool_data_ref.
14146         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
14147         store the JCF of classes seen in a zip file) and tree *constant_pool
14148         (to save a loaded class constant pool). current_class declared here.
14149         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
14150         retrieve method_ref_constant.
14151         (PUSHC): java_push_constant_from_pool now uses current_jcf.
14152         (OBJECT): get_class_constant now uses current_jcf.
14153         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
14154         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
14155         (expand_invoke): Now uses current_class instead of main_class
14156         (build_class_init): Now uses current_class instead of main_class
14157         * class.c: New static global variable registered_class.
14158         (register_class): New function.
14159         (emit_register_class): Modified to use registered_class instead of
14160         main_class
14161         (is_compiled_class): Now take into account class seen in the archive.
14162
14163 Mon Oct  6 12:03:23 1997  Per Bothner  <bothner@cygnus.com>
14164
14165         * except.h:  Renamed to: java-except.h.
14166         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
14167         * except.c:  Add semi-working (commented out) implementation.
14168
14169         * expr.c (expand_iinc):  Add needed flush_quick_stack.
14170         * parse.c (set_source_filename):  New function.
14171         (give_name_to_class):  Set input_filename from package.classname.java.
14172
14173         * jcf-io.c (find_class):  Don't look first in ".".
14174
14175 Wed Oct  1 11:26:10 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14176
14177         * zextract.c (read_zip_archive): Now takes into account the
14178         extra_field field.
14179         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
14180
14181 Sat Sep 20 12:44:28 1997  Per Bothner  <bothner@cygnus.com>
14182
14183         * constants.c, java-tree.h (build_internal_class_name):  New function.
14184         (alloc_class_constant):  Re-implement using build_internal_class_name.
14185         * class.c (make_class_data):  Likewise.
14186         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
14187
14188 Wed Sep 17 13:15:23 1997  Per Bothner  <bothner@cygnus.com>
14189
14190         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
14191         to NULL before pushing an exception handler target.
14192
14193         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
14194         (java_stack_swap, java_stack_dup):  Re-write to be safe from
14195         clobbering registers.
14196         (build_class_init):  New function.
14197
14198 Wed Sep 17 11:02:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14199
14200         * typeck.c (build_java_array_type): Temporary use
14201         permanent_obstack to create the array 'length' field.
14202         * expr.c (lookup_label): Temporay use permanent_obstack to create
14203         label if not found.
14204         * class.c (push_super_field): Tempory use permanent_obstack.
14205
14206 Mon Sep 15 11:33:31 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14207
14208         * typeck.c (type_for_mode): Now handles double_type_node and
14209         float_type_node.
14210         * verify.c (verify_jvm_instructions): The instruction following
14211         the wide bytecode is checked. OPCODE_ret added to the list of
14212         wide.
14213
14214 Thu Sep 11 19:45:18 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14215
14216         * class.c (make_class): Temporary use permanent_obstack. Set the
14217         class CLASS_P field to 1.
14218         (push_class): Temporary use permanent_obstack.
14219         (set_super_info): Temporary use permanent_obstack.
14220         (add_method): Temporary use permanent_obstack, set
14221         METHOD_TRANSIENT().
14222         (add_field): Temporary use permanent_obstack. Sets
14223         FIELD_VOLATILE() and FIELD_TRANSIENT().
14224         (build_class_ref): Temporary use permanent_obstack if the class
14225         isn't compiled.
14226         (build_static_field_ref): Temporary use permanent_obstack when
14227         creating field's rtl.
14228         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
14229         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
14230         and fields. Function finalized, as far as flag handling.
14231         (push_class_static_dummy_field): Temporary use permanent_obstack.
14232         (emit_register_class): Force generation of class registration at
14233         -O3 or deeper.
14234         * decl.c (end_java_method): Call permanent_allocation() before
14235         returning.
14236         * expr.c (can_widen_reference_to): Added comment to interface
14237         handling, fixed typo.
14238         (lookup_field): Now uses CLASS_P() to correct FIXME
14239         (expand_invoke): Verification on public && !static &&
14240         !abstract moved into soft_lookupinterfacemethod (kaffe).
14241         Use Object class dtable if objectref is an array when expanding
14242         invokeinterface.
14243         (java_push_constant_from_pool): Temporary use permanent_obstack
14244         for CONSTANT_string
14245         * parse.c (get_ref_constant): Temporary use permanent_obstack to
14246         create constant references.
14247         (get_constant): Temporary use permanent_obstack to create constant.
14248         (load_class): Temporary use permanent_obstack to load class.
14249         (jcf_parse): Temporary use permanent_obstack to perform class
14250         layout.
14251         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
14252         (build_java_signature): Temporary use permanent_obstack.
14253         * verify.c: (verify_jvm_instruction): removed unnecessary verification
14254         on ACC_SUPER flag.
14255         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
14256         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
14257         (CLASS_P): Defined
14258
14259 Thu Sep 11 11:57:32 1997  Per Bothner  <bothner@cygnus.com>
14260
14261         * class.c (append_gpp_mangled_type):  Fix typo.
14262         (emit_register_class):  Use main_class to get class object, rather
14263         than looking for no-longer-existing static decl starting with _CL.
14264         * typeck.c (parse_signature_type):  Promote array element type
14265         if it is a RECORD_TYPE.
14266
14267 Wed Sep 10 16:09:23 1997  Per Bothner  <bothner@cygnus.com>
14268
14269         * class.c (push_class_static_dummy_field):  New function.
14270         (mangle_static_field):  New. Do G++-style mangling of static fields.
14271         (layout_class):  Mandle static fields here, not in add_field.
14272         (build_class_ref):  The class object is now a dummy static field.
14273         * decl.c (find_local_variable):  Look for best, instead of first match.
14274         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
14275         (build_java_athrow):  Don't check here if exception is Throwable.
14276         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
14277         (TYPE_USED):  Removed.  No longer used ...
14278         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
14279         * verify.c (push_pending_label):  New function.
14280         (push_pending_block):  Renamed to check_pending_block.
14281         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
14282         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
14283         re-checking possible handlers) after a store (less wasted work).
14284         Check for null handler (finally) before calling add_handler.
14285         Various changes to (finally?) correctly handle try/finally.
14286
14287 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14288
14289         * class.c: Include stdio.h.
14290
14291 Thu Sep  4 21:30:55 1997  Per Bothner  <bothner@cygnus.com>
14292
14293         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
14294         to make sure class is initialized before static/special invoke.
14295
14296         * verify.c (verify_jvm_instructions):  On a store instruction,
14297         call find_local_variable to force pre-allocation of decl and rtx.
14298         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
14299
14300 Wed Sep  3 16:13:23 1997  Per Bothner  <bothner@cygnus.com>
14301
14302         * class.c (build_class_ref):   Strip off "promoted_" if need be.
14303         (make_field_value): Call build_java_signature when needed.
14304         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
14305         * expr.c (build_java_athrow):  Don't push_value of exception.
14306         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
14307         match specification of [fd]cmp[lg] for NaNs.
14308         (expand_byte_code):  Add support for exception handler ranges.
14309         * except.c:  Add skeleton for EH code-generation.
14310         * verify.c (merge_types):  Treat all promoted integral types as equal.
14311         * constants.c (build_constants_constructor):  To force creation of
14312         current_constant_pool_data_ref, call build_constant_data_ref.
14313
14314         * javaop.def (lload):  Fix typo.
14315         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
14316
14317 Tue Sep  2 17:37:25 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14318
14319         * parse.c: Don't include function.h.
14320
14321 Wed Aug 27 18:33:04 1997  Per Bothner  <bothner@cygnus.com>
14322
14323         * except.[ch]:  New files.
14324         * Makefile.in (JAVA_OBJS):  Add except.o
14325         * expr.c:  Temporary warning about unimplemented exceptions.
14326         * verify.c:  Verify exception handlers.
14327
14328         * jcf-dump.c (disassemble_method):  Print exception table.
14329
14330 Wed Aug 27 13:26:58 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14331
14332         * expr.c (verify_jvm_instructions): Started a thorough
14333         verification of invoke* bytecodes.
14334         (expand_byte_code): flush quick stack if PC is the target of a
14335         branch.  and undef RET (conflicting with config/i386/i386.h).
14336         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
14337         used.
14338         (expand_invoke): Now handles invokeinterface and do more
14339         verification according to the bytecode.
14340         (lookup_field): Don't try to load the class if processing
14341         dtable_type.
14342         (can_widen_reference_to): Now handles interfaces.
14343         * decl.c (init_decl_processing): New global variable
14344         soft_lookupinterfacemethod_node, declared in java-tree.h.
14345         Call set_super_info on string_type_node.
14346         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
14347         defined.
14348         * class.c (set_super_info): Fills the CLASS_* flags according to
14349         access_flags.
14350         (get_access_flags_from_decl): Handles all class flags.
14351
14352 Tue Aug 26 18:54:34 1997  Per Bothner  <bothner@cygnus.com>
14353
14354         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
14355         * parse.c (yyparse):  Check for abstract method, and missing code.
14356         * expr.c (expand_byte_code):  Change interface.
14357         * lang.c (put_decl_node):  Print promoted types prettier.
14358         * verify.c (verify_jvm_instruction):  Change interface.
14359         Partial support for scanning exception table.
14360         For load instructions, handle promoted integral types.
14361
14362 Thu Aug 21 13:48:01 1997  Per Bothner  <bothner@cygnus.com>
14363
14364         * verify.c:  New file, with contents moved from expr.c.
14365         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
14366         * typeck.c (is_array_type_p):  Moved here from expr.c.
14367         * java-tree.h:  Add some now-needed function declarations.
14368         * Makefile.in (JAVA_OBJS): Added verify.o.
14369
14370 Wed Aug 20 14:34:34 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14371
14372         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
14373         METHOD_ABSTRACT flag.
14374
14375         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
14376         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
14377         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
14378
14379         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
14380         variables.
14381         (start_java_method): Hook for SYNCHRONIZED methods.
14382
14383         * expr.c (build_java_jsr, build_java_ret): New functions
14384         (JSR,PRE): New macros
14385         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
14386         (verify_jvm_instructions): tableswitch, lookupswitch,
14387         monitorenter, monitorexit, goto_w: verified.
14388         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
14389         (build_java_monitor): New function.
14390         (MONITOR_OPERATION): Modified to call build_java_monitor()
14391         (verify_jvm_instructions): Started a thorough verification of
14392         invoke* bytecodes.
14393
14394 Tue Aug 19 13:35:49 1997  Per Bothner  <bothner@cygnus.com>
14395
14396         Support verification of jsr/ret subroutines (used for try/finally).
14397         * decl.c (return_address_type_node):  New type node.
14398         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
14399         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
14400         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
14401         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
14402         TYPE_USED):  New macros for special types in type_map.
14403
14404         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
14405         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
14406         BCODE_JUMP_TARGET.
14407         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
14408
14409         * expr.c (can_widen_reference_to):  New function.
14410         (pop_type):  Use it.
14411         (merge_type_state):  Support handling start of subroutine.
14412         (push_pending_block):  Return char* error message, instead of calling
14413         fatal on an error.  Also handle subroutines.
14414         (verify_jvm_instructions):  Handle errors from push_poending_block.
14415         Support jsr and ret instructions.
14416
14417 Tue Aug 19 13:33:36 1997  Per Bothner  <bothner@cygnus.com>
14418
14419         * jcf-io.c (find_classfile):  Fix thinko.
14420         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
14421
14422 Tue Aug 12 20:14:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
14423
14424         * Makefile.in (BISON): Remove.
14425
14426 Thu Aug  7 23:08:24 1997  Per Bothner  <bothner@cygnus.com>
14427
14428         * Makefile.in:  Convert to autoconf.
14429         * config-lang.in (outputs):  Added java/Makefile.
14430
14431         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
14432         Rename cc1java to jc1.
14433
14434         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
14435         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
14436
14437         * class.c (class_depth):  Do load_class if needed.
14438
14439         Mostly better verification.
14440         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
14441         (init_decl_processing):  Change return type of soft_checkcast.
14442         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
14443         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
14444         lang_print_error):  New functions.
14445         (lang_init):  Set global hook print_error_function to lang_print_error.
14446         * expr.c:  In the type_map ptr_type_node is only used for null now.
14447         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
14448         (merge_types):  Dererence pointer to record types before comparing.
14449         (decode_newarray_type, merge_types):  On error just return NULL.
14450         (build_java_binop):  Add preliminary implementation (with warning)
14451         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
14452         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
14453         (expand_compare, expand_java_goto, expand_java_call):  Don't
14454         push_pending_block, since that only makes sense when verifying.
14455         (merge_type_state):  Different return codes.
14456         (push_pending_block):  A block may need to be verified more than once.
14457         (expand_byte_code):  Warn about unused code at code generation time.
14458         (verify_jvm_instruction):  Changed logic, since code may need to be
14459         re-verified if type-state has changed.  Also, better error handling.
14460         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
14461         Improve newarray, anewarray, ?aload, athrow,
14462         * java-tree.h (LABEL_CHANGED):  New macro.
14463
14464 Tue Aug  5 12:21:27 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14465
14466         * decl.c (soft_athrow_node): New global variable initialized.
14467         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
14468         * typeck.c (convert): Added support for REAL_TYPE.
14469         (convert_to_char): New function.
14470         (convert): Handle CHAR_TYPE.
14471         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
14472         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
14473         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
14474         promoted type.
14475         (verify_jvm_instructions): Added break a the end of bogus unop: label.
14476         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
14477         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
14478         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
14479         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
14480         to Use The Right Things.
14481         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
14482         compatible with INT. BOOLEAN is made equivalent to BYTE.
14483         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
14484         OPCODE_ifnonnull): Now supported.
14485         (build_java_athrow): New function.
14486
14487 Mon Aug  4 15:46:45 1997  Per Bothner  <bothner@cygnus.com>
14488
14489         Rename method name <init> to match G++ (and fix mangling).
14490         * class.c (layout_class):  Replace method name of <init> by class name.
14491         (make_method_value):  Do inverse renaming of constructor from <init>.
14492         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
14493         * typeck.c (lookup_java_constructor):  New function.
14494         * expr.c (expand_invoke):  If method_name is <init>, call
14495         lookup_java_constructor to find constructor.
14496
14497         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
14498
14499 Fri Aug  1 11:37:09 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14500
14501         * parse.c (get_class_constant): Modified to handle array "classes"
14502         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
14503         wide type.
14504         (convert): Modified to handle real type.
14505         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
14506         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
14507         variables declared.
14508         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
14509         soft_multianewarray, soft_newarray_node, soft_throw_node): New
14510         global variables initialized.
14511         (find_local_variable): Handles the case of a pointer
14512         (end_java_method): Restore the use of one more scope
14513         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
14514         build_java_array_length_access, expand_java_arrayload,
14515         expand_java_arraystore, expand_java_array_length,
14516         expand_java_multianewarray, expand_java_anewarray,
14517         build_java_check_indexed_type, is_array_type_p,
14518         build_java_throw_out_of_bound_exception): New functions.
14519         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
14520         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
14521         OPCODE_<t>aload): Implemented code for verification.
14522         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
14523         ARRAY_NEW_MULTI): Macro defined.
14524         (CONVERT): Modified to invoke convert().
14525         (case OPCODE_aload2): Fixed index typo from 2 to 1.
14526
14527 Thu Jul 31 12:48:18 1997  Per Bothner  <bothner@cygnus.com>
14528
14529         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
14530         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
14531         (make_class_data):  Field name needs '/' as package prefix.
14532         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
14533
14534 Fri Jul 25 11:44:21 1997  Per Bothner  <bothner@cygnus.com>
14535
14536         Implement debug information for local variables.
14537         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
14538         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
14539         DECL_LOCAL_SLOT_CHAIN):  New macros.
14540         (struct lang_decl_var):  New type.
14541         * parse.c (give_name_to_locals):  Move to decl.c.
14542         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
14543         (start_java_method):  Re-write parameter handling.
14544         (pending_local_decls):  New global variable.
14545         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
14546         (find_local_variable):  Accept pc so we can skips decls not in range.
14547         (struct binding_level):  Add end_pc field.
14548         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
14549         (various):  Change so current pc gets passed to find_local_variable.
14550
14551         * decl.c (init_decl_processing):  Re-arrange fields in
14552         class_type_node and and method_type_node to match kaffe 0.9.1.
14553         * class.c (make_method_value, make_class_data):  Update
14554         initializations to match.
14555
14556 Wed Jul 16 17:17:50 1997  Per Bothner  <bothner@cygnus.com>
14557
14558         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
14559         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
14560         (push_super_field):  New function.
14561         (make_class_data):  Handle inheritance of class static initializer.
14562         (layout_class):  New name mangling.
14563         * constants.c (build_constant_data_ref):  Init type of data array
14564         to a one-element array.
14565         (build_constants_constructor):  Set DECL_SIZE from complete array type.
14566         * decl.c:  Rename class_type, object_type etc to class_type_node,
14567         object_type_node etc.  Make former inherit from latter.
14568         * expr.c (expand_invoke):  Add cast of function address.
14569         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
14570         * parse.c (yyparse):  Don't call layout_class here.
14571         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
14572
14573 Sat Jun 14 12:06:57 1997  Per Bothner  <bothner@cygnus.com>
14574
14575         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
14576         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
14577         (alloc_class_constant):  New.
14578         * expr.c (expand_invoke):  Make sure method's class is initialized.
14579         * class.c (interits_from_p, emit_register_class):  New functions.
14580         * parse.c (yyparse):  Call emit_register_class.
14581
14582 Mon Jun  9 18:08:06 1997  Per Bothner  <bothner@cygnus.com>
14583
14584         * constants.c:  New file, to handle constant pool.
14585         * Makefile.in (JAVA_OBJS):  Add constants.o.
14586         * decl.c (init_decl_processing):  Update, fix, finish various structs.
14587         (pushdecl_top_level):  New.
14588         * parse.c (layout_class):  Moved to class.c.
14589         * expr.c (java_push_constant_from_pool):  New function.
14590         * class.c (build_class_ref):  Make work fully
14591         (make_class_data):  Emit super-class, constant pool, interface vector.
14592
14593 Tue Jun  3 10:14:31 1997  Per Bothner  <bothner@cygnus.com>
14594
14595         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
14596         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
14597         * class.c (class_depth):  New function.
14598         (lookup_named_class):  Replaced by new function lookup_class.
14599         * decl.c (object_type_node, string_type_node):  New.
14600         Remove various types that we no longer need.
14601         * expr.c (verify_jvm_instructions):  New separate verifier pass.
14602         (push_type, pop_type):  New functions for verifier.
14603         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
14604         (expand_byte_code):  Simplify, since we assume already verified.
14605         (expand_invoke):  Now mostly works.
14606         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
14607         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
14608         * parse.c:  Wait to allocate class object until we know its name.
14609         (layout_class):  Calculate DECL_VINDEX for each virtual method.
14610         * typeck.c (get_array_type):  Rename to ...
14611         (build_java_array_type):  ... and provide working implementation.
14612         (build_java_signature):  New function - build Java signature of type.
14613         (set_java_signature):  New function - cache signature with type.
14614         (lookup_java_method):  New function.
14615
14616 Tue May  6 22:08:24 1997  Per Bothner  <bothner@deneb.cygnus.com>
14617
14618         * class.c (ident_subst):  Take extra SUFFIX parameter.
14619         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
14620         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
14621         (build_class_ref):  Actually implement.
14622         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
14623         * decl.c (builtin_function):  New.
14624         (init_decl_processing):  Update for current Kaffe.  Declare some
14625         builtin Kaffe functions.
14626         * expr.c (build_address_of):  New.
14627         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
14628         Renamed (from expand_java_new etc), and added working implementations.
14629         (build_field_ref):  Now also handle static fields.
14630         (expand_invoke):  Implement invokestatic, and start implement rest.
14631         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
14632         * javaop.def:  Rename invokevirt -> invokevirtual.
14633         * lang.c (use_handles):  Removed.
14634         * parse.c:  Add support for ConstantValue attribute.
14635         Handle nested loading of a class.  (JPOOL_UTF):  New.
14636
14637 Tue Mar 11 20:11:05 1997  Per Bothner  <bothner@deneb.cygnus.com>
14638
14639         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
14640
14641 Thu Feb 27 14:24:29 1997  Per Bothner  <bothner@deneb.cygnus.com>
14642
14643         * Make-lang.in (java.install-man):  New empty rule.
14644         * typeck.c (set_local_type):  New function.
14645         * expr.c (STORE_INTERNAL):  Call find_local_variable,
14646         not find_stack_slot.  Call set_local_type.
14647
14648 Wed Feb 12 16:11:05 1997  Per Bothner  <bothner@kalessin.cygnus.com>
14649
14650         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
14651         and building RECORD_TYPE CONSTRUCTORs.
14652         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
14653
14654         * lang.c (use_handles):  Change the default to 0.
14655         * decl.c:  Define and build class_type, field_type, utf8const_type.
14656         * class.c (make_class_data, make_field_value,
14657         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
14658         hashUtf8String, strLengthUtf8, mangled_classname:
14659         Functions to build reflective data structures.
14660         * parse.c (yyparse):  Call make_class_data.
14661
14662         * jcf-io.c (open_class, find_classfile):  New functions.
14663         * jcf-dump.c:  Support reading classfile from explicitly-named
14664         class file (without CLASSPATH searching).
14665
14666 Thu Oct 24 14:10:16 1996  Per Bothner  <bothner@deneb.cygnus.com>
14667
14668         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
14669         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
14670         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
14671         (get_constant):  Now trivial for CONSTANT_Utf8.
14672
14673         * jcf.h:  Make NEW_CPOOL the default.
14674         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
14675
14676 Thu Oct 24 13:52:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
14677
14678         New directory.