OSDN Git Service

2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2
3         * gcj.texi: Fix typos and bogus example.
4
5 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
6
7         * except.c: Fix a comment typo.
8
9 2005-04-19  Julian Brown  <julian@codesourcery.com>
10
11         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
12         indirect dispatch with PIC.
13
14 2005-04-18  Andrew Haley  <aph@redhat.com>
15
16         * java-except.h (struct eh_range.handler): Remove unused field.
17         (handle_nested_ranges): Remove function declaration.
18         (sanity_check_exception_range): Add function declaration.       
19         * verify.c (verify_jvm_instructions): Remove call to
20         handle_nested_ranges.
21         * verify-glue.c (verify_jvm_instructions_new): Call
22         sanity_check_exception_range.
23         * except.c (link_handler, eh_range_freelist, link_handler,
24         handle_nested_ranges): Remove.
25         (add_handler): Rewrite.
26         (sanity_check_exception_range): New function.
27         (print_ranges): New function.
28
29 2005-04-13  Julian Brown  <julian@codesourcery.com>
30
31         * decl.c (finish_method): Give methods once-only linkage.
32
33 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
34
35         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
36
37 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
38
39         * java-tree.h: Don't use PARAMS().
40
41 2005-04-07  Per Bothner  <per@bothner.com>
42
43         * class.c (push_class): By default, suppress debug output.
44         (finish_class): Enable debug output for classes we're emitting.
45
46 2005-04-07  Andrew Haley  <aph@redhat.com>
47
48         * gcj.texi: Correct gcj-dbtool instructions.
49
50 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
51
52         * gcj.texi: Fix a typo.
53         * lang.c: Fix a comment typo.
54
55 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
56
57         * gcj.texi (Invoking gij): Add descriptions of new -X options.
58         Mention recognized-and-ignored compatibility options.
59         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
60         JvFree.
61         (About CNI): Add Memory allocation section.
62
63 2005-04-01  Tom Tromey  <tromey@redhat.com>
64
65         * decl.c (java_init_decl_processing): Fix types of
66         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
67         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
68         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
69
70 2005-03-31  Jan Hubicka  <jh@suse.cz>
71
72         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
73         * class.c: Include cgraph.h
74         (make_local_functoin_alias): Mark aslias as needed.
75         * resource.c: Include cgraph.h
76         (compile_resource_data): Go via cgraph interface.
77
78 2005-03-30  Ian Lance Taylor  <ian@airs.com>
79
80         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
81
82 2005-03-30  Tom Tromey  <tromey@redhat.com>
83
84         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
85         inner_class_info_index==0 or outer_class_info_index==0.
86
87 2005-03-29  Tom Tromey  <tromey@redhat.com>
88
89         * gcj.texi (libgcj Runtime Properties): Document
90         gnu.gcj.runtime.endorsed.dirs.
91
92 2005-03-24  Anthony Green  <green@redhat.com>
93
94         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
95         'gcj-dbtool -p'.
96
97 2005-03-23  Tom Tromey  <tromey@redhat.com>
98
99         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
100         (parse_version): Use it.
101
102 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
103
104         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
105
106 2005-03-18  Andrew Haley  <aph@redhat.com>
107
108         PR java/20522
109         * decl.c (update_aliases): Don't update variables that are about
110         to die.
111         (maybe_poplevels): Add comment.
112
113 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
114
115         PR java/20502
116         * jcf-parse.c (duplicate_class_warning): New function.
117         (java_parse_file): Call duplicate_class_warning if 
118         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
119         (parse_zip_file_entries): Likewise. Also set
120         CLASS_FROM_CURRENTLY_COMPILED_P.
121
122 2005-03-16  Andrew Haley  <aph@redhat.com>
123
124         * expr.c (expand_java_arrayload): Don't generate a
125         NullPointerException based on the type of the node.
126         (build_java_array_length_access): Likewise.
127
128 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
129
130         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
131
132 2005-03-11  Tom Tromey  <tromey@redhat.com>
133
134         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
135         (libgcj Runtime Properties): Document the default .db.
136
137 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
138
139         PR java/20312
140         * parse.y (checks_throws_clauses): Check exceptions list even when
141         the base class does not come from a source file being compiled.
142         (java_complete_lhs): Remove unused variable 'wfl'.
143
144 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
145
146         PR java/20338
147         * decl.c (finish_method): Emit _Jv_InitClass for private static
148         methods inside inner classes as well.
149
150 2005-03-08  Julian Brown  <julian@codesourcery.com>
151         * Revert patch from 2005-03-08 for causing bootstrap failure on
152         ppc-darwin.
153
154 2005-03-08  Julian Brown  <julian@codesourcery.com>
155
156         * decl.c (finish_method): Give methods once-only linkage.
157
158 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
159
160         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
161
162 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
163
164         * verify-glue.c (vfy_is_assignable_from): Perform static check using
165         can_widen_reference_to if the C++ ABI is in use.
166         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
167         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
168         type_isresolved, init_state, set_pc, state_get_pc,
169         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
170         (verify_fail): Report the current PC from the verifier context.
171         (free_state): Remove #if 0 block to enable this function.
172         (free_verifier_context): Call free_state on state_list iterator
173         values before freeing them.
174         * expr.c (pop_type_0): Pop correct type for error message when stack
175         contains a multi-word type.
176
177 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
178
179         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
180         for known NULL array length access.
181
182 2005-03-07  Tom Tromey  <tromey@redhat.com>
183
184         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
185
186 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
187
188         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
189         typeck.c: Update copyright.
190
191 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
192
193         Remove xref code.
194         * xref.c, xref.h: Remove file.
195         * Make-lang.in (java/xref.o): Remove.
196         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
197         * lang.c (flag_emit_xref): Remove definition.
198         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
199         * typeck.c (convert): Remove use of do_not_fold.
200         * parse.y (do_not_fold): Remove definition.
201         (parser grammar): Remove xref code.
202         (maybe_create_class_interface_decl, create_class): Likewise.
203         (register_fields, method_header, finish_method_declaration): Likewise.
204         (declare_local_variables, source_end_java_method): Likewise.
205         (java_complete_expand_classes): Do not set do_not_fold.
206         (java_complete_expand_method): Remove xref code.
207         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
208         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
209         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
210         (patch_synchronized_statement, patch_throw_statement): Likewise.
211         (maybe_build_class_init_for_field): Likewise.
212
213 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
214
215         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
216         instead of IS_NON_TYPE_CODE_CLASS.
217
218 2005-03-04  Andrew Haley  <aph@redhat.com>
219
220         PR java/18362
221         * class.c (set_method_index): Don't set method_index if it is
222         NULL_TREE.
223         (layout_class_method): Don't complain about "non-static method foo
224         overrides static method" in the case of indirect dispatch.
225
226 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
227
228         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
229         warning.
230         * Make-lang.in: Don't elide warnings in jcf-io.c.
231
232 2005-03-01  Per Bothner  <per@bothner.com>
233
234         PR java/8608
235         * check-init.c (wfl): Remove static.
236         (final_assign_error, check_init): Replace calls to parse_error_context
237         by plain error.
238         (check_init): Save, set, and restore input_location for each exp.
239
240 2005-03-01  Per Bothner  <per@bothner.com>
241
242         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
243         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
244         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
245
246 2005-03-01  Per Bothner  <per@bothner.com>
247
248         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
249
250 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
251
252         PR libgcj/16923
253         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
254         JvVMOption.
255
256 2005-02-22  Tom Tromey  <tromey@redhat.com>
257
258         PR java/20056:
259         * verify-impl.c (EITHER): New define.
260         (types_compatible): Handle it.
261         (check_field_constant): Use it.
262
263 2005-02-18  Tom Tromey  <tromey@redhat.com>
264
265         PR java/20056:
266         * verify-impl.c (types_equal): Fixed test.
267
268         PR java/20056:
269         * verify-glue.c (vfy_class_has_field): New function.
270         * verify.h (vfy_class_has_field): Declare.
271         * verify-impl.c (check_field_constant): Added 'putfield'
272         argument.
273         (verify_instructions_0): Updated.
274         (types_equal): New function.
275
276 2005-02-14  Tom Tromey  <tromey@redhat.com>
277
278         PR java/19921:
279         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
280         stack effect of multianewarray.
281
282 2005-02-14  Andrew Haley  <aph@redhat.com>
283
284         PR java/19907
285         * expr.c (expand_byte_code): Call promote_arguments().
286         (promote_arguments): New function.
287         * decl.c (check_local_unnamed_variable): Remove special case for
288         new verifier.
289         (find_local_variable): Promote all boolean types to int
290         when searching for local variable decls.
291
292 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
293
294         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
295         parse-scan.y: Update copyright.
296
297 2005-02-11  Per Bothner  <per@bothner.com>
298
299         PR java/15543
300         * parse-scan.y (input_location): Remove variable.
301         (main_input_filename): New - replaces input_filename, which isn't
302         settable if USE_MAPPED_LOCATION.
303         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
304         so we don't reference input_location or wfl_operator in that case.
305         * jv-scan.c (expand_location): Remove - no longer used.
306         (main): Set main_input_filename rather than input_filename.
307
308 2005-02-09  Richard Henderson  <rth@redhat.com>
309
310         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
311         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
312
313 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
314
315         * expr.c (add_type_assertion): Use the proper enumeration type,
316         since this is what htab_find_slot() is expecting.
317
318 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
319
320         * gcj.texi: Update copyright dates.
321
322 2005-02-02  Tom Tromey  <tromey@redhat.com>
323
324         * gcj.texi (libgcj Runtime Properties): Default library_control
325         to 'cache'.
326
327 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
328
329         PR java/15543
330         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
331         (modifiers) when square brackets are present in a declaration for
332         a final paramter.
333         * jv-scan.c (main): Set input_filename and input_line.
334
335 2005-02-01  Tom Tromey  <tromey@redhat.com>
336
337         PR java/19742:
338         * gjavah.c (get_field_name): Don't override name for JNI header.
339
340 2005-02-01  Roger Sayle  <roger@eyesopen.com>
341
342         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
343         of unsigned types using iushr and lushr JVM bytecodes.
344
345 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
346
347         PR java/19738
348         * gjavah.c (jni_print_float): Do not emit floating-point
349         initialiser for a static final field.
350         (jni_print_double): Likewise.
351
352 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
353
354         Revert:
355         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
356         * gjavah.c (print_field_info): Mark static data members of
357         floating-point type with "__extension__".
358
359 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
360
361         * gjavah.c (print_field_info): Mark static data members of
362         floating-point type with "__extension__".
363
364 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
365
366         PR java/9157
367         * parse.y (build_string_concatenation): Remove redundant if.
368         (patch_conditional_expr): Attempt to patch_string() the condition
369         of a ?: as well, in addition to its other operands.
370
371 2005-01-25  Tom Tromey  <tromey@redhat.com>
372
373         * Make-lang.in (java/java-tree-inline.o): Removed.
374
375 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
376
377         PR java/19070
378         * parse.y (patch_binop): Allow comparisons against NULL only
379         if the other operand is of a reference type.
380
381 2005-01-24  Tom Tromey  <tromey@redhat.com>
382
383         * java-tree.h (gcj_abi_version): Declare.
384         * class.c (make_class_data): Push gcj_abi_version into "next"
385         field.  Renamed field.
386         * decl.c (gcj_abi_version): New global.
387         (parse_version): New function.
388         (java_init_decl_processing): Call it.  Renamed 'next' field.
389         Include version.h.
390         (GCJ_BINARYCOMPAT_ADDITION): New define.
391
392 2005-01-24  Roger Sayle  <roger@eyesopen.com>
393
394         PR java/19295
395         * jcf-write.c (generate_bytecode_insns): Conversions between
396         integer types of the same precision shouldn't generate widening
397         or narrowing conversion bytecodes.
398
399 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
400
401         * java-except.h, java-tree.h: Remove unused prototypes.
402
403 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
404
405         PR java/18091:
406         * jcf-write.c (perform_relocations): Don't call memcpy if source
407         and destination are the same.
408
409 2005-01-17  Tom Tromey  <tromey@redhat.com>
410
411         * verify-impl.c (get_short): Sign extend.
412         (get_int): Likewise.
413
414 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
415
416         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
417         with TYPE_SIZE.
418
419 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
420
421         * verify.c: Revert to the version before the BC-ABI merge.
422
423 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
424
425         PR java/19277
426         * check-init.c (check_init): Take care of references that do not
427         have an explicit final variable declaration (e.g. array length
428         access) for pre/post in/de-crement operators.
429
430 2005-01-08  Mark Wielaard  <mark@klomp.org>
431
432         * parse.y (process_imports): Allocate (and free) original_name only
433         when not already defined.
434         * jcf-parse.c (read_class): Free results of find_class() and
435         lrealpath().
436         (java_parse_file): Keep pointer to head of file_list and free when
437         done. Free result of lrealpath().
438
439 2005-01-05  Tom Tromey  <tromey@redhat.com>
440
441         * gcj.texi (Standard Properties): java.ext.dirs is now used.
442
443 2004-12-20  Andrew Haley  <aph@redhat.com>
444
445         * typeck.c: Use fold_convert for ints and booleans.
446
447 2004-12-17  Andrew Haley  <aph@redhat.com>
448
449         PR java/18931
450         * typeck.c (convert): Use a CONVERT_EXPR when converting to
451         BOOLEAN_TYPE or CHAR_TYPE.
452         (convert_to_boolean, convert_to_char) : Remove.
453         * convert.h (convert_to_boolean, convert_to_char) : Remove.
454         * expr.c (expand_load_internal): Do type conversion if type is not
455         as required.
456
457 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
458
459         PR target/18459
460         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
461         Update comment.
462
463 2004-12-07  Andrew Haley  <aph@redhat.com>
464
465         PR java/18811:
466         * jcf-parse.c (load_class): Remove sanity test for missing inner
467         class file.
468
469 2004-12-06  Tom Tromey  <tromey@redhat.com>
470
471         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
472         (java.uninstall): Likewise.
473         (java.maintainer-clean): Likewise.
474         (.INTERMEDIATE): Likewise.
475         (java.install-man): Likewise.
476         (gcj-dbtool.pod): New target.
477         * gcj.texi (Code Generation): Document -findirect-dispatch.
478         (libgcj Runtime Properties): Document
479         gnu.gcj.precompiled.db.path.
480         (Top): Link to "Invoking gcj-dbtool".
481
482 2004-12-06  Tom Tromey  <tromey@redhat.com>
483
484         PR java/14853:
485         * java-tree.h (extract_field_decl): Declare.
486         * parse.y (extract_field_decl): Renamed from
487         strip_out_static_field_access_decl.  No longer static.
488         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
489
490 2004-12-03  Tom Tromey  <tromey@redhat.com>
491
492         * lang.c (flag_new_verifier): Define.
493         (java_post_options): Set flag_new_verifier if indirect dispatch
494         is being used.
495         * lang.opt (fnew-verifier): Removed.
496
497 2004-12-03  Tom Tromey  <tromey@redhat.com>
498
499         PR bootstrap/14614:
500         * Make-lang.in (java.install-common): Only install transformed
501         gcjh if gcj-cross exists.
502
503 2004-12-03  Andrew Haley  <aph@redhat.com>
504
505         PR java/18812
506         * except.c (link_handler): Patch 'outer' field of siblings of the
507         range we're demoting.
508
509 2004-12-03  Andrew Haley  <aph@redhat.com>
510
511         PR java/18697
512         * class.c (layout_class_method): Don't fail to override a method
513         simply because it has DECL_ARTIFICIAL set.
514
515 2004-12-02  Tom Tromey  <tromey@redhat.com>
516
517         PR java/16675:
518         * parse.y (craft_constructor): Special case null_pointer_node.
519
520 2004-12-02  Tom Tromey  <tromey@redhat.com>
521
522         PR java/18741:
523         * java-gimplify.c (java_gimplify_expr): Don't call
524         SET_EXPR_LOCATION unless wrapped tree is an expression.
525
526 2004-11-27  Per Bothner  <per@bothner.com>
527
528         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
529         Fix fencepost error in 'i', which got executed one too many times.
530         Also, fold memcpy into explicit loop, as originally intended.
531         Also, free temporary 'buf' which otherwise leaks.
532
533 2004-11-27  Per Bothner  <per@bothner.com>
534
535         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
536         local static variables if not USE_MAPPED_LOCATION.
537
538 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
539
540         * class.c, decl.c, expr.c: Fix comment typos.
541
542 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
543
544         PR java/18305
545         * decl.c (end_java_method): Call
546         attach_init_test_initialization_flags on all the init_decls.
547         * parse.y (attach_init_test_initialization_flags): Move to ...
548         * expr.c (attach_init_test_initialization_flags): here and
549         support BIND_EXPR also.
550         * java-tree.h (attach_init_test_initialization_flags): Prototype.
551         * jcf-parse.c (parse_class_file): Don't disable class init
552         optimization.
553
554 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
555
556         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
557         in diagnostics.
558
559 2004-11-24  Richard Henderson  <rth@redhat.com>
560
561         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
562         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
563
564 2004-11-24  Tom Tromey  <tromey@redhat.com>
565
566         * verify.c (defer_merging): Don't use C++-style comment.
567         * verify.h (java_opcode): Added java_opcode_end.
568         * class.c (build_class_ref): Remove C++ comment and old FIXME.
569
570         * verify-impl.c (vfy_push_type): Removed bogus "return".
571         (initialize_stack): Use vfy_alloc and vfy_free.
572         (verify_instructions_0): Likewise.
573
574         * Merged gcj-abi-2-dev-branch to trunk.
575
576 2004-11-24  Andrew Haley  <aph@redhat.com>
577
578         * jcf-parse.c (parse_class_file): Set file_start_location.
579
580 2004-11-10  Tom Tromey  <tromey@redhat.com>
581
582         * class.c (make_field_value): Don't call build_static_field_ref.
583         (build_static_field_ref): Don't emit direct references when using
584         indirect dispatch.
585
586         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
587         -verbose:class into man page synopsis.
588
589 2004-11-09  Tom Tromey  <tromey@redhat.com>
590
591         * expr.c (build_java_arraystore_check): Still generate check if
592         element type is itself an array.
593
594 2004-11-08  Tom Tromey  <tromey@redhat.com>
595
596         * java-tree.h (soft_check_assignment_node): Removed.
597         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
598         * decl.c (java_init_decl_processing): Don't initialize
599         soft_check_assignment_node.
600
601 2004-11-05  Tom Tromey  <tromey@redhat.com>
602
603         * class.c (layout_class_methods): Don't add Miranda methods when
604         using indirect dispatch.
605
606 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
607
608         * class.c (make_class_data): Call emit_assertion_table to set the
609         'assertion_table' field.
610         (build_signature_for_libgcj): Move here from expr.c.
611         (add_assertion_table_entry): New function. Callback for assertion
612         hashtable traversal.
613         (emit_assertion_table): New. Take class argument, and generate
614         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
615         * decl.c (init_decl_processing): Define assertion_entry_type record.
616         Push 'assertion_table' class field instead of 'verify'.
617         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
618         (type_assertion_hash): Include 'assertion_code' in hash.
619         (add_type_assertion): Rewritten. Take class and assertion_code
620         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
621         (can_widen_reference_to): Use new add_type_assertion() arguments.
622         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
623         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
624         (verify_identifier_node): Removed.
625         (assertion_entry_type, assertion_table_type): New.
626         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
627         assertion code definitions.
628         (struct type_assertion): Add assertion_code. Rename 'source_type' and
629         'target_type' to 'op1' and 'op2'.
630         (add_type_assertion): Declare.
631         (lang_printable_name_wls): Remove unused definition.
632         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
633         to emit runtime assertion.
634         (vfy_note_stack_type): Clean up non-C90 declarations.
635         (vfy_note_local_type): Likewise.
636         * verify.h (vfy_is_assignable_from): Declare.
637         * verify-impl.c (is_assignable_from_slow): Remove unused function.
638         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
639         instead of is_assignable_from_slow().
640         (types_compatible): Reinstate ref_compatible() call.
641
642 2004-11-04  Tom Tromey  <tromey@redhat.com>
643
644         * class.c (build_static_field_ref): Reverted previous patch.
645
646         * class.c (build_static_field_ref): Don't emit direct references
647         when using indirect dispatch.
648
649 2004-11-03  Tom Tromey  <tromey@redhat.com>
650
651         * expr.c (expand_java_arrayload): Set lhs_type_node.
652         (expand_java_arraystore): Set rhs_type_node.
653
654 2004-11-02  Tom Tromey  <tromey@redhat.com>
655
656         * jcf-parse.c (compute_class_name): Use filename length from zip
657         directory, not strlen.
658
659         * expr.c (expand_invoke): Mark new interface methods as abstract.
660
661 2004-11-01  Tom Tromey  <tromey@redhat.com>
662
663         * verify-impl.c (push_jump): Removed check for uninitialized
664         objects.
665         (push_exception_jump): Likewise.
666         (handle_ret_insn): Likewise.
667         (handle_jsr_insn): Likewise.
668         (state_check_no_uninitialized_objects): Removed.
669
670         * decl.c (check_local_unnamed_variable): Recognize
671         promoted-to-int parameters when using the new verifier.
672         * expr.c (expand_java_arraystore): Explicitly request array type
673         when using new verifier.
674         (expand_java_arrayload): Likewise.
675         (invoke_build_dtable): Don't pass object_type_node as
676         expression argument to build_java_indirect_ref.
677         (build_java_check_indexed_type): Do nothing.
678         (build_java_arraystore_check): Handle case where array doesn't
679         have array type.
680         (build_java_array_length_access): Likewise.
681         (expand_invoke): Handle case where interface overrides a method
682         from Object.
683         (pop_type_0): Always succeed for reference types.
684         (process_jvm_instruction): Don't pop a value in a dead
685         exception handler.
686         (pop_arguments): Convert arguments to correct types.
687
688 2004-10-29  Andrew Haley  <aph@redhat.com>
689
690         * jcf-parse.c (give_name_to_class): Remove line that was
691         incorrectly merged.
692
693 2004-10-29  Andrew Haley  <aph@redhat.com>
694
695         * jcf-parse.c (set_source_filename): Add code to build new sfname.
696
697 2004-10-20  Andrew Haley  <aph@redhat.com>
698
699         * decl.c (end_java_method): Don't expand if flag_syntax_only.
700
701 2004-10-26  Tom Tromey  <tromey@redhat.com>
702
703         * verify.h (vfy_notify_verified): Removed.
704         * verify-glue.c (vfy_notify_verified): Removed.
705
706 2004-10-26  Tom Tromey  <tromey@redhat.com>
707
708         * verify-impl.c (debug_print_state): Declare `i' before code.
709         (merge_types): Modify `t' when it is null_type.
710
711 2004-10-26  Tom Tromey  <tromey@redhat.com>
712
713         * verify-impl.c (type_print): Renamed from print.  Now static and
714         takes an argument.
715         (debug_print_state): Use type_print.
716
717 2004-10-25  Tom Tromey  <tromey@redhat.com>
718
719         * expr.c (build_invokeinterface): Compute correct offset for
720         index into interface methods.
721
722 2004-10-20  Tom Tromey  <tromey@redhat.com>
723
724         * java-tree.h (verify_jvm_instructions_new): Declare.
725
726         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
727         command line.
728
729         * verify-impl.c (verify_instructions): Correctly handle wide
730         types on the stack.
731         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
732         (vfy_get_component_type): Strip pointer types.
733         (vfy_find_class): Use get_type_from_signature.  Strip pointer
734         types.
735         Include java-except.h.
736
737 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
738
739         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
740         vfy_push_type_t, set_variable, add_new_state, merge_into,
741         handle_jsr_insn, branch_prepass, check_class_constant,
742         check_wide_constant, get_one_type, compute_static_types,
743         verify_instructions_0): Clean up C99 declarations after statements.
744
745 2004-10-20  Tom Tromey  <tromey@redhat.com>
746
747         * verify-impl.c (merge_refs): Compare reference against iterator,
748         not ref2.
749
750         * verify-glue.c (vfy_tag): Mask off resolved flag.
751
752 2004-10-19  Tom Tromey  <tromey@redhat.com>
753
754         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
755         (init_state_with_stack): Initialize `this_type' in state.
756         (verify_method): Use debug_print.
757         * verify-glue.c (vfy_is_primitive): Removed debugging print.
758         (vfy_note_stack_depth): Reverted last patch.
759         (vfy_note_stack_type): Note pointer to Object, not Object.
760         (vfy_note_local_type): Likewise.
761
762         * verify.h (vfy_note_instruction_seen): Declare.
763         * verify-glue.c (verify_jvm_instructions_new): Set
764         BCODE_EXCEPTION_TARGET on target instruction.
765         (vfy_note_instruction_seen): New function.
766         * verify-impl.c (FLAG_INSN_SEEN): New define.
767         (verify_instructions_0): Set flag on instruction.  Save state for
768         PC=0 later.
769         (verify_instructions): Call vfy_note_instruction_seen.
770
771         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
772         (verify_jvm_instructions_new): Call method_init_exceptions,
773         add_handler, and handle_nested_ranges.
774         * verify-impl.c (verify_method): Return 1 on success.
775         (verify_instructions_0): Save the state at PC=0.
776
777         * verify-impl.c (init_type_from_class): Set is_resolved and
778         ref_next on new ref_intersection.
779         (init_type_from_string): Likewise.
780
781 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
782
783         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
784         if flag_new_verifier is set.
785         * java-tree.h (flag_new_verifier): Declare.
786         * lang.opt (fnew-verifier): New option.
787         * verify-impl.c: Work around namespace pollution by undef'ing
788         'current_class'.
789         (struct verifier_context): Make 'bytecode' const.
790         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
791         (types_compatible): For the BC-ABI, always consider reference types
792         compatible.
793         (check_class_constant): Use vfr->current_class.
794         (check_constant): Likewise.
795         (check_wide_constant): Likewise.
796         (check_field_constant): Check for 'L' at start of type name.
797         (get_one_type): Return pointer instead of type. Set type result in
798         caller via passed type pointer.
799         (compute_argument_types): Update to use new get_one_type arguments.
800         (compute_return_type): Likewise.
801         (make_verifier_context): New. Allocate and initialize 'vfr'.
802         (free_verifier_context): New. Free 'vfr' and its contents.
803         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
804         and free_verifier_context.
805
806 2004-10-15  Tom Tromey  <tromey@redhat.com>
807
808         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
809         * verify.h (vfy_fail): Fixed formatting.
810
811         * verify-impl.c (vfr): Fixed comment formatting.
812         (collapse_type): New function.
813         (verify_instructions): Notify compiler about type map.
814         * verify.h (vfy_note_stack_depth): Updated.
815         (vfy_note_stack_type): Likewise.
816         (vfy_note_local_type): Likewise.
817         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
818         Declare.
819         * verify-glue.c (vfy_note_stack_depth): Correctly size type
820         state.  Added `method' argument.
821         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
822         argument.
823         (vfy_note_local_type): New function.
824         (vfy_unsuitable_type): Likewise.
825         (vfy_return_address_type): Likewise.
826         (vfy_null_type): Likewise.
827
828         * verify.h (VFY_IN_GCC): Removed.
829         (VFY_WANT_TYPEMAP): Removed.
830         * verify-impl.c (verify_instructions_0): Removed useless "\".
831         (struct state) <next>: Uncomment.
832
833 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
834
835         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
836         C-style.
837
838 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
839
840         * Make-lang.in (verify.o): Re-enabled this target.
841         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
842         (vfy_get_interface): Likewise.
843         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
844         * verify.h (verify_jvm_instructions_new): Declare.
845         * verify-impl.c (free_state): Temporarily comment out unused
846         function.
847
848 2004-10-06  Tom Tromey  <tromey@redhat.com>
849
850         * java-tree.h (JV_STATE_READ): New enum value.
851
852 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
853
854         * verify.h: New file.
855
856 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
857
858         * verify-impl.c, verify-glue.c, verify.h: New files.
859         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
860
861 2004-09-24  Andrew Haley  <aph@redhat.com>
862
863         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
864         for a slot if it's of pointer type.
865
866 2004-09-14  Tom Tromey  <tromey@redhat.com>
867
868         * class.c (make_class_data): Correctly initialize "state" field.
869         Initialize "engine" field.
870         * decl.c (java_init_decl_processing): Add "engine" field.
871
872 2004-09-10  Andrew Haley  <aph@redhat.com>
873
874         PR java/12760
875         * expr.c (build_invokeinterface): Use fast method for interface
876         dispatch.
877         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
878         JTI_ITABLE_PTR_TYPE.
879         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
880         (emit_symbol_table): Add new arg, element_size.
881         * decl.c (java_init_decl_processing): Initialize Class.itable.
882         * class.c (GEN_TABLE): New macro.
883         (gen_indirect_dispatch_tables): Use it.  Add itable.
884         (make_class_data): Add new arg for emit_symbol_table().
885         Emit itable.
886         (add_miranda_methods): Make sure search_class has been parsed.
887         (emit_symbol_table): Add new arg, element_size.
888
889 2004-09-06  Andrew Haley  <aph@redhat.com>
890
891         * verify.c (merge_types): Return Object for all merges of
892         interfaces.
893         * expr.c (add_type_assertion): Don't generate assertions when
894         source type is array of Object.
895
896 2004-09-03  Andrew Haley  <aph@redhat.com>
897
898         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
899
900         * lang.c (java_post_options): Force flag_verify_invocations if
901         we're not using indirect dispatch.
902
903         * expr.c (pop_type_0): Move test for interfaces before call to
904         can_widen_reference_to().
905         (build_signature_for_libgcj): Remove generation of canonical array
906         type.
907         (add_type_assertion): Canonicalize both arrays.
908         Don't assert that type X can be assigned to Object.
909         Don't assert that type X an be assigned to type X.
910         Don't assert that Object can be assigned to type X.
911         (can_widen_reference_to): Warn whenever we generate an assertion.
912         (process_jvm_instruction): Use throwable_type_node for the type of
913         an exception class.
914
915 2004-09-01  Andrew Haley  <aph@redhat.com>
916
917         * decl.c (java_init_decl_processing): Change
918         verify_identifier_node to "__verify".
919         * expr.c (add_type_assertion): Use verify_identifier_node for name.
920         * java-tree.h (verify_identifier_node): Change to "__verify".
921
922         * expr.c (build_signature_for_libgcj): New function.
923         (add_type_assertion): Use it to construct signatures for
924         source_type and target_type.
925
926 2004-08-27  Andrew Haley  <aph@redhat.com>
927
928         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
929         (verify_identifier_node): New.
930         (TYPE_VERIFY_METHOD): New.
931         (struct type_assertion): New type.
932         * expr.c (type_assertion_eq): New function.
933         (type_assertion_hash): New function.
934         (add_type_assertion): New function.
935         (can_widen_reference_to): Call add_type_assertion().
936         * decl.c (java_init_decl_processing): Add verify_identifier_node.
937         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
938         (finish_class): Output TYPE_VERIFY_METHOD (type).
939
940         * decl.c (end_java_method): Nullify unused fields.
941
942 2004-08-17  Andrew Haley  <aph@redhat.com>
943
944         * verify.c (defer_merging): Quieten.
945         * jcf-parse.c (load_class): Only try to open a class file if it's
946         java.lang.Object or if it's part of the current compilation.
947         Check that the class we just tried to load is the class we just
948         loaded.  Quieten.
949         (java_parse_file): Set flag_verify_invocations off if we're
950         compiling from .class.
951         (parse_zip_file_entries): Abort if we try to read a dummy class.
952         * expr.c (can_widen_reference_to): Quieten.
953         (build_invokevirtual): Abort if we try to invokevirtual an
954         interface.
955         (expand_invoke): Don't build a non-interface call to an interface.
956         (build_instanceof): Don't do premature optimization if
957         flag_verify_invocations is not set.
958         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
959         from superclass.
960         (build_static_field_ref): Add correct type conversion for
961         field_address.
962         (add_miranda_methods): Disable generation of Miranda methods for
963         dummy classes.
964         (layout_class_method): Don't complain about non-static method
965         overrides static method with dummy classes.
966
967 2004-08-13  Tom Tromey  <tromey@redhat.com>
968
969         * class.c (build_static_field_ref): Re-enable atable lookups for
970         static fields.
971
972         * parse.y (strip_out_static_field_access_decl): Indentation fix.
973
974 2004-08-11  Tom Tromey  <tromey@redhat.com>
975
976         * gcj.texi (libgcj Runtime Properties): Document new properties.
977
978 2004-08-06  Andrew Haley  <aph@redhat.com>
979
980         * jcf-parse.c (load_class): Check that we really have loaded the
981         class we're looking for.
982
983 2004-07-19  Andrew Haley  <aph@redhat.com>
984
985         * verify.c (verify_jvm_instructions): Comment change only.
986
987         * typeck.c (build_java_array_type): Add size field to array name.
988
989         * java-tree.h (LOCAL_SLOT_P): New.
990         (update_aliases): Add PC argument.
991         (pushdecl_function_level): New function.
992
993         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
994         MODIFY_EXPR, and SAVE_EXPR.
995         (java_gimplify_modify_expr): New function.
996
997         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
998         (expand_iinc): Pass PC to update_aliases().
999         (STORE_INTERNAL): Likewise.
1000         (process_jvm_instruction): Likewise.
1001
1002         * decl.c (base_decl_map): New variable.
1003         (uniq): New variable.
1004         (update_aliases): Rewrite with more thorough checking.
1005         (debug_variable_p): New function.
1006         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1007         (check_local_named_variable): Delete whole function.
1008         (initialize_local_variable): New function.
1009         (check_local_unnamed_variable): Add checks and comments.
1010         (find_local_variable): Rewrite.
1011         (java_replace_reference): New function.
1012         (function_binding_level): New variable.
1013         (pushdecl_function_level): New function.
1014         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1015         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1016         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1017         function_binding_level.
1018         (end_java_method): Null unused fields to save memory.
1019
1020 2004-06-29  Andrew Haley  <aph@redhat.com>
1021
1022         * except.c (expand_start_java_handler): Push a new binding level.
1023         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
1024         register_exception_range() to register where we'll do it.
1025         (expand_end_java_handler): Remove old bogus code.  Replace with
1026         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1027         the top of the expression we're curently building.
1028         (maybe_end_try): Delete.
1029         * decl.c (binding_level.exception_range): New field.
1030         (clear_binding_level): Add field exception_range.  Reformat.
1031         (poplevel): Call expand_end_java_handler().
1032         (poplevel): Call java_add_stmt only if functionbody is false.
1033         (maybe_poplevels): Don't call maybe_end_try() from here.
1034         (end_java_method): Clear no longer used trees in function decl.
1035         (register_exception_range): New function.
1036         * java-tree.h (register_exception_range, struct eh_range): Declare.
1037
1038 2004-06-22  Andrew Haley  <aph@redhat.com>
1039
1040         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1041         the otable.
1042         * check-init.c (get_variable_decl): Teach check-init about
1043         FIELD_DECLs addressed via the otable.
1044         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1045         CLASS_PARSED_P.
1046
1047 2004-05-28  Andrew Haley  <aph@redhat.com>
1048
1049         * jcf-parse.c (load_class): Don't try to read a class that we've
1050         already read.
1051
1052         * expr.c (build_invokeinterface): Use the old-fashioned way of
1053         doing indirect dispatch: look up interfaces by name.
1054         * java-tree.h (enum java_tree_index): Add
1055         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1056         * decl.c (java_init_decl_processing): Add
1057         soft_lookupinterfacemethodbyname_node.
1058
1059         * gjavah.c (print_method_info): Final methods have vtable entries,
1060         so gjavah needs to output them.
1061         * class.c (layout_class_method): Generate vtable entries for final
1062         methods.
1063         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1064         dispatch, even if a method is final.
1065
1066 2004-05-25  Andrew Haley  <aph@redhat.com>
1067
1068         * class.c (build_symbol_entry): Convert the names of constructors
1069         to init_identifier_node when generating an entry for the indirect
1070         dispatch table.
1071
1072         * expr.c (build_known_method_ref): Generate indirect calls for
1073         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1074
1075 2004-05-24  Andrew Haley  <aph@redhat.com>
1076
1077         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1078         atable element is of the right type.
1079
1080         * class.c (build_static_field_ref): Cast pointer to correct type
1081         for field.
1082
1083 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1084
1085         * Merged with HEAD as of 20040514. Diff against
1086         gcj-abi-2-merge-20040514.
1087
1088 2004-04-16  Andrew Haley  <aph@redhat.com>
1089
1090         * verify.c (check_pending_block): Disable subroutine checks.
1091         (defer_merging): New function.
1092         (merge_types): If types are dummy, use defer_merging to combine them.
1093         (verify_jvm_instructions): If invocation is invokeinterface and
1094         target is dummy, assume target really is an interface.
1095
1096         * parse.y (patch_invoke): Break out call to java_create_object.
1097
1098         * lang.c (flag_verify_invocations): New.
1099
1100         * jcf-parse.c (load_class): If we've already failed to load a
1101         class, don't try again.
1102         (load_class): If we can't find a .class file, don't fail, but emit
1103         a warning.
1104         (parse_class_file): Don't act on dummy methods.
1105
1106         * java-tree.h (flag_verify_invocations): New.
1107         (TYPE_DUMMY): New.
1108         (lang_type.dummy_class): New field.
1109         (java_create_object): New function.
1110         (METHOD_DUMMY): New.
1111
1112         * expr.c (build_field_ref): Widen field offset.
1113         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1114         that each of its elements is compatible with the one we're
1115         popping.
1116         (pop_type_0): Issue a warning to say that we need to generate a
1117         runtime check.
1118         (java_create_object): New function.
1119         (build_field_ref): Only generate hard refs if we're not using
1120         indirect dispatch.
1121         (expand_java_field_op): If we're using !verify_invocations and we
1122         see a missing field, generate a decl for it.
1123
1124         (expand_invoke): If a class doesn't have the method we seek and
1125         we're using !flag_verify_invocations, generate a decl for the
1126         method now.
1127
1128         (build_known_method_ref): Always use indirect dispatch via the
1129         atable for static methods.
1130
1131         (expand_java_NEW): Break out object creation into new function,
1132         java_create_object.
1133
1134         (can_widen_reference_to): Issue a warning to say that we need to
1135         generate a runtime check.
1136
1137         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1138         (make_method_value): Also use index for interfaces.
1139         (make_class_data): Skip dummy field for inherited data.
1140         Don't build method array for dummy methods.
1141         Set size_in_byte to -1 when using inirect dispatch
1142         Don't build a hard class ref if we don't have a hard ref to our
1143         superclass, or if we're using inirect dispatch.
1144         Null out dispatch tables.
1145
1146         (layout_class_method): Don't complain about non-static method
1147         overrides static method is method is artificial.
1148
1149         (build_static_field_ref): Disable atable references to static
1150         fields for the time being.
1151
1152         (layout_class_methods): Check for CLASS_INTERFACE as
1153         well as CLASS_ABSTRACT.
1154
1155 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1156
1157         * class.c (make_class_data): Don't check flag_inline_functions.
1158         * lang.c (flag_really_inline): Remove unused flag.
1159         (java_handle_option): Don't set it here.  Remove special handling
1160         of flag_inline_functions for Java.
1161         (java_init): Don't set flag_inline_trees here.  Already done...
1162         (java_post_options): ...here.  Don't clear flag_inline_functions.
1163
1164 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1165
1166         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1167         (java_gimplify_exit_block_expr): New function.
1168         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1169         LABELED_BLOCK_EXPR.
1170         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1171         (EXIT_BLOCK_EXPR): Likewise.
1172         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1173         (LABELED_BLOCK_BODY): Likewise.
1174         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1175         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1176         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
1177         TREE_OPERAND.
1178         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1179         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1180         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
1181         second operand of EXIT_BLOCK_EXPR.
1182         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1183         TREE_OPERAND.
1184         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1185
1186 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1187
1188         * xref.h (xref_flag_value): Remove.
1189         (xref_set_data, xref_get_data): Likewise.
1190         (xref_set_current_fp): Likewise.
1191         (XREF_NONE): Likewise.
1192         (XREF_GET_DATA): Likewise.
1193         * xref.c (xref_flag_value): Remove.
1194         (xref_set_data, xref_get_data): Likewise.
1195         (xref_set_current_fp): Likewise.
1196
1197 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1198
1199         * gjavah.c (output_directory): Make static.
1200         (temp_directory): Likewise.
1201
1202 2004-11-15  Tom Tromey  <tromey@redhat.com>
1203
1204         * decl.c (instn_ptr_type_node): Removed.
1205         (lineNumbers_ptr_type_node): Removed.
1206         (jint_type): Removed.
1207         (jint_ptr_type): Removed.
1208
1209 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
1210
1211         PR java/15576
1212         * check-init.c (check_init): Ignore DECL_EXPR.
1213         * expr.c (always_initialize_class_p): Reenable.
1214         (build_class_init): Use a variable to store the decl.  Also use
1215         boolean_false_node instead of integer_zero_node.
1216         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1217         to the block.
1218
1219 2004-11-08  Tom Tromey  <tromey@redhat.com>
1220
1221         PR java/16843:
1222         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1223         generating a JNI header.
1224         (print_field_info): Handle JNI headers.
1225         (jni_print_float): Likewise.
1226         (jni_print_double): Likewise.
1227
1228 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
1229
1230         * decl.c (end_java_method): Remove duplicated code.
1231
1232 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
1233             Gerald Pfeifer  <gerald@pfeifer.com>
1234
1235         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1236         as well.
1237
1238 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
1239
1240         PR java/17265
1241         * class.c: Reinstate 2004-08-18 patch.
1242         (make_local_function_alias): Don't create an alias for extern (native)
1243         functions.
1244
1245 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
1246
1247         PR java/17265
1248         * class.c (make_local_function_alias): Revert 2004-08-18 change.
1249         (make_method_value): Likewise.
1250
1251 2004-10-21  Andrew Haley  <aph@redhat.com>
1252
1253         PR java/18091:
1254         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1255
1256 2004-10-20  Andrew Haley  <aph@redhat.com>
1257
1258         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1259         Remove duplicated code block.
1260
1261 2004-10-18  Steven Bosscher  <stevenb@suse.de>
1262
1263         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1264         New rules to work around old Bison warnings.
1265
1266 2004-10-17  Steven Bosscher  <stevenb@suse.de>
1267
1268         * class.c (ident_subst): Always alloca buffer.
1269         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1270         opcode after including javaop.def.
1271         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1272         conditional expression that exits, to avoid warnings.
1273         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1274         a user of an extension.
1275         * win32-host.c: Move check down to have non-empty file when
1276         WIN32 is not defined.
1277
1278         * Make-lang.in (java-warn): Add STRICT_WARN.
1279         (java/jcf-io.o-warn): Don't have Werror for this file.
1280         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1281
1282 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
1283
1284         * expr.c (expr_add_location): Move declaration to before all
1285         statements.
1286         * parse.y (java_expand_classes): Ditto.
1287         * lex.c (java_peek_unicode): Ditto.
1288
1289 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1290
1291         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1292         if possible, else convert `foo' to 'foo'.
1293         * class.c: Likewise.
1294         * decl.c: Likewise.
1295         * expr.c: Likewise.
1296         * jcf-io.c: Likewise.
1297         * jcf-parse.c: Likewise.
1298         * lang.c: Likewise.
1299         * lex.c: Likewise.
1300         * parse.h: Likewise.
1301
1302 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1303
1304         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1305         rename parameter 'msg' to 'msgid' in function declaration.
1306         (issue_warning_error_from_context): Likewise.
1307         (yyerror): Rename parameter 'msg' to 'msgid'.
1308         (all over): Use new quoting style for diagnostics.
1309
1310 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1311
1312         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1313         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1314         Update copyright.
1315
1316 2004-10-14  Matt Austern  <austern@apple.com>
1317
1318         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1319         pointer_set_t* now.
1320
1321 2004-10-13  Tom Tromey  <tromey@redhat.com>
1322
1323         PR java/15578:
1324         * lang.opt (--extdirs): Document.
1325         * jvspec.c (lang_specific_driver): Recognize -encoding and
1326         -extdirs.
1327
1328 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
1329
1330         * parse.y (issue_warning_error_from_context): Use va_list *
1331         instead of va_list parameter.
1332         (parse_error_context): Update call.
1333         (parse_warning_context): Likewise.
1334
1335 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
1336
1337         * parse.y, parse-scan.y: Add list of diagnostic messages to
1338         insulate translation template from version of yacc/bison used
1339         to compile the grammar.
1340
1341 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
1342
1343         Prepare for %q, %< and %> in diagnostic message strings.
1344         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1345         Name second parameter 'msgid'.
1346         * parse.y: Additionally include pretty-print.h and diagnostic.h.
1347         (issue_warning_error_from_context): Use pretty-printer functions
1348         instead of vsprintf for constructing formatted messages. Rename
1349         parameter 'msg' to 'msgid'.
1350         (parse_error_context): Rename parameter 'msg' to 'msgid'.
1351         (parse_warning_context): Likewise.
1352
1353 2004-10-05  Andrew Haley  <aph@redhat.com>
1354
1355         PR java/17779
1356         * jcf-parse.c (parse_zip_file_entries): If a class has a
1357         superclass and a TYPE_SIZE of zero, lay it out.
1358
1359 2004-09-30  Andrew Haley  <aph@redhat.com>
1360
1361         PR java/17733
1362         * jcf-parse.c (compute_class_name): Rewrite.
1363
1364 2004-10-01  Jan Hubicka  <jh@suse.cz>
1365
1366         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1367
1368 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1369
1370         * lex.c: Fix a comment typo.
1371
1372 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1373
1374         * java-tree.h: Fix a comment typo.
1375
1376 2004-09-30  Per Bothner  <per@bothner.com>
1377
1378         Simplify lexer.  Implement --enable-mapped-location support.
1379         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
1380         (parse_source_file_1): Pass filename as extra parameter, so we can call
1381         linemap_add and set input_location here, rather than in both callers.
1382         (read_class): Pass copied filename to parse_source_file_1.
1383         Don't initialize wfl_operator - only needed for source compilation.
1384         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
1385         * lex.h:  Remove a bunch of debugging macros.
1386         * lex.h (struct_java_line, struct java_error):  Remove types.
1387         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
1388         (struct java_lc_s):  Remove prev_col field.
1389         (struct java_lexer):  New fields next_unicode, next_columns, and
1390         avail_unicode.  New position field, and maybe token_start field.
1391         Don't need hit_eof field - use next_unicode == -1 instead.
1392         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
1393         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
1394         * parse.h:  Various changes for USE_MAPPED_LOCATION.
1395         (EXPR_WFL_EMIT_LINE_NOTE): XXX
1396         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1397         (struct parser_ctxt):  New file_start_location field.
1398         Remove p_line, c_line fields since we no longer save lines.
1399         Remove elc, lineno, and current_jcf fields - no longer used.
1400         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
1401         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1402         source_location and is probably not needed anymore anyway.
1403         Use new expr_add_Location function.
1404         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
1405         (java_pop_parser_context):  Minor cleanup.
1406         (java_parser_context_save_global, java_parser_context_restore_global,
1407         java_pop_parser_context):  Save/restore input_location as a unit.
1408         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
1409         a source_location instead of a wfl context node.
1410         (check_class_interface_creation):  input_filename is not addressable.
1411         (create_artificial_method):  Calling java_parser_context_save_global
1412         and java_parser_context_restore_global is overkill.  Instead,
1413         temporarily set input_location from class decl.
1414         (java_layout_seen_class_methods): Set input_location from method decl.
1415         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1416         (finish_loop_body):  Likewise.
1417         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
1418         (java_sprint_unicode):  Take a character, not index in line.
1419         (java_sneak_uncode):  Replaced by java_peek_unicode.
1420         (java_unget_unicode):  No longer used.
1421         (java_allocate_new_line. java_store_unicode):  Removed, since we
1422         no longer remember "lines".
1423         (java_new_lexer):  Update for new data structures.
1424         (java_read_char):  Move unget_value checking to java_read_unicode.
1425         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1426         efficient functions that are used directly when lexing.
1427         (java_read_unicode_collapsing_terminators):  No longer needed.
1428         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1429         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1430         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
1431         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
1432         combine switch branches, and test for common token kinds earlier.
1433         (java_lex_error):  Rewrite.
1434         * jv-scan.c (expand_location): New function, copied from tree.c.
1435         (main): Set ctxp->filename instead of setting input_filename directly.
1436
1437 2004-09-30  Per Bothner  <per@bothner.com>
1438
1439         More cleanup for --enable-mapped-location.
1440         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
1441         input_location here.  Instead do it in give_name_to_class.
1442         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1443         * expr.c (expand_byte_code): Call linemap_line_start.
1444         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
1445         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
1446         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
1447         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
1448         to USE_MAPPED_LOCATION case.
1449
1450         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
1451         * jcf-parse.c (java_parse_file): Don't set input_filename.
1452         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1453         Create a list of TRANSLATION_UNIT_DECL.
1454         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
1455         reason is so we can set a DECL_SOURCE_LOCATION for each file.
1456         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1457         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1458         (file_start_location):  New static.
1459         (set_source_filename):  Avoid extra access to input_filename macro.
1460         Concatenate new name with class's package prefix.
1461         (set_source_filename, give_name_to_class): Update.
1462         (give_name_to_class):  Set class's "line 0" input_location here.
1463         (parse_class_file):  Set input_location as a unit.
1464
1465         * jcf-parse.c (load_class): Sanity test if missing inner class file.
1466
1467 2004-09-29  Per Bothner  <per@bothner.com>
1468
1469         * java-tree.h:  Redefine some macros and add some declaration
1470         to handle the USE_MAPPED_LOCATION case.
1471         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
1472         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
1473         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1474         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1475
1476         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1477         * decl.c (finish_method, java_add_stmt): Likewise.
1478         * java-gimplify.c (java-gimplify.c):  Likewise.
1479         * jcf-write.c (generate_bytecode_insns):  Likewise.
1480         * lang.c (java_post_options): Likewise - call linemap_add.
1481
1482 2004-09-29  Andrew Haley  <aph@redhat.com>
1483
1484         PR java/17007
1485         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1486         result of TRUNC_MOD_EXPR.
1487         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1488         * decl.c (java_init_decl_processing): Mark
1489         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1490
1491 2004-09-28  Tom Tromey  <tromey@redhat.com>
1492
1493         PR java/15710:
1494         * class.c (add_miranda_methods): Load superinterface if not
1495         already loaded.
1496
1497 2004-09-28  Andrew Haley  <aph@redhat.com>
1498
1499         PR java/17586
1500         * jcf-parse.c (load_class): Don't try to read a class that we've
1501         already read.
1502
1503 2004-09-28  Andrew Haley  <aph@redhat.com>
1504
1505         * jcf-parse.c (load_class): Back out previous broken patch.
1506
1507 2004-09-28  Andrew Haley  <aph@redhat.com>
1508
1509         PR java/17586
1510         * jcf-parse.c (load_class): Don't try to read a class that we've
1511         already read.
1512         Check that we really did read the right class.
1513
1514 2004-09-25  Tom Tromey  <tromey@redhat.com>
1515
1516         PR java/17500:
1517         * parse.y (create_artificial_method): Use add_method_1.
1518
1519 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
1520
1521         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1522         comment typos.
1523         * gcj.texi: Fix typos.
1524
1525 2004-09-24  Tom Tromey  <tromey@redhat.com>
1526
1527         PR java/15656:
1528         * parse.y (class_instance_creation_expression): Set `$$' to NULL
1529         in error parts of rule.
1530         (unary_expression): Don't call error_if_numeric_overflow when $1
1531         is NULL.
1532
1533 2004-09-24  Tom Tromey  <tromey@redhat.com>
1534
1535         PR java/16789:
1536         * parse.y (resolve_qualified_expression_name): Set
1537         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1538         * expr.c (force_evaluation_order): Check for empty argument list
1539         after stripping COMPOUND_EXPR.
1540
1541 2004-09-23  Andrew Haley  <aph@redhat.com>
1542
1543         PR java/16927:
1544         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1545         COND_EXPRs.
1546
1547 2004-09-23  Tom Tromey  <tromey@redhat.com>
1548
1549         PR java/17329:
1550         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1551         where operand is null.
1552
1553 2004-09-23  Tom Tromey  <tromey@redhat.com>
1554
1555         PR java/17380:
1556         * parse.y (not_accessible_p): Allow access to protected members
1557         even when class is not static.
1558
1559 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1560
1561         * Make-lang.in: Revert the gcc-none.o change.
1562
1563 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
1564
1565         * parse.y (patch_anonymous_class): VEC_space returns true if there
1566         is space.
1567
1568 2004-09-21  Matt Austern  <austern@apple.com>
1569
1570         Fix bootstrap.
1571         * gjavah.c (free_method_name_list): Fix function definition so
1572         it's a proper C prototype.
1573
1574 2004-09-21  Tom Tromey  <tromey@redhat.com>
1575
1576         PR java/17575:
1577         * gjavah.c (free_method_name_list): New method.
1578         (main): Call it.
1579
1580 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
1581             Zack Weinberg  <zack@codesourcery.com>
1582
1583         * java-tree.def: Use tree_code_class enumeration constants
1584         instead of code letters.
1585         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1586         new tree-class enumeration constants.
1587
1588 2004-09-13  Tom Tromey  <tromey@redhat.com>
1589
1590         PR java/17216:
1591         * class.c (layout_class_method): Put synthetic methods into the
1592         vtable.
1593
1594 2004-09-11  Andrew Pinski  <apinski@apple.com>
1595
1596         * Make-lang.in (java/ggc-none.c): Change dependency
1597         for ggc.h into $(GGC_H).
1598
1599 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1600
1601         * Make-lang.in (java/win32-host.o): Add dependency on
1602         coretypes.h.
1603         * win32-host.c: Add includes for coretypes.h, jcf.h
1604
1605 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1606
1607         * Make-lang.in (GCJH_OBJS): Change dependency from
1608         ggc-none.o to java/ggc-none.o
1609         (JCFDUMP_OBJS): Likewise.
1610         (java/ggc-none.o): New target.
1611
1612 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
1613
1614         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
1615         * class.c (build_utf8_ref, build_static_field_ref,
1616         make_field_value, make_method_value, get_dispatch_table,
1617         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1618         * constants.c (get_tag_node, build_ref_from_constant_pool,
1619         build_constants_constructor): Likewise.
1620         * decl.c (java_init_decl_processing): Likewise.
1621         * expr.c (build_java_array_length_access, build_newarray,
1622         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1623         build_java_binop, build_field_ref, expand_java_add_case,
1624         expand_java_call, build_known_method_ref, build_invokevirtual,
1625         build_invokeinterface, build_jni_stub): Likewise.
1626         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1627         * jcf-parse.c (get_constant): Likewise.
1628         * lex.c (do_java_lex): Likewise.
1629         * parse.y (patch_binop, patch_unaryop, patch_cast,
1630         build_newarray_node, patch_newarray): Likewise.
1631         * resource.c (compile_resource_data): Likewise.
1632         * typeck.c (build_prim_array_type): Likewise.
1633
1634 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1635
1636         * decl.c (java_init_decl_processing): Adjust
1637         initialize_sizetypes call.
1638
1639 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
1640
1641         * jv-scan.c (fancy_abort): Add.
1642
1643 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1644
1645         * expr.c (build_java_arrayaccess): Use convert to change
1646         len's type.
1647
1648 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
1649
1650         * class.c (make_local_function_alias): Allocate extra space for 'L'
1651         in name buffer. Reported by Thomas Neumann.
1652
1653 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
1654
1655         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1656         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
1657         * lex.c (do_java_lex): Adjust.
1658         (error_if_numeric_overflow): Likewise.
1659
1660 2004-08-18  Andrew Pinski  <apinski@apple.com>
1661
1662         * class.c (make_local_function_alias): Only make a new decl if we
1663         support alias attribute on all decls.
1664
1665 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
1666
1667         * class.c (make_local_function_alias): New function. Create local
1668         alias for public method DECL.
1669         (make_method_value): Use make_local_function_alias.
1670         * parse.y (craft_constructor): Don't special-case anonymous classes.
1671         Always set ctor_name to init_identifier_node.
1672         (lookup_method_invoke): Call layout_class_method when creating
1673         anonymous class constructor.
1674
1675 2004-08-18  Richard Henderson  <rth@redhat.com>
1676
1677         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1678         default case.  Treat '<' similarly.  Update for
1679         is_gimple_formal_tmp_var name change.
1680
1681 2004-08-17  Andrew Haley  <aph@redhat.com>
1682
1683         * lang.c (lang_printable_name): Obey verbose flag.
1684         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1685         lang_printable_name().
1686         (verify_constructor_circularity, get_printable_method_name,
1687         check_abstract_method_definitions, java_check_regular_methods,
1688         java_check_abstract_methods, check_inner_class_access,
1689         fix_constructors, patch_method_invocation, patch_return):
1690         Likewise.
1691         * expr.c (pop_type_0): Likewise.
1692
1693         * java-tree.h (lang_printable_name_wls): Delete.
1694
1695 2004-08-16  Tom Tromey  <tromey@redhat.com>
1696
1697         PR java/8473:
1698         * parse.y (primary): Changed for initialized and uninitialized
1699         array creations.
1700         (array_access): Handle array_creation_initialized.
1701         (array_creation_expression): Split into
1702         array_creation_initialized and array_creation_uninitialized.
1703
1704 2004-08-16  Andrew Haley  <aph@redhat.com>
1705
1706         * jcf-write.c (find_constant_index): Canonicalize NaNs when
1707         generating bytecode.
1708
1709 2004-08-16  Elliot Lee <sopwith@redhat.com>
1710
1711         PR java/9677
1712         * jcf-parse.c (java_parse_file): Handle filenames with embedded
1713         spaces, and quoted filelists.
1714
1715 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1716
1717         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1718         * class.c (build_utf8_ref, build_static_field_ref,
1719         make_field_value, make_method_value, get_dispatch_table,
1720         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1721         * constants.c (get_tag_node,  build_ref_from_constant_pool,
1722         build_constants_constructor): Likewise.
1723         * decl.c (java_init_decl_processing): Likewise.
1724         * expr.c (build_java_array_length_access, build_newarray,
1725         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1726         build_java_binop, build_field_ref, expand_java_add_case,
1727         expand_java_call, build_known_method_ref, build_invokevirtual,
1728         build_invokeinterface, build_jni_stub): Likewise.
1729         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1730         * jcf-parse.c (get_constant): Likewise.
1731         * lex.c (do_java_lex): Likewise.
1732         * parse.y (patch_binop, patch_unaryop, patch_cast,
1733         build_null_of_type, patch_newarray): Likewise.
1734         * resource.c (compile_resource_data): Likewise.
1735         * typeck.c (build_prim_array_type): Likewise.
1736
1737 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
1738
1739         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1740         Don't create BLOCK here or call java_gimplify_block.
1741
1742 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
1743
1744         * java-tree.h (flag_deprecated): Removed.
1745         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1746         * parse.y (check_deprecation): Check warn_deprecated instead of
1747         flag_deprecated.
1748
1749 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
1750
1751         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1752         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1753         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1754         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1755         flag_force_classes_archive_check, flag_optimize_sci,
1756         flag_indirect_dispatch): Remove explicit declarations.
1757         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
1758         final comment.
1759
1760 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
1761
1762         PR bootstrap/14893
1763         * Make-lang.in (java.install-man): Install from either build
1764         tree or source tree, whichever has the file first.
1765
1766 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1767
1768         * jcf-parse.c (get_constant): Adjust force_fit_type call.
1769         * lex.h (SET_LVAL_NODE_TYPE): Remove.
1770         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1771         (do_java_lex): Likewise. Adjust force_fit_type call.
1772
1773 2004-08-04  Roger Sayle  <roger@eyesopen.com>
1774             Andrew Haley  <aph@redhat.com>
1775
1776         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1777         checking trees as they're being built.
1778         (convert): Call convert_ieee_real_to_integer if we're
1779         converting a constant, even if we're writing a class file.
1780
1781 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
1782
1783         PR java/16701
1784         * parse.y (fold_constant_for_init): Call resolve_field_access with
1785         correct current_class context.
1786
1787 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1788
1789         * decl.c (update_aliases, initialize_local_variable): Replace calls
1790         to build with calls to buildN.
1791         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1792         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1793         * parse.h (BUILD_THROW): Likewise.
1794         * parse.y (switch_expression, synchronized_statement,
1795         catch_clause_parameter, array_creation_expression,
1796         conditional_expression, make_qualified_name,
1797         resolve_qualified_expression_name, patch_method_invocation,
1798         patch_invoke, build_method_invocation, build_new_invocation,
1799         build_assignment, patch_assignment, build_binop, patch_binop,
1800         build_string_concatenation, build_incdec, patch_unaryop,
1801         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1802         patch_return, build_if_else_statement, build_labeled_block,
1803         build_new_loop, build_loop_body, build_bc_statement,
1804         build_assertion, encapsulate_with_try_catch, build_try_statement,
1805         build_try_finally_statement, patch_synchronized_statement,
1806         emit_test_initialization): Likewise, replace build with buildN.
1807
1808 2004-07-28  Eric Christopher  <echristo@redhat.com>
1809
1810         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1811         (java_unsafe_for_reeval): Ditto.
1812
1813 2004-07-26    <hp@bitrange.com>
1814
1815         * parse.y (build_super_invocation): Adjust declaration order to
1816         avoid declaration after statement.
1817
1818 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
1819
1820         * decl.c: Rename all identifiers named `class' to `cl'.
1821
1822 2004-07-25  Richard Henderson  <rth@redhat.com>
1823
1824         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1825
1826 2004-07-23  Mike Stump  <mrs@apple.com>
1827
1828         * boehm.c (set_bit): Improve type safety wrt unsignedness.
1829         * gjavah.c (throwable_p, decode_signature_piece,
1830         print_full_cxx_name, print_include, add_namelet, add_class_decl,
1831         process_file): Likewise.
1832         * jcf-dump.c (main): Likewise.
1833         * jcf-io.c (read_zip_member): Likewise.
1834         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1835         give_name_to_class, get_class_constant): Likewise.
1836         * jcf-write.c (find_constant_wide, push_long_const,
1837         generate_classfile): Likewise.
1838         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1839         * parse.y (read_import_dir): Likewise.
1840         * typeck.c (parse_signature_type): Likewise.
1841         * verify.c (verify_jvm_instructions): Likewise.
1842         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1843
1844 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
1845
1846         * Make-lang.in: Replace rmic and rmiregistry references with
1847         grmic and grmiregistry.
1848         * gcj.texi: Likewise.
1849
1850 2004-07-20  Andrew Haley  <aph@redhat.com>
1851
1852         PR java/16431.
1853         * verify.c (verify_jvm_instructions): Comment change only.
1854
1855         * typeck.c (build_java_array_type): Add size field to array name.
1856
1857         * java-tree.h (LOCAL_SLOT_P): New.
1858         (update_aliases): Add PC argument.
1859         (pushdecl_function_level): New function.
1860
1861         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1862         MODIFY_EXPR, and SAVE_EXPR.
1863         (java_gimplify_modify_expr): New function.
1864
1865         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1866         (expand_iinc): Pass PC to update_aliases().
1867         (STORE_INTERNAL): Likewise.
1868         (process_jvm_instruction): Likewise.
1869
1870         * decl.c (base_decl_map): New variable.
1871         (uniq): New variable.
1872         (update_aliases): Rewrite with more thorough checking.
1873         (debug_variable_p): New function.
1874         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1875         (check_local_named_variable): Delete whole function.
1876         (initialize_local_variable): New function.
1877         (check_local_unnamed_variable): Add checks and comments.
1878         (find_local_variable): Rewrite.
1879         (java_replace_reference): New function.
1880         (function_binding_level): New variable.
1881         (pushdecl_function_level): New function.
1882         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1883         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1884         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1885         function_binding_level.
1886         (end_java_method): Null unused fields to save memory.
1887
1888 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1889
1890         * class.c (add_interface_do): Remove.
1891         (set_super_info, interface_of_p, maybe_add_interface,
1892         add_interface, make_class_data, layout_class,
1893         add_miranda_methods): Adjust BINFO accessors and addition.
1894         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1895         accessors.
1896         * jcf-write.c (generate_classfile): Likewise.
1897         * parse.y (patch_anonymous_class, check_inner_circular_reference,
1898         check_circular_reference, java_complete_class,
1899         check_abstract_method_definitions,
1900         java_check_abstract_method_definitions,
1901         check_interface_throws_clauses, java_check_abstract_methods,
1902         lookup_java_interface_method2,
1903         find_applicable_accessible_methods_list): Adjust BINFO accessors
1904         and addition.
1905         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1906
1907 2004-07-18  Roger Sayle  <roger@eyesopen.com>
1908
1909         * builtins.c (max_builtin, min_builtin,
1910         java_build_function_call_expr): Replace calls to build with buildN.
1911         * class.c (build_class_ref, build_static_field_ref,
1912         get_dispatch_table, make_class_data, layout_class_method): Likewise.
1913         * constants.c (build_ref_from_constant_pool): Likewise.
1914         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1915         add_stmt_to_compound): Likewise.
1916         * except.c (build_exception_object_ref, expand_end_java_handler):
1917         Likewise.
1918         * java-gimplify.c (java_gimplify_case_expr,
1919         java_gimplify_default_expr, java_gimplify_block,
1920         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1921         * jcf-write.c (generate_bytecode_insns): Likewise.
1922         * typeck.c (convert_ieee_real_to_integer): Likewise.
1923
1924 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1925
1926         * java-tree.h (builtin_function): Declare.
1927
1928 2004-07-16  Steven Bosscher  <stevenb@suse.de>
1929
1930         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1931         abuse restore_line_number_status.
1932
1933 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
1934
1935         g++/15861
1936         * jcf-parse.c (java_emit_static_constructor): Specify default
1937         priority.
1938
1939 2004-07-13  Per Bothner  <per@bothner.com>
1940
1941         * java-tree.h (all_class_filename):  Remove useless macro.
1942         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
1943         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
1944         * parse.y (java_parser_context_restore_global):  Replace
1945         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1946         * jcf-parse.c (read_class, java_parse_file):  Likewise.
1947
1948 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1949
1950         PR java/16474
1951         gjavah.c (print_field_info): Emit constant only if field is static.
1952
1953 2004-07-11  Roger Sayle  <roger@eyesopen.com>
1954
1955         * expr.c (java_truthvalue_conversion, flush_quick_stack,
1956         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1957         build_java_ret, build_java_throw_out_of_bounds_exception,
1958         build_java_array_length_access, java_check_reference,
1959         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1960         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1961         expand_java_arrayload, build_java_monitor, expand_java_return,
1962         expand_load_internal, expand_java_NEW, build_get_class,
1963         build_instanceof, expand_java_CHECKCAST, expand_iinc,
1964         build_java_soft_divmod, build_java_binop, build_field_ref,
1965         expand_compare, expand_java_goto, expand_java_switch,
1966         expand_java_add_case, build_class_init, build_known_method_ref,
1967         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1968         expand_invoke, build_jni_stub, expand_java_field_op,
1969         java_expand_expr, expand_byte_code, STORE_INTERNAL,
1970         force_evaluation_order, emit_init_test_initialization): Convert
1971         calls to "build" into calls to the prefered "buildN" functions.
1972
1973 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
1974
1975         * java-tree.h (set_block): Remove.
1976         * lang.c (java_clear_binding_stack): New.
1977         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1978         * decl.c (struct binding_level): Remove this_block.
1979         (clear_binding_level): Likewise.
1980         (poplevel): Don't handle this_block.
1981         (set_block): Remove.
1982
1983 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
1984
1985         * class.c (common_enclosing_context_p): Remove statement with no
1986         side-effects.
1987
1988 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
1989
1990         PR java/8618
1991         * parse.y (create_anonymous_class): Remove 'location' argument. Use
1992         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1993         (craft_constructor): Inherit access flags for implicit constructor
1994         from the enclosing class.
1995         (create_class): Fix comment typo.
1996         (resolve_qualified_expression_name): Pass type of qualifier to
1997         not_accessible_p, not the type in which target field was found.
1998         (not_accessible_p): Handle inner classes. Expand protected
1999         qualifier-subtype check to enclosing instances, but don't apply this
2000         check to static members. Allow protected access to inner classes
2001         of a subtype. Allow private access within common enclosing context.
2002         (build_super_invocation): Get WFL line number info from current
2003         class decl.
2004         (build_incomplete_class_ref): Update for new create_anonymous_class
2005         signature.
2006         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2007         common_enclosing_instance_p.
2008         * class.c (common_enclosing_context_p): New. Determine if types
2009         share a common enclosing context, even across static contexts.
2010         (common_enclosing_instance_p): Renamed from
2011         common_enclosing_context_p. Determines if types share a common
2012         non-static enclosing instance.
2013         * java-tree.h (common_enclosing_instance_p): Declare.
2014         * jcf-write.c (get_method_access_flags): New. Surpress private flag
2015         for inner class constructors.
2016         (generate_classfile): Use get_method_access_flags.
2017
2018 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
2019
2020         * class.c (interface_of_p): Check for null TYPE_BINFO.
2021
2022 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2023
2024         * class.c (make_class): Do not create binfo here.
2025         (set_super_info): Create it here.
2026         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2027
2028 2004-07-08  Richard Henderson  <rth@redhat.com>
2029
2030         * expr.c (case_identity, get_primitive_array_vtable,
2031         java_expand_expr, emit_init_test_initialization): Remove.
2032         * java-tree.h (java_expand_expr): Remove.
2033         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2034
2035 2004-07-07  Per Bothner  <per@bothner.com>
2036
2037         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
2038         get internal error due to mismatched types.
2039
2040         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
2041
2042         * gcj.texi (Linking):   New node.  Document -lgij usage.
2043
2044 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2045
2046         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2047         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2048         * java/class.c (set_super_info, class_depth, interface_of_p,
2049         maybe_add_interface, add_interface, make_class_data,
2050         layout_class, add_miranda_methods): Adjust BINFO macros.
2051         * expr.c (can_widen_reference_to, lookup_field): Likewise.
2052         * jcf-write.c (generate_classfile): Likewise.
2053         * parse.y (patch_anonymous_class,
2054         check_inner_circular_reference, check_circular_reference,
2055         java_complete_class, check_abstract_method_definitions,
2056         java_check_abstract_method_definitions,
2057         check_interface_throws_clauses, java_check_abstract_methods,
2058         lookup_java_interface_method2,
2059         find_applicable_accessible_methods_list): Likewise.
2060         * typeck.c (find_method_in_interface): Likewise.
2061         * verify.c (merge_types): Likewise.
2062
2063 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2064
2065         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2066         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2067
2068 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2069
2070         * class.c (make_class): Use make_tree_binfo.
2071         (set_super_info, add_interface_do): Likewise.
2072         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2073
2074 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2075
2076         * verify.c: Correct array element access formatting thinko.
2077
2078 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2079
2080         * verify.c: Insert a short blurb at the start referring to the JVMS.
2081         (merge_type_state): Remove redundant nested if statement.
2082         (verify_jvm_instructions): Ensure current_subr is initialised to
2083         NULL_TREE.
2084         Minor formatting fixes all over the place.
2085
2086 2004-07-02  Richard Henderson  <rth@redhat.com>
2087
2088         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2089
2090 2004-07-01  Richard Henderson  <rth@redhat.com>
2091
2092         * class.c (registerClass_libfunc): Remove.
2093         (init_class_processing): Don't set it.
2094         (emit_register_classes): Take list_p parameter.  Fill it in
2095         with _Jv_RegisterClass calls.
2096         * decl.c (java_init_decl_processing): Don't call
2097         init_resource_processing.
2098         * jcf-parse.c (java_emit_static_constructor): New.
2099         (java_parse_file): Call it.
2100         * resource.c (registerResource_libfunc): Remove.
2101         (init_resource_processing): Remove.
2102         (write_resource_constructor): Take list_p parameter.  Fill it in
2103         with _Jv_RegisterResource calls.
2104         * java-tree.h: Update prototypes.
2105
2106 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
2107
2108         PR java/1262
2109         * class.c (layout_class_method): Do not override package-private
2110         method if its in a different package.
2111         (split_qualified_name): Move here from parse.y. Rename from
2112         breakdown_qualified. Add comment.
2113         (in_same_package): Move here from parse.y. Add comment.
2114         * java-tree.h (break_down_qualified, in_same_package): Declare.
2115         (in_same_package): Likewise.
2116         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2117         Callers updated.
2118
2119 2004-06-29  Andrew Haley  <aph@redhat.com>
2120
2121         * except.c (expand_start_java_handler): Push a new binding level.
2122         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2123         register_exception_range() to register where we'll do it.
2124         (expand_end_java_handler): Remove old bogus code.  Replace with
2125         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2126         the top of the expression we're curently building.
2127         (maybe_end_try): Delete.
2128         * decl.c (binding_level.exception_range): New field.
2129         (clear_binding_level): Add field exception_range.  Reformat.
2130         (poplevel): Call expand_end_java_handler().
2131         (poplevel): Call java_add_stmt only if functionbody is false.
2132         (maybe_poplevels): Don't call maybe_end_try() from here.
2133         (end_java_method): Clear no longer used trees in function decl.
2134         (register_exception_range): New function.
2135         * java-tree.h (register_exception_range, struct eh_range): Declare.
2136
2137 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
2138
2139         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2140
2141 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
2142
2143         Formatting fixes.
2144         * expr.c (class_has_finalize_method): Fix method name indentation.
2145         (expand_java_call): Remove K&R style parameter declaration.
2146         (expand_invoke): Fix statement indentation.
2147         (expand_java_field_op): Likewise.
2148         * parse-scan.y: Fix typo.
2149         (reset_report): Fix method name indentation.
2150         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2151         line. Fix typos.
2152         * verify.c (verify_jvm_instructions): Document parameters, insert
2153         page break.
2154         * lang.c (lang_init_source): Fix method name indentation.
2155         * class.c (common_enclosing_context_p): Likewise.
2156         (emit_symbol_table): Fix parameter list indentation.
2157         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2158         parameter declaration.
2159         * constants.c: Fix copyright notice indentation.
2160         * typeck.c (find_method_in_superclasses): Fix parameter list
2161         indentation.
2162         (find_method_in_interfaces): Likewise.
2163         * zextract.c (makelong): Fix method name indentation.
2164
2165 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2166
2167         PR java/15715.
2168         * parse.y (create_interface): Set correct access modifiers for
2169         interfaces.
2170         * jcf-write.c (get_classfile_modifiers): New function.
2171         (generate_classfile): Use get_classfile_modifiers, not
2172         get_access_flags.
2173
2174 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2175
2176         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2177         dependency to current parser context, not NULL_TREE, for top-level
2178         classes.
2179         (jdep_resolve_class): Enable member access check for all inner
2180         class dependencies.
2181
2182 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2183
2184         * parse.y (qualify_and_find): Pass type decl, not identifier, to
2185         load_class.
2186
2187 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2188
2189         PR java/15734
2190         * expr.c (expand_java_field_op): Ensure that target class for static
2191         field access has been loaded.
2192
2193 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2194             Ranjit Mathew  <rmathew@hotmail.com>
2195
2196         PR java/1207, java/16178
2197         * jcf-parse.c (load_class): Return immediately if passed a type decl
2198         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2199         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2200         before calling load_class.
2201         (qualify_and_find): Likewise.
2202         (find_in_imports_on_demand): Likewise.
2203         (find_applicable_accessible_methods_list): Likewise.
2204
2205 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
2206
2207         * parse.y (java_layout_seen_class_methods): Don't call load_class
2208         on class defined by source parser.
2209
2210 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2211
2212         * parse.y (set_nested_class_simple_name_value): Removed.
2213         (java_complete_expand_class): Remove calls to
2214         set_nested_class_simple_name_value.
2215
2216 2004-06-22  Andrew Haley  <aph@redhat.com>
2217             Ranjit Mathew  <rmathew@hotmail.com>
2218
2219         Fixes PR java/16113.
2220         * decl.c (force_poplevels): Remove call to expand_end_bindings.
2221
2222 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
2223
2224         * parse.y (create_class): Correct diagnostic message about
2225         java.lang.Object extending anything else.
2226
2227 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2228
2229         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2230         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2231         * constants.c (build_ref_from_constant_pool): Likewise.
2232         * expr.c (build_java_array_length_access): Likewise.
2233         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2234         (invoke_build_dtable, build_invokevirtual): Likewise.
2235         (build_invokeinterface, java_expand_expr): Likewise.
2236         (emit_init_test_initialization): Likewise.
2237         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2238         * parse.y (make_qualifed_name, build_array_ref): Likewise.
2239
2240 2004-06-21  Andrew Haley  <aph@redhat.com>
2241
2242         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2243         block.
2244
2245 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2246
2247         * jcf.h (struct JCF): Change java_source, right_zip and finished
2248         to unsigned int.
2249         * lex.h (struct java_lexer): Change hit_eof, read_anything,
2250         byte_swap and use_fallback to unsigned int.
2251         * parse.h (struct _jdep): Change flag0 to unsigned int.
2252
2253 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
2254
2255         Fixes PR java/13948
2256         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2257         before trying to lay out its methods.
2258         * jcf-parse.c (read_class): Track parsed files using canonical paths
2259         obtained via lrealpath from libiberty.
2260         (java_parse_file): Likewise.
2261         (parse_source_file_1): Rename formal parameter to reflect its
2262         modified purpose. Minor formatting fix.
2263
2264 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2265
2266         * class.c (emit_register_classes): Make the function uninlinable,
2267         do not set current_function_cannot_inline.
2268         * resource.c (write_resource_constructor): Do not reset
2269         flag_inline_functions around rest_of_compilation.
2270
2271 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
2272
2273         PR java/15769
2274         * expr.c (java_truthvalue_conversion): Handle
2275         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2276         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2277         i.e. return the expression.
2278
2279 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
2280
2281         * gjavah.c: Include version.h
2282
2283 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
2284
2285         * jcf-write.c (generate_bytecode_conditional): Correct handling
2286         of unordered conditionals. Add comment.
2287
2288 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
2289             Per Bothner  <per@bothner.com>
2290
2291         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2292         local variable was initialised upon declaration.
2293         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2294         variable was final and initialised upon declaration.
2295         * check-init.c (check_final_reassigned): Give error only if a blank
2296         final is not definitely unassigned or if an initialised final is
2297         reassigned.
2298         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2299         assignment expressions. Remove case MODIFY_EXPR, label do_default.
2300         (check_init): Perform initialised-variable-removing-optimisation
2301         only on non-final local variables.
2302
2303 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2304
2305         * jcf-write.c (generate_bytecode_conditional): Handle binops
2306         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2307         and LTGT_EXPR.
2308         (generate_bytecode_insns): Likewise.
2309
2310 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2311
2312         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2313         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2314
2315 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2316
2317         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2318         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2319
2320 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2321
2322         * decl.c (struct binding_level): Add GTY marker. Compile
2323         binding_depth unconditionally.
2324         (current_binding_level, free_binding_level, global_binding_level):
2325         Likewise.
2326         (clear_binding_level): Unconditionally set binding_depth.
2327         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2328
2329 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2330
2331         * lex.c (java_new_lexer): Set 'encoding'.
2332         (java_read_char): Improve error message for unrecognized characters.
2333         * lex.h (struct java_lexer): New field 'encoding'.
2334
2335 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
2336
2337         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2338
2339 2004-05-21  Mark Wielaard  <mark@klomp.org>
2340
2341         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2342         extern.
2343
2344 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
2345
2346         * typeck.c: Remove non-printable character 160.
2347
2348 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
2349
2350         * check-init.c: Correct minor typos.
2351
2352 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2353
2354         * Make-lang.in, expr.c, java-gimplify.c: Rename
2355         tree-simple.[ch] to tree-gimple.[ch].
2356
2357 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
2358
2359         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2360
2361 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2362
2363         Merge from tree-ssa-20020619-branch.  See
2364         ChangeLog.tree-ssa for details.
2365
2366         * Make-lang.in, builtins.c, check-init.c, class.c,
2367         constants.c, decl.c, except.c, expr.c, java-except.h,
2368         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2369         lang.c, lang.opt, parse.y, resource.c: Merged.
2370         * java-gimplify.c: New file.
2371
2372 2004-05-10  Andrew Haley  <aph@redhat.com>
2373
2374         * parse.y (create_class): Set TYPE_VFIELD.
2375         * decl.c (java_init_decl_processing): Likewise.
2376
2377         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2378         * class.c (make_method_value): Replace DECL_VINDEX with call to
2379         get_method_index().
2380         (get_dispatch_vector): Likewise.
2381         (layout_class_method): Likewise.
2382         Replace set of DECL_VINDEX with call to set_method_index().
2383         (set_method_index): New function.
2384         (get_method_index): New function.
2385         * java-tree.h (set_method_index): New function decl.
2386         (get_method_index): New function decl.
2387
2388 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
2389
2390         * parse.y (check_pkg_class_access): Add new argument
2391         and use it when cl is NULL to call lookup_cl on it.
2392         (parser_check_super_interface): Do not call lookup_cl.
2393         Pass this_decl to check_pkg_class_access and NULL
2394         instead of lookup_cl.
2395         (parser_check_super): Update for change in
2396         check_pkg_class_access.
2397         (do_resolve_class): Likewise.
2398         (process_imports): Likewise.
2399         (find_in_imports_on_demand): Likewise.
2400         (resolve_qualified_expression_name): Likewise.
2401
2402 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
2403
2404         Fixes PR java/9685, PR java/15073
2405         * parse.y (accessibility_string): New method.
2406         (not_accessible_field_error): Use accessibility_string()
2407         instead of java_accstring_lookup().
2408         (resolve_qualified_expression_name): Check with
2409         check_pkg_class_access() before allowing access using
2410         qualified names.
2411         Fix comment typo.
2412         Use check_pkg_class_access() instead of not_accessible_p()
2413         for unqualified types.
2414         (not_accessible_p): Use DECL_CONTEXT (member) instead of
2415         REFERENCE for package-private access checking.
2416         (patch_method_invocation): Use accessibility_string() instead
2417         of java_accstring_lookup().
2418
2419 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
2420
2421         Fixes PR java/15133
2422         * gjavah.c (struct method_name): Add member is_native.
2423         (overloaded_jni_method_exists_p): Match candidate method only if
2424         it is native.
2425         (print_method_info): Initialise is_native flag from the method's
2426         access flags.
2427
2428 2004-04-30  Roger Sayle  <roger@eyesopen.com>
2429
2430         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2431         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2432
2433 2004-04-22  Roger Sayle  <roger@eyesopen.com>
2434
2435         * resource.c (write_resource_constructor): Guard call to possibly
2436         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2437
2438 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
2439
2440         * class.c (make_class_data): Add new field aux_info.
2441         * decl.c (java_init_decl_processing): Push type and decl for
2442         `aux_info'.
2443
2444 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
2445
2446         * expr.c (expand_java_NEW): Don't use size argument for
2447         _Jv_AllocObject calls.
2448         * parse.y (patch_invoke): Likewise.
2449
2450 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2451
2452         * expr.c (build_invokeinterface): Remove unused variables to
2453         fix warnings.
2454
2455 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2456
2457         * class.c (get_interface_method_index): New function. Return dispatch
2458         index for interface method.
2459         (make_method_value): For interface methods, set index field to
2460         iface dispatch index, not DECL_VINDEX.
2461         * expr.c (build_invokeinterface): Use get_interface_method_index.
2462
2463 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2464
2465         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2466
2467 2004-03-31  Andrew Haley  <aph@redhat.com>
2468
2469         PR java/14104
2470         * jcf-io.c (opendir_in_zip): Tidy up error handling.
2471
2472 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
2473
2474         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2475         form of GTY markers.
2476
2477 2004-03-25  Marcus Meissner  <meissner@suse.de>
2478
2479         PR java/14689:
2480         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2481
2482 2004-03-23  Tom Tromey  <tromey@redhat.com>
2483
2484         PR java/14315:
2485         * jcf-write.c (make_class_file_name): Don't report if mkdir
2486         failed with EEXIST.
2487
2488 2004-03-23  Tom Tromey  <tromey@redhat.com>
2489
2490         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2491
2492 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
2493
2494         * class.c, gjavah.c, lang.c: Fix comment typos.
2495         * gcj.texi: Fix typos.
2496
2497 2004-03-19  Per Bothner  <per@bothner.com>
2498
2499         * gcj.texi (Code Generation):  Document new flags and assert defaults.
2500
2501         * class.c (assume_compiled_node_struct):  Rename type to
2502         class_flag_node_struct, as it is now also used for enable_assertions.
2503         Rename assume_compiled_node typedef.  Rename excludep field to value.
2504         (find_assume_compiled_node):  Rename function to find_class_flag_node.
2505         Minor optimization - avoid needless strlen.
2506         (add_assume_compiled):  Some tweaking and optimization.
2507         Rename and generalize to add_class_flag takem an extra parameter.
2508         (add_assume_compled):  New just calls add_class_flag.
2509         (add_enable_assert, enable_assertions):  New functions.
2510         (enable_assert_tree):  New static.
2511         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2512         * lang.opt (fenable-assertions, fenable-assertions=,
2513         fdisable-assertions, fdisable-assertions=):  New options.
2514         * lang.c (java_handle_option):  Handle new options.
2515         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
2516         class in an interface - create helper class nested in outer interface.
2517         (build_assertion):  Short-circuit if enable_assertions is false.
2518
2519 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2520
2521         * java-tree.h: Changes throughout to add checking to macros
2522         and numerous whitespace changes.
2523         (VAR_OR_FIELD_CHECK): New macro.
2524         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2525         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2526
2527 2004-03-16  Per Bothner  <per@bothner.com>
2528
2529         * jcf-jump.c (options):  New --print-constants option.
2530         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
2531
2532         * jcf-dump.c (flag_print_constant_pool):  Default to off.
2533         (print_constant_terse_with_index):  New helper function.
2534         (various places):  Check flag_print_constant_pool where missing.
2535         (main):  If verbose set flag_print_constant_pool.
2536         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
2537
2538 2004-03-15  Andrew Haley  <aph@redhat.com>
2539
2540         PR java/14581
2541         * parse.y (java_complete_lhs): Check that final variable has an
2542         initializer.
2543
2544 2004-03-12  Andrew Haley  <aph@redhat.com>
2545
2546         PR java/14551
2547         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2548         conversion.
2549
2550 2004-02-29  Roger Sayle  <roger@eyesopen.com>
2551
2552         * jcf-parse.c (java_parse_file): Handle the case that input_filename
2553         is NULL.
2554
2555 2004-02-27  Per Bothner  <per@bothner.com>
2556
2557         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
2558         suggestion:  Use build_incomplete_class_ref.
2559         This fixes PR java/13508, java/11714.
2560
2561 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
2562
2563         * java/parse.h: Update copyright.
2564
2565 2004-02-26  Andrew Haley  <aph@redhat.com>
2566
2567         PR java/14231:
2568         * parse.y (check_interface_throws_clauses): Check for
2569         !METHOD_INVISIBLE (iface_method).
2570         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2571         well as CLASS_ABSTRACT.
2572
2573 2004-02-25  Per Bothner  <per@bothner.com>
2574
2575         * parse.y (build_assertion):  If we're in an inner class, create the
2576         class$ helper routine in the outer class.
2577
2578 2004-02-19  Richard Henderson  <rth@redhat.com>
2579
2580         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2581
2582 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
2583
2584         * Make-lang.in (java.install-man): Add extra dependencies.
2585
2586 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
2587
2588         * Make-lang.in: Install man pages under the same names
2589         (possibly transformed) as the program they document.
2590
2591 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
2592
2593         * gjavah.c: Include "intl.h".
2594         (error): New function.
2595         (main): Call gcc_init_libintl.
2596         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2597         print_stub_or_jni, process_file, main): Use error rather than
2598         fprintf.
2599         (print_method_info, usage, help, version, main): Mark strings for
2600         translation with _.  Avoid splitting up sentences.  Send
2601         information messages to stdout.
2602         * jcf-dump.c: Include "intl.h".
2603         (main): Call gcc_init_libintl.
2604         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2605         Mark error, usage and version messages for translation with _.
2606         Avoid splitting up sentences.
2607         * jv-scan.c: Include "intl.h".
2608         (fatal_error, warning): Change parameter s to msgid.  Translate
2609         messages.
2610         (main): Call gcc_init_libintl.
2611         (usage, help, version): Mark error, usage and version messages for
2612         translation with _.  Avoid splitting up sentences.
2613         * jvgenmain.c: Include "intl.h".
2614         (main): Call gcc_init_libintl.
2615         (usage, main): Mark error messages for translation with _.
2616         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2617         JVGENMAIN_OBJS): Add intl.o.
2618         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2619         java/jvgenmain.o): Update dependencies.
2620
2621 2004-02-08  Per Bothner  <per@bothner.com>
2622
2623         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
2624         class don't use not_accessible_field_error, which can get confused.
2625
2626 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
2627
2628         Make-lang.in (po-generated):  Delete.
2629
2630 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
2631
2632         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2633         Depend on target.h.
2634         * decl.c: Include target.h.
2635         (start_java_method): Replace PROMOTE_PROTOTYPES with
2636         targetm.calls.promote_prototypes.
2637         * expr.c: Include target.h.
2638         (pop_arguments): Replace PROMOTE_PROTOTYPES with
2639         targetm.calls.promote_prototypes.
2640         * parse.y: Include target.h.
2641         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2642         with targetm.calls.promote_prototypes.
2643
2644 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
2645
2646         * typeck.c: Update copyright.
2647
2648 2004-02-02  Tom Tromey  <tromey@redhat.com>
2649
2650         * decl.c (java_init_decl_processing): Remove duplicate
2651         gnu/gcj/RawData.
2652
2653 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
2654
2655         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2656
2657 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
2658
2659         * expr.c (build_field_ref): Move variable
2660         definition up.
2661
2662 2004-01-28  Andrew Haley  <aph@redhat.com>
2663
2664         * expr.c (build_field_ref): Widen field offset.
2665
2666 2004-01-27  Andrew Haley  <aph@redhat.com>
2667
2668         java/13273
2669         * parse.y (check_interface_throws_clauses): Make sure class_decl
2670         has been loaded.
2671
2672 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
2673
2674         PR java/13733
2675         * parse.y (patch_assignment): Don't modify lhs_type for
2676         reference assignments.
2677
2678 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2679
2680         * Make-lang.in: Replace $(docdir) with doc.
2681         (java.info, java.srcinfo, java.man, java.srcman): New rules.
2682         (java.install-man): Revamp rule.
2683
2684 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2685
2686         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2687         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2688         instead of deferred backquote.
2689
2690 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
2691
2692         * typeck.c (find_method_in_interfaces): Move variable
2693         definition up.
2694
2695 2004-01-16  Andrew Haley  <aph@redhat.com>
2696
2697         PR java/13273:
2698         * typeck.c (shallow_find_method): New.
2699         (find_method_in_superclasses): New.
2700         (find_method_in_interfaces): New.
2701         (lookup_do): Rewrite.
2702         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2703
2704         * jcf-parse.c (read_class): Save and restore output_class.
2705         * decl.c (java_expand_body): Set output_class from fndecl.
2706
2707 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
2708
2709         * class.c (gen_indirect_dispatch_tables): Fix string length
2710         calculations.
2711
2712 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
2713
2714         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2715         (java.srcextra): Copy above back to source directory if requested.
2716         (po-generated): Delete reference to $(parsedir).
2717         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2718         Use implicit rule.
2719
2720 2004-01-14  Jan Hubicka  <jh@suse.cz>
2721
2722         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2723         estimation.
2724
2725 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
2726
2727         * java-tree.h (java_expand_expr): Change prototype.
2728         * expr.c (java_expand_expr): Add alt_rtl parameter.
2729
2730 2004-01-09  Andrew Haley  <aph@redhat.com>
2731
2732         PR java/12755:
2733         * parse.y (java_fix_constructors):  Set output_class.
2734         (java_reorder_fields): Likewise.
2735         (java_layout_classes): Likewise.
2736         (java_expand_classes): Generate indirect dispatch tables.
2737         (java_expand_classes): Set output_class.
2738         (java_finish_classes): Likewise.
2739         * lang.c (java_init): Turn on always_initialize_class_p if we're
2740         using indirect dis[atch.
2741         (java_decl_ok_for_sibcall): Use output_class, not current_class.
2742         (java_get_callee_fndecl): Use class local atable.
2743         * jcf-parse.c
2744         (always_initialize_class_p): Decl moved to java-tree.h.
2745         (HANDLE_CLASS_INFO): Set output_class.
2746         (read_class): Likewise.
2747         (parse_class_file): Call gen_indirect_dispatch_tables.
2748         (parse_zip_file_entries): Set output_class.
2749         (java_parse_file): Set output_class.  Don't emit symbol tables.
2750         * java-tree.h (output_class): New.
2751         Remove global declarations for otable, atable, and ctable.
2752         (always_initialize_class_p): moved here from decl.c.
2753         (DECL_OWNER): New.
2754         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2755         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2756         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2757         (struct lang_type): Add otable_methods, otable_decl,
2758         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2759         ctable_decl, catch_classes, type_to_runtime_map.
2760         * expr.c (build_field_ref): Make otable, atable, and ctable class
2761         local rather than global.
2762         (build_known_method_ref): Likewise.
2763         (build_invokeinterface): Likewise.
2764         (java_expand_expr): Pass runtime type (rather than actual type) to
2765         expand_start_catch.
2766         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2767         this class.  Look up each class in that map to delete duplicates.
2768         (expand_end_java_handler): Pass runtime type (rather than actual
2769         type) to expand_start_catch.
2770         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2771         (do_nothing): New.
2772         (java_init_decl_processing): Rearrange things.  Remove global
2773         declarations of otable, atable, and ctable.
2774         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2775         (java_expand_body): Set output_class.
2776         * constants.c (build_constant_data_ref): Use output_class, not
2777         current_class.
2778         (alloc_name_constant): Likewise.
2779         * class.c (gen_indirect_dispatch_tables): New.
2780         (build_class_ref): Generate hard reference to superclass, even if
2781         using indirect dispatch.
2782         (build_static_field_ref): Use class local atable.
2783         (make_class_data): Generate hard reference to superclass, even if
2784         using indirect dispatch.
2785         Generate symbolic references to interfaces when using indirect
2786         dispatch.
2787         (make_class_data): Emit otable, atable, and ctable.
2788         Make otable, atable, and ctable class local rather than global.
2789         (emit_catch_table): Make otable, atable, and ctable class local
2790         rather than global.
2791
2792 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
2793
2794         * parse.y (catch_clause_parameter): Fix typo.
2795
2796         PR java/13404
2797         * parse.y: (catch_clause_parameter): Return early if $3, aka
2798         formal_parameter, is null.
2799
2800 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2801
2802         * class.c: Remove uses of "register" specifier in
2803         declarations of arguments and local variables.
2804         * decl.c: Likewise.
2805         * expr.c: Likewise.
2806         * gjavah.c: Likewise.
2807         * jcf-dump.c: Likewise.
2808         * jcf-io.c: Likewise.
2809         * jcf-parse.c: Likewise.
2810         * jcf-write.c: Likewise.
2811         * keyword.h: Likewise.
2812         * parse.y: Likewise.
2813         * typeck.c: Likewise.
2814         * verify.c: Likewise.
2815
2816 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
2817
2818         * Make-lang.in (GCJ_CROSS_NAME): Delete.
2819         (java.install_common, java.install-man): Adjust for above.
2820         (java.uninstall): Likewise.
2821
2822 2003-12-03  Michael Koch  <konqueror@gmx.de>
2823
2824         * class.c (make_class_data):
2825         Push field value to 'hack_signers' instead of 'signers'.
2826         * decl.c (java_init_decl_processing):
2827         Push field 'hack_signers' instead of 'signers'.
2828
2829 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
2830
2831         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2832         including iconv.h.
2833
2834 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
2835
2836         PR java/12374:
2837         * parse.y (qualify_ambiguous_name): Remove lots of broken
2838         field access processing - there's no need to do that here,
2839         because we have resolve_field_access.  Remove
2840         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2841         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2842         used.
2843
2844 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
2845
2846         Fix PR java/13237
2847         * parse.y (java_complete_lhs): Save location prior to patching
2848         CALL_EXPR.
2849
2850 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
2851
2852         PR java/12548
2853         * resource.c (write_resource_constructor): Append
2854         "_resource" to constructor identifier name.
2855
2856 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
2857
2858         Fix PR java/13183.
2859         * constants.c (cpool_for_class): New function.
2860         (outgoing_cpool): Remove global variable.
2861         (alloc_name_constant): Use cpool_for_class.
2862         (build_constants_constructor): Likewise.
2863         * decl.c (java_expand_body): Set current_class.
2864         * java-tree.h (outgoing_cpool) Remove declaration.
2865         (init_outgoing_cpool): Likewise.
2866         * jcf-parse.c (init_outgoing_cpool): Remove function.
2867         (parse_class_file): Don't call init_outgoing_cpool.
2868         * parse.y (java_complete_expand_methods): Don't call
2869         init_outgoing_cpool.  Don't save outgoing_cpool.
2870         (java_expand_classes): Don't restore outgoing_cpool.
2871         (java_finish_classes): Likewise.
2872
2873 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
2874
2875         * Make-lang.in: (java.install-common) Add
2876         symlink for $(target_noncanonical)-gcjh for
2877         native builds.
2878
2879 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2880
2881         * Make-lang.in (java.extraclean): Delete.
2882
2883 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2884
2885         * Make-lang.in (check-java): Add.
2886
2887 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
2888
2889         Fix PR java/13024.
2890         * except.c (prepare_eh_table_type): Allocate variable-sized
2891         buffer `buf' with alloca.
2892
2893 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2894
2895         Fix PR java/12857.
2896
2897         decl.c (java_init_decl_processing): Don't initialize
2898         class_not_found_type_node, no_class_def_found_type_node.
2899
2900         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2901         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2902         (class_not_found_type_node, no_class_def_found_type_node):
2903         Don't define.
2904
2905         parse.y (build_dot_class_method_invocation): Add this_class
2906         argument.  Qualify method invocations to a different class.
2907         (create_new_parser_context): Initialize saved_data_ctx to 0.
2908         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2909         (build_dot_class_method): Don't load classes.  Register
2910         incomplete types.
2911         (build_incomplete_class_ref): Special cases for interfaces
2912         and inner classes.  Move build_dot_class_method call to here...
2913         (patch_incomplete_class_ref): ...from here.  Pass current_class
2914         to build_dot_class_method_invocation.
2915         (build_assertion): Pass class_type to
2916         build_dot_class_method_invocation.
2917         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2918
2919 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2920
2921         Fix PR java/12739.
2922         * java-tree.h (BLOCK_EMPTY_P): Define.
2923         * parse.y (java_complete_lhs): Check for empty blocks
2924         in TRY_FINALLY_EXPR case.
2925
2926 2003-11-17  Andrew Haley  <aph@redhat.com>
2927
2928         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2929         (struct lang_decl_var:freed): New variable.
2930         * decl.c (poplevel): Mark local vars that have gone out of scope.
2931         (push_jvm_slot): Don't use the RTL of a var that has gone out of
2932         scope.
2933
2934 2003-11-16  Jason Merrill  <jason@redhat.com>
2935
2936         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2937         and TAGS files that include them for each front end.
2938
2939 2003-11-15  Tom Tromey  <tromey@redhat.com>
2940
2941         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2942
2943 2003-11-12  Jason Merrill  <jason@redhat.com>
2944
2945         PR optimization/12547
2946         * lang.c (java_tree_inlining_walk_subtrees): Just walk
2947         BLOCK_EXPR_BODY directly.
2948
2949 2003-11-12  Andrew Haley  <aph@redhat.com>
2950
2951         PR java/11045
2952         * parse.y (fold_constant_for_init): Check that we really do have a
2953         constant.
2954
2955         PR java/11533
2956         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2957         init_test_decls being inlined.
2958
2959         PR java/12890:
2960         * parse.y (do_resolve_class): Check return value from
2961         breakdown_qualified().
2962
2963 2003-11-11  Tom Tromey  <tromey@redhat.com>
2964
2965         PR java/12915:
2966         * parse.y (merge_string_cste): Handle case where we have a
2967         pointer that happens to be zero, not null_pointer_node.
2968
2969 2003-11-10  Tom Tromey  <tromey@redhat.com>
2970
2971         * jcf-parse.c (classify_zip_file): Correctly compare
2972         filename_length against length of manifest file's name.
2973
2974 2003-11-08  Tom Tromey  <tromey@redhat.com>
2975
2976         PR java/12894:
2977         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2978
2979 2003-11-06  Andrew Haley  <aph@redhat.com>
2980
2981         * expr.c (java_stack_swap): Make sure destination stack slots are
2982         of the correct type.
2983
2984 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
2985
2986         * Make-lang.in (dvi): Move targets to $(docobjdir).
2987         (gcj.dvi): Simplify rule and adjust target.
2988         (gcj.info): Simplify rule.
2989         (gcj.pod): New intermediate rule.
2990         (gcjh.pod): Likewise.
2991         (jv-scan.pod): Likewise.
2992         (jcf-dump.pod): Likewise.
2993         (gij.pod): Likewise.
2994         (jv-convert.pod): Likewise.
2995         (rmic.pod): Likewise.
2996         (rmiregistry.pod): Likewise.
2997         (gcj.1): Delete.
2998         (gcjh.1): Delete.
2999         (jv-scan.1): Delete.
3000         (jcf-dump.1): Delete.
3001         (gij.1): Delete.
3002         (jv-convert.1): Delete.
3003         (rmic.1): Delete.
3004         (rmiregistry.1): Delete.
3005
3006 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
3007
3008         Fixes PR java/12866.
3009         * parse.y (resolve_qualified_expression_name): Move test
3010         for outer field access methods from here...
3011         (check_thrown_exceptions) ...to here.
3012
3013 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
3014
3015         * .cvsignore: Delete.
3016
3017 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
3018
3019         * verify.c (verify_jvm_instructions): Don't warn about legal
3020         eh binding regions generated for example by jdk 1.4.1.
3021
3022 2003-10-24  David S. Miller  <davem@redhat.com>
3023
3024         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3025
3026 2003-10-22  Andrew Haley  <aph@redhat.com>
3027
3028         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3029         (java_get_callee_fndecl): New.
3030
3031         * jcf-parse.c (java_parse_file): Call emit_catch_table().
3032
3033         * java-tree.h (ctable_decl): New.
3034         (catch_classes):  New.
3035         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3036
3037         * decl.c (java_init_decl_processing): Add catch_class_type.
3038         Add ctable_decl.
3039         Add catch_classes field.
3040
3041         * class.c (build_indirect_class_ref): Break out from
3042         build_class_ref.
3043         (make_field_value): Check flag_indirect_dispatch.
3044         (make_class_data): Ditto.
3045         Tidy uses of PUSH_FIELD_VALUE.
3046         Add field catch_classes.
3047         (make_catch_class_record): New.
3048
3049         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3050
3051 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3052
3053         * jcf-write.c: Follow spelling conventions.
3054         * parse.y: Likewise.
3055
3056 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3057
3058         * ChangeLog: Fix typos.
3059         * expr.c: Fix comment typos.
3060         * jcf-write.c: Likewise.
3061         * lang.c: Likewise.
3062         * lex.c: Likewise.
3063         * mangle.c: Likewise.
3064         * parse-scan.y: Likewise.
3065         * parse.y: Likewise.
3066
3067 2003-10-22  Tom Tromey  <tromey@redhat.com>
3068
3069         * expr.c (expand_byte_code): Only warn about dead bytecode when
3070         extra_warnings is set.
3071
3072 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
3073
3074         Fix for PR java/12586.
3075         * mangle.c (find_compression_record_match): Don't iterate through
3076         package namespace elements unless they all match compression_table
3077         entries.
3078
3079 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
3080
3081         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3082         (generate-manpages): Likewise.
3083         (java.maintainer-clean): Likewise.
3084         (gcj.info): Likewise.
3085         (gcj.1): Likewise.
3086         (gcjh.1): Likewise.
3087         (jv-scan.1): Likewise.
3088         (jcf-dump.1): Likewise.
3089         (gij.1): Likewise.
3090         (jv-convert.1): Likewise.
3091         (rmic.1): Likewise.
3092         (rmiregistry.1): Likewise.
3093         (java.install-man): Likewise.
3094         (parse-scan.o): Move and define complete compile line.
3095         (parse.o): Likewise.
3096         (jcf-tree-inline.o): Move.
3097
3098 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
3099
3100         * Make-lang.in (info): Update dependencies.
3101         (java.install-info): Remove.
3102         ($(srcdir)/java/gcj.info): Replace with ...
3103         ($(docobjdir)/gcj.info): ... this.
3104
3105 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
3106
3107         * Make-lang.in: Replace uses of $(target_alias) with
3108         $(target_noncanonical).
3109
3110 2003-10-09  Tom Tromey  <tromey@redhat.com>
3111
3112         * decl.c (java_init_decl_processing): Declare signers field.
3113         * class.c (make_class_data): Set signers field.
3114
3115 2003-10-09  Jason Merrill  <jason@redhat.com>
3116
3117         * parse.y (patch_assignment): Use make_node to create a BLOCK.
3118         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3119         POINTER_TYPE.
3120
3121 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
3122
3123         * Make-lang.in (java.info): Replace with ...
3124         (info): ... this.
3125         (java.dvi): Replace with ...
3126         (dvi): ... this.
3127         (java.generated-manpages): Replace with ...
3128
3129 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
3130
3131         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3132
3133 2003-10-01  Andrew Haley  <aph@redhat.com>
3134
3135         * jcf-parse.c (java_parse_file): Write otable and atable.
3136         * java-tree.h (atable_methods): New.
3137         (atable_decl): New.
3138         (atable_syms_decl): New.
3139         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3140         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3141         (symbol_*type): Rename method_symbol* to symbol*type.
3142         (emit_offset_symbol_table): Delete.
3143         (emit_symbol_table): New.
3144         (get_symbol_table_index): New.
3145         (atable_type): New.
3146         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3147         (build_known_method_ref): Likewise.
3148         (get_symbol_table_index): Rename from get_offset_table_index.
3149         Parameterize to allow re-use by differing types of symbol table.
3150         (build_invokevirtual): Pass table to get_offset_table_index.
3151         * decl.c (java_init_decl_processing): Push types and decls for
3152         atable and atable_syyms.
3153         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3154         (make_class_data): Add new fields atable and atable_syms.
3155         (emit_symbol_table): Rename from emit_offset_symbol_table.
3156         Parameterize to allow re-use by different types of symbol table.
3157         (build_symbol_entry): Renamed from build_method_symbols_entry.
3158
3159 2003-09-30  Roger Sayle  <roger@eyesopen.com>
3160
3161         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3162         semantics for SAVE_EXPR, by caching the result in a temporary.
3163
3164 2003-09-28  Richard Henderson  <rth@redhat.com>
3165
3166         * check-init.c (check_init): Save and restore input_location
3167         instead of file and line separately.
3168         * decl.c (java_expand_body): Likewise.
3169         * jcf-write.c (generate_bytecode_insns): Likewise.
3170         * parse.y (safe_layout_class): Likewise.
3171         * jcf-parse.c (read_class, parse_class_file): Likewise.
3172         (java_parse_file): Use %H for warning locator.
3173
3174 2003-09-28  Roger Sayle  <roger@eyesopen.com>
3175
3176         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3177         with void-type branches instead of using a COMPOUND_EXPR.
3178
3179 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
3180
3181         * decl.c (java_optimize_inline, dump_function): Remove.
3182         * java-tree.h (java_optimize_inline): Remove declaration.
3183         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3184         * parse.y (source_end_java_method, java_expand_classes):
3185         Likewise.  Remove dead code.
3186
3187 2003-09-27  Roger Sayle  <roger@eyesopen.com>
3188
3189         * lang.c (java_init_options): Set flag_evaluation_order.
3190         * expr.c (force_evaluation_order): Don't attempt to force
3191         evaluation order of binary operations using save_expr.
3192         * parse.y (java_complete_lhs): No longer need to call
3193         force_evaluation_order when constructing binary operators.
3194
3195 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3196             Bryce McKinlay  <bryce@mckinlay.net.nz>
3197
3198         PR java/1333:
3199         * parse.y (not_accessible_field_error): New function.
3200         (resolve_expression_name): Check field access permissions.
3201         (resolve_qualified_expression_name): Use
3202         not_accessible_field_error.
3203         (resolve_qualified_expression_name): Likewise.
3204
3205 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3206
3207         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3208
3209 2003-09-23  Roger Sayle  <roger@eyesopen.com>
3210
3211         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3212         with equal operands without side-effects.
3213
3214 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
3215
3216         * decl.c (java_init_decl_processing): Don't emit otable decls
3217         if flag_indirect_dispatch is not set.
3218
3219 2003-09-21  Richard Henderson  <rth@redhat.com>
3220
3221         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3222         resource.c: Revert.
3223
3224 2003-09-21  Richard Henderson  <rth@redhat.com>
3225
3226         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3227         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3228
3229 2003-09-20  Richard Henderson  <rth@redhat.com>
3230
3231         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3232
3233 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3234
3235         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3236         * check-init.c (check_init): Likewise.
3237
3238 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3239
3240         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3241
3242 2003-09-16  Andrew Haley  <aph@redhat.com>
3243
3244         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3245
3246 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
3247
3248         Fixes PR java/9577
3249         * mangle.c (find_compression_record_match): Skip
3250         over a "6JArray" (the array template mangled string)
3251         IDENTIFIER_NODE.
3252         (mangle_array_type): Correct minor typo.
3253         (atms): Move definition to the beginning.
3254
3255 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
3256
3257         * class.c (add_miranda_methods): Ensure super-interfaces are laid
3258         out. Fix for PR java/12254.
3259
3260 2003-09-11  Richard Henderson  <rth@redhat.com>
3261
3262         * parse.y (source_end_java_method): Update for new
3263         cgraph_finalize_function argument.
3264
3265 2003-09-09  Richard Henderson  <rth@redhat.com>
3266
3267         * parse.y (source_end_java_method): Update call to
3268         cgraph_finalize_function.
3269
3270 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
3271
3272         * decl.c (java_expand_body): New function.
3273         * expr.c (build_class_init): Set DECL_IGNORED_P.
3274         * java-tree.h (start_complete_expand_method,
3275         java_expand_body): Declare.
3276         * jcf-parse.c (cgraph.h): Include.
3277         (java_parse_file): Handle flag_unit_at_a_time.
3278         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3279         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3280         (java_estimate_num_insns): Use walk_tree_without_duplicates.
3281         (java_start_inlining): New function.
3282         * parse.h (java_finish_classes): Declare.
3283         * parse.y: Include cgraph.h.
3284         (block): Don't special-case empty block production.
3285         (craft_constructor): Set DECL_INLINE.
3286         (source_end_java_method): Handle flag_unit_at_a_time.
3287         Replace inline code with call to java_expand_body.
3288         (start_complete_expand_method): Remove static modifier.
3289         (java_expand_method_bodies): Patch function tree for
3290         class initialization and/or synchronization as needed.
3291         Don't begin RTL expansion yet.
3292         (java_expand_classes): Check flag_unit_at_a_time before
3293         calling finish_class.
3294         (java_finish_classes): New function.
3295         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3296         (patch_assignment): Set DECL_CONTEXT on temporary variable.
3297         (emit_test_initialization): Set DECL_IGNORED_P.
3298
3299 2003-09-03  Roger Sayle  <roger@eyesopen.com>
3300
3301         * builtins.c (enum builtin_type): Delete unused enumeration.
3302         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3303
3304 2003-08-28  Tom Tromey  <tromey@redhat.com>
3305
3306         * gcj.texi (Extensions): Document gcjlib URLs.
3307
3308 2003-08-20  Tom Tromey  <tromey@redhat.com>
3309
3310         * gcj.texi (Extensions): Added xref.
3311         (libgcj Runtime Properties): Document
3312         gnu.gcj.runtime.VMClassLoader.library_control.
3313
3314 2003-08-20  Andrew Haley  <aph@redhat.com>
3315
3316         * except.c (prepare_eh_table_type): Use new encoding for exception
3317         handlers when using -fno-assume-compiled.
3318
3319 2003-08-13  Tom Tromey  <tromey@redhat.com>
3320
3321         * gcj.texi (Invoking gij): Document -X and -?.
3322
3323 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
3324
3325         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3326         GCJH_OBJS, JCFDUMP_OBJS
3327         * win32-host.c: Removed the unnecessary and broken dependency
3328         on jcf.h
3329
3330 2003-08-11  Tom Tromey  <tromey@redhat.com>
3331
3332         * parse.y (java_check_regular_methods): Typo fixes.  Call
3333         check_interface_throws_clauses.  Use
3334         check_concrete_throws_clauses.
3335         (check_interface_throws_clauses): New function.
3336         (check_concrete_throws_clauses): New function.
3337         (hack_is_accessible_p): New function.
3338         (find_most_specific_methods_list): Added FIXME.
3339         * typeck.c (lookup_do): Use `flags' argument to decide what to
3340         do.  Reimplemented.
3341         (lookup_argument_method_generic): New function.
3342         (lookup_argument_method2): Removed.
3343         * jcf.h (ACC_INVISIBLE): New define.
3344         * jcf-write.c (generate_classfile): Skip invisible methods.
3345         * class.c (add_miranda_methods): New function.
3346         (layout_class_methods): Use it.
3347         (get_access_flags_from_decl): Use ACC_INVISIBLE.
3348         * java-tree.h (METHOD_INVISIBLE): New define.
3349         (lang_decl_func) [invisible]: New field.
3350         (lookup_argument_method_generic): Declare.
3351         (SEARCH_INTERFACE): New define.
3352         (SEARCH_SUPER): Likewise.
3353         (SEARCH_ONLY_INTERFACE): Likewise.
3354         (SEARCH_VISIBLE): Likewise.
3355         (lookup_argument_method2): Removed declaration.
3356
3357 2003-08-05  Tom Tromey  <tromey@redhat.com>
3358
3359         Fix for PR java/11600:
3360         * parse.y (java_complete_lhs): See whether we're calling a method
3361         on an array.
3362         (check_thrown_exceptions): Added `is_array_call' argument;
3363         fixed `clone' checking; updated all callers.
3364
3365 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
3366
3367         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3368
3369 2003-08-03  Tom Tromey  <tromey@redhat.com>
3370
3371         * java-tree.h (METHOD_TRANSIENT): Removed.
3372         * decl.c (pushdecl): Removed some dead code.
3373         * class.c (get_access_flags_from_decl): Can't have transient
3374         method.
3375         (add_method_1): Can't have a transient method.
3376
3377 2003-07-28  Andreas Jaeger  <aj@suse.de>
3378
3379         * jvspec.c: Convert to ISO C90 prototypes.
3380
3381 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3382
3383         * decl.c (force_poplevels): Fix warning call.
3384
3385 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3386
3387         * expr.c (expand_java_field_op): Don't use xxx_with_decl
3388         (expand_java_field_op): Likewise.
3389         * class.c (layout_class_method): Likewise
3390         (emit_register_classes): Likewise.
3391         * decl.c (pushdecl): Likewise.
3392         (poplevel): Likewise.
3393         (force_poplevels): Likewise.
3394         (give_name_to_locals): Likewise.
3395         * check-init.c (check_for_initialization): Likewise.
3396
3397 2003-07-24  Jason Merrill  <jason@redhat.com>
3398
3399         * java-tree.h: Move boolean_type_node et al to the back end.
3400
3401 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3402
3403         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3404         casts.
3405
3406 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
3407
3408         * lang.opt: Don't show -MD_ and -MDD_.
3409
3410 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
3411
3412         * lang-options.h: Remove.
3413         * lang.opt: Add help text.
3414
3415 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
3416
3417         * expr.c: Remove the last argument to expand_assignment().
3418
3419 2003-07-09  Jan Hubicka  <jh@suse.cz>
3420
3421         * java-tree.h (DECL_NUM_STMTS): Rename to...
3422         (DECL_ESTIMATED_INSNS): ... this.
3423         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3424         New static functions.
3425         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3426         * parser.y (add_stmt_to_compound): Do not account statements.
3427
3428 2003-07-08  Mark Wielaard  <mark@klomp.org>
3429
3430         * gcj.texi: CNI now expands to Compiled Native Interface.
3431
3432 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3433
3434         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3435
3436 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3437
3438         * expr.c (expand_byte_code): Adjist emit_line_note call.
3439
3440 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
3441
3442         * lang.c (java_handle_option): Don't handle filenames.
3443
3444 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
3445
3446         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3447         DIR_SEPARATOR.
3448         Use FILENAME_CMP.
3449         * jcf-write.c: Don't default-define DIR_SEPARATOR.
3450         * jcf.h: Delete COMPARE_FILENAMES definition.
3451
3452 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
3453
3454         * lang.c (java_init_options): Update prototype.
3455
3456 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3457
3458         * decl.c (poplevel): Adjust define_label call.
3459
3460 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3461
3462         * gjavah.c (flag_jni): Make non-static.
3463         * parse-scan.y (ctxp): Make non-static.
3464
3465         * class.c (build_method_symbols_entry)
3466         * expr.c (get_offset_table_index)
3467         * jcf-parse.c (jcf_parse):
3468         Mark the definition static, matching the forward declaration.
3469
3470 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
3471
3472         * lang.c (java_handle_option): Don't check for missing arguments.
3473
3474 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3475
3476         * class.c (push_class): Use a location_t to save place.
3477         (emit_register_classes): Set input_location. Adjust
3478         expand_function_end call.
3479         * resource.c (write_resource_constructor): Likewise.
3480         * decl.c (end_java_method): Adjust expand_function_end call.
3481         * parse.y (source_end_java_method): Likewise.
3482
3483 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3484
3485         * lang.c (java_handle_option): Likewise.
3486
3487 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
3488
3489         * lang.c (java_handle_option): Special-casing of optional
3490         joined arguments no longer needed.
3491         * lang.opt: Update switches that take optional argument.
3492
3493 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3494
3495         * lang.opt: Declare Java.
3496         * lang.c (java_init_options): Update.
3497
3498 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3499
3500         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3501
3502 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3503
3504         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3505         * lang.c (java_handle_option): -MD and -MMD have an underscore.
3506         * lang.opt: -MD and -MMD have an underscore.
3507
3508 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3509
3510         * class.c (emit_register_classes): Adjust init_function_start
3511         call.
3512         * decl.c (complete_start_java_method): Likewise.
3513         * resource.c (write_resource_constructor): Likewise.
3514
3515 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3516
3517         * Make-lang.in: Update to use options.c and options.h.
3518         * lang.c: Include options.h not j-options.h.
3519         (java_handle_option): Abort on unrecognized option.
3520         (java_init_options): Request Java switches.
3521
3522 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
3523
3524         * Make-lang.in: Handle mostlyclean.
3525
3526 2003-06-11  Tom Tromey  <tromey@redhat.com>
3527
3528         * lang.c (java_handle_option): Update dependency_tracking for
3529         OPT_MF case.
3530
3531         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3532         empty argument.
3533
3534 2003-06-10  Andrew Haley  <aph@redhat.com>
3535
3536         * resource.c (write_resource_constructor): Use expand_expr to
3537         generate the address of the label attached to a resource.
3538         * Make-lang.in (java/resource.o): Add expr.h
3539
3540 2003-06-10  Andrew Haley  <aph@redhat.com>
3541
3542         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3543         (java_decl_ok_for_sibcall): New.
3544
3545 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
3546
3547         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3548         (java/j-options.c, java/j-options.h): New.
3549         * java-tree.h (resource_name, compile_resource_file,
3550         compile_resource_data): Constify.
3551         * jcf-write.c (jcf_write_base_directory): Similarly.
3552         * jcf.h (jcf_write_base_directory): Similarly.
3553         * lang.c: Include j-options.h.
3554         (cl_options_count, cl_options, string_option, java_decode_option,
3555         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3556         process_option_with_no): Remove.
3557         (resource_name): Constify.
3558         (LANG_HOOKS_HANDLE_OPTION): Override.
3559         (java_handle_option): New.
3560         (java_init): Don't call jcf_path_init.
3561         (java_init_options): Call jcf_path_init.
3562         * lang.opt: New.
3563         * resource.c (compile_resource_data, compile_resource_file): Constify.
3564
3565 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
3566
3567         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3568         (struct lang_decl_func): Add last_line field.
3569         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3570         DECL_SOURCE_LINE_LAST): Remove.
3571         * parse.y (missing_return_error, finish_method_declaration,
3572         lookup_cl, start_artificial_method_body, source_end_java_method,
3573         start_complete_expand_method): Adjust.
3574
3575 2003-06-08  Tom Tromey  <tromey@redhat.com>
3576
3577         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3578         fno-assume-compiled.
3579
3580 2003-06-08  Roger Sayle  <roger@eyesopen.com>
3581
3582         * builtins.c (define_builtin_type, builtin_types): Delete.
3583         (define_builtin): Rewritten to take just the built-in code,
3584         the function's name, type and fallback library function name.
3585         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3586         (initialize_builtins): Overhaul to define the GCC builtins
3587         used by gcj manually, providing the Java run-time's
3588         implementations as the fallback library function.
3589
3590 2003-06-08  Anthony Green  <green@redhat.com>
3591
3592         * parse.y (patch_cast): Fix conversions from floating-point to
3593         integral types.
3594
3595 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
3596
3597         * Make-lang.in: Update.
3598         * lang.c: Include opts.h. Define cl_options_count and cl_options.
3599
3600 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3601
3602         * lang.c (java_init_options): Update.
3603
3604 2003-06-05  Jan Hubicka  <jh@suse.cz>
3605
3606         * Make-lang.in:  Add support for stageprofile and stagefeedback
3607
3608 2003-05-31  Roger Sayle  <roger@eyesopen.com>
3609
3610         * lang.c (java_init_options): Prescribe wrap-around two's
3611         complement arithmetic overflow by setting flag_wrapv.
3612
3613 2003-05-29  Roger Sayle  <roger@eyesopen.com>
3614
3615         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3616         (builtin_record): Add an additional builtin_code field to
3617         record which GCC built-in corresponds to the Java function.
3618         (java_builtins):  Add new entries for atan, atan2, exp, log,
3619         pow and tan.
3620         (max_builtin, min_builtin, abs_builtin): Perform constant
3621         folding on the resulting tree.
3622         (java_build_function_call_expr): Likewise, perform constant
3623         folding on the resulting tree.
3624         (initialize_builtins): The NULL creators are now allowed in
3625         the java_builtins table, which is now terminated by an entry
3626         with builtin_code == END_BUILTINS.
3627         (check_for_builtin): Likewise.  If the matching creator is
3628         NULL, construct the call using java_build_function_call_expr
3629         directly with the decl for the corresponding builtin_code.
3630
3631 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3632
3633         * win32-host.c: Normalize copyright boilerplate.
3634
3635 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3636
3637         * parse.y (print_int_node): Use string concatentation on
3638         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3639         function calls into one.
3640
3641 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
3642
3643         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3644         fatal_io_error with calls to fatal_error; add ": %m" to the end of
3645         all the affected error messages.
3646
3647 2003-05-13  Richard Henderson  <rth@redhat.com>
3648
3649         * class.c (layout_class_method): Set DECL_EXTERNAL.
3650         * decl.c (java_mark_decl_local, java_mark_class_local): New.
3651         * java-tree.h (java_mark_class_local): Declare.
3652         * jcf-parse.c (parse_class_file): Use it.
3653         * parse.y (java_expand_classes): Likewise.
3654
3655 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
3656
3657         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3658         * lex.h: #include input.h.
3659         * jv-scan.c (input_filename): Remove.
3660
3661 2003-05-02  Tom Tromey  <tromey@redhat.com>
3662
3663         PR java/10491:
3664         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3665         (handle_inner_classes): New function.
3666
3667 2003-05-01  Tom Tromey  <tromey@redhat.com>
3668
3669         PR java/10459:
3670         * parse.y (finish_for_loop): Do nothing if update expression is a
3671         EXPR_WFL_NODE wrapping nothing.
3672         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3673
3674 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
3675
3676         * lex.h (input_lineno): Remove declaration.
3677         * parse-scan.y: #include input.h.
3678         (input_filename): Remove declaration.
3679         (input_location): Add definition.
3680         (input_line): Remove definition.
3681
3682 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3683
3684         * lex.h (lineno): Rename to ...
3685         (input_line): ... here
3686         * parse-scan.y (lineno): Rename to ...
3687         (input_line): ... here.
3688         (reset_report): Rename lineno to input_line.
3689         * check-init.c (check_init): Likewise.
3690         * class.c (push_class): Likewise.
3691         * decl.c (complete_start_java_method, end_java_method): Likewise.
3692         * expr.c (expand_byte_code): Likewise.
3693         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3694         * jcf-write.c (generate_bytecode_insns): Likewise.
3695         * lex.c (java_init_lex, java_allocate_new_line,
3696         do_java_lex): Likewise.
3697         * parse.h (YYNOT_TWICE): Likewise.
3698         * parse.y (empty_statement, expression_statement,
3699         java_pop_parser_context, java_parser_context_save_global,
3700         yyerror, register_fields, method_header, safe_layout_class,
3701         find_in_imports_on_demand, create_artificial_method,
3702         source_end_java_method, start_complete_expand_method,
3703         build_thisn_assign, java_complete_lhs,
3704         maybe_absorb_scoping_block): Likewise.
3705
3706 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
3707
3708         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3709         '/' when computing java source filename
3710
3711 2003-04-13  Tom Tromey  <tromey@redhat.com>
3712
3713         * gjavah.c (print_c_decl): Indentation fix.
3714
3715 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3716
3717         * class.c (make_field_value, make_method_value, get_dispatch_table)
3718         (make_class_data, emit_offset_symbol_table)
3719         * constants.c (build_constants_constructor)
3720         * java-tree.h (START_RECORD_CONSTRUCTOR)
3721         * parse.y (maybe_build_array_element_wfl):
3722         Use build_constructor.
3723
3724 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
3725
3726         PR java/10253:
3727         * parse.y (string_convert_int_cst): Always use at least one digit
3728         in string conversion. Remove ASCII dependence.
3729         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3730
3731 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
3732
3733         * Make-lang.in: added win32-host.c
3734         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3735         resolves to open() on non-Win32 platforms and
3736         Win32-specific jcf_open_exact_case() on Win32
3737         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3738         when trying .java and .class files
3739         * win32-host.c: added to repository. Defines
3740         Win32-specific jcf_open_exact_case()
3741
3742 2003-04-10  Andrew Haley  <aph@redhat.com>
3743
3744         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3745         (maybe_free_localvar): Renamed from localvar_free.
3746         Add new arg, really.
3747         (generate_bytecode_insns): Set new variable, jsrs.
3748         Only free local vars if no jsr insns have been emittted.
3749         Call maybe_free_localvar, not localvar_free.
3750
3751 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
3752
3753         * gcj.texi: Remove @ at start of file.
3754
3755 2003-03-25  Tom Tromey  <tromey@redhat.com>
3756
3757         * parse.y (create_interface): Call CHECK_DEPRECATED.
3758
3759 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
3760
3761         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3762
3763 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3764
3765         * javaop.h (jfloat, jdouble): Make them structures mirroring
3766         the bit fields of IEEE float and double respectively.
3767         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3768         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3769         (union Word, union DWord): Delete.
3770         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3771
3772         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3773         D_NAN_MASK): Delete.
3774         (jni_print_float, jni_print_double): New.  Generate
3775         hexadecimal floating constants.
3776         (print_field_info): Use jni_print_float/double.
3777
3778         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
3779         finite floating point numbers for output; special case
3780         non-finite floats.
3781
3782 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3783
3784         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3785         Replace 0 and 1 with true and false in return statements.
3786
3787 2003-03-19  Tom Tromey  <tromey@redhat.com>
3788
3789         * lex.c (do_java_lex): Renamed from java_lex.
3790         (java_lex): New function.
3791         Include timevar.h.
3792
3793 2003-03-13  Tom Tromey  <tromey@redhat.com>
3794
3795         * parse.y (resolve_inner_class): Error if qualifier is a primitive
3796         type.
3797
3798 2003-03-04  Andrew Haley  <aph@redhat.com>
3799
3800         * gjavah.c (is_first_data_member): New global variable.
3801         (print_c_decl): If it's the first data member, align it as the
3802         superclass.
3803         (process_file): Set is_first_data_member.
3804
3805 2003-03-11  Tom Tromey  <tromey@redhat.com>
3806
3807         * parse.y (resolve_field_access): Initialize class if field is
3808         found in another static field.
3809         * expr.c (build_class_init): Don't optimize out initialization of
3810         implemented interface.
3811
3812 2003-03-11  Andrew Haley  <aph@redhat.com>
3813
3814         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3815         warning.
3816
3817 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3818
3819         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3820         and DIR_SEPARATOR_2 for a target.
3821         Correct minor typos.
3822
3823         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3824         and DIR_SEPARATOR_2 for a target into account.
3825
3826 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3827
3828         * lang.c (java_init): Update prototype, move code to java_post_options.
3829         (java_post_options): Similarly.
3830
3831 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
3832
3833         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3834         compare file name components depending on the case-sensitivity
3835         or otherwise of the host file system.
3836
3837         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3838         "strcmp" to compare file name components.
3839         Use IS_DIR_SEPARATOR instead of comparing directly against
3840         DIR_SEPARATOR.
3841         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3842         comparing directly against DIR_SEPARATOR.
3843
3844 2003-03-04  Tom Tromey  <tromey@redhat.com>
3845
3846         * Make-lang.in (java.tags): New target.
3847
3848 2003-03-01  Roger Sayle  <roger@eyesopen.com>
3849
3850         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3851         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3852
3853 2003-03-01  Tom Tromey  <tromey@redhat.com>
3854
3855         * parse.y (jdep_resolve_class): Only check deprecation if we found
3856         a decl.
3857
3858 2003-02-28  Tom Tromey  <tromey@redhat.com>
3859
3860         PR java/9695:
3861         * class.c (maybe_layout_super_class): Always pass a WFL to
3862         do_resolve_class.
3863         * parse.y (do_resolve_class): Updated comment to explain
3864         parameters.
3865
3866 2003-02-26  Tom Tromey  <tromey@redhat.com>
3867
3868         * jcf-write.c (generate_classfile): Check whether class is
3869         deprecated before writing attribute count.
3870
3871 2003-02-25  Roger Sayle  <roger@eyesopen.com>
3872
3873         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3874         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3875
3876 2003-02-23  Tom Tromey  <tromey@redhat.com>
3877
3878         * lang-options.h: Added -Wdeprecated.
3879         * gcj.texi (Warnings): Document -Wdeprecated.
3880         * java-tree.h (flag_deprecated): Declare.
3881         * lang.c (lang_W_options): Added deprecated.
3882         (flag_deprecated): New global.
3883         * chartables.h: Rebuilt.
3884         * gen-table.pl (process_one): Look at whitespace.
3885         (print_tables): Define LETTER_SPACE, LETTER_MASK.
3886         * parse.h (CLEAR_DEPRECATED): New macro.
3887         (CHECK_DEPRECATED_NO_RESET): New macro.
3888         * jcf-parse.c (handle_deprecated): New function.
3889         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3890         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3891         * parse.y (resolve_type_during_patch): Check deprecation.
3892         (jdep_resolve_class): Likewise.
3893         (process_imports): Likewise.
3894         (resolve_expression_name): Likewise.
3895         (check_deprecation): Strip arrays from decl.  Check
3896         flag_deprecated.
3897         (patch_method_invocation): Also check the particular constructor
3898         for deprecation.
3899         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3900         * jcf-write.c (append_deprecated_attribute): New function.
3901         (generate_classfile): Generate deprecated attribute when
3902         appropriate.
3903         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
3904         (java_lex) [case '*']: Simplify logic.
3905         (java_start_char_p): Use LETTER_MASK.
3906         (java_part_char_p): Likewise.
3907         (java_space_char_p): New function.
3908
3909 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3910
3911         Change base class access representation.
3912         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3913         (add_interface_do): Likewise.
3914
3915 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
3916
3917         * decl.c (java_init_decl_processing): Change
3918         soft_lookupjnimethod_node to reflect the change in
3919         signature of _Jv_LookupJNIMethod in libjava/jni.cc
3920         * expr.c (build_jni_stub): Calculate and pass the size
3921         on the stack of the arguments to a JNI function. Use
3922         new target macro MODIFY_JNI_METHOD_CALL to allow a
3923         target to modify the call to a JNI method.
3924
3925 2003-02-08  Roger Sayle  <roger@eyesopen.com>
3926
3927         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3928         instead of basename to avoid compiler warnings on Tru64.
3929
3930 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
3931
3932         * gcj.texi: Update to GFDL 1.2.
3933
3934 2003-01-31  Andrew Haley  <aph@redhat.com>
3935
3936         * parse.y (java_expand_classes): Scan the whole class list looking
3937         for access methods that haven't yet been expanded.
3938
3939 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3940
3941         Fix for java/4269:
3942
3943         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3944         to fix bootstrap on sparc-unknown-netbsdelf1.5.
3945         * jcf-parse.c: Likewise.
3946
3947 2003-01-31  Mark Wielaard  <mark@klomp.org>
3948
3949         * gjavah.c (throwable_p): Allocate 1 more byte for string.
3950
3951 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3952
3953         * class.c (make_class): Use BINFO_ELTS.
3954         (set_super_info): Likewse.
3955         (add_interface_do): Likewise.
3956
3957 2003-01-30  Tom Tromey  <tromey@redhat.com>
3958
3959         * jcf-parse.c (read_class): Update identifier's class value if it
3960         changed during parsing.
3961
3962 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
3963
3964         * Make-lang.in (po-generated): Find the targets in $(parsedir).
3965         Propagate change to all other rules as required.
3966         (java/parse-scan.o): Add explicit dependency on
3967         $(parsedir)/java/parse-scan.c .
3968
3969 2003-01-29  Tom Tromey  <tromey@redhat.com>
3970
3971         * parse.y (patch_assignment): Only transform the rhs of an
3972         assignment when compiling to native.
3973
3974 2003-01-28  Tom Tromey  <tromey@redhat.com>
3975
3976         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3977
3978 2003-01-28  Tom Tromey  <tromey@redhat.com>
3979
3980         * lex.c (java_lex): Don't include UEOF as part of token.
3981         (java_read_unicode): Error if \u sequence prematurely terminated.
3982
3983 2003-01-27  Tom Tromey  <tromey@redhat.com>
3984
3985         * parse.y (java_check_regular_methods): Check for construct after
3986         checking types in throws clause.
3987
3988 2003-01-24  Tom Tromey  <tromey@redhat.com>
3989
3990         * class.c (build_static_field_ref): Only a String or numeric field
3991         can fold to a constant.
3992
3993 2003-01-23  Tom Tromey  <tromey@redhat.com>
3994
3995         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3996         file name in resource buffer.
3997
3998 2003-01-23  Tom Tromey  <tromey@redhat.com>
3999
4000         * expr.c (build_known_method_ref): Use method's context to find
4001         method table index.
4002
4003 2003-01-23  Tom Tromey  <tromey@redhat.com>
4004
4005         * constants.c (set_constant_entry): Allocated cleared memory.
4006
4007 2003-01-22  Tom Tromey  <tromey@redhat.com>
4008
4009         * java-tree.h: Don't use PARAMS.
4010         * resource.c: Add prototypes for all functions.
4011         (write_resource_constructor): Use `const char *' to avoid
4012         warning.
4013
4014 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
4015
4016         * jcf-parse.c (process_zip_dir): Remove unused variable.
4017
4018 2003-01-22  Tom Tromey  <tromey@redhat.com>
4019
4020         * expr.c (build_invokeinterface): Abort if method's context is not
4021         an interface.
4022
4023 2003-01-22  Tom Tromey  <tromey@redhat.com>
4024
4025         * gcj.texi (Input and output files): Mention non-class entries.
4026         * decl.c (java_init_decl_processing): Call
4027         init_resource_processing.
4028         * java-tree.h (compile_resource_data, write_resource_constructor,
4029         compile_resource_file, init_resource_processing): Declare.
4030         * config-lang.in (gtfiles): Added resource.c.
4031         * Make-lang.in (gt-java-resource.h): New target.
4032         (JAVA_OBJS): Added resource.o.
4033         (java/resource.o): New target.
4034         * resource.c: New file.
4035         * class.c (compile_resource_file): Moved to resource.c.
4036         (registerResource_libfunc): Likewise.
4037         (utf8_decl_list): Mark with GTY; now static.
4038         * jcf-parse.c (classify_zip_file): New function.
4039         (parse_zip_file_entries): Use it; compile .properties files.
4040         (process_zip_dir): Use classify_zip_file and compute_class_name.
4041         Don't write class name into zip directory.
4042         (java_parse_file): Call write_resource_constructor.
4043         (compute_class_name): New function.
4044         * jcf-io.c (read_zip_member): Reindented.
4045
4046 2003-01-21  Tom Tromey  <tromey@redhat.com>
4047
4048         * class.c (supers_all_compiled): New function.
4049         (make_class_data): Use it.
4050
4051 2003-01-21  Tom Tromey  <tromey@redhat.com>
4052
4053         * parse.y (method_header): Native method can't be strictfp.
4054         No method can be transient or volatile.
4055
4056 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4057
4058         Make-lang.in (jvspec.o-warn): Add -Wno-error.
4059
4060 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
4061
4062         * check-init.c: Fix comment typos.
4063         * class.c: Likewise.
4064         * constants.c: Likewise.
4065         * decl.c: Likewise.
4066         * except.c: Likewise.
4067         * expr.c: Likewise.
4068         * java-except.h: Likewise.
4069         * java-tree.h: Likewise.
4070         * javaop.h: Likewise.
4071         * jcf-dump.c: Likewise.
4072         * jcf-io.c: Likewise.
4073         * jcf-parse.c: Likewise.
4074         * jcf-write.c: Likewise.
4075         * lang.c: Likewise.
4076         * mangle.c: Likewise.
4077         * typeck.c: Likewise.
4078         * verify.c: Likewise.
4079
4080 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4081
4082         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
4083         * jcf-write.c: Include "tm_p.h".
4084
4085 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4086
4087         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
4088
4089 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4090
4091         * builtins.c (java_build_function_call_expr): Renamed from
4092         build_function_call_expr.  All callers changed.
4093
4094         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
4095         * jcf-parse.c: Include tm_p.h.
4096
4097         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
4098         warning.
4099
4100 2003-01-14  Tom Tromey  <tromey@redhat.com>
4101
4102         * class.c (make_class_data): Check that super is compiled before
4103         building class reference to it.
4104
4105 2003-01-14  Andrew Haley  <aph@redhat.com>
4106
4107         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4108         varargs function -- correct.
4109
4110 2003-01-14  Andrew Haley  <aph@redhat.com>
4111
4112         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
4113
4114 2003-01-14  Andrew Haley  <aph@redhat.com>
4115
4116         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4117         varargs function -- correct.
4118
4119         * parse.y (patch_assignment): Copy the rhs of an assignment into a
4120         temporary if the RHS is a reference.
4121
4122 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4123
4124         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
4125         * keyword.h: Regenerated.
4126
4127         * All Files: Convert to ISO C style function definitions.
4128
4129 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4130
4131         * parse.y (check_pkg_class_access): ANSIfy definition.
4132
4133 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4134
4135         * decl.c, parse-scan.y, parse.y: Don't cast return value of
4136         xmalloc et al.
4137
4138         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
4139
4140 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4141
4142         Merge from pch-branch:
4143
4144         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
4145
4146         * Make-lang.in (java/gjavah.o): Update dependencies.
4147         * gjavah.c: Include ggc.h.
4148
4149         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
4150
4151         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
4152         (JCFDUMP_OBJS): Add ggc-none.o.
4153         (java/jcf-dump.o): Depend on GGC_H.
4154         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
4155         CPool substructures.
4156         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
4157         * jcf-dump.c: Include ggc.h.
4158
4159         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4160
4161         * jcf.h (union cpool_entry): New.
4162         (struct CPool): Use gengtype to mark.  Change field 'data' to be
4163         an array of unions.
4164         (struct JCF): Use gengtype to mark.
4165         (CPOOL_UINT): Update for new cpool_entry type.
4166         (CPOOL_USHORT1): Likewise.
4167         (CPOOL_USHORT2): Likewise.
4168         (CPOOL_FINISH): Use GC to free cpool subfields.
4169         * parse.h (struct parser_ctxt): Mark field current_jcf.
4170         * lex.c (java_init_lex): Use GC to allocate struct JCF.
4171         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
4172         (main_jcf): Use gengtype to mark.
4173         (ggc_mark_jcf): Delete.
4174         (get_constant): Update for new cpool_entry type.
4175         (give_name_to_class): Likewise.
4176         (get_class_constant): Likewise.
4177         (init_outgoing_cpool): Use GGC to allocate struct CPool.
4178         (java_parse_file): Use GGC to allocate struct JCF.
4179         (init_jcf_parse): Don't call ggc_add_root.
4180         * jcf-reader.c (jcf_parse_constant_pool): Update for new
4181         cpool_entry type.
4182         * java-tree.h (current_jcf): Use gengtype to mark.
4183         (CPOOL_UTF): Update for new cpool_entry type.
4184         (outgoing_cpool): Use gengtype to mark.
4185         (struct lang_type): GC struct JCF and struct CPool.
4186         * config-lang.in (gtfiles): Add jcf.h.
4187         * constants.c (find_tree_constant): New.
4188         (set_constant_entry): Allocate cpool subfields using GGC.  Update
4189         for new cpool_entry type.
4190         (find_constant1): Update for new cpool_entry type.
4191         (find_constant2): Likewise.
4192         (find_utf8_constant): Use find_tree_constant.
4193         (find_class_or_string_constant): Remove unnecessary cast to jword.
4194         Update for new cpool_entry type.
4195         (count_constant_pool_bytes): Update for new cpool_entry type.
4196         (write_constant_pool): Likewise.
4197         (alloc_name_constant): Use find_tree_constant.
4198         (build_constants_constructor): Update for new cpool_entry type.
4199
4200         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4201
4202         * parse.y (mark_parser_ctxt): Delete.
4203         (goal): Don't use ggc_add_root.
4204         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
4205         (java_pop_parser_context): Let GC free parser_ctxt.
4206         (java_parser_context_resume): Likewise.
4207         * parse.h (struct parser_ctxt): Use gengtype to mark.
4208         (ctxp): Likewise.
4209         (ctxp_for_generation): Likewise.
4210         * lex.h (struct java_lc_s): Mark for gengtype.
4211         (java_lexer): Rearrange for gengtype.
4212         * config-lang.in (gtfiles): Add lex.h, parse.h.
4213
4214 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4215
4216         * All Files: Remove PARAMS macro.
4217
4218         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
4219         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
4220         `__STDC__' macros.
4221
4222         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
4223         VA_CLOSE.
4224
4225 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4226
4227         * Make-lang.in (java.install-common, java.uninstall,
4228         java.install-info, java.install-man): Prepend $(DESTDIR)
4229         to destination paths in all (un)installation commands.
4230         (java.install-common): Rewrite $(LN) command to support
4231         DESTDIR with "ln" as well as with "ln -s".
4232
4233 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4234
4235         * java-tree.h: Protect against multiple inclusion.
4236
4237 2003-01-07  Tom Tromey  <tromey@redhat.com>
4238
4239         * class.c (add_assume_compiled): Don't adjust parent if we're
4240         already at the root of tree.
4241
4242 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4243
4244         * lang.c (dump_compound_expr): Prototype.
4245
4246 2003-01-03  Tom Tromey  <tromey@redhat.com>
4247
4248         Fix for PR java/8712:
4249         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
4250         when simply checking against `null'.
4251
4252 2003-01-03  Tom Tromey  <tromey@redhat.com>
4253
4254         * gcj.texi (Standard Properties): Document http.proxyHost and
4255         http.proxyPort.
4256
4257         * gcj.texi (GNU Classpath Properties): Document new properties.
4258
4259 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4260
4261         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
4262         java/lang-options.h, java/mangle.c, java/mangle_name.c,
4263         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
4264
4265 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4266
4267         * Make-lang.in, boehm.c, buffer.c,
4268           buffer.h, builtins.c, class.c,
4269           config-lang.in, constants.c,
4270           convert.h, decl.c, except.c,
4271           expr.c, java-except.h,
4272           java-tree.h, javaop.def,
4273           jcf-parse.c, jcf-write.c,
4274           jv-scan.c, jvgenmain.c,
4275           jvspec.c, keyword.gperf,
4276           keyword.h, lang-options.h,
4277           lang-specs.h, lang.c, lex.c,
4278           lex.h, mangle.c, mangle_name.c,
4279           parse-scan.y, parse.h, parse.y,
4280           typeck.c, verify.c, xref.c,
4281           xref.h: Replace "GNU CC" with
4282           "GCC" in the copyright header.
4283
4284         * check-init.c, gjavah.c, javaop.h,
4285           jcf-depend.c, jcf-dump.c, jcf-io.c,
4286           jcf-path.c, jcf-reader.c, jcf.h,
4287           zextract.c, zipfile.h: These files are
4288           "part of GCC". Also say "GCC" not "GNU CC".
4289
4290 2002-12-30  DJ Delorie  <dj@redhat.com>
4291
4292         * Make-lang.in: Protect against texi2pod/pod2man failing.
4293
4294 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
4295
4296         * gcj.texi: Use @copying.
4297
4298 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4299
4300         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
4301         print_cxx_classname.
4302         (print_cxx_classname): Add add_scope parameter.
4303         (print_class_decls): Do not emit a semicolon after the extern
4304         "Java" block.
4305         (process_file): Adjust calls to print_cxx_classname.
4306
4307 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4308
4309         * gcj.texi: Include Cover Texts in man page.
4310
4311 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
4312
4313         * class.c (build_static_field_ref): Check FIELD_FINAL.
4314
4315         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
4316         instead of current_constant_pool_data_ref.
4317         * java-tree.h (current_constant_pool_data_ref): Undefine.
4318         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
4319         * jcf-parse.c (init_outgoing_cpool): Don't initialize
4320         current_constant_pool_data_ref.
4321
4322         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
4323         not build_internal_class_name.
4324
4325         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
4326         Use it when class ref isn't certain to be compiled.
4327
4328 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4329
4330         * gcj.texi: Include gcc-common.texi.
4331         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
4332         $(srcdir)/doc/include/gcc-common.texi.
4333
4334 2002-12-22  Anthony Green  <green@redhat.com>
4335
4336         * gcj.texi (Limitations): Add note about org.xml.sax and
4337         org.w3c.dom.
4338
4339 2002-12-20  Tom Tromey  <tromey@redhat.com>
4340
4341         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
4342         where minimum case value is Integer.MIN_VALUE.
4343         Fixes PR java/8955.
4344
4345 2002-12-18  Andrew Haley  <aph@redhat.com>
4346
4347         * parse.y (patch_invoke): Force evaluation order when `check' is
4348         set.  For PR libgcj/8945.
4349
4350 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
4351
4352         * gcj.texi: Change version number to 3.4.
4353
4354 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
4355         Andrew Haley <aph@redhat.com>
4356
4357         * parse.y (source_end_java_method): Remove custom encoding of line
4358         numbers for a function decl before passing it to the back end.
4359
4360 2002-12-03  Andrew Haley  <aph@redhat.com>
4361
4362         * class.c (make_class_data): New field, "chain".
4363         * decl.c (java_init_decl_processing): Likewise.
4364
4365 2002-12-02  Tom Tromey  <tromey@redhat.com>
4366
4367         For PR java/8740:
4368         * parse.y (do_resolve_class): Handle qualified name via
4369         recursion.
4370
4371 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4372
4373         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
4374         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
4375         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
4376         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
4377         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
4378         Include coretypes.h and tm.h.
4379         * Make-lang.in: Update dependencies.
4380
4381 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4382
4383         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
4384
4385 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4386
4387         * jcf-reader.c: Don't expand JCF_readu4 inside the
4388         expansion of JCF_SKIP.
4389
4390 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4391
4392         * jcf-reader.c: Don't expand JCF_readu4 inside the
4393         expansion of JCF_SKIP.
4394
4395 2002-11-22  Tom Tromey  <tromey@redhat.com>
4396
4397         * parse.y (patch_binop): Cast right hand side of shift expression
4398         to `int'.  Fixes PR java/8676.
4399
4400 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
4401             Andrew Haley <aph@redhat.com>
4402
4403         * gcc/java/jcf-write.c (write_classfile): Remove target
4404         class file, if it exists, before renaming the temporary
4405         class file to it.
4406
4407 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
4408
4409         * jvspec.c (lang_specific_spec_functions): New.
4410
4411 2002-11-18  Tom Tromey  <tromey@redhat.com>
4412
4413         Fix for PR java/7912:
4414         * expr.c (can_widen_reference_to): Allow cast of array to
4415         Cloneable or Serializable.
4416         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4417         (java_io_serializable_identifier_node): Likewise.
4418         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4419         (valid_ref_assignconv_cast_p): Use new identifier nodes.
4420         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4421         java_io_serializable.
4422         * decl.c (java_init_decl_processing): Initialize
4423         java_lang_cloneable_identifier_node and
4424         java_io_serializable_identifier_node.
4425         (java_lang_cloneable_identifier_node): New global.
4426         (java_io_serializable_identifier_node): Likewise.
4427
4428 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
4429
4430         * buffer.c: Remove unnecessary casts.
4431         * check-init.c: Likewise.
4432         * class.c: Likewise.
4433         * constants.c: Likewise.
4434         * decl.c: Likewise.
4435         * except.c: Likewise.
4436         * gjavah.c: Likewise.
4437         * jcf-io.c: Likewise.
4438         * jcf-parse.c: Likewise.
4439         * jcf-path.c: Likewise.
4440         * jvspec.c: Likewise.
4441         * lang.c: Likewise.
4442         * lex.c: Likewise.
4443         * verify.c: Likewise.
4444
4445 2002-11-06  Tom Tromey  <tromey@redhat.com>
4446
4447         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4448         a JNI header.
4449
4450 2002-11-05  Tom Tromey  <tromey@redhat.com>
4451
4452         Fix for PR java/6388.
4453         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4454         * java-tree.h (enum java_tree_index): New values
4455         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4456         (decimal_int_max, decimal_long_max): New defines.
4457         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
4458         (error_if_numeric_overflow): Rewrote range checking.
4459         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4460         decimal_long_max.
4461
4462 2002-11-02  Tom Tromey  <tromey@redhat.com>
4463
4464         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4465
4466         * class.c (make_method_value): Put class name, not signature, into
4467         `throws' field.  For PR java/8415.
4468
4469 2002-10-24  Tom Tromey  <tromey@redhat.com>
4470
4471         * gcj.texi (Invoking gij): Document --showversion.
4472         (Standard Properties): java.library.path now set.
4473
4474 2002-10-23  Tom Tromey  <tromey@redhat.com>
4475
4476         * gjavah.c (decode_signature_piece): In JNI mode, print
4477         `jobjectArray' when array depth is nonzero.
4478         Fixes PR java/8296.
4479
4480 2002-10-15  Andrew Haley  <aph@redhat.com>
4481
4482         * parse.y (patch_invoke): Call force_evaluation_order on a static
4483         arg list.
4484         (resolve_qualified_expression_name): Call force_evaluation_order
4485         on a arg list that is part of a Qualified Expression Name.
4486
4487         * lang.c (dump_compound_expr): New.
4488         (java_dump_tree): New.
4489
4490 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
4491
4492         * gcj.texi: Added item describing the GCJ runtime property
4493         "gnu.gcj.progname".
4494
4495 2002-10-15  Richard Henderson  <rth@redhat.com>
4496
4497         * jcf-parse.c (get_constant): Fix type warning.
4498
4499 2002-10-15  Andrew Haley  <aph@redhat.com>
4500
4501         * java-tree.h (java_inlining_merge_static_initializers): Declare.
4502         (java_inlining_map_static_initializers): Declare.
4503
4504 2002-10-14  Andrew Haley  <aph@redhat.com>
4505
4506         * tree-inline.c (remap_block): All local class initialization
4507         flags go in the outermost scope.
4508         (expand_call_inline): Call java_inlining_map_static_initializers.
4509         (expand_call_inline): Call java_inlining_merge_static_initializers.
4510         * java/lang.c (merge_init_test_initialization): New.
4511         (java_inlining_merge_static_initializers): New.
4512         (inline_init_test_initialization): New.
4513         (java_inlining_map_static_initializers): New.
4514
4515 2002-10-11  Mark Wielaard  <mark@klomp.org>
4516
4517         * gcj.texi (Compatibility): Add Limitations and Extensions section.
4518
4519 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4520
4521         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4522
4523 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4524
4525         * parse.y (merge_string_cste): Add parentheses around & within |.
4526
4527 2002-10-08  Tom Tromey  <tromey@redhat.com>
4528
4529         * parse.y (variable_declarator_id): Simplify error path for
4530         array declarator error.  For PR java/8003.
4531
4532 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
4533
4534         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
4535         bug_report_url.
4536
4537 2002-10-08  Andrew Haley  <aph@redhat.com>
4538
4539         * parse.y (attach_init_test_initialization_flags): Check for
4540         error_mark_node.
4541
4542 2002-10-07  Anthony Green  <green@redhat.com>
4543
4544         * parse.y (merge_string_cste): Fix bug in string concatenation.
4545
4546 2002-10-03  Michael Koch  <konqueror@gmx.de>
4547
4548         * gcj.texi (Standard properties):
4549         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4550
4551 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4552
4553         PR optimization/6627
4554         * lang.c (java_init): If storing the vbit in function
4555         pointers, ensure that force_align_functions_log is atleast
4556         one to aid compatability with g++ vtables.
4557
4558 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
4559
4560         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4561         foul of type-based aliasing.
4562
4563 2002-09-30  Anthony Green  <green@redhat.com>
4564
4565         * gcj.texi (Invoking jv-scan): Fix texinfo.
4566
4567 2002-09-28  Anthony Green  <green@redhat.com>
4568
4569         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4570         (Code Generation): Add -fno-assert documentation.
4571         * jv-scan.c (flag_assert): New global.
4572         (options): Add assert option.
4573         (help): Add --no-assert documentation.
4574         * parse-scan.y (flag_assert): New global.
4575         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4576         (flag_assert): New global.
4577         * java-tree.h (flag_assert): New global.
4578         * lex.c (java_lex): Obey flag_assert.
4579         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4580         calling cc1.
4581
4582 2002-09-26  Andrew Haley  <aph@redhat.com>
4583
4584         * expr.c (build_java_array_length_access): Check for null pointer.
4585         * expr.c (expand_java_arrayload): Likewise.
4586
4587 2002-09-21  Richard Henderson  <rth@redhat.com>
4588
4589         * jcf-parse.c (get_constant): Decode from IEEE no matter
4590         what the target format.
4591
4592 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
4593
4594         * ChangeLog: Follow spelling conventions.
4595         * class.c: Likewise.
4596         * decl.c: Likewise.
4597         * expr.c: Likewise.
4598         * gjavah.c: Likewise.
4599         * java-tree.h: Likewise.
4600         * jcf-dump.c: Likewise.
4601         * jcf-parse.c: Likewise.
4602         * jvspec.c: Likewise.
4603         * lang.c: Likewise.
4604         * mangle.c: Likewise.
4605         * parse.y: Likewise.
4606
4607 2002-09-17  Tom Tromey  <tromey@redhat.com>
4608
4609         * lex.c (java_read_unicode_collapsing_terminators): Handle case
4610         where \r appears at EOF.  Fixes PR java/7950.
4611
4612 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4613
4614         * jvspec.c (lang_specific_driver): Remove unused variable.
4615
4616 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4617
4618         * java-tree.h (union lang_tree_node): Add chain_next option.
4619
4620 2002-09-16  Richard Henderson  <rth@redhat.com>
4621
4622         * jcf-parse.c (get_constant): Runtime check for IEEE format;
4623         use new real.h interface.
4624         * jcf-write.c (find_constant_index): Use new real.h interface.
4625         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4626
4627 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4628
4629         * lang.c: Follow spelling conventions.
4630
4631 2002-09-11  Per Bothner  <per@bothner.com>
4632
4633         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
4634         constant to the type of the field.
4635         (java_complete_tree):  Remove now-redundant code.
4636
4637         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
4638
4639 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
4640
4641         For PR java/5794:
4642         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4643         return label if a ret instruction for the jsr has been reached.
4644
4645 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
4646
4647         * parse.y (DIR_SEPARATOR): Don't define.
4648         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4649
4650 2002-08-28  Andrew Haley  <aph@redhat.com>
4651
4652         * verify.c (verify_jvm_instructions): Allow exception handler
4653         inside code that is being protected, but generate a warning.
4654         * except.c (link_handler): Initialize `expanded' in new eh_range.
4655         (binding_depth, is_class_level, current_pc): Declare extern.
4656
4657 2002-09-01  Mark Wielaard <mark@klomp.org>
4658
4659         * gcj.texi: Add chapter about system properties.
4660         Fixed some typos.
4661
4662 2002-08-26  Tom Tromey  <tromey@redhat.com>
4663
4664         * parse.y (try_builtin_assignconv): Allow narrowing primitive
4665         conversion if RHS_TYPE is byte, short, or char.
4666
4667 2002-08-22  Tom Tromey  <tromey@redhat.com>
4668
4669         * gcj.texi (Invoking gij): Document -cp and -classpath.
4670
4671 2002-08-21  Tom Tromey  <tromey@redhat.com>
4672
4673         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4674         $(prefix)/share.  For PR libgcj/7633.
4675
4676         For PR java/6005 and PR java/7611:
4677         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4678         (java_can_use_bit_fields_p): New function.
4679
4680 2002-08-16  Tom Tromey  <tromey@redhat.com>
4681
4682         * gcj.texi (Class Initialization): Mention class initialization of
4683         arrays.
4684
4685 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
4686
4687         * Make-lang.in (java-tree-inline.o): New.
4688         (JAVA_OBJS): Add java-tree-inline.o.
4689         * parse.y (source_end_java_method): Call java_optimize_inline.
4690         (java_expand_method_bodies): Save method's tree in
4691         DECL_SAVED_TREE.
4692         (add_stmt_to_compound): Keep track of the number of statments.
4693         * lang.c (java_init): Enable flag_inline_trees.
4694         (java_post_options): If flag_inline_functions is on, enable
4695         flag_inline_trees instread.
4696         (decl_constant_value): New.
4697         (java_tree_inlining_walk_subtrees): New.
4698         * java-tree.h (DECL_NUM_STMTS): New macro.
4699         (java_optimize_inline): Declare.
4700         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4701         Handle a LABEL_EXPR.
4702         * decl.c (build_result_decl): If we already have a DECL_RESULT
4703         don't make another.
4704         (dump_function): New.
4705         (java_optimize_inline): New.
4706         (dump_function): New.
4707
4708 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
4709
4710         For PR java/7483:
4711         * parse.y (build_assertion): Invert return from
4712         desiredAssertionStatus.
4713
4714 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4715
4716         * jcf-write.c (get_access_flags): Return correct access flags for
4717         private and protected inner classes.
4718
4719 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4720
4721         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4722
4723 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4724
4725         * mangle_name.c: Don't include obstack.h twice.
4726         * xref.c: Don't include obstack.h.
4727
4728 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4729
4730         * class.c: (permanent_obstack): Delete declaration.
4731         * constants.c: (permanent_obstack): Delete declaration.
4732         * except.c: (permanent_obstack): Delete declaration.
4733         * expr.c: (permanent_obstack): Delete declaration.
4734         * jcf-parse.c: (permanent_obstack): Delete declaration.
4735         (saveable_obstack): Delete declaration.
4736         * parse.h: (permanent_obstack): Delete declaration.
4737         * typeck.c: (permanent_obstack): Delete declaration.
4738
4739 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
4740
4741         * gcj.texi (version-gcc): Increase to 3.3.
4742
4743 2002-07-22  Tom Tromey  <tromey@redhat.com>
4744
4745         * lex.c (java_lex): Check for `e' or `E' after 0.
4746
4747 2002-07-21  Richard Henderson  <rth@redhat.com>
4748
4749         * lang.c (java_unsafe_for_reeval): New.
4750         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4751
4752 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
4753
4754         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4755         (jcf_path_init): Use GET_ENVIRONMENT.
4756
4757 2002-07-10  Roger Sayle  <roger@eyesopen.com>
4758             Zack Weinberg <zack@codesourcery.com>
4759
4760         * builtins.c (initialize_builtins): Remove defines that
4761         handled C/C++ specific junk hereby removed from builtins.def.
4762
4763 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
4764
4765         * lang.c (java_post_options): Update prototype.
4766
4767 2002-07-05  Roger Sayle  <roger@eyesopen.com>
4768
4769         * builtins.c (initialize_builtins): Ignore the additional
4770         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
4771         the builtins.def file.
4772
4773 2002-07-01  Tom Tromey  <tromey@redhat.com>
4774
4775         For PR libgcj/7073:
4776         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4777         specially.
4778
4779 2002-07-01  Roger Sayle  <roger@eyesopen.com>
4780
4781         * java/decl.c (builtin_function): Accept additional parameter.
4782         (java_init_decl_processing): Pass an additional NULL_TREE
4783         argument to builtin_function.
4784
4785 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
4786
4787         * gcj.texi: Fixed gcj invocation example so that it compiles.
4788
4789 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4790
4791         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4792         * parse.y (mark_parser_ctxt): Likewise.
4793         (check_modifiers, declare_local_variables): Avoid incorrect
4794         hardcoded constant 10.
4795
4796         * lex.c (java_read_char): Avoid "comparison is always true"
4797         warning.
4798
4799 2002-06-25  Andreas Schwab  <schwab@suse.de>
4800
4801         * expr.c (JSR): Avoid undefined operation on PC.
4802
4803 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4804
4805         * decl.c (clear_binding_level): Const-ify.
4806
4807 2002-06-13  Akim Demaille  <akim@epita.fr>
4808
4809         * parse.y (class_declaration, interface_declaration): Make sure
4810         all their rules have an action, in order to avoid meaningless `$$
4811         = $1' and their type clashes.
4812
4813 2002-06-11  Tom Tromey  <tromey@redhat.com>
4814
4815         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4816         * parse-scan.y (statement_without_trailing_substatement): Added
4817         assert_statement.
4818         (assert_statement): New rule.
4819         * java-tree.h (struct lang_type) [assertions]: New field.
4820         (TYPE_USES_ASSERTIONS): New macro.
4821         (CLASS_USES_ASSERTIONS): Likewise.
4822         (FIELD_SYNTHETIC): New define.
4823         * lex.c (java_lval;): Added ASSERT_TK.
4824         * parse.y (ASSERT_TK): Added.
4825         (statement_without_trailing_substatement): Added assert_statement.
4826         (assert_statement): New rule.
4827         (build_assertion): New function.
4828         (maybe_generate_pre_expand_clinit): Create and initialize
4829         $assertionsDisabled.
4830         (lookup_package_type): Removed decl.
4831         * keyword.h: Rebuilt.
4832         * keyword.gperf (assert): New token.
4833
4834 2002-06-10  Akim Demaille  <akim@epita.fr>
4835
4836         * parse.y (interface_type_list, class_member_declaration)
4837         (unary_expression_not_plus_minus): Remove duplicate %type.
4838         Whitespace changes.
4839
4840 2002-06-09  Tom Tromey  <tromey@redhat.com>
4841
4842         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4843
4844         * parse.y (method_header): Give error message in all cases.
4845         Fixes PR java/6865.
4846
4847 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4848
4849         Don't use RTL inlining. Fix for PR java/6820.
4850         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4851         (flag_really_inline): New.
4852         (java_decode_option): Set flag_really_inline if -finline-functions
4853         is seen.
4854         (java_post_options): New function. Turn off inlining unless
4855         flag_really_inline is set.
4856
4857 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4858
4859         * gjavah.c (throwable_p): Accept argument as either a classname or
4860         signature fragment. Create null-terminated classname string for super
4861         when calling itself recursively.
4862         (decode_signature_piece): Skip first character from class name
4863         signature when calling throwable_p.
4864
4865 2002-06-08  H.J. Lu  (hjl@gnu.org)
4866
4867         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4868
4869 2002-06-04  Tom Tromey  <tromey@redhat.com>
4870
4871         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4872
4873 2002-06-04  Michael Koch  <konqueror@gmx.de>
4874
4875         * gcj.texi (Input Options): Fixed typo.
4876
4877 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
4878
4879         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4880         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4881         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4882         and all now-pointless local variables.  Rename other local
4883         variables to reflect their not being handles.
4884
4885         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4886         #if JCF_USE_STDIO blocks.
4887
4888         * parse.y: Add missing semicolon at end of rule.
4889
4890 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4891
4892         * check-init.c (attach_initialized_static_class): Delete, unused.
4893         * parse.y: Use htab_t instead of struct hashtable, update
4894         all uses.
4895         * java-tree.h: Include hashtab.h instead of hash.h.
4896         (struct lang_decl_func): Use htab_t, set up for gengtype.
4897         (struct init_test_hash_entry): Delete.
4898         (struct treetreehash_entry): New.
4899         (java_treetreehash_find): New
4900         (java_treetreehash_new): New prototype.
4901         (java_treetreehash_create): New prototype.
4902         (java_mark_tree): Delete prototype.
4903         (java_hash_hash_tree_node): Delete prototype.
4904         (java_hash_compare_tree_node): Delete prototype.
4905         (attach_initialized_static_class): Delete prototype.
4906         * expr.c (build_class_init): Update to use java_treetreehash
4907         functions.
4908         (java_expand_expr): Update to use htab_t.
4909         (emit_init_test_initialization): Likewise.
4910         * decl.c (java_mark_tree): Delete.
4911         * class.c (init_test_hash_newfunc): Delete.
4912         (java_hash_hash_tree_node): Delete.
4913         (java_hash_compare_tree_node): Delete.
4914         (add_method_1): Update to use java_treetreehash functions.
4915         (JAVA_TREEHASHHASH_H): New macro.
4916         (java_treetreehash_hash): New function.
4917         (java_treetreehash_compare): New function.
4918         (java_treetreehash_find): New function.
4919         (java_treetreehash_new): New function.
4920         (java_treetreehash_create): New function.
4921         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4922
4923         * Make-lang.in (java/parse.o): Depend on debug.h.
4924         * java-tree.h (struct lang_identifier): Use gengtype.
4925         (union lang_tree_node): New.
4926         (struct lang_decl_func): Use gengtype.
4927         (struct lang_decl_var): Likewise.
4928         (struct lang_decl): Likewise.
4929         * parse.y: Include debug.h.
4930         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4931
4932         * lang.c (struct language_function): New dummy structure.
4933
4934         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4935         descriminator for DECL_LANG_SPECIFIC.
4936         (struct lang_decl_func): Rename from struct lang_decl.
4937         (enum lang_decl_desc): New.
4938         (struct lang_decl): Make it a union.  Update all the accessor macros.
4939         (struct lang_type): Use gengtype.
4940         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4941         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4942         are now the same size.
4943         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4944         use discriminator to mark DECL_LANG_SPECIFIC.
4945
4946         * Make-lang.in (gt-java-builtins.h): New rule.
4947         (java/builtins.o): Add dependency on gt-<filename>.h.
4948         * builtins.c: Use gengtype for roots.
4949         (union string_or_tree): Use gengtype.
4950         (struct builtin_record): Use gengtype.
4951         * config-lang.in (gtfiles): Add builtins.c.
4952
4953         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4954         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4955         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4956         gt-java-parse.h, gtype-java.h): Add rules to generate.
4957         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4958         (class.o): Add dependency on gt-*.h.
4959         (constants.o): Likewise.
4960         (decl.o): Likewise.
4961         (expr.o): Likewise.
4962         (jcf-parse.o): Likewise.
4963         (jcf-write.o): Likewise.
4964         (lang.o): Likewise.
4965         * config-lang.in (gtfiles): New.
4966         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4967         * constants.c: Replace uses of ggc_add_* with GTY markers.
4968         Include gt-*.h.
4969         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4970         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4971         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4972         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
4973         Include gt-*.h.
4974         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
4975         Include gt-*.h.
4976         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4977         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
4978         gt-*.h.
4979         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4980         Include gtype-java.h.
4981
4982 2002-06-02  Tom Tromey  <tromey@redhat.com>
4983
4984         Fix for PR java/5913:
4985         * parse.y (patch_binop): Call patch_string on op1.
4986
4987 2002-06-02  Tom Tromey  <tromey@redhat.com>
4988
4989         Fix for PR java/1343, PR java/6336:
4990         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
4991         formatting.  Changed return type.
4992         (anonymous_class_counter): Moved to top of file.
4993         (maybe_make_nested_class_name): Append number to class name for
4994         function-local classes.
4995
4996 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4997
4998         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
4999         * Make-lang.in: Update dependency lists.
5000
5001 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
5002
5003         * gjavah.c (throwable_p): Do not free the name of the class after
5004         passing it to find_class.
5005         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
5006         * jcf-io.c (dirent.h): Include it.
5007         (fnmatch.h): Likewise.
5008         (compare_path): New function.
5009         (java_or_class_file): Likewise.
5010         (memoized_dirlist_entry): New type.
5011         (memoized_dirlist_lookup_eq): New function.
5012         (memoized_dirlists): New variable.
5013         (caching_stat): New function.
5014         (memoized_class_lookup_eq): New function.
5015         (memoized_class_lookups): Likewise.
5016         (find_class): Use memoized_class_lookups and caching_stat.
5017         * jcf.h (JCF_USE_SCANDIR): Define.
5018         * parse.y (java_expand_classes): Write the class files in reverse
5019         order.
5020
5021 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5022
5023         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
5024
5025 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
5026
5027         * jcf-write.c (write_classfile): Unlink the temporary file if it
5028         cannot be renamed.  Use concat to build up the name of the
5029         temporary file.
5030
5031 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
5032
5033         * jcf-write.c (write_classfile): Write the file to a
5034         temporary file and then rename it.
5035
5036 2002-05-07  Tom Tromey  <tromey@redhat.com>
5037
5038         * gjavah.c (throwable_p): Use xstrdup, not strdup.
5039
5040         Fix for PR java/1200:
5041         * gjavah.c (throwable_p): New function.
5042         (decode_signature_piece): Use it.  A `WeakReference' isn't the
5043         same as a `jweak'.
5044         Include hashtab.h.
5045         (gcjh_streq): New function.
5046
5047 2002-05-07  Andreas Jaeger  <aj@suse.de>
5048
5049         * parse.y (finish_for_loop): Fix if statement.
5050
5051 2002-05-06  Tom Tromey  <tromey@redhat.com>
5052
5053         Fix for PR java/5941:
5054         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
5055         loop update expression.
5056         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
5057         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
5058
5059 2002-05-04  Mark Wielaard  <mark@klomp.org>
5060
5061         For PR java/6519:
5062         * parse.y (build_string_concatenation): Return just op1 only when op2
5063         is null and op1 is a STRING_CST, otherwise always construct a
5064         StringBuffer.
5065
5066 2002-04-27  Tom Tromey  <tromey@redhat.com>
5067
5068         For PR java/6382:
5069         * parse.y (string_convert_int_cst): New function.
5070         (merge_string_cste): Use it.
5071
5072 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5073
5074         * java-tree.h (java_parse_file): Update.
5075         (java_set_yydebug): Remove.
5076         * jcf-parse.c (yydebug): Remove.
5077         (java_set_yydebug): Die.
5078         (java_parse_file): Update.
5079         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5080
5081 2002-04-24  Tom Tromey  <tromey@redhat.com>
5082
5083         For PR java/6425:
5084         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
5085         EXPR_WFL_QUALIFICATION of qual_wfl.
5086
5087 2002-04-23  Per Bothner  <per@bothner.com>
5088
5089         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
5090         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
5091         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
5092
5093 2002-04-23  Tom Tromey  <tromey@redhat.com>
5094
5095         For PR java/6314:
5096         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
5097         recognize `-fcompile-resource='.
5098         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
5099         a bit.
5100
5101 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5102
5103         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
5104         paths. Fixes PR java/2791.
5105
5106 2002-04-19  Andrew Haley  <aph@redhat.com>
5107
5108         * jcf-write.c (push_long_const): lo, hi: New variables.
5109         Use rshift_double to extract the high part of a 64-bit long.
5110         Use WORD_TO_INT to extract the low part.
5111
5112         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
5113         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
5114         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
5115
5116 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5117
5118         * typeck.c (incomplete_type_error): Remove.
5119
5120 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5121
5122         * class.c (make_class_data): Set DECL_ALIGN on static class data,
5123         for hash synchronization.
5124         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
5125         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
5126         class_type_node.
5127
5128 2002-04-16  Mark Wielaard  <mark@klomp.org>
5129
5130         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
5131         negative zero.
5132
5133 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5134
5135         Fix for PR java/6294:
5136         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
5137         interfaces.
5138
5139 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5140
5141         Fix for PR java/6085:
5142         * parse.y (patch_method_invocation): Always use build_access_to_thisn
5143         to get enclosing "this" argument for inner-class constructor
5144         invocation. Pass correct arguments to build_access_to_thisn.
5145
5146 2002-04-10  Andreas Jaeger  <aj@suse.de>
5147
5148         * gcj.texi (Input Options): Fix extdirs patch.
5149
5150 2002-04-10  Anthony Green  <green@redhat.com>
5151
5152         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
5153
5154 2002-04-09  Anthony Green  <green@redhat.com>
5155
5156         * gcj.texi (Input Options): Add --extdirs documentation.
5157         * jcf-dump.c (OPT_extdirs): New macro.
5158         (options): Add extdirs option.
5159         (help): Describe --extdirs.
5160         (main): Handle OPT_extdirs.
5161         * gjavah.c (OPT_extdirs): New macro.
5162         (options): Add extdirs option.
5163         (help): Describe --extdirs.
5164         (main): Handle OPT_extdirs.
5165         * jcf-path.c (jcf_path_init): Add extdirs support.
5166         (jcf_path_extdirs_arg): New function.
5167         (extensions): New variable to hold extensions path entries.
5168         * jvspec.c: Remove -fextdirs= when compiling main().
5169         * lang.c (java_decode_option): Handle -fextdirs=.
5170         * jcf.h (jcf_path_extdirs_arg): Declare new function.
5171         * Make-lang.in: Compile jcf-path with version info for use in
5172         identifying the appropriate libgcj.jar.
5173
5174 2002-04-08  Tom Tromey  <tromey@redhat.com>
5175
5176         For PR libgcj/5303:
5177         * .cvsignore: Added rmic.1 and rmiregistry.1.
5178         * gcj.texi (Top): Link to new nodes.
5179         (Invoking rmic): New node.
5180         (Invoking rmiregistry): Likewise.
5181         * Make-lang.in (java.generated-manpages): Added rmic.1 and
5182         rmiregistry.1.
5183         (java.maintainer-clean): Likewise.
5184         ($(srcdir)/java/rmic.1): New target.
5185         ($(srcdir)/java/rmiregistry.1): Likewise.
5186         (java.install-man): Handle rmic.1 and rmiregistry.1.
5187
5188 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5189
5190         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
5191         Add note about handling uncaught exceptions. Add an exception handler
5192         to example.
5193
5194 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5195
5196         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
5197         after using it to patch CALL_EXPR.
5198
5199 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5200
5201         * gcj.texi (Invocation): Document CNI invocation API.
5202
5203 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5204
5205         * expr.c (truthvalue_conversion): Rename.  Update.
5206         (expand_compare): Update.
5207         * java-tree.h (java_truthvalue_conversion): New.
5208         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5209
5210 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5211
5212         * java-tree.h (java_mark_addressable): New.
5213         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5214         * typeck.c (mark_addressable): Rename, update.
5215
5216 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5217
5218         * expr.c (build_java_binop): Update.
5219         * java-tree.h (java_signed_type, java_unsigned_type,
5220         java_signed_or_unsigned_type): Update.
5221         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5222         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5223         * parse.y (patch_binop): Update.
5224         * typeck.c (signed_or_unsigned_type, unsigned_type,
5225         signed_type): Update.
5226
5227 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5228
5229         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5230         (java_dummy_print): Remove.
5231         (lang_print_error): Rename.  Exit early if inhibiting output.
5232         (inhibit_error_printing_function): New.
5233         (java_init): Don't set hook.
5234         (lang_init_source): Use new boolean.
5235
5236 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5237
5238         * parse.y (do_resolve_class): Fix infinite recursion.
5239
5240 2002-03-29  Tom Tromey  <tromey@redhat.com>
5241
5242         * parse.y (check_inner_circular_reference): Ignore incomplete
5243         types.
5244
5245 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5246
5247         * Make-lang.in (builtins.o): Update.
5248         * boehm.c (get_boehm_type_descriptor): Update.
5249         * builtins.c: Include langhooks.h.
5250         * decl.c (java_init_decl_processing): Update.
5251         * java-tree.h (java_type_for_mode, java_type_for_size): New.
5252         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
5253         Redefine.
5254         * typeck.c (type_for_mode, type_for_size): Update.
5255
5256 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5257
5258         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
5259
5260 2002-03-28  Tom Tromey  <tromey@redhat.com>
5261
5262         * except.c (expand_end_java_handler): If the handler type is NULL,
5263         use java.lang.Throwable.  Fixes PR java/5986.
5264
5265 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5266
5267         Fix for PR java/4715:
5268         * jcf-parse.c (parse_source_file_3): New function.
5269         (read_class): Call it.
5270         (java_parse_file): Likewise.
5271
5272 2002-03-28  Jan Hubicka  <jh@suse.cz>
5273
5274         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
5275
5276 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5277
5278         * parse.y (resolve_package): Initialize "decl".
5279         (lookup_package_type): Remove unused function.
5280
5281 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5282
5283         Fix for PR java/5993:
5284         * parse.y (resolve_package): Return the decl if resolution was
5285         successful. Don't special case "java.lang" and "java.lang.reflect"
5286         packages. Set type_name to the merged identifier.
5287         (resolved_qualified_expression_name): Print error using "name" if
5288         resolve_package returns NULL_TREE.
5289
5290 2002-03-27  Tom Tromey  <tromey@redhat.com>
5291
5292         * expr.c (expand_invoke): Don't generate null pointer check if
5293         we're calling <init>.
5294
5295 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5296
5297         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
5298         fix prototype.
5299         * java-tree.h (java_lang_expand_expr): Similarly.
5300         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5301         (java_init): Don't set hook.
5302
5303 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5304
5305         Fix for PR java/5850:
5306         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
5307         context if field was not found in the current scope.
5308         * expr.c (lookup_field): Don't look in enclosing contexts.
5309
5310 2002-03-26  Tom Tromey  <tromey@redhat.com>
5311
5312         Fix for PR java/5942:
5313         * parse.y (init_src_parse): Added sanity check.
5314         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
5315         elements, not 11.
5316
5317 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5318
5319         * decl.c (lang_mark_tree): Rename java_mark_tree.
5320         * java-tree.h (java_mark_tree): New.
5321         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5322
5323 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
5324
5325         * lex.c: Change java_perform_atof to take normal parameters
5326         instead of a pointer to a parameter block.  Call it directly
5327         from java_lex.
5328
5329 2002-03-22  Mark Wielaard  <mark@klomp.org>
5330
5331         Fix for PR java/5368:
5332         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
5333         when printing error message.
5334
5335 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5336
5337         * decl.c (maybe_build_cleanup): Remove.
5338
5339 2002-03-22  Tom Tromey  <tromey@redhat.com>
5340
5341         Andrew Haley  <aph@cambridge.redhat.com>
5342
5343         * expr.c (build_field_ref): Don't build a check if the field is a
5344         member of `this'.
5345
5346 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
5347
5348         Fix for PR java/6026:
5349         * lex.c (java_lex): Fix parsing of consecutive floats.
5350
5351 2002-03-21  Tom Tromey  <tromey@redhat.com>
5352
5353         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
5354         class.
5355
5356 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5357
5358         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5359         insert_block, getdecls, kept_level_p, global_bindings_p): New.
5360
5361 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5362
5363         * gcj.texi: @code{gcj} becomes @command{gcj}.
5364         @code{gcc} becomes @command{gcc}.
5365         GcjRaw changed to gnu.gcc.RawData.
5366
5367 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5368
5369         * decl.c (start_java_method): Use new hook.
5370         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5371         (java_init): Remove old hook.
5372
5373 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
5374
5375         * builtins.c (define_builtin): Do nothing if `type' is null.
5376         Fixes PR java/5876.
5377
5378 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5379
5380         * parse.y (parser_check_super_interface): Fix error message
5381         grammar/order.
5382
5383 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5384
5385         * jcf-parse.c (get_constant): Delete unused variables.
5386
5387 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5388
5389         * java-tree.h (java_parse_file): New.
5390         * jcf-parse.c (yyparse): Rename java_parse_file.
5391         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5392
5393 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5394
5395         * parse.y (craft_constructor): Return the constructor decl.
5396         (java_expand_classes): Update comments.
5397         (lookup_method_invoke): Call fix_constructors immediately for
5398         anonymous class. Fixes PR java/5935.
5399
5400 2002-03-15  Anthony Green  <green@redhat.com>
5401
5402         * jcf-parse.c (yyparse): Don't emit class registration
5403         constructor when compiling resource files.
5404
5405 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5406
5407         * lang.c (java_tree_code_type, java_tree_code_length,
5408         tree_code_name): Delete.
5409         (tree_code_type, tree_code_length, tree_code_name): Define.
5410         (java_init): Don't try to copy into the various tree_code
5411         arrays.
5412
5413 2002-03-12  Tom Tromey  <tromey@redhat.com>
5414
5415         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5416         UTF-8, not UCS-2.  Fixes PR java/5923.
5417
5418         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5419         a call_expr wrapped in a convert.  Fixes PR java/5848.
5420
5421 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5422
5423         * jcf-write.c (write_classfile): Improve error strings.
5424
5425 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5426
5427         * lex.c: Adjust comments to GNU standards.
5428
5429 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5430
5431         Fix for PR java/5902:
5432         * lex.c (java_lex): Fix parsing of literals.
5433
5434 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5435
5436         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5437         to prevent it getting evaluated twice in the store checking case.
5438         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5439         examining OBJECT.
5440
5441 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5442
5443         * decl.c (java_init_decl_processing): Make sure class_type_node
5444         alignment is not less than 64 bits if hash synchronization is enabled.
5445
5446 2002-03-08  Per Bothner  <per@bothner.com>
5447
5448         * parse.y (java_complete_lhs):  Check if patch_assignment
5449         returned an error-mark.
5450
5451         * parse.y (try_builtin_assignconv):  Don't special-case zero.
5452
5453 2002-03-08  Per Bothner  <per@bothner.com>
5454
5455         Fix for PR java/5812.
5456         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
5457         here instead of in JSR macro.  Likewise with load_type_state call.
5458         Do the latter on if the return_pc has been verified (the jsr returns).
5459         (JSR):  Now just call build_java_jsr.
5460
5461 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
5462
5463         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5464         (java.install-common): Link native driver to
5465         JAVA_TARGET_INSTALL_NAME.
5466
5467 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
5468
5469         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5470         * builtins.c(sin_builtin): Likewise
5471         * builtins.c(sqrt_builtin): Likewise
5472
5473 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
5474
5475         * java/expr.c, java/jcf-parse.c, java/lex.c:
5476         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5477         REAL_ARITHMETIC blocks unconditional.  Delete some further
5478         #ifdef blocks predicated on REAL_ARITHMETIC.
5479
5480 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5481
5482         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5483         explicit sizeof/sizeof.
5484         * decl.c (java_init_decl_processing): Likewise.
5485         * jcf-parse.c (init_jcf_parse): Likewise.
5486         * parse.y (init_src_parse): Likewise.
5487
5488 2002-03-02  Per Bothner  <per@bothner.com>
5489
5490         Make --CLASSPATH by a synonym for --classpath and -classpath.
5491         Implement --bootclasspath.
5492         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
5493         (classpath_l):  Remove.
5494         (jcf_path_CLASSPATH_arg):  Remove.
5495         (jcf_path_bootclasspath_arg):  New function.
5496         (jcf_path_seal):  Simplify accordingly.
5497
5498         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
5499         (jcf_path_CLASSPATH):  Remove declaration.
5500         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
5501         (lang_specific_driver):  Translate -bootclasspath.
5502         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
5503         * lang.c (decode_lang_options):  Do jcf_path_init first.
5504         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
5505         * gjavah.c:  Also handle --bootclasspath.
5506         Handle --CLASSPATH as a synonum for --classpath.
5507         * jcf-dump.c: Likewise.
5508
5509         "." is not part of system path, but is the default for --classpath.
5510         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
5511         (jcf_path_seal):  Add "." if no CLASSPATH specified.
5512
5513         * gcj.texi:  Document changes.
5514
5515 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5516
5517         * expr.c (build_java_arraystore_check): Fix formatting.
5518
5519 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5520
5521         Fix for PR java/5758, java/5632:
5522         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5523         inner-class separator too.
5524         * parse.y (do_resolve_class): New local `decl_result.'
5525         Progressively build a name for what can have been loaded.
5526
5527 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5528
5529         * expr.c (java_array_data_offset): Removed function.
5530         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
5531         (build_java_array_length_access): Obtain "length" value using a
5532         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
5533         (build_java_arrayaccess): Correct comment. Access "data" using a
5534         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
5535         (build_java_arraystore_check): New function.
5536         (expand_java_arraystore): Use build_java_arraystore_check.
5537         * parse.y (patch_assignment): Simplify code to insert a store check
5538         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
5539         * check-init.c (check_init): Update to reflect that an array length
5540         access is now a COMPONENT_REF.
5541         * gcj.texi (Code Generation): Improve documentation of
5542         -fno-bounds-check. Add documentation for -fno-store-check.
5543         * java-tree.h (flag_store_check): Declare.
5544         (build_java_arraystore_check): Declare.
5545         * lang.c (flag_store_check): Initialize to 1.
5546         (lang_f_options): Add store-check option.
5547         * jvspec.c: Don't pass store-check option to jvgenmain.
5548         * lang-options.h: Add help string for -fno-store-check.
5549
5550 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5551
5552         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5553         * java-tree.h (java_dup_lang_specific_decl): New.
5554         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5555
5556 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5557
5558         * builtins.c, decl.c: Delete traditional-mode-related code
5559         copied from the C front end but not used, or used only to
5560         permit the compiler to link.
5561
5562 2002-02-22  Tom Tromey  <tromey@redhat.com>
5563
5564         Fix for PR java/2369:
5565         * jvspec.c (verify_class_name): New function.
5566         (lang_specific_driver): Call it.
5567         (JAVA_START_CHAR_P): New macro.
5568         (JAVA_PART_CHAR_P): Likewise.
5569
5570 2002-02-22  Per Bothner  <per@bothner.com>
5571
5572         * class.c:  Change vtable to be more compatible with g++ v3 abi.
5573         (get_dispatch_table):  Prepend offset-to-top (always 0) and
5574         type_info pointer (currently unimplemented hence NULL) to vtable.
5575         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5576         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
5577         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5578         (build_dtable_decl):  Add declarations for new fields.
5579
5580 2002-02-20  Per Bothner  <per@bothner.com>
5581
5582         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5583         to finit$ (otherwise generate_bytecode_insns drops it). However, we
5584         don't need to set it on the COMPOUND_EXPR - the caller does that.
5585
5586 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5587
5588         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5589         `--CLASSPATH' becomes `--classpath.'
5590         * gjavah.c: Likewise.
5591         * jcf-dump.c: Likewise.
5592         * lang-options.h: Likewise.
5593         * lang.c: Likewise.
5594         * jcf-path.c: Updated comment.
5595         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5596         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5597         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5598         (jcf_path_CLASSPATH_arg): Ditto.
5599         (classpath_u): Updated leading comment.
5600
5601 2002-02-20  Per Bothner  <per@bothner.com>
5602
5603         * builtins.c (check_for_builtin):  New function.
5604         (build_call_or_builtin):  Remove.
5605         * java-tree.h:  Update accordingly.
5606         * expr.c (expand_invoke):  Use build + check_for_builtin instead
5607         of build_call_or_builtin.
5608         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
5609         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5610         flag (which had caused jcf-write to incorrectly emit invokevirtual).
5611
5612 2002-02-17  Tom Tromey  <tromey@redhat.com>
5613
5614         * java-tree.h (TYPE_STRICTFP): New macro.
5615         (struct lang_type) [strictfp]: New field.
5616         (CLASS_STRICTFP): New macro.
5617         (METHOD_STRICTFP): New macro.
5618         (struct lang_decl) [strictfp]: New field.
5619         * parse.y (method_header): Disallow strictfp constructor or
5620         abstract method.
5621         (STRICT_TK): Move before MODIFIER_TK.
5622         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5623         (METHOD_MODIFIERS): Likewise.
5624         (INTERFACE_MODIFIERS): Likewise.
5625         * jcf-write.c (get_access_flags): Likewise.
5626         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5627         (add_method_1): Likewise.
5628         (get_access_flags_from_decl): Likewise.
5629         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
5630         recognize strictfp flag.
5631         * jcf.h (ACC_STRICT): New define.
5632
5633 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
5634
5635         * class.c(build_utf8_ref): Move declaration of decl_size
5636
5637 2002-02-07  Tom Tromey  <tromey@redhat.com>
5638
5639         * gcj.texi (Input Options): --CLASSPATH does not suppress system
5640         path.
5641
5642 2002-02-04  Anthony Green  <green@redhat.com>
5643
5644         * class.c (build_utf8_ref): Put UTF-8 constants into merged
5645         sections if available.
5646
5647 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5648
5649         * parse.y (java_expand_classes): Fix typo in static field loop.
5650
5651 2002-02-02  Richard Henderson  <rth@redhat.com>
5652
5653         * class.c (add_field): Mark static fields external.
5654         (build_class_ref): Remove redundant set.
5655         * parse.y (java_expand_classes): Mark static fields of classes
5656         to be compiled as local.
5657         * jcf-parse.c (parse_class_file): Likewise.
5658
5659 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5660
5661         * gcj.texi (About CNI): New node.
5662
5663 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5664
5665         PR java/5080
5666         * jcf-parse.c : Check for HAVE_LOCALE_H before using
5667         setlocale() with LC_CTYPE as a parameter.
5668         * jv-scan.c: Same.
5669
5670 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
5671
5672         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5673         Follow GNU Coding Standards for --version.
5674
5675 2002-01-28  Tom Tromey  <tromey@redhat.com>
5676
5677         * expr.c (build_jni_stub): Ensure storage for `meth' is
5678         generated.
5679         * parse.y (java_complete_expand_methods): Set
5680         current_function_decl before building JNI stub.
5681
5682 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5683
5684         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5685         BUILT_IN_SQRTF.
5686
5687 2002-01-22  Tom Tromey  <tromey@redhat.com>
5688
5689         * decl.c (java_init_decl_processing): Use add_predefined_file.
5690         Predefine RawData.java.
5691         (predef_filenames): Removed.
5692         (java_init_decl_processing): Don't register predef_filenames.
5693         * jcf-parse.c (add_predefined_file): New function.
5694         (predefined_filename_p): Rewrote.
5695         (predefined_filename_p): No longer static.
5696         * decl.c (java_init_decl_processing): Call initialize_builtins.
5697         * Make-lang.in (JAVA_OBJS): Added builtins.o.
5698         (java/builtins.o): New target.
5699         * builtins.c: New file.
5700         * parse.y (patch_invoke): Use build_call_or_builtin.
5701         * java-tree.h (build_call_or_builtin): Declare.
5702         (initialize_builtins): Declare.
5703         (java_set_exception_lang_code): Removed unused declaration.
5704         (PREDEF_FILENAMES_SIZE): Removed.
5705         (java_tree_index): Added JTI_PREDEF_FILENAMES.
5706         (predef_filenames): New define.
5707         (add_predefined_file): Declare.
5708         (predefined_filename_p): Declare.
5709         * expr.c (expand_invoke): Use build_call_or_builtin.
5710
5711 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5712
5713         * parse.y (patch_switch_statement): Fix format specifier.
5714
5715 2002-01-16  Tom Tromey  <tromey@redhat.com>
5716
5717         More for PR java/5365:
5718         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5719         default.
5720         (process_file): Generate include for
5721         java.lang.UnsupportedOperationExceptions.
5722
5723 2002-01-15  Andreas Jaeger  <aj@suse.de>
5724
5725         * .cvsignore: Add man pages.
5726
5727 2002-01-15  Tom Tromey  <tromey@redhat.com>
5728
5729         Fix for PR java/5365:
5730         * gjavah.c (process_file): Turn class name into a file name.
5731
5732 2002-01-14  Matthias Klose  <doko@debian.org>
5733
5734         * gcj.texi: Fix whitespace and formatting errors in the
5735         synopsis of the man pages. Update copyright.
5736
5737 2002-01-14  Tom Tromey  <tromey@redhat.com>
5738
5739         For PR libgcj/5303:
5740         * Make-lang.in (java.install-man): Handle jv-convert man page.
5741         (java.generated-manpages): Added jv-convert.1.
5742         (java.uninstall): Remove jv-convert.1.
5743         (java.maintainer-clean): Likewise.
5744         ($(srcdir)/java/jv-convert.1): New target.
5745         * gcj.texi (Top): Link to jv-convert node.
5746         (Individual utilities): Likewise.
5747         (Invoking jv-convert): New node.
5748
5749 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
5750             Martin Kahlert  <martin.kahlert@infineon.com>
5751
5752         * jcf-parse.c (get_constant): Don't swap lo/hi for big
5753         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5754
5755 2002-01-03  Graham Stott  <grahams@redhat.com>
5756
5757         * class.c (compile_resource_file): Update copyright date.
5758         Constify filename parameter.
5759         (java-tree.h): Update copyright date.
5760         (compile_resource_file): Constify filename parameter.
5761
5762 2002-01-03  Graham Stott  <grahams@redhat.com>
5763
5764         * gcc/jcf-parse.c: Update copyright date.
5765         (yyparse): Constify resource_filename.
5766
5767 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5768
5769         * parse.y (src_parse_roots): Don't needlessly zero init.
5770
5771 2001-12-31  Tom Tromey  <tromey@redhat.com>
5772
5773         * parse.y (dump_java_tree): New function.
5774         (source_end_java_method): Call it.
5775         (end_class_declaration): Likewise.
5776         * lang.c (java_decode_option): Call dump_switch_p.
5777
5778 2001-12-28  Tom Tromey  <tromey@redhat.com>
5779
5780         * gen-table.pl: Don't process characters after \uffff.  Added
5781         comment pointing to input file.
5782
5783 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5784
5785         * gen-table.pl: Const-ify output.  Document the location of a
5786         suitable unicode input file.
5787
5788         * chartables.h: Regenerate.
5789
5790 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5791
5792         * chartables.h: Const-ify.
5793         * gjavah.c (options): Likewise.
5794         * jcf-dump.c (options): Likewise.
5795         * jv-scan.c (options): Likewise.
5796         * lex.c (java_start_char_p, java_part_char_p): Likewise.
5797         * parse.y (binop_lookup): Likewise.
5798
5799 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5800
5801         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5802         the static arrays that are output.
5803         * jvspec.c (jvgenmain_spec): Make static.
5804         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5805         * keyword.h: Regenerate.
5806         * lang.c (string_option, process_option_with_no, lang_f_options,
5807         lang_W_options): Const-ify.
5808         * lex.c (java_lex): Likewise.
5809
5810 2001-12-21  Richard Henderson  <rth@redhat.com>
5811
5812         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5813         (get_boehm_type_descriptor): ... here.  Arrange for the
5814         TREE_TYPE to get set properly.
5815
5816 2001-12-21  Richard Henderson  <rth@redhat.com>
5817
5818         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5819         only if the target requires collect2.
5820
5821         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5822
5823 2001-12-20  Tom Tromey  <tromey@redhat.com>
5824
5825         For PR java/4509:
5826         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5827         CAN_COMPLETE_NORMALLY for the node.
5828         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5829         generate code for second branch if first branch can't complete
5830         normally.
5831         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5832         the loop head if the loop body can't complete normally.
5833
5834 2001-12-20  Tom Tromey  <tromey@redhat.com>
5835
5836         For PR java/4766:
5837         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5838         case where `finally' clause can't complete normally.
5839
5840 2001-12-20  Tom Tromey  <tromey@redhat.com>
5841
5842         Fixes PR java/5057:
5843         * parse.y (analyze_clinit_body): Added this_class parameter.
5844         Check for more cases where we must keep <clinit>.
5845         (maybe_yank_clinit): Cleaned up flow control.
5846
5847 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5848
5849         * decl.c (java_init_decl_processing): Don't initialize
5850         finit_leg_identifier_node.
5851         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5852         (finit_leg_identifier_node): Remove.
5853         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5854
5855 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5856
5857         * mangle.c (mangle_member_name): Don't special-case for
5858         NO_DOLLAR_IN_LABEL.
5859         * mangle_name.c (unicode_mangling_length): Likewise.
5860         (append_unicode_mangled_name): Likewise.
5861         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5862         code.
5863
5864 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5865
5866         * expr.c (build_java_array_length_access): Don't force null pointer
5867         check unless flag_check_references is set.
5868
5869 2001-12-20  Tom Tromey  <tromey@redhat.com>
5870
5871         Fix for PR java/3417:
5872         * parse.y (patch_assignment): Added special processing for
5873         `return'.
5874         (patch_return): Don't convert booleans to integers, and don't
5875         special-case `null'.
5876
5877 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5878
5879         * config-lang.in (diff_excludes): Remove.
5880
5881 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
5882
5883         * gcj.texi: Update link to GCC manual.
5884
5885 2001-12-17  Tom Tromey  <tromey@redhat.com>
5886
5887         * parse.y (link_nested_class_to_enclosing): Removed useless
5888         statement.
5889
5890 2001-12-16  Tom Tromey  <tromey@redhat.com>
5891
5892         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5893         Fixes PR java/5088.
5894
5895 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5896
5897         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5898         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5899         spelling errors.
5900
5901 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5902
5903         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5904
5905 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5906
5907         * decl.c (java_init_decl_processing): Build otable_type correctly.
5908         otable_decl is an otable_type.
5909
5910 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5911
5912         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5913         otable_type, otable_ptr_type, method_symbol_type,
5914         method_symbols_array_type, method_symbols_array_ptr_type): New
5915         field/global tree definitions.
5916         (flag_indirect_dispatch): New flag.
5917         * decl.c (java_init_decl_processing): Initialize new otable and
5918         otable_syms type nodes and decls. Add new field "index" to
5919         method_type_node.
5920         * class.c (build_method_symbols_entry): New function.
5921         (make_method_value): Set "index" to to method's vtable index for
5922         virtual methods when indirect-dispatch is not used.
5923         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5924         and set vtable_method_count to -1. Set otable and otable_syms field
5925         if indirect-dispatch is used and there was something to put in them.
5926         (build_method_symbols_entry): New function.
5927         (emit_offset_symbol_table): New function.
5928         * expr.c (get_offset_table_index): New function.
5929         (build_invokevirtual): Build array reference to otable at the index
5930         returned by get_offset_table_index, and use the result as the vtable
5931         offset.
5932         (build_invokeinterface): Similar.
5933         * jcf-parse.c (yyparse): If indirect-dispatch, call
5934         emit_offset_symbol_table at the end of compilation, after all classes
5935         have been generated.
5936         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5937         * lang.c (flag_indirect_dispatch): Define.
5938         (lang_f_options): Add indirect-dispatch flag.
5939
5940 2001-12-14  Matthias Klose  <doko@debian.org>
5941
5942         * gcj.texi: Markup for man page generation. Document missing
5943         options printed by <tool> --help.
5944         Terminate description of gij's -ms option with a dot.
5945         * Make-lang.in ($(srcdir)/java/*.1): New targets.
5946         (java.generated-manpages java.install-man, java.uninstall,
5947         java-maintainer-clean) Updated.
5948
5949 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
5950
5951         * class.c (get_dispatch_table): Fix java vtable layout
5952         for TARGET_VTABLE_USES_DESCRIPTORS.
5953         * decl.c (java_init_decl_processing): Initialize
5954         alloc_no_finalizer_node, finalize_identifier_node.
5955         * expr.c (class_has_finalize_method): New function.
5956         (expand_java_NEW): Generate calls for finalizer-free allocation.
5957         (build_invokevirtual): Fix java vtable layout for
5958         TARGET_VTABLE_USES_DESCRIPTORS.
5959         * java-tree.h (enum java_tree_index): New entries:
5960         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5961         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5962         (class_has_finalize_method): declare.
5963         (HAS_FINALIZER_P): New macro.
5964         * parse.y (patch_invoke): Generate calls for finalizer-free
5965         allocation.
5966
5967 2001-12-12  Matthias Klose  <doko@debian.org>
5968
5969         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5970         whitespace at end of line.
5971
5972 2001-12-11  Tom Tromey  <tromey@redhat.com>
5973
5974         * lex.c (java_init_lex): Define wfl_to_string as
5975         gnu.gcj.runtime.StringBuffer unless generating bytecode.
5976
5977 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
5978
5979         * class.c (make_method_value): Use null_pointer_node to
5980         represent empty exception table.
5981
5982 2001-12-10  Tom Tromey  <tromey@redhat.com>
5983
5984         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
5985
5986 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
5987
5988         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
5989
5990 2001-12-09  Per Bothner  <per@bothner.com>
5991
5992         * check-init.c (current_switch_has_default):  New static field.
5993         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
5994         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
5995         DEFAULT_EXPR seen, simulate a default alternative that copies state.
5996
5997 2001-12-09  Tom Tromey  <tromey@redhat.com>
5998
5999         * check-init.c (check_init): Don't allow pre- or post- increment
6000         or decrement of final variable.
6001         (final_assign_error): Minor error message rewording.
6002
6003 2001-12-08  Tom Tromey  <tromey@redhat.com>
6004
6005         * java-tree.h: Fixed typo.
6006
6007         * gjavah.c (decompile_method): Don't decompile to `return this'
6008         for static methods.
6009
6010         * gjavah.c (cxx_keywords): Re-sorted.
6011         * lex.c (cxx_keywords): Re-sorted.
6012
6013         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
6014         else.
6015
6016         * gjavah.c (print_namelet): Clear subnamelets.
6017         (HANDLE_METHOD): Set `method_printed' earlier.
6018
6019 2001-12-07  Tom Tromey  <tromey@redhat.com>
6020
6021         * lang.c (lang_f_options): Added
6022         optimize-static-class-initialization.
6023         (java_decode_option): Removed special case.
6024
6025 2001-12-07  Per Bothner  <per@bothner.com>
6026
6027         * check-init.c (check_init):  Fix typo freeing memory twice.
6028
6029 2001-12-05  Per Bothner  <per@bothner.com>
6030
6031         Restore support for static class initialization optimization.
6032         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
6033         * check-init.c (check_int):  At end of BLOCK handle initialization
6034         blocks, which used to be done in java_complete_expand_method but did
6035         not handle the case where check_for_initialization might allocate
6036         more than a word of bits.
6037         * decl.c (lang_make_tree):  The smic field is now a tree.
6038         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
6039         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
6040
6041         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
6042
6043         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
6044         Change from a hash table to a list.
6045         (struct_lang_decl):  Change field 'smic' to match.
6046         * class.c (add_method_1):  Initialize
6047         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
6048         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
6049         (java_expand_method_bodies): -here, since 'smic' is now a list.
6050         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
6051
6052         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
6053
6054         * class.c (java_hash_compare_tree_node):  Fix casts.
6055
6056 2001-12-04  Per Bothner  <per@bothner.com>
6057
6058         * check-init.c:   Handle definite unassignment to finals in addition
6059         to definite assignment.
6060         (loop_current_locals):  New field.
6061         (num_current_locals, int start_current_locals, num_current_words):
6062         Make static.
6063         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
6064         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
6065         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
6066         (get_variable_decl, check_final_reassigned):  New functions.
6067         (check_init, check_bool_init):  Modify as needed for checking finals.
6068         (check_for_initialization):  Take extra parameter and return void.
6069         Do extra start-up logic to check final fields for assignment.
6070         * parse.y (check_static_final_variable_assignment_flag,
6071         reset_static_final_variable_assignment_flag, check_final_assignment,
6072         check_final_variable_local_assignment_flag,
6073         reset_final_variable_indirect_assignment_flag,
6074         reset_final_variable_global_assignment_flag):  Remove functions.
6075         (java_complete_expand_methods, outer_field_access_fix,
6076         patch_assignment): Remove no-longer used logic.
6077         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
6078         * parse.y (register_fields, java_complete_tree):  Update accordingly.
6079
6080         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
6081         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
6082         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
6083
6084         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
6085
6086         * java-tree.h (DECL FINAL):  New bit-field.
6087         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
6088         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
6089         (DECL_INIT_CALLS_THIS):  New macro.
6090         (struct lang_decl):  New bit-field init_calls_this.
6091         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
6092         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
6093         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
6094         use it for both local variables and final fields.
6095         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
6096         and local_final.
6097         (struct lang_type):  Remove hfv bit-field.
6098         (check_for_initialization):  Change to return void.
6099
6100         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
6101         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
6102         * check-init.c (final_assign_error):  New helper function.
6103         (check_final_reassigned, check_init):  Use it.
6104         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
6105
6106         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
6107         bit-fields to unsigned.
6108
6109 2001-12-03  Per Bothner  <per@bothner.com>
6110
6111         * parse.y (patch_binop):  Minor constant folding.
6112
6113         * parse.y (build_current_thisn):  Shorter 'buffer'.
6114
6115 2001-12-03  Per Bothner  <per@bothner.com>
6116
6117         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
6118         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
6119         * jcf-write.c (generate_bytecode_insns):  Remove support for
6120         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
6121         * check-init.c (check_init):  Likewise.
6122
6123 2001-12-03  Per Bothner  <per@bothner.com>
6124
6125         * verify.c (subroutine_nesting):  New function.
6126         (verify_jvm_instructions):  Use it to fix logic for checking that
6127         we're done with the current subroutine.
6128
6129         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
6130         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
6131
6132 2001-12-03  Per Bothner  <per@bothner.com>
6133
6134         * jcf.h:  Fix obvious typo in comment.
6135         * typeck.c (build_null_signature):  Add comment.
6136
6137 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6138
6139         * expr.c: Remove leading capital from diagnostic messages, as
6140         per GNU coding standards.
6141         * jcf-io.c: Similarly.
6142         * jcf-parse.c: Similarly.
6143         * jv-scan.c: Similarly.
6144         * jvspec.c: Similarly.
6145         * mangle.c: Similarly.
6146
6147 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
6148             Alexandre Petit-Bianco  <apbianco@redhat.com>
6149
6150         * expr.c (build_java_arrayaccess): Call save_expr on array for
6151         correct evaluation order, modified comment, fixed indentation.
6152         * parse.y: (patch_assignment): Correctly extract the array base
6153         from the tree generate by build_java_arrayaccess, added comments.
6154         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
6155         Fixes PR java/3096, PR java/3803, PR java/3965.
6156
6157 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6158
6159         * expr.c (expand_byte_code): Remove trailing periods from messages.
6160         * jcf-parse.c (load_class, jcf_parse): Similarly.
6161         * jcf-write.c (generate_classfile): Similarly.
6162         * lex.c (java_lex): Similarly.
6163
6164 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6165
6166         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
6167
6168 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6169
6170         * Make-lang.in (java.generated-manpages): New dummy target.
6171
6172 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6173
6174         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6175         ASM_FINAL_SPEC.
6176         (lang_specific_pre_link): Use set_input to set input_filename.
6177         Append `main' here.
6178         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6179         (main): Fix definition.
6180         Strip `main' from classname.
6181         Fixes PR java/227.
6182
6183 2001-11-18  Roger Sayle <roger@eyesopen.com>
6184
6185         * parse.h (java_expand_switch): Remove old prototype.
6186
6187 2001-11-18  Tom Tromey  <tromey@redhat.com>
6188
6189         Fix for PR java/1401:
6190         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
6191         arg0 is null.
6192         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
6193         correctly.
6194
6195 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6196
6197         * lang.c (finish_parse): Rename to java_finish.
6198         (LANG_HOOKS_FINISH, java_finish): New.
6199
6200 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6201
6202         * decl.c (init_decl_processing): Rename java_init_decl_processing.
6203         * java-tree.h: New prototype.
6204         * lang.c (java_init): Update prototype.  Combine with old init_parse.
6205
6206 2001-11-13  Tom Tromey  <tromey@redhat.com>
6207
6208         * gjavah.c (method_signature): New global.
6209         (HANDLE_METHOD): Set it.
6210         (decompile_return_statement): New function.
6211         (decompile_method): Use it.
6212         (print_method_info): Removed `synth' argument.
6213
6214 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6215
6216         * java-tree.h (java_set_yydebug): New.
6217         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
6218         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
6219         (print_lang_decl, print_lang_type, print_lang_identifier,
6220         print_lang_statistics, lang_print_xnode): Remove.
6221
6222 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6223
6224         * jcf-parse.c (init_lex): Remove.
6225         * lang.c (language_string, lang_identify): Remove.
6226         (struct lang_hooks): Constify.
6227         (LANG_HOOKS_NAME): Override.
6228         (init_parse): Update.
6229
6230 2001-11-08  Andreas Franck  <afranck@gmx.de>
6231
6232         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
6233         program_transform_name the way suggested by autoconf.
6234         (java.install-common): Also transform auxiliary program names with
6235         program_transform_name.
6236
6237 2001-11-08  Tom Tromey  <tromey@cygnus.com>
6238
6239         * parse.y (trap_overflow_corner_case): New rule.
6240         (unary_expression): Use it.
6241         * lex.c (java_init_lex): Don't set minus_seen.
6242         (yylex): Don't use minus_seen.  Communicate overflow to parser for
6243         it to handle.
6244         (error_if_numeric_overflow): New function.
6245         * parse.h (minus_seen): Removed field.
6246         (JAVA_RADIX10_FLAG): New define.
6247
6248 2001-11-07  Tom Tromey  <tromey@redhat.com>
6249
6250         Patch for PR java/1414:
6251         * parse.y (case_label_list): New global.
6252         (goal): Register case_label_list with GC.
6253         (java_complete_lhs): Save new case on case_label_list.
6254         (patch_switch_statement): Check for duplicate case labels.
6255
6256 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
6257
6258         * parse.y (patch_assignment): Removed unused third argument.
6259         (java_complete_lhs): Removed unused third argument to patch_assignment.
6260
6261 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6262
6263         * lang.c: Include langhooks-def.h.
6264         * Make-lang.in: Update.
6265
6266 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6267
6268         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6269
6270 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6271
6272         * mangle.c (find_compression_record_match): Don't match compression
6273         records for package name elements unless they occur at the start of
6274         the name. Fix for PR java/4717.
6275
6276 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6277
6278         * expr.c (expand_java_field_op): Don't special-case references to
6279         java.lang.PRIMTYPE.TYPE.
6280         (build_primtype_type_ref): Removed.
6281         * java-tree.h (build_primtype_type_ref): Remove prototype.
6282         * parse.y (maybe_build_primttype_type_ref): Removed.
6283         (complete_function_arguments): Don't special-case references to
6284         java.lang.PRIMTYPE.TYPE.
6285         (patch_assignment): Likewise.
6286         (array_constructor_check_entry): Likewise.
6287
6288 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6289
6290         * mangle.c (static tree compression_table): Fixed leading comment.
6291         * parse.h (struct parser_ctxt): Fixed field comment.
6292         * parse.y (check_pkg_class_access): New prototype, fixed leading
6293         comment, new parameter used to emit error only if passed as true.
6294         (parse_check_super): Pass extra argument to check_pkg_class_access.
6295         (do_resolve_class): Likewise.
6296         (process_imports): Likewise.
6297         (read_import_dir): Fixed indentation.
6298         (find_in_imports_on_demand): New local class_type_name. Local
6299         node_to_use deleted. while loop changed into for loop. Report
6300         multiple definition only for accessible classes. Improved error
6301         message.
6302         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
6303         assigned to parameter list, fixed indentation. while loop changed
6304         into for loop, restore TREE_CHAIN on local `tem' before the next
6305         iteration.
6306
6307 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6308
6309         * lang.c (lang_get_alias_set): Deleted.
6310
6311 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6312
6313         * gjavah.c (jni_print_char): Fix thinko in last change.
6314
6315         * gjavah.c (jni_print_char, decode_signature_piece): Use
6316         safe-ctype macros and/or fold extra calls into fewer ones.
6317         * lex.c (java_read_unicode, java_lex): Likewise.
6318         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
6319         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
6320         * mangle_name.c (append_unicode_mangled_name,
6321         unicode_mangling_length): Likewise.
6322
6323 2001-10-17  Richard Henderson  <rth@redhat.com>
6324
6325         * Make-lang.in (java/lang.o): Depend on langhooks.h.
6326
6327 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
6328
6329         * lang.c (langhooks.h): Included.
6330         (LANG_HOOKS_INIT): Redefined.
6331         (LANG_HOOKS_INIT_OPTIONS): Likewise.
6332         (LANG_HOOKS_DECODE_OPTION): Likewise.
6333         (struct lang_hooks lang_hooks): New initialization.
6334
6335 2001-10-11  Per Bothner  <per@bothner.com>
6336
6337         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
6338         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
6339         The former is simpler, and jcf-write.c handles it better.
6340         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
6341         or WITH_CLEANUP_EXPR.
6342         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
6343         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
6344
6345         * parse.y (patch_if_else_statement):  If the condition is constant,
6346         optimize away the test.
6347
6348 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6349
6350         * parse.y (patch_cast): Call patch_string on the first operand of
6351         the incoming node, update it if necessary. Fixes PR java/4510.
6352
6353 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6354
6355         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
6356         when name qualifier matches a package name.
6357
6358 2001-10-08  Tom Tromey  <tromey@redhat.com>
6359
6360         Fix for PR java/4489:
6361         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
6362         force a new label when computing `body_block'.
6363
6364 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6365
6366         * jcf-io.c (format_uint): Const-ify.
6367         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
6368         * lex.c (java_get_line_col): Likewise.
6369         * parse.y (build_incdec): Likewise.
6370
6371 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
6372
6373         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
6374         a NULL enclosing context if appropriate. Fixes PR java/4466.
6375
6376 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6377
6378         * parse.y (patch_assignment): Use lvalue's original TYPE when
6379         building the final COMPOUND_EXPR.
6380         (try_reference_assignconv): Fixed leading comment.
6381
6382 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
6383
6384         * parse.y (check_final_variable_indirect_assignment): For
6385         COMPOUND_EXPR, return only if finals were found initialized
6386         properly, if not, keep on checking.
6387         (check_final_variable_global_assignment_flag): New local
6388         error_found, set when appropriate and used to decide whether to
6389         report uninitialized finals. Fixed typo in comment.
6390
6391 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6392
6393         * decl.c (init_decl_processing): Fixed typo in predef_filenames
6394         last three initializations. Fixes PR java/4360.
6395
6396 2001-09-21  Richard Henderson  <rth@redhat.com>
6397
6398         * class.c (get_dispatch_table): Handle function descriptors.
6399         (build_dtable_decl): Likewise.
6400         * expr.c (build_invokevirtual): Likewise.
6401
6402 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
6403
6404         * parse.y (patch_method_invocation): Build class initialization
6405         when static finals are used to qualify method invocation.
6406         Fixes PR java/4366.
6407
6408 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
6409
6410         * parse.h: (WFL_STRIP_BRACKET): Re-written using
6411         build_type_name_from_array_name.
6412         (STRING_STRIP_BRACKETS): New macro.
6413         * parse.y (build_type_name_from_array_name): New function.
6414         (array_creation_expression:): Accumulate []s instead of [s.
6415         (cast_expression:): Accumulate []s instead of [s after cast type
6416         name.
6417         (build_array_from_name): Local string deleted, use
6418         build_type_name_from_array_name.
6419         (build_unresolved_array_type): Accumulate []s instead of [s after
6420         type name.
6421         (register_fields): Fixed comment.
6422         (resolve_class): Local name, base deleted, new locals tname and
6423         array_dims. Use build_type_name_from_array_name. Use array_dims to
6424         build array type.
6425         (purify_type_name): Use STRING_STRIP_BRACKETS.
6426
6427 2001-09-18  Andreas Jaeger  <aj@suse.de>
6428
6429         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6430         * jv-scan.c: Likewise.
6431
6432 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6433
6434         * parse.y (patch_method_invocation): Inner class creation context
6435         check not enforced within constructors. Fixes PR java/1873.
6436
6437 2001-09-16  Tom Tromey  <tromey@redhat.com>
6438
6439         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6440         NOTE_PUSH for single-case push.  Fixes PR java/4189.
6441
6442 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6443
6444         * java-tree.h (TYPE_IMPORT_LIST): New macro.
6445         (TYPE_IMPORT_DEMAND_LIST): Likewise.
6446         (struct lang_type): New fields import_list and import_demand_list.
6447         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6448         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6449         (do_resolve_class): New local saved_enclosing_type, initialized,
6450         passed as parameter to find_in_imports and find_in_imports_on_demand.
6451         (find_in_imports): Added paramater enclosing_type, use its
6452         TYPE_IMPORT_LIST when applicable.
6453         (find_in_imports_on_demand): Added parameter enclosing_type, use
6454         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6455         declaration and initialization.
6456         (fold_constant_for_init): Switch/restore current_class to the
6457         appropriate context.
6458
6459 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
6460
6461         * verify.c (verify_jvm_instructions): Fix typo.
6462
6463 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6464
6465         * expr.c (expand_invoke): Const-ification.
6466         * parse.y (patch_method_invocation): Likewise.
6467
6468 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6469
6470         * gjavah.c (cxx_keywords): Const-ification.
6471         * keyword.gperf (java_keyword): Likewise.
6472         * lang.c (java_tree_code_name): Likewise.
6473         * lex.c (cxx_keywords): Likewise.
6474         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6475
6476 2001-09-11  Richard Henderson  <rth@redhat.com>
6477
6478         * parse.h (ctxp_for_generation): Mark extern.
6479
6480 2001-09-10  Richard Henderson  <rth@redhat.com>
6481
6482         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6483
6484 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6485
6486         * typeck.c (java_array_type_length, build_prim_array_type):
6487         Represent empty arrays by NULL index.
6488
6489 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
6490
6491         * java-tree.h (compile_resource_file): Grouped with other prototypes.
6492         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6493
6494 2001-09-06  Anthony Green  <green@redhat.com>
6495
6496         * class.c (O_BINARY): Define if necessary.
6497         (registerResource_libfunc): Declare.
6498         (init_class_processing): Initilize registerResource_libfunc.
6499         (compile_resource_file): New function.
6500         * java-tree.h (resource_name): Declare.
6501         (compile_resource_file): Declare.
6502         * jcf-parse.c (yyparse): Handle compiling java resource files.
6503         * lang.c (java_decode_option): Handle -fcompile-resource option.
6504         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6505         resource files.
6506         * gcj.texi (Code Generation): Add documentation for -R flag.
6507
6508 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
6509
6510         * jcf-write.c (generate_classfile): Issue an error in case of
6511         field/initial value mismatch.
6512         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6513         being initialized and we're generating bytecode.
6514         (java_complete_lhs): In MODIFY_EXPR section: added comments,
6515         set DECL_INITIAL properly when appropriate.
6516         Fixes PR java/4230
6517         Fixes PR java/4204
6518
6519 2001-09-01  Per Bothner  <per@bothner.com>
6520
6521         * parse.y (maybe_yank_clinit):  A field without an initializer is not
6522         relevant.  All initializers except static final and constant require
6523         <clinit>, regardless of flag_emit_class_files.
6524
6525 2001-08-31  Per Bothner  <per@bothner.com>
6526
6527         * class.c (set_constant_value):  When not emitting class files, then a
6528         String ConstantValue is a utf8const_ptr_type.
6529
6530 2001-08-30  Per Bothner  <per@bothner.com>
6531
6532         * jcf-write.c (generate_classfile):  Check that field is primitive
6533         or string before emitting ConstantValue attribute.
6534
6535 2001-08-30  Per Bothner  <per@bothner.com>
6536
6537         * parse.y (resolve_qualified_expression_name):  If creating a
6538         COMPOUND_EXPR, set it's type correctly.
6539
6540 2001-08-30  Per Bothner  <per@bothner.com>
6541
6542         * jcf-io.c (open_class):  Set filename field.
6543
6544         * jcf-parse,c (parse_class_file):  Set current_function_decl
6545         for better error message when Code attribute is missing.
6546
6547         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
6548         better diagnostics, especially for constructors.
6549
6550 2001-08-30  Per Bothner  <per@bothner.com>
6551
6552         * jcf-write.c (generate_classfile):  Don't write ConstantValue
6553         attribute if field is not final, for compatibility with jdk.
6554
6555         * jcf-write.c (generate_classfile):  Convert ConstantValue values
6556         to correct type.  Work-around for front-end bug.
6557         * class.c (set_constant_value):  Error if constant has wrong type.
6558
6559 2001-08-30  Per Bothner  <per@bothner.com>
6560
6561         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
6562         "Double" are printed at verbosity 1.
6563
6564         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
6565
6566         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
6567
6568 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
6569
6570         * parse.y (patch_assignment): Don't verify final re-assignment here.
6571         (java_complete_lhs): Verify assignments to finals calling
6572         patch_assignment. Verify re-assignments to finals before calling
6573         patch_assignment.
6574
6575 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
6576
6577         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6578         Fixes PR java/1413
6579
6580 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6581
6582         * lex.c (java_lex): new local found_hex_digits. Set and then used
6583         in test to reject invalid hexadecimal numbers.
6584         * parse.y (java_complete_tree): Prevent unwanted cast with
6585         initialized floating point finals.
6586         (patch_binop): Emit a warning when detecting a division by zero,
6587         mark result not constant, don't simplify non integer division.
6588
6589 2001-08-28  Per Bothner  <per@bothner.com>
6590
6591         * jcf-write.c  (generate_bytecode_insns):  For increments and
6592         decrements just recurse to push constant.  Improvement on Mark's patch.
6593
6594 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
6595
6596         * jcf-write.c (generate_bytecode_insns): Generate an integer to
6597         real conversion for increments and decrements of reals.
6598
6599 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6600
6601         * parse.y (resolve_qualified_expression_name): Handle unresolved
6602         qualified expressions, prevent numerical qualifiers, fixed typo.
6603         Fixes PR java/4141
6604
6605 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6606
6607         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6608         don't report anything but deprecated class when marked so. Handle
6609         VAR_DECL.
6610         (patch_method_invocation): Check deprecation on methods and types.
6611         (patch_binop): code becomes an enum tree_code, added default: to
6612         switch to handle that. Detect division by zero, try to fold and
6613         return before using a subroutine.
6614
6615 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
6616
6617         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6618         file smaller than 4 bytes.
6619         * parse.y (check_inner_circular_reference): New function.
6620         (check_circular_reference): Likewise.
6621         (array_initializer:): Accept {,}.
6622         (java_check_circular_reference): Rewritten using
6623         check_circular_reference and check_inner_circular_reference.
6624         (java_complete_expand_method): Unconditionally save and restore
6625         the unpurged exception list.
6626         (build_dot_class_method_invocation): Unmangle signature parameter.
6627
6628 2001-08-21  Tom Tromey  <tromey@redhat.com>
6629
6630         * decl.c (init_decl_processing): Add `throws' field to method
6631         descriptor.
6632         * class.c (make_method_value): Compute `throws' field for method.
6633
6634 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6635
6636         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6637         circularity is detected.
6638         (ctors_unchecked_throws_clause_p): Fixed leading comment.
6639
6640 2001-08-17  Richard Henderson  <rth@redhat.com>
6641
6642         * class.c (emit_register_classes): Add align parameter to
6643         call to assemble_integer.
6644
6645 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
6646
6647         * jcf-parse.c (load_class): New locals saved and class_loaded. If
6648         loading a class_or_name fails, try considering an innerclass name
6649         and load the enclosing context.
6650         * parse.y (resolve_inner_class): New function.
6651         (find_as_inner_class): Added leading comment.
6652         (register_incomplete_type): Keep the current context as enclosing
6653         context for JDEP_FIELD dependencies.
6654         (do_resolve_class): Locals new_class_decl and super initialized to
6655         NULL. Call resolve_inner_class, explore the enclosing context
6656         superclass if necessary.
6657         Fixes PR java/4007
6658
6659 2001-08-16  Tom Tromey  <tromey@redhat.com>
6660
6661         * jcf-dump.c (main): Updated for change to jcf_path_seal.
6662         * gjavah.c (main): Updated for change to jcf_path_seal.
6663         * lang.c (version_flag): New global.
6664         (java_decode_option): Recognize `-version'.
6665         (java_init): Update for change to jcf_path_seal.
6666         * jcf.h (jcf_path_seal): Added `print' argument.
6667         * jcf-path.c (jcf_path_seal): Added `print' argument.
6668
6669 2001-08-13  Zack Weinberg  <zackw@panix.com>
6670
6671         * Make-lang.in (java/decl.o): Update dependencies.
6672         * decl.c: Include libfuncs.h, don't include toplev.h.
6673
6674 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6675
6676         * decl.c (init_decl_processing): exception_type_node,
6677         class_not_found_type_node, and no_class_def_found_type_node
6678         initialized. predef_filenames augmented accordingly.
6679         instinit_identifier_node initialized.
6680         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6681         * java-tree.h (enum java_tree_index): New entries
6682         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6683         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6684         (exception_type_node): New macro.
6685         (class_not_found_type_node): Likewise.
6686         (no_class_def_found_type_node): Likewise.
6687         (instinit_identifier_node): Likewise.
6688         (PREDEF_FILENAMES_SIZE): Adjusted.
6689         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6690         (struct lang_type): Fixed typo in bitfield name.
6691         (DECL_INSTINIT_P): New macro.
6692         (ID_INSTINIT_P): Likewise.
6693         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6694         attribute.
6695         * parse.y (encapsulate_with_try_catch): New function.
6696         (generate_instinit): Likewise.
6697         (build_instinit_invocation): Likewise.
6698         (ctors_unchecked_throws_clause_p): Likewise.
6699         (add_instance_initializer): Deleted.
6700         (build_instance_initializer): Likewise.
6701         (in_instance_initializer): Likewise.
6702         (check_method_redefinition): instinit$ not to be verified.
6703         (java_complete_expand_methods): Generate instinit$, simplified code.
6704         (build_dot_class_method): Eliminated unnecessary locals. Use
6705         encapsulate_with_try_catch, removed unnecessary code.
6706         (fix_constructors): New local iii. Use build_instinit_invocation.
6707         (patch_method_invocation): Added comment.
6708         (maybe_use_access_method): Don't consider instinit$.
6709         (find_applicable_accessible_methods_list): Shorten the search for
6710         instinit$ too.
6711         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6712         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6713         (patch_throw_statement): Likewise. Fixed typo.
6714
6715 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
6716
6717         Revert:
6718         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6719         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6720         ASM_FINAL_SPEC.
6721         (lang_specific_pre_link): Use set_input to set input_filename.
6722         Append `main' here.
6723         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6724         (main): Fix definition.
6725         Strip `main' from classname.
6726         Fixes PR java/227.
6727
6728 2001-08-11  Zack Weinberg  <zackw@panix.com>
6729
6730         * lex.h: Don't include setjmp.h.  Don't define
6731         SET_FLOAT_HANDLER or prototype set_float_handler.
6732
6733 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6734
6735         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6736         `poplevel' in the right order.
6737
6738 2001-08-09  Richard Henderson  <rth@redhat.com>
6739
6740         * Make-lang.in (class.o): Depend on TARGET_H.
6741         * class.c (emit_register_classes): Use target hooks instead of
6742         assemble_constructor and assemble_destructor.
6743
6744 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
6745
6746         * check-init.c (flags.h): Include
6747         (check_init): Don't report uninitialized static class
6748         initialization flags, don't free bit index when doing static class
6749         initialization optimization.
6750         (check_for_initialization): Return type changed to `unsigned int.'
6751         (attach_initialized_static_class): New function.
6752         * class.c (add_method_1): Create the initialized static class
6753         table if necessary.
6754         (finish_class): Always emit deferred inline methods.
6755         * decl.c (emit_init_test_initialization): Moved to expr.c
6756         (complete_start_java_method): Don't traverse
6757         DECL_FUNCTION_INIT_TEST_TABLE.
6758         (lang_mark_tree): Mark hash tables in function decls.
6759         * expr.c (emit_init_test_initialization): Moved from decl.c.
6760         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6761         initialization flag, set DECL_CONTEXT and
6762         LOCAL_CLASS_INITIALIZATION_FLAG.
6763         (java_lang_expand_expr): Emit initialization code for static class
6764         initialized flags when entering block, if necessary.
6765         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6766         * java-tree.h (flag_optimize_sci): New global variable declaration.
6767         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6768         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6769         (LOCAL_FINAL_P): Fixed typo in comment.
6770         (FINAL_VARIABLE_P): Likewise.
6771         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6772         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6773         (struct lang_decl): New fields `ict', `smic' and `cif.'
6774         (check_for_initialization): New returned value for global.
6775         (attach_initialized_static_class): New global function.
6776         (STATIC_CLASS_INIT_OPT_P): New macro.
6777         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6778         * lang.c (java_decode_option): Handle
6779         `-fno-optimize-static-class-initialization'
6780         * parse.y (start_complete_expand_method): New function.
6781         (java_expand_method_bodies): Likewise.
6782         (attach_init_test_initialization_flags): Likewise.
6783         (adjust_init_test_initialization): Likewise.
6784         (emit_test_initialization): Likewise.
6785         (java_complete_expand_methods): Nullify abstract and native method
6786         bodies.
6787         (java_complete_expand_method): New locals `fbody', `block_body'
6788         and `exception_copy.' Reorganized: directly return on empty method
6789         bodies, call `start_complete_expand_method', remember definitely
6790         initialized static class in function, don't expand method bodies.
6791         (java_expand_classes): Call `java_expand_method_bodies' before
6792         `finish_class' when compiling to native.
6793         (resolve_expression_name): Use `orig' after building outer class
6794         field access.
6795         (patch_invoke): Remember static method invocations.
6796
6797 2001-08-06  Richard Henderson  <rth@redhat.com>
6798
6799         * class.c (emit_register_classes): Pass a symbol_ref and priority
6800         to assemble_constructor.
6801
6802 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
6803
6804         * java-tree.h (all_class_filename): New macro.
6805         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6806         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6807         newly created IDENTIFIER_NODE to `all_class_filename.'
6808
6809 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
6810
6811         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6812         Use ggc_add_tree_root to register roots.
6813
6814 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6815
6816         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6817         second operand calling check_init.
6818         * decl.c (complete_start_java_method): Swaped second and third
6819         arguments while creating WITH_CLEANUP_EXPR node.
6820         * jcf-write.c (generate_bytecode_insns): Use second operand
6821         instead of third when handling WITH_CLEANUP_EXPR.
6822         * parse.y (java_complete_lhs): Expand second operand of
6823         WITH_CLEANUP_EXPR nodes.
6824         (patch_synchronized_statement): Swaped second and third arguments
6825         while creating WITH_CLEANUP_EXPR node.
6826
6827 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
6828
6829         * parse.y (create_interface): Avoid cyclic inheritance report when
6830         syntax error encountered during class definition.
6831         Fixes PR java/2956
6832
6833 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6834
6835         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6836         ASM_FINAL_SPEC.
6837         (lang_specific_pre_link): Use set_input to set input_filename.
6838         Append `main' here.
6839         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6840         (main): Fix definition.
6841         Strip `main' from classname.
6842         Fixes PR java/227.
6843
6844 2001-07-18  Tom Tromey  <tromey@redhat.com>
6845
6846         For PR java/2812:
6847         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6848         * lex.c (java_new_lexer): Use ICONV_CONST.
6849         (java_read_char): Likewise.
6850         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6851         (jv-scan$(exeext)): Likewise.
6852
6853 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6854
6855         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6856         * parse.y (check_class_interface_creation): Allow `private' if the
6857         enclosing is not an interface.
6858         (create_interface): Interface tagged public if the enclosing
6859         context is an interface.
6860         (create_class): Class tagged public if the enclosing context
6861         is an interface.
6862         Fixes PR java/2959
6863
6864 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6865
6866         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6867         Fixes PR java/2665
6868
6869 2001-07-14  Tim Josling  <tej@melbpc.org.au>
6870
6871         * check-init.c (check_init): Remove references to EXPON_EXPR.
6872
6873 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6874
6875         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6876         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6877         Fixes PR java/3602
6878
6879 2001-07-13  Tom Tromey  <tromey@redhat.com>
6880
6881         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6882         invocation.
6883
6884 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6885
6886         * parse.y (patch_method_invocation): Don't override primary if one
6887         is already provided, but let this$<n> be built. Fixed comment.
6888
6889 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6890
6891         * parse.y (empty_statement:): Report empty statement error only
6892         when found at class declaration level.
6893         Fixes PR java/3635
6894
6895 2001-07-12  Tom Tromey  <tromey@redhat.com>
6896
6897         * expr.c (expand_load_internal): New function.
6898         (LOAD_INTERNAL): Use it.
6899
6900 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
6901
6902         * parse.y (verify_constructor_super): Compare anonymous class ctor
6903         args with `valid_method_invocation_conversion_p.'
6904         Fixes PR java/3285
6905
6906 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6907
6908         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6909         `-fsyntax-only.' Fixes PR java/3248
6910
6911 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6912
6913         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6914
6915 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6916
6917         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6918         current function is static. Fixes PR java/1970
6919
6920 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6921
6922         * parse.y (patch_method_invocation): Add enclosing context to ctor
6923         calls if necessary. Fixes PR java/2953
6924
6925 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6926
6927         * parse.y (resolve_package): Abort if qualified expression member
6928         isn't right.
6929         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6930         Fixes PR java/1391
6931
6932 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
6933
6934         * verify.c: Don't use // comments.
6935
6936 2001-07-05  Tom Tromey  <tromey@redhat.com>
6937
6938         * lang.c (flag_assume_compiled): Removed.
6939         * java-tree.h (flag_assume_compiled): Removed.
6940         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6941         -fhash-synchronization, -fuse-divide-subroutine,
6942         -fcheck-references, -femit-class-file, -femit-class-files,
6943         -fassume-compiled.  Updated --encoding information.  Changed
6944         -foutput-class-dir to `-d'.
6945
6946 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
6947
6948         * jcf-parse.c (parse_class_file): Add lineno parameter to
6949         debug_start_source_file call.
6950
6951 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6952
6953         * gcj.texi: Use gpl.texi.
6954         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6955         dependencies and use doc/include in search path.
6956
6957 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
6958
6959         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6960         `this'.  If so, don't build instance initializers.
6961
6962 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6963
6964         * parse.y (resolve_expression_name): Improved error message for
6965         inner class cases. Fixes PR java/1958
6966
6967 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6968
6969         * lang.c: #include diagnostic.h
6970         (lang_print_error): Add a `diagnostic_context *' parameter.
6971         (java_dummy_print): Likewise.
6972         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
6973
6974 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6975
6976         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
6977         * jcf.h (typedef struct JCF): New bitfield `finished.'
6978         (JCF_FINISH): Set `finished.'
6979         (JCF_ZERO): Reset `finished.'
6980         Fixes PR java/2633
6981
6982 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6983
6984         * parse.y (class_body_declaration:): Don't install empty instance
6985         initializers.
6986         Fixes PR java/1314
6987
6988 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6989
6990         * class.c (set_super_info): Call `set_class_decl_access_flags.'
6991         (set_class_decl_access_flags): New function.
6992         * java-tree.h (set_class_decl_access_flags): New prototype.
6993         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
6994         (parse_class_file): New local `decl_max_locals.' Take wide types
6995         into account to compute DECL_MAX_LOCALS.
6996         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
6997         imports on demand.
6998
6999 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
7000
7001         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
7002
7003 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7004
7005         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
7006         * parse.y (do_resolve_class): Moved comments out to leading comment
7007         section. Removed local `start', New local `_ht' and
7008         `circularity_hash.'  Record `enclosing' in hash table and search
7009         it to detect circularity.  Use `enclosing' as an argument to
7010         `lookup_cl.' Free the hash table when done.
7011
7012 2001-06-19  Tom Tromey  <tromey@redhat.com>
7013
7014         * lex.c (java_read_char): Disallow invalid and overlong
7015         sequences.  Fixes PR java/2319.
7016
7017 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
7018
7019         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
7020
7021 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7022
7023         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
7024         arguments accordingly.
7025
7026 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7027
7028         * gcj.texi: Move contents to just after title page.
7029
7030 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
7031
7032         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
7033         builtin type.
7034         (patch_incomplete_class_ref): Build the class ref, build the class
7035         init if necessary, complete the tree.
7036         Fixes PR java/2605
7037
7038 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7039
7040         * parse.y (lookup_field_wrapper): Test `name' code.
7041         (resolve_qualified_expression_name): Test `qual_wfl' code.
7042         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
7043         handle `qual_wfl' by code.
7044         (maybe_build_primttype_type_ref): Test `wfl' code.
7045
7046 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7047
7048         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
7049         fdl.texi.
7050         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
7051         the dvi file in the java directory.
7052
7053 2001-05-25  Sam TH  <sam@uchicago.edu>
7054
7055         * gen-table.pl javaop.h jcf.h lex.h,
7056         parse.h: Fix header include guards.
7057
7058 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
7059
7060         * jv-scan.c (version): Update copyright year.
7061
7062 2001-05-21  Per Bothner  <per@bothner.com>
7063
7064         * jcf-parse.c (read_class):  If class is from .class or .zip file
7065         and it's already been read, don't push/pop parser context.
7066
7067 2001-05-18  Per Bothner  <per@bothner.com>
7068
7069         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
7070         command line so the jvgenmain-generated main program comes first.
7071
7072 2001-05-15  Tom Tromey  <tromey@redhat.com>
7073
7074         * class.c (build_utf8_ref): Don't generate identifier based on
7075         utf8const contents.
7076
7077 2001-05-12  Richard Henderson  <rth@redhat.com>
7078
7079         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
7080         * expr.c (java_lang_expand_expr): Expand it.
7081         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
7082         calling build_exception_object_ref.
7083         * parse.y (catch_clause_parameter): Likewise.
7084         (build_dot_class_method): Likewise.
7085         (try_reference_assignconv): Likewise.
7086         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
7087         * jcf-write.c (generate_bytecode_insns): Likewise.
7088
7089 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7090
7091         * parse.y (build_unresolved_array_type): Set
7092         EXPR_WFL_QUALIFICATION on the newly created wfl.
7093         Fixes PR java/2538. Fixes PR java/2535.
7094
7095 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7096
7097         * parse.y (fix_constructors): Removed unnecessary assignment to
7098         local. Moved assignment to `this$<n>', fixed comments and
7099         indentation.
7100         (build_wfl_wrap): Fixed indentation.
7101         Fixes PR java/2598, java/2579 and java/2658.
7102
7103 2001-05-03  Mo DeJong  <mdejong@redhat.com>
7104
7105         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
7106         check for byte swap.
7107
7108 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
7109
7110         * expr.c (build_class_init): Move MODIFY_EXPR
7111         outside of COND_EXPR.  Remove variable `call'.
7112
7113 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7114
7115         * decl.c: NULL_PTR -> NULL.
7116         * jcf-write.c: Likewise.
7117
7118 2001-05-01  Tom Tromey  <tromey@redhat.com>
7119
7120         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
7121         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
7122         * gcj.texi: Updated copyright text.  Include fdl.texi.
7123         (Top): Link to new node.
7124
7125 2001-05-01  Per Bothner  <per@bothner.com>
7126
7127         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
7128
7129 2001-05-01  Per Bothner  <per@bothner.com>
7130
7131         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
7132         import_list contains the name, not the TREE_PURPOSE.
7133
7134 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7135
7136         * jcf-io.c (read_zip_member): Cast to long in comparison with
7137         signed value.
7138
7139         * jvspec.c (lang_specific_driver): Initialize variables.
7140
7141         * mangle.c (find_compression_record_match): Likewise.
7142
7143         * typeck.c (build_null_signature): Provide static prototype.  Mark
7144         parameter with ATTRIBUTE_UNUSED.
7145
7146         * verify.c (verify_jvm_instructions): Initialize variable.
7147
7148 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7149
7150         * parse.y (do_resolve_class): Check for cyclic inheritance during
7151         inner class resolution.
7152
7153 2001-04-27  Per Bothner  <per@bothner.com>
7154
7155         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
7156         while iterating, since that could cause gc to lose stuff.
7157
7158 2001-04-26  Per Bothner  <per@bothner.com>
7159
7160         Fix method search wrt scope of inner classes to match JLS2.
7161         * typeck.c (build_null_signature):  New static function.
7162         (has_method):  New function.  Uses build_null_signature and lookup_do.
7163         * java-tree.h (has_method):  New declaration.
7164         * parse.y (find_applicable_accessible_methods_list):  Do not search
7165         context of inner classes here.
7166         (patch_method_invocation):  Search scope, ie. current and outer clases,
7167         for method matching simple name, to find class.
7168
7169 2001-04-26  Per Bothner  <per@bothner.com>
7170
7171         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
7172         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
7173
7174         * constants.c (find_methodref_with_class_index):  New function.
7175         (find_methodref_index):  Use find_methodref_with_class_index.
7176         * java-tree.h (find_methodref_with_class_index):  New declaration.
7177         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
7178         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
7179         If context changed from interface to class, don't use invokeinterface.
7180
7181 2001-04-25  Per Bothner  <per@bothner.com>
7182
7183         * verify.c (verify_jvm_instructions):  For field instructions,
7184         check that field index is valid.  For invoke instructions, check that
7185         method index is valid.
7186
7187 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
7188
7189         * config-lang.in (target_libs): Copy from $libgcj_saved.
7190
7191 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7192
7193         * decl.c (init_decl_processing): Add new class "protectionDomain"
7194         field.
7195         * class.c (make_class_data): Set initial value for "protectionDomain".
7196
7197 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7198
7199         * jvspec.c (lang_specific_driver): Fix memory allocation
7200         deficit, by using concat in lieu of xmalloc/sprintf.
7201
7202 2001-04-20  Per Bothner  <per@bothner.com>
7203
7204         Fixes to compile multiple .class files at once.
7205         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
7206         * java-tree.h (CLASS_PARSED_P):  New macro.
7207         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
7208         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
7209         (read_class):  Avoid some code duplication.
7210         Don't call JCF_FINISH for a .class file - might be needed later.
7211         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
7212         rather than CLASS_LOADED_P, since latter implies class laid out.
7213         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
7214         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
7215
7216 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7217
7218         * Make-lang.in (java/boehm.o): Depend on toplev.h.
7219
7220         * boehm.c: Include toplev.h.
7221
7222 2001-04-06  Tom Tromey  <tromey@redhat.com>
7223             Alexandre Petit-Bianco  <apbianco@redhat.com>
7224
7225         Fix for PR gcj/1404 and PR gcj/2332:
7226         * parse.y (build_array_from_name): If we use the type_wfl then
7227         accumulate dimensions from the original type as well.
7228         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
7229
7230 2001-04-06  Tom Tromey  <tromey@redhat.com>
7231
7232         * parse.y (analyze_clinit_body): Return true if the second operand
7233         of a METHOD_EXPR is nonzero.
7234
7235 2001-04-06  Tom Tromey  <tromey@redhat.com>
7236
7237         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
7238         directory.
7239         ($(srcdir)/java/parse.c): Likewise.
7240
7241 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
7242
7243         * gcj.texi: Use `which-gcj' instead of `which-g77.'
7244         (version-gcc): Initialized.
7245         (which-gcj): Likewise.
7246
7247 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7248
7249         * java-tree.h (struct lang_decl): New macro
7250         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
7251         * parse.y (build_instance_initializer): New function.
7252         (add_instance_initializer): Use it.
7253         (java_fix_constructors): Set `current_class' before fix pass.
7254         (fix_constructors): Just return if already fixed. Move `super()'
7255         invocation ahead. Use `build_instance_initializer.'
7256         Fixes PR java/1315.
7257
7258 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7259
7260         * parse.y (resolve_qualified_expression_name): Pass field's
7261         DECL_CONTEXT to `not_accessible_p.'
7262         (not_accessible_p): Changed parameters order in `inherits_from_p'
7263         invocation.
7264
7265 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
7266
7267         * lang-options.h: Add flag_check_references.
7268
7269 2001-04-04  Per Bothner  <per@bothner.com>
7270
7271         * java-tree.h (CONSTANT_VALUE_P):  New macro.
7272         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
7273         * parse.y (maybe_build_class_init_for_field):  New static function.
7274         (resolve_expression_name, resolve_field_access):  Use
7275         maybe_build_class_init_for_field instead of build_class_init
7276         This does not do the init if the field is compile-time-constant.
7277         (resolve_field_access):  Simplify.
7278
7279         * parse.y (fold_constant_for_init):  Merge test into switch.
7280
7281 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
7282
7283         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
7284         on gansidecl.h.
7285         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
7286
7287 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
7288
7289         * expr.c (pop_type_0): Save the result of the first
7290         lang_printable_name call in a scratch buffer, so it
7291         won't be clobbered by the second call.
7292
7293 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7294
7295         * parse-scan.y (array_type:): Rewritten.
7296         (type_declaration:): `empty_statement' replaces `SC_TK.'
7297         (class_member_declaration:): `empty statement' added.
7298         (method_body:): Simplified.
7299         (static_initializer:): Likewise.
7300         (primary_no_new_array:): Use `type_literals.'
7301         (type_literals:): New rule.
7302         (dims:): Set and update `bracket_count.'
7303         Fixes PR java/1074. Fixes PR java/2412.
7304
7305 2001-03-28  Hans Boehm  <boehm@acm.org>
7306
7307         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
7308         (get_boehm_type_descriptor): Set type on returned value to be a
7309         pointer length integer.
7310
7311 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7312
7313         * expr.c (pop_type_0): Call `concat' rather than building the
7314         string manually.
7315         (pop_type): Add format specifier in call to `error'.
7316
7317         * parse.y (patch_method_invocation): Avoid casting away
7318         const-ness.
7319
7320 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
7321
7322         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
7323
7324 2001-03-28  Richard Henderson  <rth@redhat.com>
7325
7326         IA-64 ABI Exception Handling:
7327         * Make-lang.in (except.o): Don't depend on eh-common.h.
7328         * check-init.c (check_init): Handle EXC_PTR_EXPR.
7329         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
7330         [soft_exceptioninfo_call_node]: Remove.
7331         [eh_personality_libfunc, lang_eh_runtime_type]: New.
7332         (end_java_method): No emit_handlers.
7333         * except.c (java_set_exception_lang_code): Remove.
7334         (method_init_exceptions): Don't call it.
7335         (prepare_eh_table_type): No CATCH_ALL_TYPE.
7336         (build_exception_object_ref): New.
7337         (expand_end_java_handler): Update for except.h name changes.
7338         (emit_handlers, expand_resume_after_catch): Remove.
7339         * expr.c (java_lang_expand_expr): Update for except.h name changes.
7340         (process_jvm_instruction): Use build_exception_object_ref.
7341         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
7342         (soft_exceptioninfo_call_node): Remove.
7343         (build_exception_object_ref): Declare.
7344         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
7345         soft_exceptioninfo_call_node.  Move processing ...
7346         [EXC_PTR_EXPR]: ... here.
7347         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
7348         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
7349         (source_end_java_method): No java_set_exception_lang_code or
7350         emit_handlers.
7351         (build_dot_class_method): Use build_exception_object_ref.
7352         (try_reference_assignconv): Check EXC_PTR_EXPR not
7353         soft_exceptioninfo_call_node.
7354
7355 2001-03-28  Richard Henderson  <rth@redhat.com>
7356
7357         * java-tree.h (throw_node): Define as a single member of
7358         java_global_trees instead of a separate array.
7359         (JTI_THROW_NODE): New.
7360         * decl.c (throw_node): Don't declare.
7361         (init_decl_processing): Init a scalar throw_node.
7362         Don't register it for gc.
7363         * check-init.c (check_init): Reference scalar throw_node.
7364         * expr.c (build_java_athrow): Likewise.
7365         * jcf-write.c (generate_bytecode_insns): Likewise.
7366         * parse.h (BUILD_THROW): Likewise.
7367
7368 2001-03-28  Richard Henderson  <rth@redhat.com>
7369
7370         * decl.c (end_java_method): Do not save and restore
7371         flag_non_call_exceptions.
7372         * parse.y (source_end_java_method): Likewise.
7373         * lang.c (flag_exceptions): Don't declare.
7374         (java_init_options): Set flag_non_call_exceptions.  Set
7375         flag_exceptions here ...
7376         (java_init): ... not here.
7377
7378 2001-03-27  Richard Henderson  <rth@redhat.com>
7379
7380         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
7381         exceptions_via_longjmp.
7382
7383         * lang.c (flag_new_exceptions): Don't declare it.
7384         (java_init_options): Or set it.
7385
7386 2001-03-27  Richard Henderson  <rth@redhat.com>
7387
7388         * decl.c (end_java_method): Rename asynchronous_exceptions to
7389         flag_non_call_exceptions.
7390         * parse.y (source_end_java_method): Likewise.
7391
7392 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7393
7394         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7395
7396 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7397
7398         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
7399
7400 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
7401
7402         * parse.y (find_as_inner_class): Follow current package
7403         indications not to mistakingly load an unrelated class.
7404
7405 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7406
7407         * constants.c (PUTN): Use memcpy, not bcopy.
7408
7409         * lex.c (java_read_char): Use memmove, not bcopy.
7410
7411         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7412
7413 2001-03-23  Per Bothner  <per@bothner.com>
7414
7415         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
7416         macro for better error pin-pointing.
7417         * java-tree.h:  Fix typo in comment.
7418
7419         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
7420         Don't include jsr/goto in exception range.
7421         Check if start and end of exception range are the same (also TRY_EXPR).
7422         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7423         However, do emit the following goto even if try_block is empty.
7424         Defer freeing exception_decl until after the finalizer, to make
7425         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
7426
7427         * parse.y (java_complete_lhs):  If the try-clause is empty, just
7428         return the finally-clause and vice versa.
7429
7430 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7431
7432         * gcj.texi (Input Options): documented the check for attribute
7433         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7434         * java-tree.h (flag_force_classes_archive_check): Declared extern.
7435         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7436         (jcf_parse): Check for the right classes archive if necessary.
7437         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7438         (jcf_parse_fields): Fixed indentation.
7439         * jcf-write.c (append_gcj_attribute): New function.
7440         (generate_classfile): Compute the attribute count, invoke
7441         `append_gcj_attribute'.
7442         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7443         turned into bit-fields. New bit-field `right_zip.'
7444         (JCF_ZERO): Set `right_zip' to zero.
7445         * lang-options.h (-fforce-classes-archive-check): Added flag.
7446         * lang.c (flag_force_classes_archive_check): New flag.
7447         (lang_f_options): New entry `force-classes-archive-check.'
7448         Fixes PR java/1213.
7449
7450 2001-02-07  Andrew Haley  <aph@redhat.com>
7451
7452         * gcj.texi (Configure-time Options): Add -fcheck-references.
7453         * expr.c (build_java_indirect_ref): New function.
7454         (java_check_reference): New function.
7455         (build_java_array_length_access): Use build_java_indirect_ref to
7456         check for null references.
7457         (build_java_arrayaccess): Likewise.
7458         (build_get_class): Likewise.
7459         (build_field_ref): Likewise.
7460         (invoke_build_dtable): Likewise.
7461         (build_invokeinterface): Likewise.
7462         * lang.c (lang_f_options): Add flag_check_references.
7463         * jvspec.c (jvgenmain_spec): Add flag_check_references.
7464         * java-tree.h (flag_check_references): New variable.
7465         * lang.c (flag_check_references): Likewise.
7466         * parse.y (patch_invoke): Use java_check_reference.
7467         (patch_assignment): Allow for extra nesting in
7468         _Jv_CheckArrayStore.
7469
7470 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
7471
7472         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7473         * lex.c (cxx_keywords): Likewise.
7474
7475 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7476
7477         * parse.y (qualify_ambiguous_name): Broaden `length'
7478         recognition. Help MODIFY_EXPR be resolved as expression names.
7479         Fixes PR java/2066. Fixes PR java/2400.
7480
7481 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
7482
7483         * gjavah.c (process_file): Mark interface definitions with
7484         "__attribute__ ((java_interface))".
7485
7486 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7487
7488         * class.c (layout_class): Fixed push_super_field's second
7489         argument. Fixes PR java/2333.
7490         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7491         too early to lay innerclasses out.
7492
7493 2001-03-20  Tom Tromey  <tromey@redhat.com>
7494             Alexandre Petit-Bianco <apbianco@redhat.com>
7495
7496         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7497         inside an array reference. Insertion of the array store check
7498         rewritten. Fixes PR java/2299.
7499
7500 2001-03-20  Tom Tromey  <tromey@redhat.com>
7501
7502         * lex.c (java_read_unicode): Only accept leading `u's.
7503
7504 2001-03-20  Tom Tromey  <tromey@redhat.com>
7505
7506         * jcf-parse.c (read_class): Initialize `class'.
7507
7508 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7509
7510         * jcf_parse.c (jcf_parse): Eliminate unused variable.
7511
7512 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7513
7514         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7515         (layout_class): Likewise.
7516         (layout_class_method): Likewise.
7517         (emit_register_classes): Likewise.
7518         * decl.c (builtin_function): Likewise.
7519         (give_name_to_locals): Likewise.
7520
7521 2001-03-19  Per Bothner  <per@bothner.com>
7522
7523         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
7524         before trying to load an inner class.
7525
7526         Fixes to process to command-line .class files in two passes.
7527         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
7528         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
7529         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
7530         * class.c (is_compiled_class):  Fix for renamed flag.
7531         * parse.y (maybe_create_class_interface_decl):  Likewise.
7532         * jcf-parse.c (yyparse):  Also set if compiling .class files.
7533         * jcf-parse.c (read_class);  Read current_class.
7534         (jcf_parse):  Make static.
7535         (load_inner_classes):  New function, with code moved from jcf_parse,
7536         because we need to inner classes after the command-line files are read.
7537         (yyparse):  Set finput to NULL when it doesn't need to be closed.
7538         Reduce use of main_jcf (basically only for archive) and
7539         use finput instead of main_jcf->read_state.
7540         Inline jcf_figure_file_type into yyparse.
7541         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7542         Defer load_inner_classes and parse_class_file to a second pass,
7543         after we've correctly mapped command-line .clas fiels to classes.
7544         (jcf_figure_file_type):  Removed.
7545         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
7546         (JCF_ZERO):  Also clear zipd field.
7547         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
7548
7549 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7550
7551         * jcf-parse.c (yyparse): Change ch from char * to char.
7552
7553 2001-03-19  Per Bothner  <per@bothner.com>
7554
7555         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
7556         Add constructed filelist-file at end, following -xjava.  Thus any .o
7557         and library files are not affected by the -xjava.  Also wrap
7558         explicit @FILE with -xjava and -xnone.
7559
7560 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
7561
7562         * class.c (build_static_field_ref): Call make_decl_rtl() after
7563         setting the DECL_EXTERNAL flag.
7564
7565 2001-03-17  Per Bothner  <per@bothner.com>
7566
7567         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
7568
7569         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
7570         when result is is needed (target is STACK_TARGET).
7571
7572         * parse.h (JDEP_SOLV):  Removed.
7573         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
7574
7575         * parse.y (incomplete_class_list): Removed.
7576         (obtain_incomplete_type): Don't use or set incomplete_class_list.
7577         It doesn't work if resolve_class changes the name of an array type
7578         that is on the list and then someone else looks for the modified name.
7579         Also, seems liable to break when compiling multiple source files at
7580         once.  So the simplest is to just remove incomplete_class_list -
7581         it is only a minor space win and it is not even clear it saves time.
7582
7583         * parse.y (resolve_class):  Remove unneeded promote_type.
7584
7585 2001-03-15  Per Bothner  <per@bothner.com>
7586
7587         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
7588         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
7589         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7590         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7591
7592         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
7593         * parse.y (java_expand_classes):  Likewise.
7594
7595         * parse.y (expand_start_java_method):  Was only called once and had a
7596         misleading name, so inline in caller java_complete_expand_method.
7597         (enter_a_block):  Likewise inline in enter_block and remove.
7598
7599         Remove junk from when gcc/java was created (by copying from C/C++).
7600         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
7601         (struct binding_level):  Remove fields keep, keep_if_subblocks,
7602         more_cleanups_ok, have_cleanups (which have never been used).
7603         (pushlevel, poplevel):  Remove related useless code.
7604
7605         * class.c (make_class_data):  The class_dtable_decl (i.e. the
7606         vtable for Class) should be external, except when compiling Class.
7607
7608         * jvspec.c (lang_specific_driver):  Fix -C handling.
7609         Check -save-temps to see if temp @FILE should be deleted.
7610         Follow-up to/fix for February 16 patch.
7611
7612         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
7613         (type_stack_dup):  Remove no-longer neded error check.
7614
7615 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
7616
7617         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7618         to 'for_pointer'. If this type is for a pointer (argument) mangling,
7619         don't surround the element with 'N..E' if the type name is
7620         unqualified.
7621
7622 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7623
7624         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7625         DECL_RTL_SET_P, etc.
7626         (make_method_value): Likewise.
7627         (get_dispatch_table): Likewise.
7628
7629         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7630
7631 2001-03-07  Tom Tromey  <tromey@redhat.com>
7632
7633         * config-lang.in (lang_requires): Define.
7634
7635 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
7636
7637         * typeck.c (convert): Check flag_unsafe_math_optimizations,
7638         not flag_fast_math.
7639
7640 2001-03-05  Per Bothner  <per@bothner.com>
7641
7642         Fix a problem where rest_of_decl_compilation applied to
7643         class_dtable_decl causes problems because it was done too early,
7644         before output file was opened.
7645         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
7646         * class.c (class_dtable_decl):  Add macro - element of class_roots.
7647         (make_class_data):  Define class_dtable_decl.
7648         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
7649
7650 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7651
7652         * java/class.c, java/decl.c, java/java-tree.h: Replace all
7653         uses of 'boolean' with 'bool'.
7654
7655 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7656
7657         * lang-specs.h: Add zero initializer for cpp_spec field to all
7658         array elements.
7659
7660 2001-02-16  Per Bothner  <per@bothner.com>
7661
7662         Handle compiling multiple input files at once, and @FILE syntax.
7663         * gcj.texi:  Updated documentation to match.
7664         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
7665         * jcf-parse.c (parse_source_file):  Split into ...
7666         (parse_source_file_1):  New function - and:
7667         (parse_source_file_2):  New function.
7668         (yyparse):  On -ffilelist-file, open and scan named file.
7669         On first pass over files, only do parse_source_file_1.
7670         A new second pass calls parse_source_file_2 for each file to compile.
7671         (init_jcf_parse):  Call init_src_parse.
7672         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
7673         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
7674         as multiple input file combined in one compilation.
7675         * lang-options.h:  Add -ffilelist-file
7676         * lang.c (flag_filelist_file):  New flag variable.
7677         (lang_f_options):  Handle -ffilelist-file.
7678         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7679         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
7680         gclass_list - use global fields of src_parse_roots instead.
7681         * parse.y (src_parse_roots):  New array.
7682         (incomplete_class_list, gclass_list):  New macros.
7683         (push_parser_context, java_pop_parser_context,
7684         java_parser_context_resume):  Don't fiddle with deleted fields.
7685         (various):  Use incomplete_class gclass_list and global macros
7686         instead of parse_ctxt fields - the lists are global.
7687         (init_src_parse):  New function.
7688
7689 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7690
7691         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7692
7693 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7694
7695         * parse.y (check_inner_class_access): Moved declaration of local
7696         `enclosing_decl_type' to the right location.
7697
7698 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
7699
7700         * parse.y (parser_check_super_interface): Don't call
7701         check_pkg_class_access for an inner interface.
7702         (parser_check_super): Don't call check_pkg_class_access for inner
7703         class.
7704         (do_resolve_class): Simplify enclosing type loop. Don't call
7705         check_pkg_class_access if CL and DECL are not set.
7706         (find_in_imports_on_demand): Set DECL if class_type needed to be
7707         loaded. Don't call check_pkg_class_access for an inner class.
7708         (check_inner_class_access): Rewritten to implement member access
7709         rules as per spec 6.6.1.
7710         (check_pkg_class_access): Handle the empty package correctly.
7711         (in_same_package): New function. Determine if two classes are in the
7712         same package.
7713
7714 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
7715
7716         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7717         method into array types.
7718         * parse.y (patch_method_invocation): Bypass access check on clone call
7719         to array instance.
7720
7721 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
7722
7723         * expr.c (build_instanceof): Check for arrays when trying fold to
7724         false.
7725
7726 2001-02-15  Jim Meyering  <meyering@lucent.com>
7727
7728         * Make-lang.in (java.install-common): Depend on `installdirs'.
7729         (java.install-info): Likewise.
7730
7731 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
7732
7733         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7734
7735 2001-02-14  Tom Tromey  <tromey@redhat.com>
7736             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7737
7738         Fix for PR java/1261.
7739         * typeck.c (build_java_array_type): Add public `clone' method to
7740         arrays.
7741         * parse.y (resolve_qualified_expression_name): Use current_class
7742         when checking for inaccessibility.
7743         (patch_method_invocation): Fixed error message when accessibility
7744         denied.  Added `from_super' argument.
7745
7746 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7747
7748         * parse.y (resolve_class): Don't build a fake decl. Use the one
7749         already built.
7750         * typeck.c (build_java_array_type): Build and assign decl to array
7751         type.
7752
7753 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7754
7755         * parse.y (not_accessible_p): Changed leading comment. Added extra
7756         `where' argument. Use it to enforce protected access rules.
7757         (resolve_qualified_expression_name): Added extra argument to
7758         not_accessible_p.
7759         (patch_method_invocation): Use argument `primary' to provide
7760         not_accessible_p with an extra argument.
7761         (lookup_method_invoke): Added extra argument to not_accessible_p.
7762         (search_applicable_method_list): Likewise.
7763
7764 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7765
7766         * parse.y (resolve_qualified_expression_name): Try to resolve as
7767         an inner class access only if `decl' is a TYPE_DECL.
7768
7769 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7770
7771         * decl.c (classdollar_identifier_node): Initialize.
7772         * java-tree.h (enum java_tree_index): New entry
7773         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7774         (classdollar_identifier_node): New macro.
7775         (ID_CLASSDOLLAR_P): Likewise.
7776         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7777         (build_dot_class_method_invocation): Likewise.
7778         (find_applicable_accessible_methods_list): `class$' can't be
7779         inherited.
7780
7781 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
7782
7783         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7784
7785 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7786
7787         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7788         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7789         gone.
7790
7791 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7792
7793         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7794         outside of the `__U' sequence too.
7795         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7796         sequence too.
7797
7798 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7799
7800         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7801
7802 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7803
7804         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7805         (JVGENMAIN_OBJS): Likewise.
7806         * java-tree.h (append_gpp_mangled_name): New prototype.
7807         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7808         Removed cast calling `gcc_add_root.'
7809         * jvgenmain.c (mangle_obstack): New global, initialized.
7810         (main): Use it.
7811         (do_mangle_class): Constify local `ptr.'
7812         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7813         append_gpp_mangle_name and update `count' if necessary.
7814         Use `mangle_obstack.'
7815         * mangle.c (append_unicode_mangled_name): Removed.
7816         (append_gpp_mangled_name): Likewise.
7817         (unicode_mangling_length): Likewise.
7818         (mangle_member_name): Return type set to `void.'
7819         (mangle_field_decl): Don't append `U' in escaped names.
7820         (mangle_method_decl): Likewise.
7821         (mangle_member_name): Just use `append_gpp_mangled_name.'
7822         * mangle_name.c: New file.
7823
7824 2001-02-07  Per Bothner  <per@bothner.com>
7825
7826         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
7827
7828         * check-init.c (check_init):  Don't call done_alternative after
7829         processing loop code, as a LOOP_EXPR never terminates normally.
7830
7831 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7832
7833         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7834
7835 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7836
7837         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7838         DECLs.
7839
7840 2001-02-06  Tom Tromey  <tromey@redhat.com>
7841
7842         * lex.c (java_new_lexer): Longer error message.
7843
7844 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
7845             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7846
7847         * typeck.c (build_prim_array_type): Added leading comment.
7848         (build_java_array_type): Moved locals out of
7849         block. Always create the `data' field, fixed alignment to match
7850         C++.
7851
7852 2001-02-04  Tom Tromey  <tromey@redhat.com>
7853
7854         * expr.c (java_lang_expand_expr): Don't bother recomputing
7855         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
7856         Fixes PR java/1866.
7857
7858 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7859
7860         * parse.y (process_imports): Save the original name of the import
7861         for better error report.
7862
7863 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
7864
7865         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7866         of macros used when compiling jvspec.c.
7867         * jvspec.c (lang_specific_driver): Link with the shared
7868         libgcc by default.
7869
7870 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7871
7872         * check-init.c (check_init): Call internal_error instead of fatal.
7873         * expr.c (java_lang_expand_expr): Likewise.
7874         * jcf-parse.c (get_constant): Likewise.
7875         * mangle.c (java_mangle_decl): Likewise.
7876         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7877         (operator_string): Likewise.
7878         * check-init.c (check_init): Call abort instead of fatal.
7879         * class.c (build_class_ref): Likewise.
7880         * constants.c (write_constant_pool): Likewise.
7881         * decl.c (start_java_method): Likewise.
7882         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7883         (java_stack_dup, encode_newarray_type): Likewise.
7884         (build_java_array_length_access): Likewise.
7885         (build_java_check_indexed_type, expand_java_pushc): Likewise.
7886         (build_java_soft_divmod, build_invokeinterface): Likewise.
7887         * java-tree.h (INNER_CLASS_P): Likewise.
7888         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7889         (give_name_to_class, get_class_constant): Likewise.
7890         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7891         (find_constant_index, generate_bytecode_conditional): Likewise.
7892         (generate_bytecode_insns, perform_relocations): Likewise.
7893         * lex.c (java_unget_unicode, java_lex): Likewise.
7894         * mangle.c (mangle_type, mangle_record_type): Likewise.
7895         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7896         (finish_mangling): Likewise.
7897         * parse.h (MARK_FINAL_PARMS): Likewise.
7898         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7899         (obtain_incomplete_type, java_complete_class): Likewise.
7900         (java_check_regular_methods, java_complete_expand_method): Likewise.
7901         (cut_identifier_in_qualified, check_deprecation): Likewise.
7902         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7903         (java_complete_lhs, lookup_name_in_blocks): Likewise.
7904         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7905         * typeck.c (set_local_type, parse_signature_type): Likewise.
7906         (parse_signature_string, build_java_signature): Likewise;
7907         (set_java_signature): Likewise.
7908         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7909         * class.c (add_method): Call fatal_error instead of fatal.
7910         (build_static_field_ref): Likewise.
7911         * expr.c (build_known_method_ref, expand_invoke): Likewise.
7912         * jcf-parse.c (get_constant, jcf_parse): Likewise.
7913         * lex.c (java_new_new_lexer): Likewise.
7914         * jv-scan.c (main): Likewise.
7915         (fatal_error): Renamed from fatal.
7916         * jcf-parse.c (yyparse): Call fatal_io_error instead of
7917         pfatal_with_name.
7918         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7919         (yyparse): Likewise.
7920         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7921         * lex.c (java_get_line_col): Likewise.
7922         * jcf-parse.c (load_class): Make errors non-fatal.
7923         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7924
7925 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
7926
7927         * jvgenmain.c (class_mangling_suffix): Remove unused string.
7928         (error): Remove unused function.
7929         (main): Don't use "__attribute__ alias" on generated class symbol.
7930
7931 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7932
7933         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7934         argument.
7935         * parse.y (finish_method_declaration): Code accounting for WFLed
7936         method DECL_NAMEs deleted.
7937         (check_abstract_method_definitions): Likewise.
7938         (resolve_type_during_patch): Layout resolved type.
7939         * typeck.c (lookup_do): Removed unused local.
7940
7941 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
7942
7943         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7944         * decl.c (init_decl_processing): Use integer_minus_one_node, not
7945         integer_negative_one_node.
7946         * expr.c (build_java_binop): Likewise.
7947
7948 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
7949
7950         * zextract.c (read_zip_archive): Read file_offset before writing
7951         zipd and consequently clobbering the header contents.
7952
7953 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7954
7955         * Make-lang.in: Remove all dependencies on defaults.h.
7956         * decl.c: Don't include defaults.h.
7957         * expr.c: Likewise.
7958         * parse.y: Likewise.
7959
7960 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7961
7962         * ChangeLog (2001-01-21): Fixed typo.
7963         * class.c (layout_class_method): Code accounting for WFLed
7964         method DECL_NAMEs deleted.
7965         * constant.c (find_methodref_index): Likewise.
7966         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7967         * java-tree.h (DECL_FUNCTION_WFL): New macro.
7968         (struct lang_decl): New field `wfl'.
7969         (java_get_real_method_name): Prototype deleted.
7970         * mangle.c (mangle_method_decl): Code accounting for WFLed
7971         method DECL_NAMEs deleted.
7972         * parse.h (GET_METHOD_NAME): Macro deleted.
7973         * parse.y (reset_method_name): Deleted.
7974         (method_header): Set DECL_FUNCTION_WFL.
7975         (check_abstract_method_header): Code accounting for WFLed method
7976         DECL_NAMEs deleted.
7977         (java_get_real_method_name): Deleted.
7978         (check_method_redefinition): Code accounting for WFLed method
7979         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
7980         (java_check_regular_methods): Likewise.
7981         (java_check_abstract_methods): Likewise.
7982         (java_expand_classes): Don't call `reset_method_name.'
7983         (search_applicable_method_list): Use DECL_NAMEs instead of
7984         GET_METHOD_NAME.
7985         * typeck.c (lookup_do): Code accounting for WFLed method
7986         DECL_NAMEs deleted.
7987
7988 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
7989
7990         * lex.c (java_read_char): Check for EOF from getc first.
7991
7992 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7993
7994         * class.c (layout_class): Don't lay the superclass out if it's
7995         already being laid out.
7996         * jcf-parse.c (handle_innerclass_attribute): New function.
7997         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
7998         handle_innerclasses_attribute.
7999         (jcf_parse): Don't load an innerclasses if it's already being
8000         laid out.
8001         * jcf-write.c (append_innerclass_attribute_entry): Static
8002         `anonymous_name' and its initialization deleted. `ocii' and `ini'
8003         to be zero for anonymous classes.
8004
8005 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8006
8007         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
8008         necessary.
8009         * jcf-parse.c (set_source_filename): Use
8010         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
8011
8012 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8013
8014         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
8015         gets a unique asm name.
8016
8017 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8018
8019         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
8020         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8021         if necessary.
8022         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
8023         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
8024         * parse.y (lookup_package_type_and_set_next): Deleted.
8025         (resolve_package): Removed unnecessary code.
8026         (find_applicable_accessible_methods_list): `finit$' can't be
8027         inherited.
8028         * verify.c (pop_argument_types): Added missing prototype.
8029
8030 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
8031
8032         * config-lang.in: Disable java by default.
8033
8034 2001-01-23  Tom Tromey  <tromey@redhat.com>
8035
8036         * gcj.texi (Copying): New node.
8037         Added copyright information.
8038
8039 2001-01-21  Per Bothner  <per@bothner.com>
8040
8041         Various fixes to allow compiling a compressed .jar/.zip archive.
8042         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
8043         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
8044         (struct ZipDirectory):  New field zipf points to owning ZipFile.
8045         * jcf.h (struct ZipDirectory):  Add forward declaration.
8046         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
8047         Remove seen_in_zip and zip_offset fields.
8048         (JCF_SEEN_IN_ZIP):  New macro.
8049         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
8050         * jcf-io.c:  Change all ZipFileCache to ZipFile.
8051         (read_zip_member):  New function.
8052         (open_in_zip):  Call read_zip_member.
8053         * jcf-parse.c (find_in_current_zip):  Remove function.
8054         (read_class):  Merge in find_in_current_zip functionality.
8055         Call read_zip_member if needed.
8056         (parse_zip_file_entries):  Use read_zip_member.
8057         (process_zip_dir):  Update for removed and added JCF fields.
8058         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
8059
8060 2001-01-21  Per Bothner  <per@bothner.com>
8061
8062         Minor optimization of static ggc roots.
8063         * jcf-parse.c (parse_roots):  New static field.
8064         (current_field, current_method, current_file_list):  Replace by macros
8065         naming fields of parse_roots.
8066         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
8067         * class.c (class_roots):  New static field.
8068         (registered_class, fields_ident, info_ident, class_list):
8069         New macros naming fields of parse_roots.
8070         (build_static_field_ref):  Don't register roots here.
8071         (layout_class):  Static field list replaced by macro class_list.
8072         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
8073         Initialize fields_ident and info_ident here.
8074
8075 2001-01-21  Per Bothner  <per@bothner.com>
8076
8077         * jcf-parse.c (ggc_mark_jcf):  New function.
8078         (init_jcf_parse):  Register current_jcf as ggc root.
8079
8080 2001-01-21  Per Bothner  <per@bothner.com>
8081
8082         * lang.c (put_decl_node):  Print method's name.
8083
8084 2001-01-21  Per Bothner  <per@bothner.com>
8085
8086         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
8087         (verify_jvm_instructions):  Use it, for better error messages on loads.
8088
8089 2001-01-21  Per Bothner  <per@bothner.com>
8090
8091         * verify.c (merge_type_state):  Still may have to merge even if
8092         LABEL_VERIFIED (label).
8093
8094 2001-01-21  Per Bothner  <per@bothner.com>
8095
8096         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
8097         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
8098
8099 2001-01-19  Per Bothner  <per@bothner.com>
8100
8101         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
8102         if expeting an interface type.  Refines Tom's change of 2000-09-12.
8103
8104 2001-01-18  Per Bothner  <per@bothner.com>
8105
8106         * gcj.texi (Input Options): Mention .java files.
8107
8108 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8109
8110         * lang-options.h (-Wunsupported-jdk11): Removed.
8111         * lang.c (flag_not_overriding): Deleted.
8112         (flag_static_local_jdk1_1): Likewise.
8113         (lang_W_options): Removed "unsupported-jdk11" entry.
8114         * parse.y (java_check_methods): Removed dead code.
8115
8116 2001-01-17  Tom Tromey  <tromey@redhat.com>
8117
8118         Changes suggested by Per Bothner:
8119         * gcj.texi (Input Options): Don't mention input files.
8120         (Code Generation): Updated --main information.
8121         (Invoking jcf-dump): Mention that --javap is incomplete.
8122         From Alexandre Petit-Bianco:
8123         (Warnings): Don't mention -Wunsupported-jdk11.
8124         My stuff:
8125         (Compatibility): Mention JDK 1.2-ness of libraries.
8126         (Resources): Mention resources used when writing gcj.
8127
8128 2001-01-17  Tom Tromey  <tromey@redhat.com>
8129
8130         * gcj.texi: New file.
8131         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
8132         (java.info): Depend on gcj.info.
8133         (java/gcj.dvi): New target.
8134         (java.dvi): Depend on gcj.dvi.
8135         (java.install-info): Wrote.
8136
8137 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
8138
8139         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
8140         having called make_decl_rtl.
8141
8142 2001-01-14  Per Bothner  <per@bothner.com>
8143
8144         Various patches to emit better messages on verification errors.
8145         * expr.c (push_type_0):  Return error indication on stack overflow,
8146         instead of callinfg fatal.
8147         (push_type):  Now just call push_type_0 (nd fatal on overflow).
8148         (pop_type_0):  Return detailed error message (in a char** argument).
8149         (pop_type):  If pop_type_0 fails, print error message.
8150         (pop_argument_types):  Moved to verify.c.
8151         * verify.c (pop_argument_types):  Moved from expr.c.
8152         Return a (possible) error message, rather than void.
8153         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
8154         (verify_jvm_instruction):  Use new macros, improving error messages.
8155         For case OPCODE_astore use object_ptr_type_node.
8156         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
8157         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
8158
8159         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
8160         constant, return body without wrapper.  (Improves constant folding.)
8161         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
8162
8163 2001-01-13  Per Bothner  <per@bothner.com>
8164
8165         * expr.c (expand_java_field_op):  Assigning to a final field outside
8166         an initializer does not violate JVM spec, so should be warning, not
8167         error.  (Sun's verifier does not complain - though MicroSoft's does.)
8168
8169 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
8170
8171         * gjavah.c (version), jcf-dump.c (version): Update copyright year
8172         to 2001.
8173
8174 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
8175
8176         * parse.y (resolve_expression_name): Permit instance variables from
8177         enclosing context in super constructor call.
8178         (resolve_qualified_expression_name): Permit enclosing class's qualified
8179         "this" in super constructor call.
8180
8181 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8182
8183         * class.c (build_utf8_ref): Remove last argument in call to
8184         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8185         (build_class_ref): Likewise.
8186         (build_static_field_ref): Likewise.
8187         (get_dispatch_table): Likewise.
8188         (layout_class_method): Likewise.
8189         (emit_register_classes): Likewise.
8190         * constants.c (build_constant_data_ref): Likewise.
8191         * decl.c (builtin_function): Likewise.
8192         (create_primitive_vtable): Likewise.
8193         * expr.c (build_known_method_def): Likewise.
8194         (build_jni_stub): Likewise.
8195         (java_lang_expand_expr): Likewise.
8196
8197 2001-01-10  Tom Tromey  <tromey@redhat.com>
8198
8199         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
8200
8201 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8202
8203         * java-tree.h (lang_printable_name_wls): New prototype.
8204         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
8205         rather than `current_class' to print type name. Don't prepend type
8206         names when printing constructor names.
8207         (lang_printable_name_wls): New function.
8208         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
8209         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
8210         * parse.y (patch_method_invocation): Message tuned for constructors.
8211         (not_accessible_p): Grant `private' access from within
8212         enclosing contexts.
8213
8214 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8215
8216         All files with updated copyright when applicable.
8217         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
8218         * class.c (mangle_class_field): Function removed.
8219         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
8220         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
8221         (build_class_ref): Call `java_mangle_class_field' instead of
8222         `mangle_class_field.'
8223         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
8224         (layout_class): Call `java_mangle_decl' instead of
8225         `mangle_static_field.'
8226         (cxx_keywords): Initialized static array moved to `lex.c.'
8227         (layout_class_method): Changed leading comment. Simplified to
8228         call `java_mangle_decl.' Local `ptr' moved in for loop body.
8229         * decl.c (lang_mark_tree): Mark field `package_list.'
8230         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
8231         (struct lang_type): New field `package_list.'
8232         (unicode_mangling_length): Prototype removed.
8233         (append_gpp_mangled_name, append_gpp_mangled_classtype,
8234         emit_unicode_mangled_name): Likewise.
8235         (cxx_keyword_p): New prototype.
8236         (java_mangle_decl, java_mangle_class_field,
8237         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
8238         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
8239         `build_expr_wfl.'
8240         * jvgenmain.c (main_method_prefix): Global variable removed.
8241         (main_method_suffix): Likewise.
8242         (do_mangle_classname): New function.
8243         (main): Call it. Format changed to accommodate new mangling scheme.
8244         * lex.c: (utf8_cmp): Conditionally prototyped.
8245         (cxx_keywords): Moved from class.c, conditionally defined.
8246         (utf8_cmp, cxx_keyword_p): Likewise.
8247         * mangle.c (obstack.h, ggc.h): Included.
8248         (mangle_field_decl): New function.
8249         (mangle_method_decl, mangle_type, mangle_pointer_type,
8250         mangle_array_type, mangle_record_type,
8251         find_compression_pointer_match, find_compression_array_match,
8252         find_compression_record_match,
8253         find_compression_array_template_match, set_type_package_list,
8254         entry_match_pointer_p, emit_compression_string, init_mangling,
8255         finish_mangling, compression_table_add, mangle_member_name): Likewise.
8256         (mangle_obstack): New global.
8257         (MANGLE_RAW_STRING): New macro.
8258         (unicode_mangling_length): Turned static.
8259         (append_unicode_mangled_name): Renamed from
8260         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
8261         replaces `obstack', removed from the parameter list.
8262         (append_gpp_mangled_name): Turned static. `mangle_obstack'
8263         replaces parameter `obstack', removed from the parameter list. Call
8264         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
8265         (append_gpp_mangled_classtype): Removed.
8266         (compression_table, compression_next): New static variables.
8267         * parse.y (temporary_obstack): Extern declaration removed.
8268
8269 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8270
8271         * parse.y (patch_binop): Compute missing type in error situations.
8272
8273 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8274
8275         * class.c (make_class_data): Push initial value for "arrayclass".
8276         * decl.c (init_decl_processing): Add new class field "arrayclass".
8277
8278 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8279
8280         From patha@softlab.ericsson.se:
8281         * parse.y (switch_label): Use build, not build1, to construct
8282         DEFAULT_EXPR.
8283
8284 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8285
8286         * lang.c (lang_decode_option): Change -MA to -MP.
8287         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
8288         Update to new prototype; do quote targets.
8289         (jcf_dependency_write): Update.
8290
8291 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
8292
8293         Shorten primitive array allocation path:
8294         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
8295         to create new primitive arrays.
8296         * expr.c (build_newarray): If generating native code, call
8297         soft_newarray_node with a reference to the primitive TYPE identifier
8298         instead of type_value.
8299
8300 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
8301
8302         Fix for PRs gcj/312 and gcj/253:
8303         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
8304         dest if they arn't already.
8305         * class.c (layout_class): Call maybe_layout_super_class on
8306         superinterfaces also, but only if compiling from bytecode.
8307
8308         Fix for PR gcj/373:
8309         * parse.y (create_class): Set ACC_STATIC if class is declared in an
8310         interface.
8311
8312 2000-12-15  Tom Tromey  <tromey@redhat.com>
8313
8314         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
8315         set.
8316
8317 2000-12-14  Andrew Haley  <aph@redhat.com>
8318
8319         * boehm.c (mark_reference_fields): Change test to correctly detect
8320         bitmap overflow.
8321
8322 2000-12-15  Andreas Jaeger  <aj@suse.de>
8323
8324         * config-lang.in (lang_dirs): Added.
8325
8326 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8327
8328         * parse.y (end_artificial_method_body): Fixed undefined behavior.
8329         Credits go to rth for finding it.
8330
8331 2000-12-13  Mike Stump  <mrs@wrs.com>
8332
8333         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
8334
8335 2000-11-07  Tom Tromey  <tromey@cygnus.com>
8336
8337         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
8338         * lex.c (java_ignorable_control_p): Removed.
8339         (java_letter_or_digit_p): Removed.
8340         (java_start_char_p): New function.
8341         (java_read_char): Return `int', not `unicode_t'.  Changed
8342         callers.
8343         (java_read_unicode): Likewise.
8344         (java_read_unicode_collapsing_terminators): Likewise.
8345         (java_get_unicode): Likewise.
8346         (java_new_lexer): Initialize hit_eof.
8347         (java_parse_end_comment): Take `int' argument.
8348         (java_parse_doc_section): Likewise.
8349         (java_parse_escape_sequence): Don't allow backlash-newline.
8350         Return `int'.
8351         * lex.h (JAVA_DIGIT_P): Removed.
8352         (_JAVA_LETTER_OR_DIGIT_P): Removed.
8353         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
8354         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
8355         (JAVA_PART_CHAR_P): New macro.
8356         (UEOF): Now -1.
8357         (JAVA_CHAR_ERROR): Now -2.
8358         (java_lexer): New field `hit_eof'.
8359         * chartables.h: New file.
8360         * gen-table.pl: new file.
8361
8362 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8363             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8364
8365         * parse.y (java_complete_lhs): Only allow compound assignment of
8366         reference type if type is String.
8367
8368 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8369
8370         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
8371         jcf-path.c: Likewise.
8372
8373 2000-12-09  Anthony Green  <green@redhat.com>
8374
8375         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
8376         filestart and filename_length as int values.
8377
8378 2000-12-07  Mo DeJong  <mdejong@redhat.com>
8379
8380         * jcf-io.c (find_class): Correct the logic that tests to see if a
8381         .java file is newer than its .class file. The compiler was
8382         incorrectly printing a warning when file mod times were equal.
8383
8384 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
8385
8386         * jvgenmain.c: Use ISPRINT not isascii.
8387
8388 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8389
8390         * parse.y (end_artificial_method_body): Fixed typo.
8391
8392 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8393
8394         * parse.y (patch_method_invocation): Pick the correct enclosing
8395         context when creating inner class instances.
8396         Fixes gcj/332.
8397
8398 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
8399
8400         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8401         Update copyright year to 2000.
8402
8403 2000-11-23  Anthony Green  <green@redhat.com>
8404
8405         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8406         Move current_file_list out of yyparse and make it static.
8407
8408         * expr.c: Declare quick_stack and tree_list_free_list as static
8409         (init_expr_processing): Register quick_stack and
8410         tree_list_free_list roots.
8411
8412 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8413
8414         * parse.y (build_outer_field_access): New local `decl_ctx', use
8415         it. Check for field's context and current class immediate outer
8416         context inheritance.
8417         (outer_field_access_p): Consider fields inherited from the last
8418         enclosing context.
8419         (build_access_to_thisn): Stop at the last enclosing context if
8420         necessary.
8421         Fixes gcj/367.
8422
8423 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
8424
8425         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8426
8427 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
8428
8429         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8430         scratch buffer.
8431
8432 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8433
8434         * jv-scan.c (help): Document --complexity.
8435         (options): Added --complexity.
8436         (flag_complexity): New global.
8437         (main): Call `report'.
8438         * parse-scan.y (complexity): New global.
8439         (if_then_statement, if_then_else_statement,
8440         if_then_else_statement_nsi, switch_block_statement_group,
8441         while_expression, do_statement, for_begin, continue_statement,
8442         throw_statement, catch_clause, finally, method_invocation,
8443         conditional_and_expression, conditional_or_expression,
8444         conditional_expression): Update complexity.
8445         (reset_report): Reset complexity.
8446         (report): New function.
8447
8448 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8449
8450         * lex.c (yylex): Added STRICT_TK case.
8451         * parse.y (STRICT_TK): Added.
8452         * parse-scan.y (STRICT_TK): Added.
8453         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8454         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
8455         file.
8456         * keyword.h: Rebuilt.
8457         * keyword.gperf (strictfp): Added.
8458
8459 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8460
8461         * lex.c (yylex): Recognize floating point constants with leading
8462         0.
8463
8464 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8465
8466         * java-tree.h (cyclic_inheritance_report): Constify.
8467         * parse.y (cyclic_inheritance_report): Likewise.
8468
8469 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
8470
8471         * parse.y (goal): Remove call to ggc_add_string_root.
8472
8473 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
8474
8475         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8476         Create string in scratch buffer, then pass to build_string.
8477
8478 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8479
8480         * parse.y (issue_warning_error_from_context): Add
8481         ATTRIBUTE_PRINTF.
8482
8483 2000-11-11  Anthony Green  <green@redhat.com>
8484
8485         * jcf-parse.c (process_zip_dir): Add finput parameter.
8486         (jcf_figure_file_type): Call process_zip_dir with appropriate
8487         argument.
8488
8489 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8490
8491         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8492         * jcf-parse.c (jcf_figure_file_type): Likewise.
8493
8494 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8495
8496         * parse.y (create_new_parser_context): Use memset () instead of
8497         bzero ().
8498
8499 2000-11-08  Tom Tromey  <tromey@cygnus.com>
8500
8501         * gjavah.c (process_file): Only include gcj/cni.h when generating
8502         CNI stubs.
8503
8504 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8505
8506         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8507         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8508         instead of bzero ().
8509
8510 2000-11-05  Tom Tromey  <tromey@cygnus.com>
8511
8512         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8513         * lex.c (IS_ZERO): New define.
8514         (java_perform_atof): Error on floating point underflow.
8515
8516 2000-11-04  Tom Tromey  <tromey@cygnus.com>
8517
8518         * lex.c (java_parse_escape_sequence): Only read two octal
8519         characters if the first one is greater than 3.  Don't allow
8520         "octal" numbers to include the digits 8 or 9.
8521
8522 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
8523
8524         * Make-lang.in (java.distdir): Remove.
8525
8526 2000-11-03  Tom Tromey  <tromey@cygnus.com>
8527
8528         * Make-lang.in (java.dvi): New target.
8529         Partial fix for PR other/567.
8530
8531         * lang-options.h: Mention -Wout-of-date.
8532         * jcf-dump.c (flag_newer): New global.
8533         * gjavah.c (flag_newer): New global.
8534         * jcf-io.c (find_class): Only warn when flag_newer set.
8535         * lang.c (flag_newer): New global.
8536         (struct string_option): New declaration.
8537         (lang_W_options): New global.
8538         (process_option_with_no): New function.
8539         (lang_decode_option): Use it.
8540
8541         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8542         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8543         `$'.
8544
8545         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8546         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8547         * lex.c (java_read_unicode): Removed `term_context' argument.
8548         Recognize any number of `u' in `\u'.
8549         (java_read_unicode_collapsing_terminators): New function.
8550         (java_get_unicode): Use it.
8551         (java_lineterminator): Removed.
8552         (yylex): Produce error if character literal is newline or single
8553         quote.  Return if eof found in middle of `//' comment.  EOF in
8554         `//' comment is only an error if pedantic.
8555         (java_ignorable_control_p): New function.
8556         (java_parse_end_comment): Return if eof found in middle of
8557         comment.
8558         Include flags.h.
8559         * jv-scan.c (pedantic): New global.
8560
8561 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8562
8563         * parse.y (outer_field_access_p): Inherited fields aren't
8564         consider outer fields.
8565         (maybe_build_thisn_access_method): Use
8566         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8567         (resolve_expression_name): Trigger an error if a static field
8568         is being accessed as an outer field.
8569
8570 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8571
8572         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8573         Fixes gcj/365.
8574
8575 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
8576
8577         * Make-lang.in: Move all build rules here from Makefile.in,
8578         adapt to new context.  Wrap all rules that change the current
8579         directory in parentheses.  Expunge all references to $(P).
8580         When one command depends on another and they're run all at
8581         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
8582         all object-file generation rules.  Delete obsolete variables.
8583
8584         * Makefile.in: Delete.
8585         * config-lang.in: Delete outputs= line.
8586
8587 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8588
8589         * parse.y (patch_method_invocation): NULLify this_arg when already
8590         inserted.
8591         (maybe_use_access_method): Handle call to methods unrelated to the
8592         current class. Fixed comment.
8593         Fixes gcj/361.
8594
8595 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8596
8597        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8598        scope.
8599
8600 2000-10-24  Tom Tromey  <tromey@cygnus.com>
8601
8602         * lex.c (java_new_lexer): Initialize new fields.  Work around
8603         broken iconv() implementations.
8604         (java_read_char): Swap bytes if required.  Use fallback decoder if
8605         required.
8606         (byteswap_init, need_byteswap): New globals.
8607         (java_destroy_lexer): Only close iconv handle if it is in use.
8608         * lex.h (java_lexer): New fields read_anything, byte_swap,
8609         use_fallback.
8610         Made out_buffer unsigned.
8611
8612 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8613
8614         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8615         where an enclosing context can be set on the jdep.
8616         (do_resolve_class): Fixed identation.
8617
8618 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8619
8620         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8621
8622         * jcf-reader.c (peek_attribute, skip_attribute): Only define
8623         when requested.
8624
8625         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8626
8627         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8628
8629 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8630
8631         * jcf-write.c (OP1): Update `last_bc'.
8632         (struct jcf_block): Fixed indentation and typo in comments.  New
8633         field `last_bc'.
8634         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8635         follows `monitorenter'.
8636         * parse.y (patch_synchronized_statement): New local `tmp'. Call
8637         `patch_string'.
8638         Fixes gcj/232.
8639
8640 2000-10-16  Tom Tromey  <tromey@cygnus.com>
8641
8642         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8643         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8644         * lang-options.h: Added -MA, -MT, -MF..
8645         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8646         (DEPEND_TARGET_SET): New macro.
8647         (DEPEND_FILE_ALREADY_SET): Likewise.
8648         (init_parse): Handle new flags.
8649         * jcf.h (jcf_dependency_print_dummies): Declare.
8650         * Make-lang.in (s-java): Added mkdeps.o.
8651         * Makefile.in (BACKEND): Added mkdeps.o.
8652         (../gcjh$(exeext)): Added mkdeps.o.
8653         (../jcf-dump$(exeext)): Added mkdeps.o.
8654         * jcf-depend.c: Include mkdeps.h.
8655         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8656         add_entry): Removed.
8657         (jcf_dependency_reset): Rewrote.
8658         (dependencies): New global.
8659         (jcf_dependency_set_target): Rewrote.
8660         (jcf_dependency_add_target): Likewise.
8661         (jcf_dependency_add_file): Likewise.
8662         (munge): Removed.
8663         (print_ents): Removed.
8664         (jcf_dependency_write): Rewrote.
8665         (print_dummies): New global.
8666         (jcf_dependency_print_dummies): New function
8667         (jcf_dependency_write): Call deps_dummy_targets if required.
8668
8669 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8670
8671         * gjavah.c (add_class_decl): Removed unused variables `tname',
8672         `tlen' and `name_index'.
8673         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8674         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8675         in `wfl_operator' with value.
8676         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8677         (jcf_figure_file_type): Fixed identation.
8678         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8679         * parse.y (analyze_clinit_body): New function.
8680         (static_initializer:): Reset `current_static_block'.
8681         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8682         `wfl_operator' with new value.
8683         (lookup_cl): Use EXPR_WFL_FILENAME.
8684         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8685         analyze_clinit_body.
8686         (build_outer_field_access): Access to this$<n> built from
8687         current_class, not its outer context.
8688         (build_access_to_thisn): Fixed leading comment. Tidied things up.
8689         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8690         (patch_method_invocation): Use `is_static_flag' when already
8691         initialized.
8692         (patch_newarray): Removed assignment in ternary operator.
8693
8694 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8695
8696         * except.c (free_eh_ranges): Don't free `whole_range'.
8697
8698 2000-10-15  Anthony Green  <green@redhat.com>
8699
8700         * decl.c (init_decl_processing): Call init_class_processing before
8701         anything else.
8702
8703 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8704
8705         * check-init.c (check_init): Fixed leading comment. Use
8706         LOCAL_FINAL_P.
8707         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8708         (give_name_to_locals): Likewise.
8709         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8710         fields in lang_decl_var.
8711         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8712         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8713         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8714         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8715         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8716         (LOCAL_FINAL): Rewritten.
8717         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8718         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8719         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8720         `init_final' fields.
8721         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8722         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8723         (TYPE_HAS_FINAL_VARIABLE): New macro.
8724         (struct lang_type): Added `afv' field.
8725         * parse.y (check_static_final_variable_assignment_flag): New function.
8726         (reset_static_final_variable_assignment_flag): Likewise.
8727         (check_final_variable_local_assignment_flag): Likewise.
8728         (reset_final_variable_local_assignment_flag): Likewise.
8729         (check_final_variable_indirect_assignment): Likewise.
8730         (check_final_variable_global_assignment_flag): Likewise.
8731         (add_inner_class_fields): Use LOCAL_FINAL_P.
8732         (register_fields): Handle local finals and final variables.
8733         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8734         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8735         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8736         on local finals.
8737         (java_complete_expand_methods): Loop to set
8738         TYPE_HAS_FINAL_VARIABLE. Call
8739         `reset_final_variable_local_assignment_flag' and
8740         `check_final_variable_local_assignment_flag' accordingly before
8741         and after constructor expansion. Call
8742         `reset_static_final_variable_assignment_flag'
8743         before expanding <clinit> and after call
8744         `check_static_final_variable_assignment_flag' if the
8745         current_class isn't an interface. After all methods have been
8746         expanded, call `check_final_variable_global_assignment_flag' and
8747         `check_static_final_variable_assignment_flag' if the current class
8748         is an interface.
8749         (maybe_yank_clinit): Fixed typo in comment.
8750         (build_outer_field_access_methods): Removed old sanity check. Use
8751         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8752         Don't create access methods for finals.
8753         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8754         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8755         existing DECL_INIT has been processed.
8756         (java_complete_lhs): Likewise.
8757         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8758         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8759         logic.
8760         (patch_assignment): Use LOCAL_FINAL_P.
8761         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8762         DECL_INITIAL is nullified.
8763         Fixes gcj/163.
8764
8765 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8766
8767         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8768
8769         * Makefile.in (parse.c, parse-scan.c): Likewise.
8770
8771 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
8772
8773         * class.c (temporary_obstack): Remove.
8774         (make_class): Don't mess with obstascks.
8775         (push_class): Likewise.
8776         (set_super_info): Likewise.
8777         (add_method_1): Likewise.
8778         (add_method): Likewise.
8779         (add_field): Likewise.
8780         (build_utf8_ref): Likewise.
8781         (build_class_ref): Likewise.
8782         (build_static_field_ref): Likewise.
8783         (finish_class): Likewise.
8784         (push_super_field): Likewise.
8785         (layout_class): Likewise.
8786         (layout_class_methods): Likewise.
8787         (init_class_processing): Likewise.
8788         * constants.c (get_tag_node): Likewise.
8789         (build_constant_data_ref): Likewise.
8790         * decl.c (ggc_p): Remove.
8791         (copy_lang_decl): Use ggc_alloc.
8792         (complete_start_java_method): Don't mess with obstacks.
8793         (start_java_method): Likewise.
8794         (end_java_method): Likewise.
8795         * except.c (link_handler): Use xmalloc.
8796         (free_eh_ranges): New function.
8797         (method_init_exceptions): Use it.
8798         (add_handler): Use xmalloc.
8799         (expand_start_java_handler): Don't mess with obstacks.
8800         (prepare_eh_table_type): Likewise.
8801         (expand_end_java_handler): Likewise.
8802         * expr.c (push_value): Likewise.
8803         (create_label_decl): Likewise.
8804         (build_jni_stub): Likewise.
8805         (java_lang_expand_expr): Likewise.
8806         (note_instructions): Use xrealloc.
8807         (java_push_constant_from_pool): Don't mess with obstacks.
8808         (process_jvm_instruction): Likewise.
8809         * java-tree.h (cyclic_inheritance_report): Remove duplicate
8810         declaration.
8811         * jcf-parse.c (get_constant): Don't mess with obstacks.
8812         (read_class): Likewise.
8813         (jcf_parse): Likewise.
8814         * lex.c (expression_obstack): Remove.
8815         (java_lex): Don't use obstack_free.
8816         * parse.h (exit_java_complete_class): Don't mess with obstacks.
8817         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8818         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8819         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8820         * parse.y (gaol): Add more GC roots.
8821         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8822         (lookup_field_wrapper): Likewise.
8823         (obtain_incomplete_type): Don't mess with obstacks.
8824         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8825         macros.
8826         (craft_constructor): Don't mess with obstacks.
8827         (safe_layout_class): Likewise.
8828         (java_complete_class): Likewise.
8829         (source_end_java_method): Likewise.
8830         (build_outer_field_access_methods): Likewise.
8831         (build_outer_method_access_method): Likewise.
8832         (maybe_build_thisn_access_method): Likewise.
8833         (build_dot_class_method_invocation): Likewise.
8834         (java_complete_tree): Likewise.
8835         (java_complete_lhs): Likewise.
8836         (do_merge_string_cste): Likewise.
8837         (patch_string_cst): Likewise.
8838         (array_constructor_check_entry): Likewise.
8839         * typeck.c (build_java_array_type): Likewise.
8840         (parse_signature_string): Likewise.
8841         (build_java_signature): Likewise.
8842
8843 2000-10-12  Tom Tromey  <tromey@cygnus.com>
8844
8845         Fix for PR gcj/356:
8846         * gjavah.c (add_class_decl): Don't special-case inner classes.
8847         (add_namelet): Likewise.
8848
8849 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
8850
8851         * java-tree.h: Constify current_encoding.
8852         * lang.c: Constify current_encoding.
8853
8854 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
8855
8856         * jvgenmain.c (class_mangling_suffix): Omit `.'.
8857         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8858
8859 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8860
8861         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8862         patch. Fixes gcj/340.
8863
8864 2000-10-10  Tom Tromey  <tromey@cygnus.com>
8865
8866         * lex.c (java_new_lexer): Initialize out_first and out_last
8867         fields.
8868         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8869
8870 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8871
8872         * parse.y (pop_current_osb): New function.
8873         (array_type:): Use `dims:', changed actions
8874         accordingly. Suggested by Anthony Green.
8875         (array_creation_expression:): Used pop_current_osb.
8876         (cast_expression:): Likewise.
8877         (search_applicable_method_list): Fixed indentation.
8878
8879 2000-10-08  Anthony Green  <green@redhat.com>
8880
8881         * parse.y (array_type_literal): Remove production.
8882         (type_literals): Refer to array_type, not array_type_literal.
8883
8884 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8885
8886         Patch contributed by Corey Minyard.
8887         * decl.c (check_local_named_variable): New function.
8888         (tree check_local_unnamed_variable): Likewise.
8889         (find_local_variable): Splitted. Call check_local_{un}named_variable.
8890
8891 2000-10-07  Anthony Green  <green@redhat.com>
8892
8893         * class.c (layout_class): Handle case where superclass can't be
8894         layed out yet.
8895
8896 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8897
8898         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8899         gperf.
8900
8901 2000-10-05  Tom Tromey  <tromey@cygnus.com>
8902
8903         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8904         * jvgenmain.c (class_mangling_prefix): Removed.
8905         (class_mangling_suffix): New global.
8906         (main): Use it.
8907         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8908         `$'.
8909         (print_method_info): Handle overrides for static and final
8910         methods.
8911         (process_file): Generate declaration for class object field.
8912         * class.c (cxx_keywords): New array.
8913         (utf8_cmp): New function.
8914         (cxx_keyword_p): New function.
8915         (layout_class_method): Mangle C++ keywords by appending `$'.
8916         (mangle_field): New function.
8917         (mangle_class_field): Use mangle_field.  Mangle class name as
8918         `class$'.
8919         (mangle_static_field): Use mangle_field.
8920
8921 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8922
8923         * decl.c (find_local_variable): Removed uncessary type check and
8924         fixed range check typo. From Corey Minyard.
8925
8926 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8927
8928         * decl.c (give_name_to_locals): New local `code_offset'. Call
8929         `maybe_adjust_start_pc'.
8930         * expr.c (note_instructions): New function.
8931         (expand_byte_code): Don't collect insn starts here.
8932         (peek_opcode_at_pc): New function.
8933         (maybe_adjust_start_pc): Likewise.
8934         * java-tree.h (maybe_adjust_start_pc): Declare.
8935         (note_instructions): Likewise.
8936         * jcf-parse.c (parse_class_file): Call `note_instructions'.
8937
8938 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8939
8940         * parse.y (field_access:): Fixed indentation.
8941         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8942
8943 2000-09-07  Tom Tromey  <tromey@cygnus.com>
8944
8945         Fix for PR gcj/307:
8946         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8947         JPRIMITIVE_TYPE_P, for arithmetic operators.
8948         (patch_method_invocation): Indentation fix.
8949         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
8950         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8951         (do_unary_numeric_promotion): Cleaned up code.
8952         (valid_cast_to_p): Handle boolean correctly.
8953
8954 2000-09-27  Tom Tromey  <tromey@cygnus.com>
8955
8956         * lex.c (java_read_unicode): Reset bs_count when finished with
8957         `\u' sequence.
8958
8959 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
8960
8961         Convert to GC.
8962         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8963         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8964         (typeck.o): Depend on ggc.h.
8965         * class.c (add_method_1): Use GC functions for allocation.
8966         (init_class_processing): Register roots.
8967         * decl.c (ggc_p): Set to 1.
8968         (pending_local_decls): Make it static.
8969         (push_jvm_slot): Use GC functions for allocation.
8970         (init_decl_processing): Register roots.
8971         (give_name_to_locals): Use GC functions for allocation.
8972         (lang_mark_tree): New function.
8973         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
8974         functions for allocation.
8975         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
8976         * lex.c (java_lex): Use build_string, rather than replicating it
8977         inline.
8978         * parse.y (goal): Add more roots.
8979         (mark_parser_ctxt): New function.
8980         * typeck.c: Include ggc.h.
8981
8982 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8983
8984         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
8985         contains something else than MODIFY_EXPR.
8986
8987 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
8988
8989         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
8990         * Makefile.in (parse.o): Depend on ggc.h.
8991         (class.o): Likewise.
8992         (constants.o): Likewise.
8993         (decl.o): Likewise.
8994         (expr.o): Likewise.
8995         (jcf-parse.o): Likewise.
8996         (jcf-write.o): Likewise.
8997         (mangle.o): Likewise.
8998         * class.c: Include ggc.h.
8999         (build_static_field_ref): Register GC roots.
9000         (layout_class): Likewise.
9001         (init_class_processing): Likewise.
9002         * constants.c: Include ggc.h.
9003         (current_constant_pool_data_ref): Remove.
9004         (tag_nodes): Move it to ...
9005         (get_tag_node): ... here.  Register GC roots.
9006         * decl.c: Include ggc.h.  Remove many global tree definitions.
9007         (throw_node): Define.
9008         (java_global_trees): Likewise.
9009         (predef_filenames): Make the size a constant.
9010         (init_decl_processing): Adjust accordingly.
9011         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
9012         * expr.c: Include ggc.h.
9013         (init_expr_processing): Register GC roots.
9014         (build_invokeinterface): Likewise.
9015         * java-tree.h: Replace extern tree declarations with macros.
9016         (java_global_trees): New variable.
9017         (java_tree_index): New enumeration.
9018         (init_jcf_parse): Declare.
9019         * jcf-parse.c: Include ggc.h.
9020         (current_class): Remove declaration.
9021         (main_class): Likewise.
9022         (all_class_list): Likewise.
9023         (predefined_filename_p): Adjust for constant size of
9024         predef_filenames.
9025         (init_jcf_parse): New function.
9026         * jcf-write.c: Include ggc.h.
9027         (generate_classfile): Register GC roots.
9028         (append_synthetic_attribute): Likewise.
9029         (append_innerclass_attribute_entry): Likewise.
9030         * lang.c: Include ggc.h.
9031         (lang_print_error): Register GC roots.
9032         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
9033         with macros.
9034         * parse.y: Include ggc.h.
9035         (wfl_operator): Remove.
9036         (goal): Register GC roots.
9037         (java_pop_parser_context): Adjust for new field names.
9038         (java_parser_context_save_global): Likewse.
9039         (java_parser_context_restore_global): Likewise.
9040         (java_parser_context_suspend): Likewise.
9041         (java_parser_context_resume): Likewise.
9042         (verify_constructor_circularity): Register GC roots.
9043         (lookup_cl): Likewise.
9044         (java_reorder_fields): Likewise.
9045         (build_current_this): Likewise.
9046         (class_in_current_package): Likewise.
9047         (argument_types_convertible): Likewise.
9048         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
9049
9050 2000-09-14  Tom Tromey  <tromey@cygnus.com>
9051
9052         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
9053
9054 2000-09-13  Tom Tromey  <tromey@cygnus.com>
9055
9056         * jcf-parse.c: Include <locale.h>.
9057         * jv-scan.c: Include <locale.h>.
9058
9059 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9060
9061         * expr.c (pop_type_0): Return `Object' if trying to merge two
9062         interface types.
9063         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
9064         interface types; `Object' is always a valid supertype.
9065
9066 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9067
9068         Fix for PR gcj/33:
9069         * jv-scan.c (help): Document --encoding.
9070         (options): Added `encoding' entry.
9071         (OPT_ENCODING): New define.
9072         (main): Handle --encoding.
9073         Include <langinfo.h> if nl_langinfo exists.
9074         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
9075         --encoding.
9076         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
9077         (parse_source_file): Correctly call java_init_lex.  Added `finput'
9078         argument.  Use nl_langinfo to determine default encoding.
9079         * java-tree.h (current_encoding): Declare.
9080         * parse.y (java_parser_context_restore_global): Don't restore
9081         `finput'.
9082         (java_parser_context_save_global): Don't set `finput' field.
9083         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
9084         if required.
9085         * lang.c (current_encoding): New global.
9086         (lang_decode_option): Recognize `-fencoding='.
9087         (finish_parse): Don't close finput.
9088         * parse.h (struct parser_ctxt): Removed `finput' and
9089         `unget_utf8_value' fields.  Added `lexer' field.
9090         (java_init_lex): Fixed declaration.
9091         * lex.c (java_new_lexer): New function.
9092         (java_destroy_lexer): Likewise.
9093         (java_read_char): Added `lex' argument.  Handle iconv case.
9094         (java_read_unicode): Added `lex' argument.  Count backslashes in
9095         lexer structure.
9096         (java_init_lex): Added `finput' and `encoding' arguments.  Set
9097         `lexer' field in ctxp.
9098         (BAD_UTF8_VALUE): Removed.
9099         (java_lex): Handle seeing UEOF in the middle of a string literal.
9100         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
9101         (java_lexer): New structure.
9102         (UNGETC): Removed.
9103         (GETC): Removed.
9104         (DEFAULT_ENCODING): New define.
9105         (java_destroy_lexer): Declare.
9106
9107 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9108
9109         Fix for PR gcj/343:
9110         * lex.c (java_init_lex): Initialize java_io_serializable.
9111         * parse.y (java_io_serializable): New global.
9112         (valid_ref_assignconv_cast_p): An array can be cast to
9113         serializable.
9114
9115 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9116
9117         * decl.c, expr.c: Include defaults.h if not already included.
9118         Don't define the *_TYPE_SIZE macros.
9119
9120 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
9121
9122         * typeck.c (build_java_array_type): Correct first parameter
9123         in ADJUST_FIELD_ALIGN invocation.
9124
9125 2000-09-06  Tom Tromey  <tromey@cygnus.com>
9126
9127         * lang-specs.h: Also recognize `-femit-class-files'.
9128
9129 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9130
9131         * verify.c (merge_types): Load the types to merge if necessary.
9132
9133 2000-09-02  Anthony Green  <green@redhat.com>
9134
9135         * jcf-io.c: Include zlib.h.
9136         (open_in_zip): Read compressed class file archives.
9137         * zipfile.h (ZipDirectory): Add uncompressed_size and
9138         compression_method fields.
9139         * zextract.c (read_zip_archive): Collect file compression info.
9140
9141 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
9142
9143         * parse.y (do_resolve_class): Also explore superclasses of
9144         intermediate enclosing contexts when searching for inner classes.
9145
9146 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9147
9148         * parse.y (variable_declarator_id:): Better error message.
9149         (expression_statement:): Use YYNOT_TWICE.
9150         (cast_expression:): Likewise.
9151         (assignment:): Likewise.
9152
9153 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9154
9155         * parse.y (do_merge_string_cste): New locals. Create new
9156         STRING_CSTs each time, use memcpy. Fixes gcj/311.
9157
9158 2000-08-07  Hans Boehm  <boehm@acm.org>
9159
9160         * boehm.c (mark_reference_fields): Set marking bits for all words in
9161         a multiple-word record.
9162         (get_boehm_type_descriptor): Use the procedure marking descriptor for
9163         java.lang.Class.
9164
9165 2000-08-31  Mike Stump  <mrs@wrs.com>
9166
9167         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
9168         jcf-dump$(exeext)): Make parallel safe.
9169
9170 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9171
9172         * jcf-parse.c (set_source_filename): Constify a char *.
9173         * jcf-write.c (append_innerclasses_attribute,
9174         make_class_file_name): Constify a char *.  Don't recycle a
9175         variable for an unrelated purpose.
9176         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
9177         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
9178
9179 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9180
9181         * expr.c (can_widen_reference_to): Fixed indentation.
9182         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
9183         * parse.y: `finit$' replaces `$finit$' in comments.
9184         (try_builtin_assignconv): Fixed leading comment.
9185
9186 2000-08-25  Greg McGary  <greg@mcgary.org>
9187
9188         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
9189
9190 2000-08-24  Greg McGary  <greg@mcgary.org>
9191
9192         * lang.c (lang_decode_option): Use ARRAY_SIZE.
9193         * parse.y (BINOP_LOOKUP): Likewise.
9194
9195 2000-08-22  Andrew Haley  <aph@cygnus.com>
9196
9197         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
9198         sign extending. Fixes gcj/321.
9199         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
9200         combining to make a jlong. Fixes gcj/321.
9201
9202 2000-08-21  Nix  <nix@esperi.demon.co.uk>
9203
9204         * lang-specs.h: Do not process -o or run the assembler if
9205         -fsyntax-only.
9206
9207 2000-08-16  Andrew Haley  <aph@cygnus.com>
9208
9209         * typeck.c (build_java_array_type): Rewrite code to do array
9210         alignment.  Take into account back-end macros when aligning array
9211         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
9212         user to set alignment. Fixes gcj/252 and 160.
9213
9214 2000-08-09  Tom Tromey  <tromey@cygnus.com>
9215
9216         * parse.y (check_abstract_method_definitions): Now return `int'.
9217         Check implemented interfaces.  Fixes PR gcj/305.
9218
9219         * parse.y (patch_switch_statement): Disallow `long' in switch
9220         expressions.  Fixes PR gcj/310.
9221
9222 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9223
9224         * decl.c (finit_leg_identifier_node): New global.
9225         (init_decl_processing): Use `finit$' to initialize
9226         finit_identifier_node. Use `$finit$' to initialize
9227         finit_leg_identifier_node.
9228         * expr.c (expand_java_field_op): Use ID_FINIT_P.
9229         * java-tree.h (finit_identifier_node): Changed attached comment.
9230         (finit_leg_identifier_node): New declaration.
9231         (ID_FINIT_P): Take finit_identifier_node and
9232         finit_leg_identifier_node into account. This is a backward
9233         compatibility hack.
9234
9235 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9236
9237         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
9238         Jan 6 2000 patch.
9239         (generate_bytecode_insns): Check `nargs' before emitting it.
9240         * verify.c (merge_type_state): Fixed typo.
9241         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
9242         generate_bytecode_{conditional,insns}.
9243
9244 2000-08-13  Anthony Green  <green@redhat.com>
9245
9246         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
9247         for -pg builds).
9248
9249 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9250
9251         * class.c (maybe_layout_super_class): Fixed indentation.
9252         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
9253         (java_check_methods): New function declaration.
9254         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
9255         instead of `str_ptr'.
9256         * jcf-write.c (generate_bytecode_insns): Emit number the of args
9257         of a `invokeinterface' at the right time.
9258         * parse.h (WFL_STRIP_BRACKET): New macro.
9259         (SET_TYPE_FOR_RESOLUTION): Use it.
9260         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
9261         (check_class_interface_creation): Don't check for cross package
9262         innerclass name clashes.
9263         (method_header): Behave properly if MDECL is `error_mark_node'.
9264         (method_declarator): Return `error_mark_node' if bogus current
9265         class.
9266         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
9267         (resolve_and_layout): New local `decl_type', set and used. Call
9268         java_check_methods.
9269         (java_check_methods): New method.
9270         (java_layout_classes): Use it.
9271         (resolve_qualified_expression_name): No EH check necessary in
9272         access$<n>.
9273         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
9274         `case' statement.
9275         (patch_assignment): Set DECL_INITIAL on integral final local.
9276
9277 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9278
9279         * java-tree.h (flag_extraneous_semicolon): New extern.
9280         * lang-options.h: (-Wextraneous-semicolon): New option.
9281         * lang.c (flag_redundant): Fixed typo in leading comment.
9282         (flag_extraneous_semicolon): New global.
9283         (lang_decode_option): Set `flag_extraneous_semicolon' when
9284         -Wall. Decode `-Wextraneous-semicolon'.
9285         * parse.y (type_declaration:): Removed `SC_TK' hack, added
9286         `empty_statement' rule.
9287         (class_body_declaration): Likewise.
9288         (method_body:): Accept `;' as a method body.
9289         (static_initializer:): Removed `SC_TK' hack.
9290         (constructor_block_end:): Likewise.
9291         (empty_statement:): Report deprecated empty declaration. Fixes
9292         gcj/295
9293
9294 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9295
9296         * parse.y (build_dot_class_method_invocation): Changed parameter
9297         name to `type'. Build signature from `type' and convert it to a
9298         STRING_CST if it's an array.
9299         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
9300         to use `ref_type' directly.
9301
9302 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
9303
9304         * lang-options.h: Added a comma after the last element to avoid
9305         syntax errors when other languages define additional options.
9306
9307 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
9308
9309         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
9310         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
9311         (jc1): Link with $(BACKEND).
9312         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
9313
9314 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
9315
9316         * jvspec.c: Adjust type of second argument to
9317         lang_specific_driver, and update code as necessary.
9318
9319         * class.c (build_dtable_decl): Initialize dummy.
9320
9321 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9322
9323         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
9324         method bodies not to rule out discarding `<clinit>'; don't use
9325         <clinit> to initialize static fields with constant initializers.
9326
9327 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9328
9329         * gjavah.c (print_method_info): Added `synth' parameter. Skip
9330         synthetic methods.
9331         (method_synthetic): New global.
9332         (HANDLE_METHOD): Recognize synthetic method and tell
9333         `print_method_info' about it.
9334         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
9335         processing a synthetic method.
9336         * jcf-reader.c (skip_attribute): New function.
9337         ( skip_attribute): Likewise.
9338
9339 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9340
9341         * parse.y (build_outer_field_access): Fixed comments.
9342         (fix_constructors): Emit the initialization of this$<n> before
9343         calling $finit$.
9344         (resolve_qualified_expression_name): Build an access to `decl' if
9345         necessary.
9346
9347 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9348
9349         * parse-scan.y (curent_class): Non longer const.
9350         (inner_qualifier, inner_qualifier_length): Deleted.
9351         (current_class_length): New global.
9352         (bracket_count): Fixed typo in leading comment.
9353         (anonymous_count): New global.
9354         (class_instance_creation_expression:): Handle anonymous classes.
9355         (anonymous_class_creation:): New rule.
9356         (push_class_context): Rewritten.
9357         (pop_class_context): Likewise.
9358         (INNER_QUALIFIER): Macro deleted.
9359         (report_class_declaration): call `push_class_context' when
9360         entering the function. `fprintf' format modified not to use
9361         INNER_QUALIFIER.
9362         (report_class_declaration): Assign `package_name' and
9363         `current_class' to NULL separately.
9364
9365 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9366
9367         * expr.c (build_invokeinterface): Call layout_class_methods on
9368         target interface.
9369
9370 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9371             Anthony Green  <green@cygnus.com>
9372             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9373
9374         * class.c (make_class_data): Create vtable for abstract classes.
9375         (get_dispatch_table): Changed to cope with abstract classes.
9376
9377 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9378
9379         * parse.y (patch_method_invocation): Don't reverse the argument
9380         list when dealing with anonymous class constructors. Fixed typo in
9381         comment.
9382
9383 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9384
9385         * parse.y (build_alias_initializer_parameter_list): Reverse
9386         crafted list when building aliases for anonymous class
9387         constructors.
9388
9389 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9390
9391         * parse.y (jdep_resolve_class): Don't bother checking potential
9392         innerclass access if `decl' is NULL.
9393         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
9394         WFL.
9395
9396 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9397
9398         * parse.c: Remove (again.)
9399
9400 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9401
9402         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9403         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9404         outside the `if' statement, alias to innerclass removed, `decl'
9405         used to mark the class complete.
9406
9407 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9408
9409         * parse.y (simple_name:): Fixed typo in error message.
9410
9411 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9412
9413         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9414         or its first operand can be error marks.
9415
9416 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9417
9418         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9419         * parse.y (method_header): Likewise.
9420
9421 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9422
9423         * parse.y (process_imports): Consider that one might be trying to
9424         import an innerclass. Fixes gcj/254
9425
9426 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9427
9428         * parse.y (find_as_inner_class): Handle the case where the
9429         enclosing context of an innerclass has been loaded as bytecode.
9430
9431 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9432
9433         * parse.y (simple_name:): Reject `$' in type names.
9434         (resolve_type_during_patch): Use `type' as a second
9435         argument to resolve_no_layout. Fixes gcj/257.
9436
9437 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
9438
9439         * parse.y (find_most_specific_methods_list): Select the only
9440         non-abstract method even if max has been set.
9441         Fixes gcj/285, gcj/298.
9442
9443 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
9444
9445         * lang-specs.h: Added %(jc1) to java compiler options.
9446
9447 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
9448
9449         * .cvsignore: New file.
9450
9451 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9452
9453         * parse.y (not_accessible_p): Access granted to innerclasses
9454         (indirectly) extending the reference type. Fixes gcj/249.
9455
9456 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9457
9458         * parse.y (patch_method_invocation): Fixed comment.
9459         (maybe_use_access_method): Build this$<n>s to the context of the
9460         target method, or a type that extends it. Fixes gcj/242.
9461
9462 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
9463
9464         * parse.c: Remove.
9465
9466 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9467
9468         * parse.y (fold_constant_for_init): Avoid bullish conversion.
9469
9470 2000-07-13  Tom Tromey  <tromey@cygnus.com>
9471
9472         * lang-specs.h: Added %{I*}.
9473
9474 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
9475
9476         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
9477
9478 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
9479
9480         * parse-scan.c: Remove.
9481
9482 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9483
9484         * class.c (set_super_info): Handled protected inner classes.
9485         (common_enclosing_context_p): Bail early if arguments aren't both
9486         inner classes.
9487         (get_access_flags_from_decl): Handle private and protected inner
9488         classes.
9489         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9490         (CLASS_PROTECTED): Likewise.
9491         (struct lang_type): New bitfield `poic'.
9492         * parse.y (jdep_resolve_class): Call check_inner_class_access on
9493         inner classes only.
9494         (check_inner_class_access): Renamed arguments, added
9495         comments. Handles protected inner classes (fixes gcj/225)
9496         (not_accessible_p): Fixed comments. Avoid handling inner classes.
9497
9498 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9499
9500         * parse.y (resolve_qualified_expression_name): Verify qualified
9501         access to `this'. Fixes gcj/239.
9502
9503 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9504
9505         * jcf-write.c (generate_classfile): Don't install ConstantValue
9506         for null pointers.
9507
9508 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9509
9510         * parse.y (resolve_qualified_expression_name): Handle inner class
9511         access. Fixes gcj/256.
9512
9513 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9514
9515         * jcf-write.c (generate_classfile): Properly install the
9516         ConstantValue attribute and the initial value constant pool index
9517         on string constants.
9518         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9519         class files.
9520
9521 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9522
9523         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9524         construct.
9525         * parse.y (find_as_inner_class): Fixed typo.
9526         (do_resolve_class): Explore enclosing contexts when searching for
9527         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
9528         (check_inner_class_access): Check `decl' which can be null in case
9529         of previous errors.
9530
9531 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9532
9533         * java-tree.h (java_debug_context): Declared `extern'.
9534         (safe_layout_class): Likewise.
9535         * parse.y (resolve_field_access): Field must be `static' in order
9536         to be replaced by its initial value. Added comments.
9537         (find_applicable_accessible_methods_list): Fixed typo.
9538         (find_most_specific_methods_list): Methods found in innerclasses
9539         take over methods founds in the enclosing contexts.
9540         (java_complete_tree): Loosen restrictions on the type of DECLs
9541         that can be replaced by their initialization values.
9542         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9543
9544 2000-07-05  Tom Tromey  <tromey@cygnus.com>
9545
9546         * Make-lang.in (PARSE_DIR): New macro.
9547         (PARSE_RELDIR): Likewise.
9548         (PARSE_C): Likewise.
9549         (PARSE_SCAN_C): Likewise.
9550         ($(PARSE_C)): New target.
9551         ($(PARSE_SCAN_C)): Likewise.
9552         (SET_BISON): New macro.
9553         (BISONFLAGS): Likewise.
9554         (JAVABISONFLAGS): Likewise.
9555
9556 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
9557
9558         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9559         argument on the first pass for CNI as well as JNI.
9560         (print_method_info): Set up method name on the first pass only.
9561
9562 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9563
9564         * parse.y (parser_qualified_classname): Removed parameter
9565         `is_static'.
9566         (create_interface): Removed first passed parameter to
9567         parser_qualified_classname.
9568         (create_class): Likewise. Don't install alias on static
9569         innerclasses. Fixes gcj/275.
9570
9571 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9572
9573         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9574         debugable statement with empty_stmt_node. Fixes gcj/272
9575
9576 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9577
9578         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9579         gcj/271.
9580
9581 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9582
9583         * jcf-write.c (push_long_const): Appropriately cast short negative
9584         constant to jword.
9585
9586 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9587
9588         * parse.y (verify_constructor_super): Use loop variable
9589         `m_arg_type' initialized with `mdecl_arg_type'.
9590
9591 2000-06-29  Tom Tromey  <tromey@cygnus.com>
9592
9593         * parse.y (resolve_field_access): Handle case where `type_found'
9594         is NULL.
9595
9596 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9597
9598         * expr.c (lookup_field): The same field can be found through two
9599         different interface. Don't declare it ambiguous in that case.
9600
9601 2000-06-27  Tom Tromey  <tromey@cygnus.com>
9602
9603         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
9604         follows \r, then unget it at a lower level.
9605
9606 2000-06-26  Tom Tromey  <tromey@cygnus.com>
9607
9608         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9609         java_complete_tree.
9610
9611 2000-06-25  Tom Tromey  <tromey@cygnus.com>
9612
9613         * parse.y (for_statement): Wrap expression in a WFL if it is a
9614         constant.  For PR gcj/268.
9615
9616 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9617
9618         * parse.y (do_resolve_class): Minor optimiztion in the package
9619         list search. Removed unnecessary test and return statement.
9620         (valid_ref_assignconv_cast_p): Order of arguments to
9621         enclosing_context_p fixed.
9622
9623 2000-06-24  Tom Tromey  <tromey@cygnus.com>
9624
9625         * expr.c (lookup_field): Print error and return error_mark_node if
9626         field reference is ambiguous.
9627
9628         * parse.y (check_abstract_method_definitions): Also check if
9629         `other_method' is abstract.
9630
9631 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9632
9633         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9634         classes.
9635         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9636         (struct lang_type): New field `pic'.
9637         (CLASS_PRIVATE): New macro.
9638         * parse.y (check_inner_class_access): New function.
9639         (jdep_resolve_class): Call it.
9640
9641 2000-06-23  Tom Tromey  <tromey@cygnus.com>
9642
9643         * parse.y (patch_incomplete_class_ref): Initialize the returned
9644         class.  For PR gcj/260.
9645
9646 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9647
9648         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9649
9650 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9651
9652         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9653         Java specific checks.
9654         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9655         screened by DECL_P.
9656         * java-tree.def (CASE_EXPR): Marked 'e'.
9657         (DEFAULT_EXPR): Likewise.
9658         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9659         screened by DECL_P.
9660         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9661         Java specific checks.
9662         (generate_bytecode_insns): Test try_block for BLOCK before using
9663         BLOCK_EXPR_BODY.
9664         * parse.y (build_wfl_wrap): Added `location' argument. Set
9665         EXPR_WFL_LINECOL accordingly.
9666         (dim_expr:): Wrap constants with WFLs.
9667         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9668         (resolve_package): Check for `stmt' not being a BLOCK before
9669         building a debuggable statement with it.
9670         (make_qualified_primary): Added extra parameter to build_wfl_wrap
9671         invocation.
9672         (resolve_field_access): Make sure `decl' is a DECL before treating
9673         it as such.
9674         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9675         IDENTIFIER_NODE before treating it as such.
9676         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9677         treating it as such.
9678         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9679         to be applied only on non array types.
9680
9681 2000-06-16  Per Bothner  <per@bothner.com>
9682
9683         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
9684         define in terms of DECL_RESULT, as that fails when --enable-checking.
9685
9686 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9687
9688         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
9689         types the same in comparison.
9690         (CHECK_OP): Add static prototype.
9691
9692 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
9693
9694         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9695         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9696         * parse.c: Rebuilt.
9697
9698 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9699
9700         * decl.c (create_primitive_vtable): Prototype.
9701
9702         * jcf-write.c (generate_bytecode_insns): Initialize variable
9703         `saved_context'.
9704
9705         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9706
9707 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9708
9709         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9710         to track searched classes, and do not search the same class more than
9711         once. Call find_applicable_accessible_methods_list on immediate
9712         superclass, instead of search_applicable_method_list on all ancestors.
9713         Fix for PR gcj/238.
9714
9715 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9716
9717         * parse.y (register_fields): Permit static fields in inner classes
9718         if they are final. Fix for PR gcj/255.
9719
9720 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9721
9722         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9723         * parse.y (find_in_imports): Returned type changed to void,
9724         leading comment fixed.
9725         (register_package): New function.
9726         (qualify_and_find): Likewise.
9727         (package_declaration:): Use `register_package'.
9728         (single_type_import_declaration:): Removed local variable
9729         `node'. Added missing `;' for consistency.
9730         (type_import_on_demand_declaration:): Use `chainon' to link new
9731         entries.
9732         (lookup_field_wrapper): Lookup local variables defined in outer
9733         contexts first.
9734         (java_complete_class): Don't reverse the list of imported on demand.
9735         (do_resolve_class): Reorganized. Removed local variable
9736         `original_name'. Call `qualify_and_find' with the current package
9737         name, invoke `find_in_imports_on_demand' right after. Call
9738         `qualify_and_find' with the packages we've seen so far. Fixed
9739         operations numbering in comments.
9740         (java_expand_class): Don't reverse `package_list'.
9741         (find_most_specific_methods_list): New local variables `abstract'
9742         and `candidates'. Use them to pick the right method.
9743
9744 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
9745
9746         * parse.y (check_modifiers_consistency): Don't subtract out
9747         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9748
9749 2000-06-04  Philipp Thomas  <pthomas@suse.de>
9750
9751         * Makefile.in (INTLLIBS): New.
9752         (LIBS): Add above.
9753         (DEPLIBS): Ditto.
9754
9755 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9756
9757         * class.c (get_dispatch_table): Build the vtable dummy entry list
9758         element with a null purpose. Fixed leading comment.
9759         (build_dtable_decl): Build an accurate dtable type when appropriate
9760         and use it.
9761
9762 2000-06-02  Richard Henderson  <rth@cygnus.com>
9763
9764         * lang.c (lang_get_alias_set): New.
9765
9766 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9767
9768         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9769         before using it as the accessed field.
9770
9771 2000-05-31  Tom Tromey  <tromey@cygnus.com>
9772
9773         * java-tree.h (boolean_array_vtable, byte_array_vtable,
9774         char_array_vtable, short_array_vtable, int_array_vtable,
9775         long_array_vtable, float_array_vtable, double_array_vtable):
9776         Declare.
9777         * expr.c (get_primitive_array_vtable): New function.
9778         (create_primitive_vtable): New function.
9779         (java_lang_expand_expr): Enable code to statically generate
9780         arrays.
9781         * decl.c (init_decl_processing): Create primitive vtables.
9782         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9783         short_array_vtable, int_array_vtable, long_array_vtable,
9784         float_array_vtable, double_array_vtable): Define.
9785
9786 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
9787
9788         * java/parse.y (find_applicable_accessible_methods_list):
9789         Don't add an uninitialized value to the list.
9790
9791 2000-05-25  Tom Tromey  <tromey@cygnus.com>
9792
9793         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9794         when trying to see if field's class should be initialized.  Always
9795         initialize field's declaring class, not qualified class.
9796         For PR gcj/162.
9797
9798         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9799         `wfl_operator', to maybe_build_primttype_type_ref.
9800         Fixes PR gcj/235.
9801
9802 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
9803
9804        * parse.y (patch_method_invocation): Don't try to lookup methods
9805        in primitive types.
9806
9807 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9808
9809         * parse.y (resolve_field_access): Call the appropriate <clinit>
9810         before accessing the length of a static array. Craft a decl for
9811         the field while its time. Fixes PR gcj/129.
9812
9813 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9814
9815         * parse.y (resolve_package): Correctly set `*next' (was off by
9816         one.)
9817         (resolve_qualified_expression_name): Fixed comment.
9818
9819 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9820
9821         * jcf-parse.c (jcf_parse_source): Reset current_class and
9822         current_function_decl to NULL before parsing a new file.
9823
9824 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9825
9826         * parse.y (block_end:): If the collected block doesn't feature a
9827         statement, insert an empty statement.
9828
9829 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9830
9831         * parse.y (maybe_yank_clinit): New function.
9832         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9833         end of the list of methods belonging to a class.
9834         (java_complete_expand_method): Check whether <clinit> is really
9835         necessary and expand it accordingly.
9836
9837 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9838
9839         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9840         processed by the method's switch statement.
9841
9842 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9843
9844         * java-tree.h: Added init state enum.
9845         * decl.c (emit_init_test_initialization): Initialize class
9846         initialization check variable by looking at class' state.
9847
9848 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9849
9850         * java-tree.h (build_instanceof): Declare.
9851         (build_get_class): Declare.
9852         * parse.y (patch_binop): Use build_instanceof.
9853         * expr.c (build_instanceof): New function.  If class is final,
9854         don't make a function call.
9855         (expand_java_INSTANCEOF): Use it.
9856         (build_get_class): New function.
9857
9858 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
9859
9860         * jcf-write.c (generate_classfile): Scan the source_file for
9861         slashes with the right pointer variable.
9862
9863 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
9864
9865         * lang.c (lang_decode_option): Update -Wunused flags by calling
9866         set_Wunused.
9867         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9868
9869 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9870
9871         * check_init.c (check_init): Constify local char *.
9872         * class.c (push_class): Constify local char *.
9873         * java_tree.h: Update prototypes.
9874         * jcf-io.c (open_class): Constify filename parameter and
9875         return value.
9876         (find_class): Remove redundant string copy.  Cast return from
9877         open_class.
9878         * jcf-parse.c (read_class, parse_class_file, yyparse):
9879         Constify local char *.
9880         * jcf-write.c (generate_bytecode_insns, generate_classfile):
9881         Constify local char *.
9882         * jcf.h (JCF): Constify filename and classname.
9883         (JCF_FINISH): Cast args to FREE to char * when appropriate.
9884         * lang.c (init_parse): Constify parameter and return value.
9885         * lex.c (java_get_line_col): Constify filename parameter.
9886         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
9887         * parse.y (java_parser_context_suspend,
9888         issue_warning_error_from_context, safe_layout_class): Constify
9889         local char *.
9890         * parse.c: Regenerate.
9891
9892 2000-05-08  Tom Tromey  <tromey@cygnus.com>
9893
9894         * expr.c (build_jni_stub): Cache the result of
9895         _Jv_LookupJNIMethod.
9896
9897 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9898
9899         * decl.c (predef_filenames_size): Now 7.
9900         (predef_filenames): New seventh entry.
9901
9902 2000-05-04  Tom Tromey  <tromey@cygnus.com>
9903
9904         * boehm.c (mark_reference_fields): Don't mark RawData fields.
9905         Keep track of when we've seen a reference field after a
9906         non-reference field.
9907         (get_boehm_type_descriptor): Handle case where we see
9908         non-reference fields but no trailing reference field.
9909         * decl.c (rawdata_ptr_type_node): Define.
9910         (init_decl_processing): Initialize rawdata_ptr_type_node.
9911         * java-tree.h (rawdata_ptr_type_node): Declare.
9912
9913 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9914
9915         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9916         specifiers in calls to fprintf.
9917
9918 2000-05-03  Andrew Haley  <aph@cygnus.com>
9919
9920         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9921
9922         * javaop.h (WORD_TO_INT): New function.
9923         (IMMEDIATE_s4): Use WORD_TO_INT.
9924         * jcf.h (JPOOL_INT): Ditto.
9925
9926         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9927         separator.
9928
9929 2000-04-19  Tom Tromey  <tromey@cygnus.com>
9930
9931         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9932         on native function.
9933         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9934         JNI methods.
9935         * expr.c (build_jni_stub): New function.
9936         * lang-specs.h: -fjni and -femit-class-file are incompatible.
9937         * parse.c: Rebuilt.
9938         * parse.y (java_complete_expand_methods): Expand a native method
9939         and call build_jni_stub if -fjni given.
9940         * lang-options.h: Document -fjni.
9941         * lang.c (flag_jni): New global.
9942         (lang_f_options): Added `jni' entry.
9943         * java-tree.h (soft_lookupjnimethod_node,
9944         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9945         Declare.
9946         (flag_jni): Declare.
9947         (build_jni_stub): Declare.
9948         (struct lang_decl): Added `native' flag.
9949         (METHOD_NATIVE): Redefined to use `native' field of lang specific
9950         structure.
9951         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9952         soft_jnipopsystemframe_node): New globals.
9953         (init_decl_processing): Set them.  _Jv_InitClass only takes one
9954         argument.
9955
9956         * java-tree.def: Put into `C' mode.
9957
9958 2000-04-27  Tom Tromey  <tromey@cygnus.com>
9959
9960         Fix for PR gcj/2:
9961         * expr.c (expand_invoke): Generate check to see if object pointer
9962         is null in nonvirtual invocation case.
9963         * java-tree.h (soft_nullpointer_node): Declare.
9964         * decl.c (soft_nullpointer_node): New global.
9965         (init_decl_processing): Initialize soft_nullpointer_node.
9966         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9967         or `private' methods.
9968         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9969
9970 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9971
9972         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9973         from <clinit>
9974
9975 2000-04-26  Tom Tromey  <tromey@cygnus.com>
9976
9977         * zextract.c (find_zip_file_start): New function.
9978         (read_zip_archive): Use it.
9979
9980 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9981
9982         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
9983
9984 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9985
9986         * class.c (common_enclosing_context_p): New function.
9987         * java-tree.h (common_enclosing_context_p): Added prototype.
9988         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
9989         classes sharing an outer context with the current instance.
9990         * parse.y (build_access_to_thisn): Fixed leading comment.
9991         (verify_constructor_super): New local `supper_inner'. Skip
9992         enclosing context argument in the case of inner class constructors.
9993         (patch_method_invocation): Insert proper context as second
9994         parameter to pure inner class constructor super invocations.
9995
9996 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9997
9998         * parse.y (end_class_declaration): Reset the interface number
9999         counter.
10000
10001 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10002
10003         * parse.y (source_start_java_method): Deleted unnecessary code.
10004         (patch_method_invocation): Fixed comment.
10005
10006 2000-04-24  Robert Lipe <robertlipe@usa.net>
10007
10008         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
10009
10010 2000-04-23  Tom Tromey  <tromey@cygnus.com>
10011
10012         * boehm.c (mark_reference_fields): Use int_byte_position.
10013
10014 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10015
10016         * boehm.c (mark_reference_fields): Only call byte_position on
10017         non-static fields.
10018
10019 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10020
10021         * boehm.c (mark_reference_fields): Added `last_view_index'
10022         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
10023
10024 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
10025
10026         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
10027         * parse.y (check_class_interface_creation): Fixed comments. Select
10028         permitted modifiers for (inner) interfaces. Changed error message
10029         to report rejected modifiers used with local classes.
10030
10031 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10032
10033         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
10034         of directly inherited type considered in scope.
10035         * parse.y (do_resolve_class): Search inherited classes for inner
10036         classes.
10037
10038 2000-04-20  Tom Tromey  <tromey@cygnus.com>
10039
10040         * parse.y (not_accessible_p): Use member's class, not current
10041         class, when doing inheritance check for protected reference.
10042         Fixes PR gcj/124.
10043
10044 2000-04-20  Jason Schroeder  <shrode@subnature.com>
10045
10046         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
10047
10048 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10049
10050         * parse.y (lookup_field_wrapper): Search for final local aliases.
10051         (resolve_expression_name): Let lookup_field_wrapper search for
10052         final local aliases. Force the value of `name' if one is found.
10053         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
10054         an expression name. Fixed comments.
10055
10056 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10057
10058         * parse.y (yyerror): `msg' can be null, don't use it in that case.
10059
10060 2000-04-19  Tom Tromey  <tromey@cygnus.com>
10061
10062         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
10063
10064 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10065
10066         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
10067
10068 2000-04-18  Tom Tromey  <tromey@cygnus.com>
10069
10070         PR gcj/211:
10071         * gjavah.c (utf8_cmp): Changed return value.
10072         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
10073         result.
10074         (cxx_keywords): New global.
10075         (get_field_name): Handle new result of cxx_keyword_subst.
10076         (print_method_info): Likewise.
10077
10078 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
10079
10080         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
10081         with a newline, for CNI.
10082         (print_stub_or_jni): Print a space or newline before method name for
10083         CNI as well as JNI.
10084         (print_cxx_classname): Don't write leading "::" in CNI stub method.
10085         (process_file): Include gcj/cni.h if generating CNI stubs.
10086
10087 2000-04-16  Tom Tromey  <tromey@cygnus.com>
10088
10089         * gjavah.c (decompile_method): Use print_field_name.
10090         Fixes PR gcj/205.
10091
10092 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10093
10094         * parse.y (java_expand_classes): Reverse the package list once.
10095         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
10096         reduction.
10097         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
10098         the `==' and `!=' operators.
10099
10100 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10101
10102         * jcf-write.c (generate_bytecode_insns): At invocation time,
10103         always relate an interface method to the type of its selector.
10104
10105 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10106
10107         Fix for PR gcj/2:
10108         * expr.c (expand_invoke): Generate check to see if object pointer
10109         is null in nonvirtual invocation case.
10110         * java-tree.h (soft_nullpointer_node): Declare.
10111         * decl.c (soft_nullpointer_node): New global.
10112         (init_decl_processing): Initialize soft_nullpointer_node.
10113         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10114         or `private' methods.
10115         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10116
10117 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10118
10119         Fix for PR gcj/140:
10120         * parse.y (check_final_assignment): Recognize assignments to the
10121         `length' field of an array when generating class files.
10122
10123 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10124
10125         * class.c (decl_hash): Prototype removed.
10126         (decl_compare): Likewise.
10127
10128 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10129
10130         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
10131         * parse.y (check_modifiers_consistency): Check for final/volatile
10132         clash.  Fixes PR gcj/164.
10133
10134 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10135
10136         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
10137         made global.
10138         (java_hash_compare_tree_node): Renamed from `decl_compare, made
10139         global.
10140         (add_method_1): Use `java_hash_hash_tree_node' and
10141         `java_hash_compare_tree_node'.
10142         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
10143         (java_hash_compare_tree_node): Likewise.
10144         * parse.y (find_applicable_accessible_methods_list): Create,
10145         delete and use a hash table to remember already searched interfaces.
10146
10147 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
10148
10149         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
10150         with latest entry.
10151
10152 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10153
10154         * boehm.c (mark_reference_fields, set_bit): Prototype.
10155         (set_bit): Un-ANSI-fy definition.
10156
10157         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
10158         Prototype.
10159
10160         * decl.c (emit_init_test_initialization): Likewise.
10161
10162         * gjavah.c (jni_print_char): Likewise.
10163
10164         * parse.y (create_new_parser_context): Likewise.
10165
10166 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10167
10168         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
10169         patch missing hunk. Fixed indentation.
10170
10171 2000-03-30  Tom Tromey  <tromey@cygnus.com>
10172
10173         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
10174         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
10175
10176 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10177
10178         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10179         when negative *before* using it as an array index.
10180         * ChangeLog: Fixed typo.
10181
10182 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10183
10184         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10185         to 0 when it reaches -1.
10186
10187 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10188
10189         * jcf-parse.c (get_constant): Properly cast `num' during the
10190         invocation of `add_double'.
10191         * jcf-write.c (push_long_const): Properly cast `lo' before
10192         comparing it to short bounds.
10193         * parse-scan.y (interface_declaration:): Rule re-arrange so that
10194         `interface_body:' is reduced after the current interface is
10195         pushed.
10196
10197 2000-03-26  Tom Tromey  <tromey@cygnus.com>
10198
10199         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
10200         Java-specific `-f' option.
10201
10202 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10203
10204         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
10205         Adjust order of making types.
10206         Make bitsize_*_node values.
10207
10208 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10209
10210         * class.c (make_field_value): Use byte_position.
10211         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
10212         (java_array_data_offset): Likewise.
10213         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
10214         bzero call.
10215
10216 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10217
10218         * parse.y (check_abstract_method_definitions): New local
10219         `end_type_reached'. Make sure we also consider `end_type'.
10220         (java_check_abstract_method_definitions): Make sure we eventually
10221         consider `java.lang.Object'.
10222         (maybe_use_access_method): Don't use access method if not in the
10223         context of a pure inner class or if the method's context is right.
10224         (find_applicable_accessible_methods_list): New static flag
10225         `object_done'. Don't search abstract classes as interfaces. Fixed
10226         indentation. Fixed the `java.lang.Object' only search. Search
10227         class interface(s) first, then fully search enclosing contexts.
10228         (find_most_specific_methods_list): Pick the closest candidate when
10229         they're all abstract.
10230
10231 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10232
10233         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10234         properly initialize `finished_label'. Don't emit gotos for empty
10235         try statements.
10236
10237 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10238
10239         * except.c (emit_handlers): Clear catch_clauses_last.
10240
10241 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10242
10243         * parse.y (check_method_types_complete): New function.
10244         (create_class): Reset anonymous class counter only when seeing an
10245         non inner classe.
10246         (java_complete_class): JDEP_METHOD: Don't recompute signature
10247         if incomplete.
10248
10249 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10250
10251         * class.c (build_static_ref): Fixed indentation in comment.
10252         * java-tree.def (TRY_EXPR): Fixed typo in name.
10253         (CLASS_LITERAL): Likewise.
10254         * java-tree.h: (TYPE_DOT_CLASS): New macro.
10255         (struct lang_type): New field `dot_class'.
10256         * jcf-write.c (generate_bytecode_insns): Fixed error message.
10257         (generate_classfile): Method `class$' is synthetic.
10258         * parse.y (build_do_class_method): New function.
10259         (build_dot_class_method_invocation): Likewise.
10260         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
10261         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
10262         (qualify_ambiguous_name): Likewise.
10263         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
10264         (build_try_statement): Fixed leading comment.
10265
10266 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10267
10268         * class.c (make_field_value): Properly handle sizes.
10269         (get_dispatch_vector): Use tree_low_cst and host_integerp.
10270         (layout_class_method): Count using trees.
10271         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
10272         * expr.c (java_array_data_offset): Use int_bit_position.
10273         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
10274         (build_invokevirtual): Use tree_low_cst and do computations with trees.
10275
10276 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10277
10278         * lang.c (flag_hash_synchronization): New global.
10279         (lang_f_options): Added `hash-synchronization'.
10280         * lang-options.h: Mention -fhash-synchronization.
10281         * java-tree.h (flag_hash_synchronization): Declare.
10282         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
10283         hash table synchronization is disabled.
10284         * decl.c (init_decl_processing): Only push `sync_info' value when
10285         hash table synchronization is disabled.
10286         * class.c (make_class_data): Only push `sync_info' field when hash
10287         table synchronization is disabled.  Removed dead code.
10288
10289 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10290
10291         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
10292
10293 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10294
10295         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
10296         classes.
10297         * parse.y (patch_method_invocation): Handle anonymous classes
10298         creation in static context.
10299
10300 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10301
10302         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
10303         * parse.y (resolve_qualified_expression_name): Use it.
10304         (patch_method_invocation): Likewise.
10305
10306 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10307
10308         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
10309         depending on the type of dependency which dictates what the
10310         current class is.
10311         (unresolved_type_p): Resolved types limited to the current class.
10312
10313 2000-03-15  Tom Tromey  <tromey@cygnus.com>
10314
10315         * decl.c (init_decl_processing): Set type of `sync_info' to be
10316         pointer to Object.
10317
10318         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
10319         Correctly compute bit number for current slot.  Zero `high' and
10320         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
10321         mark_reference_fields.
10322         (mark_reference_fields): New function.
10323
10324 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10325
10326         * parse.y (register_incomplete_type): Fixed initialization of
10327         JDEP_ENCLOSING.
10328
10329 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10330
10331         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
10332         static globals.
10333         (push_class_context, pop_class_context): New function.
10334         (class_body:): Call pop_class_context.
10335         (interface_body:): Likewise.
10336         (INNER_QUALIFIER): New macro.
10337         (report_class_declaration): Changed output format and use
10338         INNER_QUALIFIER. Call push_class_context.
10339
10340 2000-02-14  Andrew Haley  <aph@cygnus.com>
10341
10342         * check-init.c (check_init): Add new cases for unary and binary
10343         tree nodes.
10344
10345 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10346
10347         * parse.y (resolve_package): Set `next' once a type name has been
10348         progressively discovered.
10349         (resolve_qualified_expression_name): Propagate resolution only if
10350         there are remaining qualifiers. Take into account `q' might have
10351         been cleared after re-qualification.
10352         * parse.y (patch_method_invocation): New local `resolved'.
10353         Section dealing with qualified expression rewritten to use
10354         resolve_field_access.
10355
10356 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10357
10358         * parse.h (PUSH_CPC): Fixed indentation.
10359         (DEBUG_CPC): New macro.
10360         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
10361         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
10362         * parse.y (class_body_declaration:): Use
10363         SET_CPC_INSTANCE_INITIALIZER_STMT.
10364         (method_declaration:): Check for null current_function_decl.
10365         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
10366         (java_parser_context_pop_initialized_field): Better handling of
10367         empty lists.
10368         (maybe_make_nested_class_name): Mark nested class name as
10369         qualified when necessary.
10370         (end_class_declaration): Don't call java_parse_context_resume when
10371         one or more error occurred.
10372         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
10373         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
10374         SET_CPC_INITIALIZER_STMT.
10375         (method_header): Check for inner classes declaring static methods.
10376         (resolve_qualified_expression_name): Handle situation where `this'
10377         is implied.
10378
10379 2000-03-13  Hans Boehm <boehm@acm.org>
10380
10381         * typeck.c (build_prim_array_type): Correctly set the high word too.
10382
10383 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10384
10385         * parse.y (java_complete_expand_methods): Leave <clinit> out of
10386         ordinary methods.
10387         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
10388         list of methods for interfaces.
10389
10390 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10391
10392         * parse.y (qualify_ambiguous_name): Properly handle expressions
10393         using `null'.
10394
10395 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10396
10397         * parse.y (check_final_assignment): Extended to process
10398         COMPOUND_EXPR.
10399         (patch_assignment): Have check_final_assignment called only once.
10400
10401 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10402
10403         * java-tree.h (IS_INIT_CHECKED): New flag.
10404         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10405         * parse.y (patch_string): Call force_evaluation_order on the
10406         completed string concatenation tree.
10407         * expr.c (force_evaluation_order): Call force_evaluation_order on
10408         function's arguments too.
10409
10410 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10411
10412         * decl.c (emit_init_test_initialization): Mark KEY as unused.
10413         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10414         (build_anewarray): Likewise.
10415         * parse.y (patch_newarray): Likewise.
10416         * parse.c: Regenerated.
10417
10418 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
10419
10420         * decl.c (init_decl_processing): Added new class fields `depth',
10421         `ancestors', and `idt' to class_type_node. Use
10422         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10423         * class.c (make_class_data): Push initial values for new fields.
10424         * java-tree.h: Updated prototype for `build_invokeinterface'.
10425         * expr.c (build_invokeinterface): Changed parameters to accept
10426         `method' tree. Calculate index of `method' in its declaring
10427         interface. Build call to _Jv_LookupInterfaceMethodIdx.
10428         (expand_invoke): Call `build_invokeinterface' with new parameters.
10429         * parse.y (patch_invoke): Call `build_invokeinterface' with new
10430         parameters.
10431
10432 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
10433
10434         * typeck.c (lookup_do): Search superinterfaces first
10435         when looking up an interface method. From Godmar Back
10436         <gback@cs.utah.edu>
10437
10438 2000-03-06  Tom Tromey  <tromey@cygnus.com>
10439
10440         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10441
10442 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10443
10444         * java-tree.h (lookup_argument_method2): Declared.
10445         (safe_layout_class): Prototype moved from parse.h.
10446         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10447         * parse.y (java_check_regular_methods): Local `super_class' gone.
10448         Call lookup_argument_method2 instead of lookup_argument_method.
10449         Perform modifier match for methods found declared in implemented
10450         interfaces. Fixed indentation problem. Overriding/hiding error
10451         report to take place only for methods found in classes.
10452         * typeck.c (lookup_argument_method): Changed leading
10453         comment. Re-written by calling lookup_do.
10454         (lookup_argument_method2): New function.
10455         (lookup_java_method): Re-written by calling lookup_do.
10456         (lookup_do): New function.
10457
10458 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10459
10460         * check-init.c (check_init): Removed dead code. Handle (blank)
10461         final variables.
10462         * parse.y (declare_local_variables): New local `final_p', set it
10463         and use it to initialize LOCAL_FINAL.
10464         (check_final_assignment): Only check FIELD_DECLs.
10465
10466 2000-02-17  Tom Tromey  <tromey@cygnus.com>
10467
10468         * Makefile.in (JAVA_OBJS): Added boehm.o.
10469         (boehm.o): New target.
10470         * Make-lang.in (JAVA_SRCS): Added boehm.c.
10471         * java-tree.h (flag_use_boehm_gc): Declare.
10472         (get_boehm_type_descriptor): Declare.
10473         * lang.c (lang_f_options): Added `use-boehm-gc'.
10474         (flag_use_boehm_gc): New global.
10475         * lang-options.h: Added -fuse-boehm-gc.
10476         * boehm.c: New file.
10477         * class.c (get_dispatch_table): If class uses a Boehm type
10478         descriptor, put it in the vtable.
10479         (make_class_data): Removed dead code.
10480
10481 2000-03-03  Per Bothner  <per@bothner.com>
10482
10483         * decl.c (init_decl_processing):  Initialize sizetype properly.
10484
10485 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10486
10487         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10488         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10489         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10490         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10491         (jcf_parse): New local `current'. Load innerclasses seen in outer
10492         context being processed.
10493         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10494         * jcf-write.c (append_innerclasses_attribute): New function.
10495         (append_innerclasses_attribute_entry): Likewise.
10496         (get_access_flags): Handle static classes. Set anonymous and local
10497         classes to be private.
10498         (generate_classfile): Attribute count adjusted. Call
10499         append_innerclasses_attribute.
10500         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10501         PURE_INNER_CLASS_TYPE_P.
10502         * parse.y (parser_qualified_classname): New parameter `is_static',
10503         produce non qualified name accordingly.
10504         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10505         (create_interface): Added argument to parser_qualified_classname.
10506         (create_class): Added argument to parser_qualified_classname. Setup
10507         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10508         (add_inner_class_fields): Fixed indentation.
10509         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10510         (method_declarator): Fixed typo in comment.
10511         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10512         (build_current_thisn): Likewise.
10513         (patch_method_invocation): Likewise.
10514
10515 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10516
10517         * decl.c (current_function_decl): Move to toplev.c.
10518
10519 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10520
10521         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10522         (DECL_BIT_INDEX): Use underlying representation.
10523         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10524
10525 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10526
10527         * expr.c (build_java_ret): Pass proper type to size_binop.
10528
10529 2000-02-25  Anthony Green  <green@cygnus.com>
10530
10531         * expr.c (build_class_init): Mark the decl to be ignored by
10532         check_init.
10533         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
10534         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
10535         * class.c (init_test_hash_newfunc): New function.
10536         (decl_hash): New function.
10537         (decl_compare): New function.
10538         * decl.c (emit_init_test_initialization): New function.
10539         (complete_start_java_method): Traverse the init test hashtable,
10540         calling emit_init_test_initialization.
10541         (always_initialize_class_p): Define.
10542         * expr.c (build_class_init): Use initialization tests when
10543         emitting class initialization code.
10544         (always_initialize_class_p): Declare.
10545         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10546         1.
10547         * java-tree.h: Include hash.h.
10548         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10549         (struct lang_decl): Add init_test_table field.
10550         (init_test_hash_entry): Define.
10551
10552 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10553
10554         * gjavah.c (main): Avoid using `argi' to report unimplemented
10555         options.
10556
10557 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10558
10559         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10560         initialize locals to avoid warnings. Local `exception_type' moved
10561         into if statement.
10562
10563 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10564
10565         * parse.y (resolve_expression_name): Use `orig' as a second
10566         argument to resolve_field_access.
10567         (resolve_field_access): Removed unnecessary code when dealing with
10568         static fields.
10569
10570 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10571
10572         * class.c (push_super_field): Don't push the field twice.
10573         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10574         * parse.h (java_reorder_fields): Prototyped.
10575         * parse.y (java_reorder_fields): New function.
10576         (java_layout_class): Simplified not to worry about re-ordering.
10577
10578 2000-02-23  Tom Tromey  <tromey@cygnus.com>
10579
10580         * gjavah.c (print_name): In JNI case, correctly quote string.
10581         (print_method_info): Don't handle overrides in JNI mode.
10582
10583 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10584
10585         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10586         value type set to `boolean_type_node'.
10587
10588 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
10589
10590         * jcf-dump.c (main): Test for correct condition after
10591         output file creation.
10592
10593 2000-02-19  Anthony Green  <green@cygnus.com>
10594
10595         * jcf-depend.c (add_entry): Fix test for first list entry.
10596
10597 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10598
10599         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10600         * constants.c (build_constants_constructor): Likewise.
10601
10602 2000-02-19  Anthony Green  <green@cygnus.com>
10603
10604         * jcf-depend.c (add_entry): Add entries to the end of the list.
10605
10606 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
10607
10608         * decl.c (INT_TYPE_SIZE): Define if necessary.
10609         (expand_java_return): Handle the case of a native integer smaller
10610         than a JVM integer.
10611
10612 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10613
10614         * gjavah.c (help): Use GCCBUGURL.
10615         * jv-scan.c (help): Likewise.
10616         * jcf-dump.c (help): Likewise.
10617
10618 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10619
10620         * jcf-write.c (generate_bytecode_insns): Don't generate empty
10621         `finally' clauses.
10622
10623 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10624
10625         * jcf-parse.c (load_class): Call `fatal' if no file containing
10626         the target class are found.
10627
10628 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
10629
10630         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10631         lex.c, lex.h, and PARSE_H to...
10632         (parse.o, parse-scan.o): ...here, respectively.
10633
10634         * lex.c: Split out code that may trigger SIGFPE from yylex()
10635         to its own function.
10636         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10637
10638 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10639
10640         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10641
10642 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10643
10644         * parse.y (outer_field_access_p): Stop in time when outer contexts
10645         are exhausted.
10646         (resolve_qualified_expression_name): Properly qualify *everything*
10647         after a package.type to be resoled as expression names.
10648         (find_applicable_accessible_methods_list): Save/restore `class' to
10649         isolate it from a possible outer context search.
10650
10651 2000-02-15  Tom Tromey  <tromey@cygnus.com>
10652
10653         * gjavah.c (jni_print_char): New function.
10654         (print_full_cxx_name): Use it.
10655         (decode_signature_piece): Likewise.
10656         (print_cxx_classname): Likewise.
10657
10658 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10659
10660         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10661         version.o.
10662         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10663
10664         * gjavah.c: Include version.h.
10665
10666         * jcf-dump.c: Likewise.
10667
10668         * jv-scan.c: Likewise.
10669
10670 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10671
10672         * parse.y (outer_field_access_fix): First parameter now a tree
10673         node. Check for assignment to final. First argument to
10674         build_outer_field_access_fix modified to accommodate prototype.
10675         (build_outer_field_access): Don't check for assignment to final
10676         here.
10677         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10678         possibly returned by outer_field_access_fix. Changed
10679         outer_field_access_fix's first argument.
10680         (check_final_assignment): $finit$'s context is OK.
10681         (patch_unaryop): Use node instead of its line/column value when
10682         calling outer_field_access_fix.
10683
10684 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10685
10686         * parse.y (interface_declaration:): No longer tagged
10687         <node>. Re-installed default action.
10688         (class_member_declaration:): Handle inner interfaces.
10689         (interface_member_declaration): Handle inner interfaces and
10690         classes.
10691         (create_interface): Push error if one seen. Suspend parsing
10692         context when processing an inner interface.
10693         (register_fields): Inner class static field limitations not to
10694         apply to inner interfaces.
10695
10696 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10697
10698         * jcf-parse.c (load_class): Update `java_error_count' when a
10699         class' file can't be found.
10700         (parse.y): Avoid (byte)code generation when errors seen.
10701
10702 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10703
10704         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10705         decodes a valid node.
10706         (patch_binop): Handle TRUNC_DIV_EXPR.
10707
10708 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10709
10710         * parse.y (resolve_package): New local `acc'. Try to progressively
10711         build and guess a package and type name.
10712
10713 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10714
10715         * parse.y (find_applicable_accessible_methods_list): Load and
10716         layout the search class if necessary.
10717         (java_complete_tree): Keep to original type of the folded initial
10718         value.
10719
10720 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10721
10722         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10723         Generate error message if circularity is detected. New static
10724         local `list'.
10725         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
10726         * jcf-write.c (generate_bytecode_insns): Very simply handle
10727         SAVE_EXPR.
10728         * parse.y (java_check_circular_reference): Use
10729         `cyclic_inheritance_report' during report, if necessary.
10730         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10731         walking NEW_ARRAY_INIT twice.
10732
10733 2000-02-09  Tom Tromey  <tromey@cygnus.com>
10734
10735         * parse.y (check_class_interface_creation): Allow inner classes to
10736         be `private' or `protected', check modifiers' consistency. Prevent
10737         block local classes from bearing any modifiers.
10738
10739 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10740
10741         * except.c (check_start_handlers): Re-add prototype lost in last
10742         patch.
10743         (maybe_start_try): Remove excess argument to `check_start_handlers'.
10744
10745 2000-02-09  Andrew Haley  <aph@cygnus.com>
10746
10747         * decl.c (clear_binding_level): Remove excess initializer.
10748         (maybe_poplevels): Remove unused variable.
10749         (force_poplevels): Ditto.
10750         (struct binding_level): Add comment.
10751
10752 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10753
10754         * jcf-write.c (generate_classfile): Don't consider
10755         pre-initialization with reference value (use <clinit> instead.)
10756         * parse.y (java_fix_constructors): No generated constructor for
10757         interfaces.
10758         (build_outer_field_access): Removed debug message.
10759         (outer_field_expanded_access_p): Adapted to bytecode generation.
10760         (build_outer_field_access_method): Use fix_method_argument_names.
10761         (build_outer_method_access_method): Fixed indentation. Added
10762         comment. Handle access method generation for static and also void
10763         methods.
10764         (build_access_to_thisn): Inserted debug message.
10765         (maybe_build_thisn_access_method): Use fix_method_argument_names.
10766         (resolve_qualified_expression_name): Fixed comment.
10767         (not_accessible_p): Adapted to bytecode generation. Added comment.
10768         (patch_method_invocation): Added comment.
10769         (maybe_use_access_method): Fixed leading comment. Handle static
10770         methods.
10771         (java_complete_lhs): Don't shortcut handling of initialized upon
10772         declaration String type static fields when generating bytecode.
10773         (patch_unaryop): Handle outer field access when generating
10774         bytecode.
10775
10776 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10777
10778         * java-tree.h (FIELD_THISN): New macro.
10779         * jcf-write.c (append_synthetic_attribute): New function.
10780         (generate_classfile): Set "Synthetic" attribute on this$<n>,
10781         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10782         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10783         this$<n> fields.
10784         (build_outer_field_access): Turned on access functions usage and
10785         generation when compiling to bytecode.
10786         (maybe_use_access_method): Likewise.
10787
10788 2000-01-25  Andrew Haley  <aph@cygnus.com>
10789
10790         * java-except.h (struct eh_range): Add `expanded' field.
10791         (maybe_start_try): Add end_pc arg.
10792         (maybe_end_try): Ditto.
10793         * java-tree.h (force_poplevels): new function.
10794         * expr.c (expand_byte_code): Don't call maybe_start_try or
10795         maybe_end_try.
10796         * except.c (add_handler): Reset expanded.
10797         (expand_start_java_handler): Set expanded.
10798         (check_start_handlers): Don't expand a start handler that's
10799         already been expanded.
10800         (maybe_start_try): Add end_pc arg.  Only expand a handler which
10801         ends after end_pc.
10802         (expand_end_java_handler): call force_poplevels.
10803         (force_poplevels): new function.
10804         * decl.c (binding_level): Add start_pc of binding level.
10805         (maybe_pushlevels): Call maybe_start_try when pushing binding
10806         levels.
10807         (maybe_poplevels): Call maybe_end_try when popping binding levels.
10808         (LARGEST_PC): Define.
10809         (clear_binding_level): Use LARGEST_PC.
10810
10811         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10812         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10813         (binding_depth, is_class_level, current_pc): new variables.
10814         (struct binding_level): ditto.
10815         (indent): new function.
10816         (push_jvm_slot): add debugging info.
10817         (maybe_pushlevels): ditto.
10818         (maybe_poplevels): ditto.
10819         (pushlevel): ditto.
10820         (poplevel): ditto.
10821         (start_java_method): ditto.
10822         (give_name_to_locals): comment only.
10823         * except.c (binding_depth, is_class_level, current_pc):
10824         new variables.
10825         (expand_start_java_handler): add debugging info.
10826         (expand_end_java_handler): ditto.
10827
10828 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10829
10830         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10831         (print_name_for_stub_or_jni, process_file): Constify a char*.
10832
10833 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10834
10835         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10836
10837 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10838
10839         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10840         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10841         defined to be 1.
10842
10843 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10844
10845         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10846         * java-tree.h (TYPE_II_STMT_LIST): New macro.
10847         (struct lang_type): New field `ii_block'.
10848         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10849         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10850         * parse.h (struct parser_ctxt): New field `instance_initializers'.
10851         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10852         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10853         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10854         macros.
10855         * parse.y (add_instance_initializer): New function.
10856         (in_instance_initializer): New static global.
10857         (class_body_declaration:): Link instance initializer block.
10858         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10859         (array_creation_expression:): Remove unused local.
10860         (java_parser_context_push_initialized_field): Fixed leading
10861         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10862         CPC_INSTANCE_INITIALIZER_LIST.
10863         (java_parser_context_pop_initialized_field): Likewise.
10864         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10865         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10866         CPC_INITIALIZER_STMT.
10867         (fix_constructors): New local `class_type'. Use it. Call
10868         add_instance_initializer.
10869         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10870         (patch_return): Forbid return in instance initializers.
10871         (patch_throw_statement): Enforce exception handling in the context
10872         of instance initializers.
10873
10874 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10875
10876         * Make-lang.in (java.mostlyclean): Remove executables in
10877         `mostlyclean'.
10878
10879 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10880
10881         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10882         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10883         (java_float_finite): Convert to use union Word from javaop.h.
10884         (java_double_finite): Convert to use union DWord from javaop.h.
10885
10886 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10887
10888         * gjavah.c (options): Added `jni' entry.
10889         (help): Document -jni.
10890         (flag_jni): New global.
10891         (process_file): Handle JNI output.  Don't print text from
10892         -prepend, -add, etc, when generating stubs.  Only remove `.class'
10893         suffix if it actually exists.
10894         (main): Create a `.c' file when run with `--jni --stubs'.  Create
10895         correct output file name with `--jni'.
10896         (print_include): Mangle header name differently in JNI case.
10897         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10898         method list.
10899         (print_method_info): Handle JNI case.  Put signature info into
10900         method name.  Handle case when STREAM is NULL.
10901         (print_name_for_stub_or_jni): New function.
10902         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
10903         (print_cxx_classname): Handle JNI.
10904         (print_full_cxx_name): Likewise.
10905         (decode_signature_piece): Likewise.
10906         (overloaded_jni_method_exists_p): New function.
10907         (struct method_name): Added `signature' and `sig_length' fields.
10908         (HANDLE_END_FIELD): Do nothing in JNI mode.
10909
10910 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10911
10912         * jv-scan.c: Include version.c, <getopt.h>.
10913         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10914         (options): New array.
10915         (usage): New function.
10916         (version): New function.
10917         (main): Use getopt_long to parse command line.
10918         * jcf-dump.c: Include version.c, <getopt.h>.
10919         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10920         OPT_JAVAP): New macros.
10921         (options): New array.
10922         (usage): Return `void'.  Changed message.
10923         (help): New function.
10924         (version): New function.
10925         (main): Use getopt_long_only to parse command line.
10926         * gjavah.c: Include <getopt.h>.
10927         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10928         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10929         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10930         (options): New array.
10931         (java_no_argument): Removed.
10932         (help): Updated with missing options.
10933         (main): Use getopt_long_only to parse command line.
10934         (usage): Changed message.
10935
10936 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10937
10938         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10939         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10940         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10941         * parse.y (array_creation_expression:): Handle anonymous arrays.
10942         (build_array_from_name): Don't set `ret_name' if null.
10943         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10944         (qualify_ambiguous_name): Likewise.
10945         (java_complete_expand_class): Likewise.
10946
10947 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10948
10949         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10950         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10951         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10952         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10953         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10954         AIPL_FUNCTION_COMPLETED_INVOCATION.
10955         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10956         AIPL_FUNCTION_INVOCATION_READY.
10957         (AIPL_FUNCTION_DECLARATION): New enum entry.
10958         * parse.y (reorder_static_initialized): New function.
10959         (java_parser_context_pop_initialized_field): Use it.
10960         (add_inner_class_fields): Use
10961         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10962         augmented. Install marker after last alias initializer, if any.
10963         (generate_finit): Fixed typo. Don't try to retain only the used
10964         fields.
10965         (method_header): Compute and set DECL_FUNCTION_NAP.
10966         (method_declarator): Fixed comment. Insert alias initializer in
10967         parameter list.
10968         (build_alias_initializer_parameter_list): Fixed leading
10969         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10970         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10971         (java_complete_expand_class): Code to retain only used aliases
10972         removed.
10973         (java_complete_expand_methods): New local `first_decl'. Generate
10974         $finit$ first, then expand the constructors, regular methods and
10975         <clinit>.
10976         (java_complete_expand_method): Don't report error on missing
10977         return statement if previously detected bogus.
10978         (fix_constructors): Don't patch constructor parameters list.
10979         (patch_method_invocation): Use new AIPL enum values. Reverse
10980         alias initializer list for anonymous classes.
10981
10982 2000-01-30  Anthony Green  <green@redhat.com>
10983
10984         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
10985         determine how many stack slots to pop.
10986
10987 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10988
10989         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
10990         error handling/recovery.
10991         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
10992
10993 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10994
10995         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
10996         FIELD_LOCAL_ALIAS_USED): New macros.
10997         (DECL_FUNCTION_NAP): New macro.
10998         (struct lang_decl): New field `nap'.
10999         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
11000         (struct lang_type): New fields `finit_stmt_list' and
11001         `clinit_stmt_list'.
11002         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
11003         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
11004         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
11005         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
11006         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
11007         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
11008         (BUILD_THROW): Macro line separator re-indented.
11009         * parse.y (end_class_declaration): New function.
11010         (maybe_generate_pre_expand_clinit): New name for
11011         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
11012         pre-expand static fields.
11013         (maybe_generate_clinit): Function deleted.
11014         (check_for_static_method_reference): Prototype's parameter list
11015         indented.
11016         (generate_finit): New name for maybe_generate_finit. Changed
11017         leading comment. Function rewritten to use
11018         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
11019         (build_alias_initializer_parameter_list): New function.
11020         (java_parser_context_pop_initialized_field): Likewise.
11021         (add_inner_class_fields): Likewise.
11022         (type_declaration:): Call end_class_declaration.
11023         (class_member_declaration:): Likewise.
11024         (formal_parameter_list:): Fixed typos.
11025         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
11026         element. Improved error handling.
11027         (block_statement:): Call end_class_declaration.
11028         (anonymous_class_creation:): Likewise.
11029         (create_anonymous_class): Fixed comments.
11030         (create_class): Call add_inner_class_fields.
11031         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
11032         (method_header): Use MARK_FINAL_PARMS.
11033         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
11034         (method_declarator): Propagate final argument flag.
11035         (craft_constructor): New local `artificial'. Call
11036         build_alias_initializer_parameter_list. Use
11037         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
11038         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
11039         necessary.
11040         (complete_expand_class): Get rid of unused outer context local
11041         alias fields.
11042         (java_complete_expand_methods): Fixed leading
11043         comment. Generate/pre-expand <clinit> first. Changed method
11044         expansion order to regular, $finit$, constructors, <clinit>.
11045         (java_complete_expand_method): Set current_function_decl.
11046         (fix_constructors): Fix constructor parameter list to account for
11047         outer context local alias initializers.
11048         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11049         (resolve_expression_name): Lookup outer context local aliases. New
11050         local `access', use it.
11051         (patch_method_invocation): Patch inner class ctor invocation with
11052         outer context local aliases initialization values. $finit$
11053         invocation patching now includes things generated with
11054         build_alias_initializer_parameter_list.
11055         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11056         (build_super_invocation): Likewise.
11057         (patch_assignment): Changed comment.
11058
11059 2000-01-27  Andrew Haley  <aph@cygnus.com>
11060
11061         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
11062         (emit_if): Ditto.
11063         (emit_jsr): Ditto.
11064
11065 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11066
11067         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
11068         concatenation.
11069         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
11070
11071         * parse.y (register_fields): Don't pass a format specifier to
11072         OBSOLETE_MODIFIER_WARNING.
11073         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
11074         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
11075         specifier.
11076         (check_modifiers): Change function into a macro.
11077         (check_class_interface_creation): Pass a literal format string.
11078
11079 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11080
11081         * buffer.h: PROTO -> PARAMS.
11082         * check-init.c: Likewise.
11083         * class.c: Likewise.
11084         * constants.c: Likewise.
11085         * convert.h: Likewise.
11086         * decl.c: Likewise.
11087         * except.c: Likewise.
11088         * expr.c: Likewise.
11089         * gjavah.c: Likewise.
11090         * java-except.h: Likewise.
11091         * java-tree.h: Likewise.
11092         * jcf-depend.c: Likewise.
11093         * jcf-dump.c: Likewise.
11094         * jcf-parse.c: Likewise.
11095         * jcf-path.c: Likewise.
11096         * jcf-reader.c: Likewise.
11097         * jcf-write.c: Likewise.
11098         * jcf.h: Likewise.
11099         * jv-scan.c: Likewise.
11100         * jvgenmain.c: Likewise.
11101         * jvspec.c: Likewise.
11102         * lang.c: Likewise.
11103         * lex.c: Likewise.
11104         * lex.h: Likewise.
11105         * parse-scan.y: Likewise.
11106         * parse.h: Likewise.
11107         * parse.y: Likewise.
11108         * typeck.c: Likewise.
11109         * verify.c: Likewise.
11110         * xref.c: Likewise.
11111         * xref.h: Likewise.
11112         * zextract.c: Likewise.
11113         * zipfile.h: Likewise.
11114
11115 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11116
11117         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11118         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
11119         * constants.c (build_constant_data_ref): Check for cached
11120         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
11121         in TYPE_CPOOL_DATE_REF.
11122         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
11123         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
11124         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
11125         (LOCAL_FINAL): New macro.
11126         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
11127         constant pool -- don't try to reuse.
11128         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
11129         TYPE_LANG_SPECIFIC.
11130         (find_in_current_zip): Use TYPE_JCF.
11131         * parse.h (java_check_final): Prototype removed.
11132         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
11133         (maybe_create_class_interface_decl,
11134         check_class_interface_creation): Likewise.
11135         (java_expand_finals): Function removed.
11136         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
11137         (block_statement:): Fixed comment.
11138         (anonymous_class_creation:): Likewise.
11139         (check_class_interface_creation): Reversed Jan 12, 2000 extra
11140         argument patch.
11141         (check_class_interface_creation): Loosened error report on (inner)
11142         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
11143         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
11144         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
11145         argument patch.
11146         (create_interface): Likewise.
11147         (anonymous_class_counter): New static global.
11148         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
11149         patch. Fixed comments.
11150         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
11151         anonymous_class_counter when declaring a toplevel class.
11152         (craft_constructor): Fixed constructor name when handling
11153         anonymous classes. Anonymous class constructors to feature hidden
11154         this$<n> parameter.
11155         (java_fix_constructors): Added comment.
11156         (java_check_final): Function removed.
11157         (java_complete_expand_methods): Fixed comment. Don't generate
11158         class data, save its outgoing constant pool instead.
11159         (verify_constructor_super): Skip anonymous class constructor
11160         hidden this$<n> parameter.
11161         (java_expand_classes): New local `saved_ctxp'. Removed call to
11162         java_expand_finals and java_check_final. Expand anonymous class
11163         constructors. Generate class data.
11164         (build_super_invocation): Skip anonymous class hidden this$<n>
11165         parameter.
11166         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
11167         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11168         (set_java_signature): Likewise.
11169
11170 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11171
11172         * gjavah.c: Delete ACC_VISIBILITY define.
11173         * jcf.h: Add ACC_VISIBILITY define.
11174         * parse.y: final: rule tagged <value>.
11175         (java_check_regular_methods): Use ACC_VISIBILITY define for
11176         default package access check.
11177         (local_variable_declaration_statement): Use final: rule.
11178
11179 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11180
11181         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
11182         (final:): New rule.
11183
11184 2000-01-17  Tom Tromey  <tromey@cygnus.com>
11185
11186         * gjavah.c (print_field_info): Allow non-static final fields.
11187
11188 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11189
11190         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
11191         * parse.y (patch_anonymous_class): New function.
11192         (create_anonymous_class): Register incomplete type when the
11193         class/interface to extends/implement isn't known yet.
11194         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
11195         (verify_constructor_super): Tuned error message.
11196
11197 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11198
11199         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
11200         (ANONYMOUS_CLASS_P): New macro.
11201         (TYPE_SIGNATURE, TYPE_JCF): New macros.
11202         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
11203         * parse.y (create_class): Added leading argument.
11204         (maybe_create_class_interface_decl,
11205         check_class_interface_creation): Likewise.
11206         (craft_constructor): New function.
11207         (verify_constructor_super): Added argument in prototype.
11208         (class_declaration:): Inserted leading argument.
11209         (for_begin:): Use FOR_LOOP_P.
11210         (anonymous_class_creation): Create WFL of the anonymous class to
11211         instantiate. Call build_new_invocation. Added comments.
11212         (check_class_interface_creation): Handle parameter `anonymous' in
11213         verbose mode class creation announce.
11214         (link_nested_class_to_enclosing): Exclude anonymous classes.
11215         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
11216         anonymous class, even though they appear to have an enclosing
11217         context.
11218         (create_interface): Pass extra argument to
11219         check_class_interface_creation.
11220         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
11221         (create_class): Call check_class_interface_creation and
11222         maybe_create_class_interface_decl with extra new argument. Don't
11223         add private this$<n> to anonymous classes.
11224         (method_declarator): Insert hidden this$<n> to anonymous class
11225         constructors.
11226         (java_fix_constructors): Deleted code creating default
11227         constructor. Call craft_constructor instead.
11228         (java_check_regular_methods): Set `saw_constructor' to 1 for
11229         anonymous classes.
11230         (fix_constructors): Pass extra argument to verify_constructor_super.
11231         (verify_constructor_super): New local `sdecl', use it. Search for
11232         matching constructor (possibly featuring arguments) in super
11233         class.
11234         (lookup_method_invoke): Craft constructor according to arguments
11235         list when dealing with anonymous class constructors.
11236         (build_super_invocation): Pass arguments to anonymous class super
11237         constructors.
11238         (search_loop): Use FOR_LOOP_P.
11239         (labeled_block_contains_loop_p): Likewise.
11240
11241 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11242
11243         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
11244         (enclosing_context_p): New function.
11245         (get_access_flags_from_decl): Handle CLASS_STATIC.
11246         (maybe_layout_super_class): Extra first argument passed to
11247         do_resolve_class.
11248         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
11249         ID_INIT_P.
11250         * decl.c (access0_identifier_node): New global.
11251         (init_decl_processing): access0_identifier_node initialized.
11252         (pushdecl): Set DECL_CONTEXT only on non type decls.
11253         * expr.c (lookup_field): Lookup inner class fields in enclosing
11254         contexts.
11255         (expand_invoke): Use ID_INIT_P.
11256         (expand_java_field_op): Use DECL_CLINIT_P.
11257         * java-tree.def (CLASS_LITERAL): New tree code.
11258         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
11259         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
11260         (struct lang_decl): New field `inner_access'.
11261         (enclosing_context_p): Prototyped.
11262         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
11263         ID_CLINIT_P): New macros.
11264         (CLASS_STATIC): New macro.
11265         (CLASS_ACCESS0_GENERATED_P): New macro.
11266         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
11267         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
11268         INNER_CLASS_P): New macros.
11269         (DECL_INNER_CLASS_LIST): New macro.
11270         * jcf-parse.c (yyparse): Avoid the use of ANSI string
11271         concatenation.
11272         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11273         the shift value to int. Fixed typo in comment.
11274         * lex.c (inst_id, wpv_id): Initialize.
11275         * mangle.c (unicode_mangling_length): Take `$' into account.
11276         * parse.h (DRECOVER, RECOVER): Terminate properly.
11277         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
11278         (typedef struct _jdep): New field `enclosing'.
11279         (JDEP_ENCLOSING): New macro.
11280         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
11281         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
11282         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
11283         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
11284         GET_ENCLOSING_CPC_CONTEXT): New macros.
11285         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
11286         (do_resolve_class): Added extra argument in prototype.
11287         * parse.y (resolve_class): Added extra argument in prototype.
11288         (maybe_create_class_interface_decl): Likewise.
11289         (maybe_use_access_method, build_wfl_wrap): New functions.
11290         (java_complete_expand_classes, java_complete_expand_class):
11291         Likewise.
11292         (java_parser_context_push_initialized_field,
11293         java_parser_context_suspend, java_parser_context_resume):
11294         Likewise.
11295         (maybe_make_nested_class_name, make_nested_class_name,
11296         set_nested_class_simple_name_value,
11297         link_nested_class_to_enclosing, find_as_inner_class,
11298         find_as_inner_class_do, check_inner_class_redefinition,
11299         build_thisn_assign, build_current_thisn, build_access_to_thisn,
11300         maybe_build_thisn_access_method, build_outer_field_access,
11301         build_outer_field_access_methods, build_outer_field_access_expr,
11302         build_outer_method_access_method, build_new_access_id,
11303         build_outer_field_access_method, outer_field_access_p,
11304         outer_field_expanded_access_p, outer_field_access_fix,
11305         build_incomplete_class_ref, patch_incomplete_class_ref,
11306         create_anonymous_class): Likewise.
11307         (inst_id, wpv_id): New static global variables.
11308         (synchronized:): New rule, tagged <node>.
11309         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
11310         rules.
11311         (anonymous_class_creation:): New rule, tagged <node>.
11312         (NEW_TK): Tagged <node>.
11313         (type_literals, array_type_literal): New rules, tagged <node>.
11314         (class_declaration:): Removed action when reducing by class_body:
11315         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
11316         using GET_CPC in sub-rules.
11317         (class_member_declaration): Handle inner classes.
11318         (method_declaration): When reducing method_header:, reset
11319         current_function_decl when appropriate.
11320         (method_declarator:): Set the number of formal parameter to 0 for
11321         method declared without arguments.
11322         (constructor_declarator:): Likewise.
11323         (static_initializer:): List of elements kept in a list.
11324         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
11325         use of the keyword `static' for type declarations.
11326         (block_statement:): Handle inner class declarations.
11327         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
11328         type qualified `this'.
11329         (class_instance_creation_expression): Use anonymous_class_creation:
11330         to handle inner class instances creation. Handle qualified `new'.
11331         (something_dot_new): Added appropriate actions.
11332         (create_new_parser_context): New function.
11333         (java_push_parser_context, java_parser_context_save_global,
11334         java_parser_context_suspend): Use create_new_parser_context.
11335         (check_modifiers): Changed leading comment.
11336         (check_class_interface_creation): Handle interclasses.
11337         (add_superinterfaces): Fixed comment.
11338         (create_interface): Build qualified name from the raw_name instead
11339         of its matching WFL. Push the initialized fields list. raw_name added
11340         as an extra argument to maybe_create_class_interface_decl.
11341         (create_class): Build qualified name from the raw_name instead of
11342         its matching WFL. Removed assignment to current_parsed_class_un.
11343         Call PUSH_ERROR before returning an error. Suspend the current
11344         parser context when processing an inner class. Push the
11345         initialized fields list. raw_name added as an extra argument to
11346         maybe_create_class_interface_decl. Add the private this$<n>
11347         field.
11348         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
11349         (register_fields): Get the class type from GET_CPC and handle
11350         previous errors.  Added code to handle the creation of static
11351         fields in inner classes. Initialized fields initialization
11352         statements kept in a list of lists.
11353         (maybe_generate_finit): Initialized fields initialization
11354         statements kept in a list of lists. Use GET_CPC.
11355         (maybe_generate_clinit): Likewise.
11356         (method_header): Use GET_CPC and GET_CPC_UN.
11357         (parser_qualified_classname): Handle inner classes.
11358         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
11359         (java_fix_constructors): Hide pointer to enclosing context
11360         instance in constructor list when dealing with inner classes.
11361         (jdep_resolve_class): Call resolve_class with extra first argument
11362         JDEP_ENCLOSING.
11363         (resolve_class): Add enclosing context as a first extra argument
11364         to do_resolve_class.
11365         (do_resolve_class): Call find_as_inner_class. Handle WFLs
11366         properly.
11367         (resolve_no_layout): Extra argument added to resolve_class
11368         invocation.
11369         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
11370         (java_get_real_method_name): Use GET_CPC_UN.
11371         (check_abstract_method_definitions): Use DECL_CLINIT_P.
11372         (java_check_abstract_methods): Handle static method declared in
11373         inner classes by an error.
11374         (java_check_regular_methods): Use DECL_CLINIT_P.
11375         (source_start_java_method): Also set DECL_MAX_LOCALS.
11376         (create_artificial_method): Call java_parser_context_save_global
11377         and java_parser_context_restore_global instead of saving/restoring
11378         the context by hand.
11379         (expand_start_java_method): Improved verbose mode message.
11380         (java_complete_expand_methods): Fixed leading comment. Use
11381         DECL_CLINIT_P.
11382         (fix_constructors): Added assignment to this$<n> if necessary.
11383         (java_expand_classes): Call java_complete_expand_classes instead
11384         of java_complete_expand_methods.
11385         (make_qualified_primary): Simplified.
11386         (merge_qualified_name): Optimized for missing left or right parts.
11387         (resolve_expression_name): Handle access to outer class fields from
11388         interclasses.
11389         (resolve_qualified_expression_name): New macro
11390         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
11391         classes. Report error on non appropriate qualification of
11392         `new'. Handle qualified `this'.
11393         (not_accessible_p): Allow access to outer class private fields from
11394         inner classes.
11395         (patch_method_invocation): Handle method invocations through
11396         access methods and inner class constructor invocations.
11397         (find_applicable_accessible_methods_list): Search enclosing
11398         contexts of an inner class.
11399         (search_applicable_methods_list): Fixed typo.
11400         (argument_types_convertible): Handle inner class constructors'
11401         hidden outer context reference argument.
11402         (qualify_ambiguous_name): Handle qualified `this'.
11403         (java_complete_lhs): Handle use of field accessed through
11404         artificial access methods in various cases of assignments. Handle
11405         CLASS_LITERAL node.
11406         (check_final_assignment): Use DECL_CLINIT_P.
11407         (valid_ref_assignconv_cast_p): Handle the destination being an
11408         enclosing context of the source.
11409         (patch_unaryop): Handle use of field accessed through artificial
11410         access methods.
11411         (patch_return): Use DECL_CLINIT_P.
11412         (patch_throw_statement): Use DECL_CLINIT_P.
11413         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11414         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11415         ID_INIT_P.
11416
11417 2000-01-16  Anthony Green  <green@cygnus.com>
11418
11419         * parse.y (build_string_concatenation): Only use
11420         StringBuffer(String) shortcut if String arg is constant.
11421
11422 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11423
11424         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11425         the shift value to int. Fixed typo in comment.
11426
11427 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
11428
11429         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11430         * jcf-write.c: Likewise.
11431         * parse.y: Likewise.
11432         * parse.c: Regenerate.
11433
11434 2000-01-09  Anthony Green  <green@cygnus.com>
11435
11436         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11437         bytecodes in the correct order.
11438
11439 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11440
11441         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11442
11443 2000-01-06  Anthony Green  <green@cygnus.com>
11444
11445         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11446         before building constant array decl.
11447
11448 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11449
11450         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11451         method invocation and typo in conditional expression.
11452         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11453         the appropriate NOTE_POP.
11454         * parse.y (patch_binop): Shift value mask to feature the right
11455         type.
11456
11457 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11458
11459         * class.c (assume_compiled, assume_compiled_node): Add static
11460         prototype.
11461         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11462
11463         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11464
11465         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11466
11467         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11468         to `__modifier' to avoid stringifying it.
11469
11470         * parse.y (verify_constructor_circularity): Don't call a variadic
11471         function with a non-literal format string.
11472         (java_check_abstract_methods): Move unreachable code inside
11473         `continue' statement.
11474         (lookup_method_invoke): Call xstrdup, not strdup.
11475
11476         * expr.c (expand_java_field_op): Avoid the use of ANSI string
11477         concatenation.
11478
11479         * jcf-parse.c (yyparse): Likewise.
11480
11481         * jv-scan.c (main): Likewise.
11482
11483 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11484
11485         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11486         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11487         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11488         concatenation.
11489
11490         * parse.y (synchronized, variable_redefinition_error,
11491         check_class_interface_creation, create_interface, create_class,
11492         method_header, finish_method_declaration,
11493         check_modifiers_consistency, method_declarator,
11494         complete_class_report_errors, check_abstract_method_definitions,
11495         java_check_regular_methods, check_throws_clauses,
11496         java_check_abstract_methods, read_import_dir,
11497         check_pkg_class_access, declare_local_variables, fix_constructors,
11498         cut_identifier_in_qualified, resolve_expression_name,
11499         resolve_qualified_expression_name, patch_method_invocation,
11500         java_complete_lhs, patch_assignment, try_builtin_assignconv,
11501         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11502         patch_exit_expr, patch_exit_expr, patch_switch_statement,
11503         patch_try_statement, patch_synchronized_statement,
11504         patch_throw_statement, check_thrown_exceptions,
11505         patch_conditional_expr): Likewise.
11506
11507 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11508
11509         * Makefile.in (LIBDEPS): Added gcc's errors.o
11510         (../jcf-dump$(exeext):): Link with gcc's errors.o
11511         (../gcjh$(exeext):): Likewise.
11512         * expr.c (expand_java_NEW): Layout the entire target type instead of
11513         laying out its methods only.
11514         (lookup_field): Layout the class after having loaded it.
11515         * java-tree.h (java_debug_context): Declared.
11516         * jcf-io.c (toplev.h): Included.
11517         (find_class): Removed assignment to jcf's outofsynch
11518         field. Force source file to be read if newer than its matching
11519         class file. Tweaked debug messages.
11520         * jcf-parse.c (jcf_out_of_synch): Deleted.
11521         (read_class): Call to jcf_out_of_synch removed.
11522         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11523         (jcf_out_of_synch): Prototype deleted.
11524         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11525         `deprecated' and `class_err': integer turned into bit-fields.
11526         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
11527         * parse.y (package_list): New global.
11528         (package_declaration:): Record newly parsed package name.
11529         (extra_ctxp_pushed_p): Static global deleted.
11530         (java_parser_context_save_global): Create buffer context for the
11531         purpose of saving globals, if necessary.
11532         (java_parser_context_restore_global): Pop context pushed for the
11533         purpose of saving globals, if necessary.
11534         (java_debug_context_do): New prototype and function.
11535         (java_debug_context): Likewise.
11536         (do_resolve_class): Use already parsed package names to qualify
11537         and lookup class candidate.
11538         (java_pre_expand_clinit): Removed unnecessary local variable.
11539
11540 1999-12-17  Tom Tromey  <tromey@cygnus.com>
11541
11542         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
11543         fixes PR gcj/119.
11544         (process_file): Use `\n\' at end of each line in string.
11545
11546 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11547
11548         * expr.c (expand_invoke): Layout the loaded class before
11549         attempting to use it.
11550         (expand_java_field_op): Allow final field assignments to take
11551         place in $finit$.
11552         * typeck.c (convert): Return error_mark_node if expr is null.
11553
11554 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11555
11556         * class.c (class_depth): Return -1 if the class doesn't load
11557         properly.
11558         * expr.c (can_widen_reference_to): Check for errors during depth
11559         computation and return 0 accordingly.
11560         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11561         create default constructors and add an other error check.
11562         * parse.h (java_fix_constructors): Prototyped.
11563         * parse.y (java_pre_expand_clinit): Likewise.
11564         (build_super_invocation): Re-prototyped to feature one argument.
11565         (java_check_circular_reference): Directly use `current'.
11566         (java_fix_constructors): New function.
11567         (java_check_regular_methods): Don't create default constructors
11568         here, but abort if none were found.
11569         (java_complete_expand_methods): Pre-process <clinit> calling
11570         java_pre_expand_clinit.
11571         (java_pre_expand_clinit): New function.
11572         (fix_constructors): build_super_invocation invoked with the
11573         current method declaration as an argument.
11574         (build_super_invocation): Use the context of the processed method
11575         decl argument instead of current_class.
11576         * typeck.c (lookup_java_method): Take WFLs in method names into
11577         account.
11578
11579 1999-12-14  Per Bothner  <per@bothner.com>
11580
11581         * class.c (make_class_data): flag_keep_inline_functions to keep
11582         private methods in the method array.
11583
11584 1999-12-15  Anthony Green  <green@cygnus.com>
11585
11586         * check-init.c (check_init): Take into account both types of
11587         `throw's when checking for uninitialized variables.
11588
11589 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11590
11591         * parse.y (java_complete_lhs): Force conversion of array
11592         dimensions to int_type_node, that's what runtime's ABI expects.
11593
11594 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11595
11596         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11597         operand of a WFL, until the Java front-end gets fixed with regard
11598         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11599
11600 1999-12-10  Andrew Haley  <aph@cygnus.com>
11601
11602         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11603         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11604         expr.c (build_java_athrow): Add support for sjlj-exceptions.
11605         java-tree.h: Ditto.
11606         jcf-write.c: Ditto.
11607
11608 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11609
11610         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11611         before calling expand_eh_region_start and expand_start_all_catch.
11612         * except.c (expand_start_java_handler): Switch to permanent
11613         obstack before calling expand_eh_region_start.
11614         (expand_end_java_handler): Switch to permanent obstack before
11615         calling expand_start_all_catch.
11616
11617 1999-12-5  Anthony Green  <green@cygnus.com>
11618
11619         * decl.c (init_decl_processing): Mark throw_node as a noreturn
11620         function with side effects.
11621         (init_decl_processing): Mark all memory allocating DECLs with
11622         DECL_IS_MALLOC.
11623
11624 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11625
11626         * except.c (expand_end_java_handler): Call
11627         expand_resume_after_catch and end_catch_handler.
11628
11629 1999-11-30  Anthony Green  <green@cygnus.com>
11630
11631         * verify.c (verify_jvm_instructions): Create new return label
11632         chain if non existent (don't rely on the verified state of the jsr
11633         target.)
11634
11635 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11636
11637         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11638         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11639
11640         * parse.y (patch_assignment): Removed bogus final class test on
11641         lhs when checking on whether to emit an ArrayStoreException runtime
11642         check.
11643         * expr.c (expand_java_arraystore): Likewise.
11644
11645 1999-11-28 Anthony Green <green@cygnus.com>
11646
11647         * decl.c (find_local_variable): Reuse single slot decls when
11648           appropriate.
11649
11650 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11651
11652         * jcf-parse.c (saw_java_source): Global variable removed.
11653         (read_class): Don't use `saw_java_source'. Added extra braces.
11654         (yyparse): Code setting `saw_java_source' removed.
11655
11656 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
11657
11658         * except.c (emit_handlers): Zero catch_clauses after emitting them.
11659
11660 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11661
11662         * verify.c (merge_type_state): Non verified subroutines being
11663         considered more than once to trigger passive type merge.
11664
11665 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11666
11667         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11668         in case of error. Error message tuned.
11669
11670 1999-11-21  Anthony Green  <green@cygnus.com>
11671
11672         * constants.c (find_methodref_index): Unwrap method names before
11673         inserting them in the constant pool.
11674
11675         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11676
11677         * class.c (assume_compiled_node): New typedef.
11678         (assume_compiled_tree): New static data.
11679         (find_assume_compiled_node): New function.
11680         (add_assume_compiled): New function.
11681         (assume_compiled): New function.
11682         * class.c (make_class_data): Use assume_compiled.
11683         (is_compiled_class): Use assume_compiled.
11684
11685         * java-tree.h (add_assume_compiled): Declare.
11686
11687         * lang.c (lang_decode_option): Parse new options.
11688
11689 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11690
11691         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11692         int_type_node: that's what `_Jv_AllocObject' expects.
11693
11694 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11695
11696         * parse.y (lookup_method_invoke): Use lang_printable_name to
11697         reliably build the type name during error report. Fixes PR gcj/97.
11698
11699 1999-11-09  Tom Tromey  <tromey@cygnus.com>
11700
11701         * jcf-path.c: Include <sys/stat.h>.
11702         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
11703         (DIR_UP): New macro.
11704
11705 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11706
11707         * parse.y (source_end_java_method): Resume permanent allocation,
11708         reversing Apr 27 1998 patch.
11709         (patch_string_cst): Pop obstacks after having pushed the permanent
11710         ones.
11711
11712 1999-11-05  Tom Tromey  <tromey@cygnus.com>
11713
11714         * class.c (finish_class): Emit inlined methods if any native
11715         methods exist in the class.  Fixes PR gcj/85.
11716
11717 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11718
11719         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11720         (qualify_ambiguous_name): Likewise.
11721
11722 1999-11-03  Godmar Back <gback@cs.utah.edu>
11723
11724         * typeck.c: (lookup_java_method):  search all inherited
11725         interfaces when looking up interface method.
11726
11727 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11728
11729         * parse.y (method_header:): Issue error message for rule `type
11730         error'.
11731         (synchronized:): Error report when not using synchronized.
11732
11733 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11734
11735         * parse.y (resolve_qualified_expression_name): Prevent `this' from
11736         being used before the superclass constructor has been called.
11737         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11738         instead of `CALL_THIS_CONSTRUCTOR_P'.
11739
11740 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
11741
11742         * check-init.c: Fix typo in comment.
11743
11744 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11745
11746         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11747         and final method.
11748
11749 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11750
11751         * parse.y (expression_statement:): Call function to report
11752         improper invocation of a constructor.
11753         (parse_ctor_invocation_error): New function.
11754
11755 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
11756
11757         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11758         remember_end_note.
11759
11760 1999-10-21  Tom Tromey  <tromey@cygnus.com>
11761
11762         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11763         in generated `main'.
11764
11765 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11766
11767         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11768         (qualify_ambiguous_name): Likewise.
11769
11770 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11771
11772         * parse.y (java_complete_tree): fold_constant_for_init to work on
11773         permanent_obstack.
11774         (java_complete_lhs): Likewise.
11775         (array_constructor_check_entry): Complete an initializer element
11776         on permanent_obstack.
11777
11778 1999-10-19  Tom Tromey  <tromey@cygnus.com>
11779
11780         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11781         From Mike Moreton <mike@pillim.demon.co.uk>.
11782
11783 1999-10-15  Greg McGary  <gkm@gnu.org>
11784
11785         * java-tree.h (flag_bounds_check): Remove extern decl.
11786         * lang.c (flag_bounds_check): Remove global variable.
11787         (lang_f_options): Remove "bounds-check" entry.
11788         (lang_init_options): Default flag_bounds_check to "on".
11789
11790 1999-10-14  Tom Tromey  <tromey@cygnus.com>
11791
11792         * jvgenmain.c (usage): New function.
11793         (main): Use it.  Also, handle `-D' options.
11794         * jvspec.c (lang_specific_driver): Recognize -D.
11795         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11796
11797         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11798
11799 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11800
11801         * jcf-dump.c (print_constant, disassemble_method): Don't call a
11802         variadic function with a non-literal format string.
11803
11804         * parse-scan.y (report_main_declaration): Likewise.
11805
11806         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11807
11808         * parse.y (read_import_dir, patch_assignment, patch_binop,
11809         patch_array_ref): Likewise.
11810
11811         * typeck.c (build_java_array_type): Likewise.
11812
11813         * verify.c (verify_jvm_instructions): Likewise.
11814
11815 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11816
11817         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11818
11819 1999-10-07  Anthony Green  <green@cygnus.com>
11820
11821         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11822         where CHECK_PUT may fail for valid reasons.
11823
11824         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11825         UNSAFE_PUTN): New macros.
11826
11827 1999-10-04  Tom Tromey  <tromey@cygnus.com>
11828
11829         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11830         well.  Fixes Java PR gcj/59.
11831         * parse-scan.y (yyerror): Report errors.
11832
11833 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
11834
11835         * decl.c (insert_block): Remove unconditional `abort'.
11836
11837 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
11838
11839         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
11840         FUNCTION_CODE now of type int.  All callers changed.
11841         Set the builtin's DECL_BUILT_IN_CLASS.
11842
11843 1999-09-23  Tom Tromey  <tromey@cygnus.com>
11844
11845         * jvspec.c (lang_specific_driver): Don't read spec file if
11846         -fsyntax-only given.
11847
11848 1999-09-22  Tom Tromey  <tromey@cygnus.com>
11849
11850         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11851
11852         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11853         (WORDS_TO_LONG): Likewise.
11854         (WORDS_TO_DOUBLE): Likewise.
11855
11856 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11857
11858         * jcf-write.c (RELOCATION_VALUE_0): New macro.
11859         (RELOCATION_VALUE_1): Likewise.
11860         (emit_iinc, emit_reloc, push_constant1, push_constant2,
11861         push_in_const, push_long_const): Prototyped.
11862         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11863         (push_constant2): Likewise.
11864         (push_int_const): Cast find_constant1's integer arguments to `jword'.
11865         (find_constant_wide): Cast find_constant2's integer arguments to
11866         `jword'.
11867         (find_constant_index): Cast find_constant2's and find_constant2's
11868         integer arguments to `jword'.
11869         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11870         (emit_switch_reloc): Use RELOCATION_VALUE_0.
11871         (emit_if): Use RELOCATION_VALUE_1.
11872         (emit_goto): Likewise.
11873         (emit_jsr): Likewise.
11874         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11875         argument to push_long_const to HOST_WIDE_INT.
11876
11877 1999-09-15  Andreas Schwab  <schwab@suse.de>
11878
11879         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11880
11881 1999-09-20  Nick Clifton  <nickc@cygnus.com>
11882
11883         * lang.c (lang_decode_option): Extend comment.
11884
11885 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11886
11887         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11888         instead of fndecl.
11889
11890 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11891
11892         * gjavah.c (get_field_name, print_method_info, print_include,
11893         add_namelet): Use xmalloc, not malloc.
11894
11895         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
11896         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11897         NULL pointer.
11898
11899         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11900
11901         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11902
11903         * jcf-path.c (add_entry): Likewise.
11904
11905         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11906
11907         * jv-scan.c (xmalloc): Remove definition.
11908
11909         * jvgenmain.c (xmalloc): Likewise.
11910
11911         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11912
11913         * lex.c (java_store_unicode): Use xrealloc, not realloc.
11914
11915         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
11916         concat, not xmalloc/sprintf.
11917         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11918         (xstrdup): Remove definition.
11919
11920         * parse.y (duplicate_declaration_error_p,
11921         constructor_circularity_msg, verify_constructor_circularity,
11922         check_abstract_method_definitions, java_check_regular_methods,
11923         java_check_abstract_methods, patch_method_invocation,
11924         check_for_static_method_reference, patch_assignment, patch_binop,
11925         patch_cast, array_constructor_check_entry, patch_return,
11926         patch_conditional_expr): Use xstrdup, not strdup.
11927
11928         * zextract.c (ALLOC): Use xmalloc, not malloc.
11929
11930 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11931
11932         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11933
11934         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
11935         (do_spec, lang_specific_pre_link, lang_specific_driver,
11936         input_filename, input_filename_length): Don't declare.
11937         (main_class_name, jvgenmain_spec, lang_specific_driver):
11938         Constify a char*.
11939         (lang_specific_driver): All calls to the function pointer
11940         parameter now explicitly call `fatal'.
11941
11942 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11943
11944         * parse.y (find_applicable_accessible_methods_list): Search
11945         abstract classes as interfaces.
11946
11947 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11948
11949         * class.c (finish_class): We're now outside a valid method
11950         declaration. Tell the rest of gcc so.
11951
11952 1999-09-08  Bruce Korb  autogen@linuxbox.com
11953
11954         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11955
11956 1999-09-07  Tom Tromey  <tromey@cygnus.com>
11957
11958         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11959         java-array.h.
11960         (decode_signature_piece): Don't emit "::" in JArray<>.
11961         (print_namelet): Only print trailing `;' when printing a class.
11962
11963 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
11964
11965         * java-tree.h: Delete declarations for all tree nodes now moved to
11966         global_trees.
11967         * decl.c: Delete their definitions.
11968
11969 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
11970
11971         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11972         * Makefile.in (OBJS): Add ggc-callbacks.o.
11973         (OBJDEPS): Likewise.
11974
11975 1999-09-03  Tom Tromey  <tromey@cygnus.com>
11976
11977         * parse.y (strip_out_static_field_access_decl): Return operand if
11978         it satisfies JDECL_P.
11979
11980 1999-09-02  Tom Tromey  <tromey@cygnus.com>
11981
11982         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
11983         Handle nested arrays, like `[[I'.
11984
11985 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11986
11987         * class.c (finish_class): Remove unused parameter, all callers
11988         changed.
11989
11990         * expr.c (build_java_athrow): Change return type to void.
11991         (java_lang_expand_expr): Make sure each case in switch returns a
11992         value.
11993
11994         * java-tree.h (finish_class): Fix prototype to take void args.
11995
11996         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
11997         (main): Issue return from main, not exit.
11998
11999         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
12000
12001         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
12002
12003         * jv-scan.c (main): Issue return from main, not exit.
12004
12005         * parse.y (check_abstract_method_definitions,
12006         java_check_abstract_method_definitions): Add static prototypes.
12007         (java_complete_expand_methods): Fix call to `finish_class'.
12008
12009         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
12010         and `prevpc'.
12011
12012 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12013
12014         * lang.c (language_string): Constify.
12015
12016 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12017
12018         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
12019         Remove hacks for stuff which comes from libiberty.
12020
12021         * Make-lang.in: Likewise.
12022
12023 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
12024
12025         * Makefile.in (xref.o): Depend on xref.c explicitly.
12026
12027 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12028
12029         * java-tree.h (lang_printable_name): Constify a char*.
12030
12031         * lang.c (lang_printable_name): Likewise.
12032
12033 1999-08-27  Jeffrey A Law  (law@cygnus.com)
12034
12035         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
12036         comments in C code.
12037
12038 1999-08-26  Tom Tromey  <tromey@cygnus.com>
12039
12040         * gjavah.c (print_cxx_classname): Print "::" before qualified
12041         name.
12042
12043 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12044
12045         * parse.y (lookup_cl): Changed leading comment. Now does its best
12046         to set the column number.
12047         (qualify_ambiguous_name): Take WFL wrappers into account.
12048
12049 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
12050
12051         * verify.c (verify_jvm_instructions): Don't check instruction
12052         validity beyond end of method.
12053
12054 1999-08-25  Tom Tromey  <tromey@cygnus.com>
12055
12056         * jvspec.c (lang_specific_driver): Correctly handle --help again.
12057
12058 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12059
12060         * gjavah.c (print_name, print_base_classname, utf8_cmp,
12061         cxx_keyword_subst, generate_access, name_is_method_p,
12062         get_field_name, print_field_name, super_class_name, print_include,
12063         decode_signature_piece, print_class_decls, usage, help,
12064         java_no_argument, version, add_namelet, print_namelet): Add static
12065         prototype.
12066         (print_base_classname, utf8_cmp, cxx_keyword_subst,
12067         name_is_method_p): Constify a char*.
12068         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
12069         Provide a final else clause in an if-else-if.
12070         (print_field_info): Add missing final arg in function call to
12071         `print_field_name'.
12072         (print_method_info, decompile_method, decode_signature_piece,
12073         print_c_decl, print_full_cxx_name, print_stub,
12074         print_mangled_classname, super_class_name, print_include,
12075         add_namelet, add_class_decl, print_class_decls, process_file,
12076         help): Constify a char*.
12077
12078         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
12079         push_int_const, find_constant_wide, find_constant_index,
12080         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
12081         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
12082         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
12083         emit_if, emit_goto, emit_jsr, call_cleanups,
12084         make_class_file_name): Add static prototypes.
12085         (generate_bytecode_return, generate_bytecode_insns): Pass a
12086         NULL_PTR, not a NULL_TREE.
12087
12088         * jv-scan.c: Include "jcf.h".
12089         (main): Declare using DEFUN macro.
12090
12091         * jvspec.c (find_spec_file, lang_specific_pre_link,
12092         lang_specific_driver): Add prototypes.
12093         (find_spec_file): Constify a char*.
12094
12095         * keyword.gperf (hash, java_keyword): Add prototypes.
12096
12097         * lang.c (lang_print_error): Add static prototype.
12098         (lang_init): Prefer memcpy over bcopy to avoid casts.
12099
12100         * lex.c (yylex): Add static prototype.
12101
12102         * parse-scan.y: Include "lex.c" earlier.
12103
12104         * parse.h: Remove redundant declaration for `yylex'.
12105
12106         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
12107         labeled_block_contains_loop_p): Add static prototypes.
12108         (not_accessible_p): Make static to match prototype.
12109
12110         * verify.c (start_pc_cmp): Don't needlessly cast away const.
12111
12112 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12113
12114         * parse.y (check_method_redefinition): Changed leading comment.
12115         (check_abstract_method_definitions): New function.
12116         (java_check_abstract_method_definitions): New function.
12117         (java_check_regular_methods): Call it.
12118         (verify_constructor_super): Fixed indentation.
12119         (lookup_method_invoke): Likewise.
12120
12121 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12122
12123         * parse.y (method_header): Return a null pointer if the current
12124         class node is null.
12125         (finish_method_declaration): Return if the current function decl
12126         is null.
12127         (source_start_java_method): Likewise.
12128         (java_method_add_stmt): Likewise.
12129
12130 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12131
12132         * class.c (emit_register_class): Removed unnecessary call to
12133         start_sequence.
12134         * parse.y (labeled_block_contains_loop_p): Removed unused local
12135         variable.
12136
12137 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12138
12139         * parse.y (java_refold): Added prototype.
12140
12141 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12142
12143         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
12144         (java_stabilize_reference): Removed unnecessary `else'.
12145         (java_complete_lhs): Set flag to remember boolean. Call
12146         java_refold. Added comments.
12147         (java_decl_equiv): New function.
12148         (binop_compound_p): Likewise.
12149         (java_refold): Likewise.
12150         (patch_unaryop): Striped static field access assigned to decl and
12151         op. Changed promotion scheme for ++/-- operators.
12152         (search_loop): New function.
12153         (labeled_block_contains_loop_p): Likewise.
12154         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
12155         comment.
12156         (patch_bc_statement): Call search_loop. Fixed comment.
12157
12158 1999-08-14  Anthony Green  <green@cygnus.com>
12159
12160         * expr.c (java_lang_expand_expr): Mark static array data as
12161         referenced.
12162
12163 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
12164
12165         * jvgenmain.c (main): NUL-terminate name_obstack.
12166
12167 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12168
12169         * check-init.c (check_bool2_init, done_alternative): Add static
12170         prototypes.
12171
12172         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
12173         (add_method, build_utf8_ref, build_class_ref,
12174         append_gpp_mangled_type, layout_class_method): Constify a char*.
12175
12176         * decl.c (push_promoted_type, make_binding_level): Add static
12177         prototypes.
12178         (push_promoted_type, pushdecl): Constify a char*.
12179
12180         * except.c (find_handler_in_range, link_handler,
12181         check_start_handlers): Add static prototypes.
12182
12183         * expr.c (process_jvm_instruction): Constify a char*.
12184
12185         * gjavah.c (main): Constify a char*.
12186
12187         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
12188         Constify a char*.
12189
12190         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
12191         static prototypes.
12192         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
12193         munge, print_ents): Constify a char*.
12194
12195         * jcf-dump.c (disassemble_method): Constify a char*.
12196         (print_constant_pool, print_exception_table): Add static prototypes.
12197         (print_constant, print_exception_table, main, disassemble_method):
12198         Constify a char*.
12199
12200         * jcf-io.c (find_classfile, find_class): Likewise.
12201
12202         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
12203         (set_source_filename, predefined_filename_p): Add static prototypes.
12204         (set_source_filename, get_constant, get_class_constant,
12205         find_in_current_zip): Constify a char*.
12206
12207         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
12208         static prototypes.
12209         (add_entry, add_path, jcf_path_classpath_arg,
12210         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12211
12212         * jcf-reader.c (get_attribute, jcf_parse_preamble,
12213         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
12214         jcf_parse_one_method, jcf_parse_methods,
12215         jcf_parse_final_attributes): Add static prototypes.
12216         (get_attribute): Constify a char*.
12217
12218         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
12219         jcf_dependency_add_target, jcf_path_classpath_arg,
12220         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12221
12222         * jv-scan.c (main): Constify a char*.
12223         (gcc_obstack_init): Add prototype arguments.
12224
12225         * jvgenmain.c (gcc_obstack_init): Likewise.
12226         (main): Constify a char*.
12227
12228         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
12229         static prototypes.
12230         (put_decl_string, lang_print_error): Constify a char*.
12231         (lang_init): Remove redundant extern prototype.
12232
12233         * mangle.c (emit_unicode_mangled_name): Constify a char*.
12234
12235         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
12236         Add static prototypes.
12237         (get_type_from_signature): Constify a char*.
12238
12239         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
12240         Add static prototypes.
12241         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
12242         (verify_jvm_instructions): Constify a char*.
12243
12244         * xref.c (xref_flag_value): Likewise.
12245
12246         * xref.h (xref_flag_value): Likewise.
12247
12248         * zextract.c (makeword, makelong): Add static prototypes.
12249         (makeword, makelong): Constify a uch*.
12250
12251 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12252
12253         * lang.c (java_dummy_print): Constify a char*.
12254         (lang_print_error): Likewise.
12255         (lang_init): Remove redundant prototype for `print_error_function'.
12256         (lang_init_source): Likewise.
12257         (lang_identify): Constify a char*.
12258
12259 1999-08-09  Tom Tromey  <tromey@cygnus.com>
12260
12261         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
12262         (WORDS_TO_LONG): Likewise.
12263         (WORDS_TO_DOUBLE): Likewise.
12264
12265 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12266
12267         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
12268
12269         * expr.c (java_stack_pop, java_array_data_offset,
12270         build_java_throw_out_of_bounds_exception, case_identity,
12271         build_java_check_indexed_type): Add static prototypes.
12272         (linenumber_table, expand_invoke, expand_java_field_op,
12273         build_primtype_type_ref, expand_byte_code): Constify a char*.
12274
12275         * java-tree.h (build_primtype_type_ref, linenumber_table):
12276         Constify a char*.
12277         (java_lang_expand_expr): Add prototype.
12278
12279         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
12280         `java_lang_expand_expr'.
12281
12282         * lex.c (java_lex_error): Constify a char*.
12283         (java_get_unicode, java_read_char, java_allocate_new_line,
12284         java_unget_unicode, java_sneak_unicode): Prototype.
12285
12286         * parse-scan.y (current_class, package_name, method_declarator,
12287         report_class_declaration, yyerror): Constify a char*.
12288
12289         * parse.h (java_report_errors): Prototype.
12290         (yyerror): Constify a char*.
12291
12292         * parse.y (classitf_redefinition_error, check_modifiers,
12293         parse_jdk1_1_error, lookup_package_type,
12294         lookup_package_type_and_set_next, get_printable_method_name,
12295         purify_type_name): Constify a char*.
12296         (build_super_invocation, maybe_generate_finit,
12297         verify_constructor_super, parser_add_interface,
12298         add_superinterfaces, jdep_resolve_class, note_possible_classname,
12299         java_complete_expand_methods, java_expand_finals,
12300         cut_identifier_in_qualified, java_stabilize_reference,
12301         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
12302         merge_string_cste): Prototype.
12303         (single_type_import_declaration, yyerror,
12304         variable_redefinition_error, build_array_from_name,
12305         build_unresolved_array_type, check_class_interface_creation,
12306         resolve_class, complete_class_report_errors,
12307         note_possible_classname, read_import_dir,
12308         find_in_imports_on_demand, resolve_package, fix_constructors,
12309         check_deprecation, lookup_method_invoke,
12310         maybe_build_primttype_type_ref, array_constructor_check_entry):
12311         Constify a char*.
12312         (java_complete_expand_methods, java_expand_finals): Make static.
12313         (convert_narrow): Remove static prototype.
12314
12315 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
12316
12317         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
12318
12319 1999-08-02  Richard Henderson  <rth@cygnus.com>
12320
12321         * decl.c: Include defaults.h instead of expr.h.
12322         * parse.y: Likewise.
12323
12324 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
12325
12326         * java/decl.c (start_java_method): Change all uses of
12327         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
12328         Ensure expr.h is included.
12329         * java/expr.c (pop_arguments): Ditto.
12330         * java/parse.y (expand_start_java_method): Ditto.
12331
12332 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12333
12334         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
12335
12336 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
12337
12338         * decl.c: Include "function.h".
12339         * except.c: Likewise.
12340         * parse.y: Likewise.
12341         * Makefile.in: Update dependencies.
12342
12343 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12344
12345         * expr.c (build_java_soft_divmod): Provide a default case in switch.
12346         (java_lang_expand_expr): Mark parameters `target', `tmode' and
12347         `modifier' with ATTRIBUTE_UNUSED.
12348
12349         * gjavah.c (process_file): Add braces around ambiguous `else'.
12350
12351         * jcf-dump.c (print_access_flags, localvar_free): Change return
12352         type to void.
12353
12354         * parse.y (java_complete_expand_method): Initialize variable
12355         `exception_copy'.
12356         (resolve_qualified_expression_name): Likewise for `field_decl'.
12357         (patch_method_invocation): Likewise for `class_to_search'.
12358         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
12359         (patch_assignment): Likewise for `lhs_type'.
12360
12361         * verify.c (verify_jvm_instructions): Remove unused variable
12362         `caller'.
12363
12364 1999-07-25  Richard Henderson  <rth@cygnus.com>
12365
12366         * decl.c (va_list_type_node): New.
12367
12368 1999-07-25  Anthony Green  <green@cygnus.com>
12369
12370         * gjavah.c (print_stub): New function.
12371         (METHOD_IS_NATIVE): New macro.
12372         (print_mangled_classname): Make static.
12373         (HANDLE_END_FIELD): Don't emit fields during stub generation.
12374         (process_file): Perform stub generation.
12375         (HANDLE_METHOD): Don't emit class decls during stub
12376         generation.
12377         (HANDLE_END_METHOD): Take into account stub generation.
12378         (print_method_info): Handle stub generation.
12379         (print_stub): New function.
12380         (print_cxx_classname): Make signature consistant with others.
12381         (help): Describe -stubs option.
12382         (main): Create stub file.
12383         (version): Use version.c.
12384         (print_full_cxx_name): New function.
12385         (print_c_decl): Use print_full_cxx_name.
12386
12387 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12388
12389         * check-init.c (check_init): Handle MAX_EXPR.
12390
12391 1999-07-15  Andrew Haley  <aph@cygnus.com>
12392
12393         * lang.c (flag_use_divide_subroutine): New variable.
12394         * typeck.c: (convert_ieee_real_to_integer): Bounds check
12395         fp-to-integer conversion.
12396         (convert): Call convert_ieee_real_to_integer when flag_fast_math
12397         is not set.
12398
12399         * expr.c (build_java_soft_divmod): New function.
12400         (build_java_binop): Call build_java_soft_divmod if
12401         flag_use_divide_subroutine is set.
12402         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12403         soft_lrem_node: new builtin functions.
12404         (init_decl_processing) Initialize the new builtins.
12405         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12406         soft_lrem_node: new builtin functions.
12407         (build_java_soft_divmod): New function.
12408         * parse.y: Call build_java_soft_divmod if
12409         flag_use_divide_subroutine is set.
12410         * parse.c: Rebuilt.
12411
12412         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12413         a --specs= arg) even if not linking.
12414         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12415         -fuse-divide-subroutine
12416
12417 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12418
12419         * parse.y (resolve_and_layout): Check methods only once.
12420         (resolve_qualified_expression_name): Verify thrown exceptions
12421         compatibility.
12422         (check_thrown_exceptions): Reject exceptions thrown in
12423         initializer. Error message tuned.
12424
12425 1999-07-14  Andrew Haley  <aph@cygnus.com>
12426
12427         * expr.c (expand_expr): Do not return the last statement in a
12428         block as the block's value.
12429
12430 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12431
12432         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12433         CALL_EXPR, to avoid order of evaluation changes.
12434
12435 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12436
12437         * parse.y (qualify_ambiguous_name): Do not use
12438         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12439
12440 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12441
12442         * check-init.c (check_init): Handle MAX_EXPR.
12443         * expr.c (force_evaluation_order): Force method call arguments to
12444         be evaluated in left-to-right order.
12445         * parse.y (qualify_ambiguous_name): Loop again to qualify
12446         NEW_ARRAY_EXPR properly.
12447
12448 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12449
12450         * parse.y (patch_invoke): Resolve unresolved invoked method
12451         returned type.
12452         (qualify_ambiguous_name): STRING_CST to qualify expression for
12453         type name resolution.
12454
12455 1999-06-24  Andrew Haley  <aph@cygnus.com>
12456
12457         * class.c (finish_class): Whenever a deferred method is
12458         output, rescan the list of methods to see if a new candidate for
12459         output can be found.
12460
12461 1999-06-28  Tom Tromey  <tromey@cygnus.com>
12462
12463         * jvspec.c (lang_specific_driver): Recognize --help.
12464
12465 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12466
12467         * parse.y (resolve_package): Fixed bogus return statement.
12468         (patch_method_invocation): Resolve method invocation beginning with
12469         a package name qualifier.
12470
12471 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12472
12473         * Make-lang.in (java.stage1): Depend on stage1-start.
12474         (java.stage2): Likewise for stage2-start.
12475         (java.stage3): Likewise for stage3-start.
12476         (java.stage4): Likewise for stage4-start.
12477
12478 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12479
12480         * parse.y (java_complete_lhs): When doing cross referencing, don't
12481         try to keep file location on a WFL expanded as a CALL_EXPR.
12482
12483 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12484
12485         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12486         compiling to class file a void method with an empty method body.
12487         As a side effect, the bytecode backend will generate the
12488         appropriate `return' instruction.
12489
12490 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12491
12492         * parse.y (lookup_package_type_and_set_next): New function prototype.
12493         (resolve_package): Search current and imported packages.
12494         (lookup_package_type_and_set_next): New function.
12495
12496 1999-06-22  Andrew Haley  <aph@cygnus.com>
12497
12498         * verify.c (verify_jvm_instructions): Check for pending blocks
12499         before invalid PC test and opcode switch, not after.
12500
12501 1999-06-21  Andrew Haley  <aph@cygnus.com>
12502
12503         * except.c (find_handler_in_range): The upper limit for exception
12504         ranges is exclusive, not inclusive: (start <= pc < end).
12505         (link_handler): find child pointer which points to outer by
12506         searching sibling list: previous code incorrectly assumed that
12507         outer->outer->first_child must point to outer.
12508         * verify.c (verify_jvm_instructions): FIXME added to code for
12509         `athrow'.
12510         (verify_jvm_instructions): Do not assume that the last block
12511         processed in a subroutine is a block which ends with a `ret'
12512         instruction.  With some control flows it is possible that the last
12513         block ends with an `athrow'.
12514
12515 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12516
12517         * parse.y (qualify_ambiguous_name): Reorganized the post
12518         evaluation of non WFL leading expression nodes.
12519
12520 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12521
12522         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12523         CONVERT_EXPR.
12524
12525 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12526
12527         * parse.y (qualify_ambiguous_name): Handle qualified expression
12528         beginning with a STRING_CST.
12529
12530 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12531
12532         * parse.y (register_fields): Set DECL_INITIAL on both
12533         pre-initialized static and public fields.
12534         (resolve_field_access): Static field access expressions to always
12535         use pointer types.
12536         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
12537         qualification. CONVERT_EXPR to be resolved as an expression name.
12538         (java_complete_lhs): Identify and access qualified final
12539         initialized field in switch statement case expression.
12540         (fold_constant_for_init): Pre-initialized field decl constant to
12541         be folded.
12542
12543 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12544
12545         * parse.y (note_possible_classname): Mark returned node with
12546         QUALIFIED_P only if the original class name contained a '/'.
12547
12548 1999-06-05  Anthony Green  <green@cygnus.com>
12549
12550         * Make-lang.in (gcjh): More parallel build fixes.
12551
12552 1999-06-03  Mike Stump  <mrs@wrs.com>
12553
12554         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12555
12556 1999-06-02  Anthony Green  <green@cygnus.com>
12557
12558         * except.c (link_handler): Chain exception handlers in order.
12559
12560 1999-06-02  Anthony Green  <green@cygnus.com>
12561
12562         * expr.c (expand_byte_code): Fill unreachable bytecode regions
12563         with nops and process as usual in order to always set correct EH
12564         ranges.  Emit detailed warnings about unreachable bytecodes.
12565
12566 1999-06-02  Anthony Green  <green@cygnus.com>
12567
12568         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12569         constant.
12570
12571 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12572
12573         * parse.y (lookup_field_wrapper): Unified returned value to NULL
12574           or the searched field decl.
12575
12576 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12577
12578         * parse.y (fold_constant_for_init): Convert numerical constant
12579         values to the type of the assigned field.
12580
12581 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12582
12583         * expr.c (lookup_field): Relaxed the test on class loading error
12584         detection.
12585         * parse.y (fold_constant_for_init): Enabeled old code.
12586
12587 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12588
12589         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12590         decide the validity of the cast of a java.lang.Cloneable reference
12591         to an array.
12592         (patch_conditional_expr): Fixed first argument passed to
12593         binary_numeric_promotion.
12594
12595 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12596
12597         * parse.y (qualify_ambiguous_name): Take into account that a
12598         CONVERT_EXPR might specify a type as a WFL.
12599
12600 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12601
12602         * parse.y (patch_assignment): Save the rhs before using it as an
12603         argument to _Jv_CheckArrayStore.
12604
12605 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12606
12607         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12608
12609 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12610
12611         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12612         floating point literal only when the exponent indicator has been
12613         parsed.
12614
12615 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12616
12617         * parse.y (formal_parameter:): Construct argument tree list
12618         element even if a yet unsupported final parameter was encountered.
12619
12620 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12621
12622         * parse.y (finish_method_declaration): Issue errors for native or
12623         abstract methods declared with a method body, as well as for non
12624         native or non abstract methods with no method body.
12625
12626 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12627
12628         * class.c (build_utf8_ref): Initialize variable `field'.
12629
12630         * decl.c (init_decl_processing): Initialize variable `field'.
12631
12632         * expr.c (build_known_method_ref): Mark parameters `method_type',
12633         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12634         (process_jvm_instruction): Likewise for parameter `length'.
12635
12636         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12637         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12638         ATTRIBUTE_UNUSED.
12639
12640         * parse.y (maybe_generate_clinit): Remove unused variable
12641         `has_non_primitive_fields'.
12642         (find_in_imports_on_demand): Initialize variables `node_to_use'
12643         and `cl'.
12644         (patch_binop): Likewise for variable `prom_type'.
12645         (patch_unaryop): Likewise for variable `prom_type'.
12646
12647         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12648
12649         * xref.c (xref_table): Add missing initializer.
12650
12651 1999-05-14  Tom Tromey  <tromey@cygnus.com>
12652
12653         * java-except.h (struct eh_range): Removed unused `next' member.
12654         * verify.c (verify_jvm_instructions): Call check_nested_ranges
12655         after adding all exception handlers.  Sort exception ranges in
12656         order of start PC.
12657         (struct pc_index): New structure.
12658         (start_pc_cmp): New function.
12659         * except.c (add_handler): Return `void'.  Don't call link_handler;
12660         instead construct an ordinary linked list and do range
12661         coalescing.
12662         (check_nested_ranges): New function.
12663         (link_handler): Changed interface to allow merging of eh_ranges.
12664         Split overlapping ranges.  Return `void'.
12665
12666 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12667
12668         * parse.y (constructor_block_end:): New rule, tagged <node>.
12669         (constructor_body:): Use `constructor_block_end' instead of
12670         `block_end'.
12671
12672 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12673
12674         * parse.y (statement_nsi:): Pop `for' statement block.
12675         (java_complete_lhs): Labeled blocks containing no statement are
12676         marked as completing normally.
12677
12678 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12679
12680         * xref.c (xref_set_current_fp): New function, defined.
12681         * xref.h (xref_set_current_fp): New function, prototyped.
12682
12683 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12684
12685         * check-init.c (check_init): Take into account that
12686         LABELED_BLOCK_STMT can be empty.
12687
12688 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12689
12690         * parse.y (java_check_regular_methods): Warning check on not
12691         overriding methods with default access in other packages does not
12692         apply to `<clinit>'.
12693         (java_complete_lhs): If block body is an empty_stmt_node, replace
12694         it by NULL_TREE. This prevents gcc from generating an irrelevant
12695         warning.
12696
12697 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12698
12699         * check-init.c (check_init): Removed code accepting to see things
12700         falling through default:, when doing xrefs.
12701         * java-tree.h (do_not_fold): New global variable, declared.
12702         * parse.y (do_not_fold): New global variable, defined.
12703         (java_complete_expand_method): Set `do_not_fold' to the value of
12704         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12705         and reinstall them after them have been purged; do not check for
12706         initializations; do not issue missing return errors.
12707         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12708         when doing xrefs.
12709         (patch_binop): Skip the fold part when doing xrefs.
12710         (build_string_concatenation): Skip the concatenation part when
12711         doing xrefs.
12712         (patch_synchronized_statement): Do not generate a try-finally when
12713         doing xrefs.
12714         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12715         and keep the location where the throw was seen.
12716         * typeck.c (convert): When `do_not_fold' is set, do not attempt
12717         any treatment on the converted node an simply return a NOP_EXPR of
12718         the targeted type.
12719         * xref.c (xref_get_data): New function, defined.
12720         * xref.h (xref_get_data): New function, declared.
12721         (XREF_GET_DATA): Use xref_get_data.
12722
12723 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12724
12725         * gjavah.c (print_include): Cast the result of `strlen' to int
12726         when comparing against a signed value.
12727         (add_namelet): Likewise.
12728
12729 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12730
12731         * expr.c (expand_invoke): Mark parameter `nargs' with
12732         ATTRIBUTE_UNUSED.
12733         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12734
12735         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12736         ATTRIBUTE_UNUSED.
12737
12738         * jcf-reader.c (get_attribute): Cast a value to long
12739         when comparing against a signed expression.  Likewise.
12740
12741         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12742         HOST_BITS_PER_CHAR.
12743
12744 1999-05-11  Andrew Haley  <aph@cygnus.com>
12745
12746         * parse.y (source_end_java_method): If the current method contains
12747         any exception handlers, force asynchronous_exceptions: this is
12748         necessary because signal handlers in libjava may throw exceptions.
12749         * decl.c (end_java_method): Ditto.
12750
12751 1999-05-11  Tom Tromey  <tromey@cygnus.com>
12752
12753         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12754         flags.
12755         * jvspec.c (THREAD_NAME): Removed.
12756         (GC_NAME): Likewise.
12757         (MATHLIB): Likewise.
12758         (WITHLIBC): Likewise.
12759         (GCLIB): Likewise.
12760         (THREADLIB): Likewise.
12761         (MATH_LIBRARY): Likewise.
12762         (lang_specific_driver): Don't add `-l' options to command line.
12763         Instead, add a single --specs option.  Recognize `-L' options and
12764         use them to search for spec file.
12765         (find_spec_file): New function.
12766         (SPEC_FILE): New define.
12767
12768 1999-05-11  Dave Brolley  <brolley@cygnus.com>
12769
12770         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12771         cpplib-enabled build.
12772
12773 1999-05-05  Per Bothner  <bothner@cygnus.com>
12774
12775         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
12776         temporarily zero it while calling rest_of_decl_compilation.
12777
12778         * java-tree.h (string_ptr_type_node):  Add declaration.
12779         * decl.c:  Define and initialize string_ptr_type_node.
12780         * parse.y (patch_string_cst):  Use string_ptr_type_node.
12781
12782         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
12783         * parse.y (for_statement):  Now unconditionally exit_block.
12784         (finish_labeled_statement):  No longer exit_block if for-loop.
12785         (patch_loop_statement):  Check harder if the loop is already labeled.
12786
12787         * parse.y (patch_initialized_static_field):  Removed function.
12788         (maybe_generate_clinit):  Removed special handling for interfaces.
12789         (java_complete_expand_methods):  Do a preliminary java_complete_tree
12790         on <clinit> to determine if it can be removed.
12791         (java_complete_expand_method):  Remove special handling for <clinit>.
12792         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
12793         optimize if we get back empty_stmt_node.
12794         For MODIFY_EXPR, re-do checking of static initializers.
12795         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
12796         For VAR_DECL, pass correct context.
12797
12798         * verify.c (verify_jvm_instructions):  Better error messages.
12799
12800 1999-05-03  Tom Tromey  <tromey@cygnus.com>
12801
12802         * parse-scan.y (interface_declaration): Call
12803         report_class_declaration for interfaces.
12804
12805 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
12806
12807         * Makefile.in: Remove -v from bison command lines.
12808
12809 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12810
12811         * check-init.c (check_init): Exclude a case of error when doing
12812         xrefs.
12813         * class.c (layout_class_method): Don't generate the error message
12814         twice when compiling from source.
12815         * lang-options.h: Added `-Wredundant-modifers' and
12816         `-Wunusupported-jdk11' flags and help text.
12817         * lang.c (lang_decode_option): Added support for
12818         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12819         flag_static_local_jdk11 and flag_redundant set accordingly.
12820         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12821         * parse.h (EXPR_WFL_ADD_COL): New macro.
12822         (DECL_END_SOURCE_LINE): Likewise.
12823         (DECL_INHERITED_SOURCE_LINE): Likewise.
12824         * parse.y (static_ref_err): New function, prototyped.
12825         (CCB_TK): Now tagged <operator>.
12826         (class_body:): Remember the location of the closing '}' of a class
12827         definition when doing xrefs.
12828         (block:): Likewise.
12829         (block_end:): Likewise.
12830         (create_class): Remember the location of the inherited class
12831         identifier when doing xrefs.
12832         (register_fields): Added test on first operand of `init' before
12833         testing it TREE_CODE.
12834         (method_header): Store the location of the class identifier in the
12835         class decl when doing xrefs.
12836         (finish_method_declaration): Don't combine first/last method line
12837         when doing xref.
12838         (java_check_regular_methods): Warning check on not overriding
12839         methods with default access on other packages move before check on
12840         static methods. Initialization of `aflags' also moved up.
12841         (resolve_expression_name): Call static_ref_err to report the error.
12842         (static_ref_err): New function, implemented.
12843         (resolve_field_access): Returned simplified static field access
12844         when doing xrefs.
12845         (resolve_qualified_expression_name): Check for illegal use of
12846         static fields in a non static context. Call static_ref_err to
12847         report error in various places.
12848         (java_complete_tree): Do not fold initialized static fields when
12849         doing xrefs.
12850         (java_complete_lhs): Likewise.
12851
12852 1999-04-29  Anthony Green  <green@cygnus.com>
12853
12854         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12855         create internal labels.
12856         (lookup_label): Ditto.
12857
12858 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12859
12860         * class.c (layout_class_method): Generate <clinit>'s rtl for
12861         interfaces.
12862         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12863         for interfaces' <clinit>.
12864         * expr.c (lookup_field): Search for fields in interfaces.
12865         (expand_invoke): Fixed indentation.
12866         (expand_java_field_op): Likewise. Use IS_CLINIT.
12867         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12868         (IS_CLINIT): New macro.
12869         * parse.y (type_declaration:): Call maybe_generate_clinit after an
12870         interface was parsed.
12871         (maybe_generate_clinit): Don't generate if the current class is an
12872         interface with only fields of primitive types.
12873         (reset_method_name): Use IS_CLINIT.
12874         (java_complete_expand_method): Expand <clinit> when it exists for
12875         interfaces. Use IS_CLINIT.
12876         (resolve_expression_name): Use DECL_CONTEXT instead of
12877         current_class to build static field references.
12878         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12879         ARRAY_REF when doing xreferencing.
12880         (check_final_assignment): Fixed typo in leading comment. Use
12881         IS_CLINIT.
12882         (patch_array_ref): Don't fully expand array references when
12883         xreferencing.
12884         (patch_return): Use IS_CLINIT.
12885         (patch_throw_statement): Likewise.
12886
12887 1999-04-22  Tom Tromey  <tromey@cygnus.com>
12888
12889         * Make-lang.in (JAVA_SRCS): Added check-init.c.
12890
12891 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12892
12893         * decl.c (predef_filenames, predef_filenames_size): New globals
12894         (init_decl_processing): predef_filenames and predef_filenames_size
12895         initialized.
12896         * java-tree.h (predef_filenames, predef_filenames_size): Declared
12897         extern.
12898         * jcf-parse.c (predefined_filename_p): New function.
12899         (yyparse): Check that files on the command line are specified only
12900         once and issue a warning otherwise.
12901         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12902         * parse.y (source_end_java_method): Nullify NOP method bodies, to
12903         avoid a gcc warning with -W -Wall turned on.
12904         (java_expand_classes): Abort if errors were encountered.
12905         (java_complete_lhs): If the cross reference flag is set, wrap
12906         field DECL node around a WFL when resolving expression name.
12907
12908 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12909
12910         * lang.c (lang_decode_option): Fixed returned value when parsing
12911         `-fxref=...' and `-Wall'.
12912         * parse.y (source_end_java_method): Do not generate code when
12913         flag_emit_xref is set.
12914         (resolve_expression_name): Do not build static field access when
12915         flag_emit_xref is set.
12916         (resolve_field_access): No special treatment on `length' when
12917         flag_emit_xref is set. Do not build qualified static field access
12918         when flag_emit_xref is set.
12919         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12920         when flag_emit_xref is set.
12921         (patch_assignment): Do not generate array store runtime check when
12922         flag_emit_xref is set.
12923         * xref.c (xref_flag_value): Fixed function declaration
12924         indentation.
12925         (xset_set_data): New function.
12926         * xref.h (xref_set_data): Added prototype for new function.
12927         (typedef struct xref_flag_table): New field data.
12928         (XREF_GET_DATA): New macro.
12929
12930 1999-04-19  Tom Tromey  <tromey@cygnus.com>
12931
12932         * xref.h (enum): Removed trailing comma.
12933
12934         * parse.y (resolve_qualified_expression_name): Added missing
12935         `break'.
12936
12937 1999-04-15  Anthony Green  <green@cygnus.com>
12938
12939         * gjavah.c: New prototypes for java_float_finite and
12940         java_double_finite.
12941
12942 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12943
12944         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12945         references.
12946
12947 1999-04-06  Jeffrey A Law  (law@cygnus.com)
12948
12949         * Makefile.in (TREE_H): Add tree-check.h.
12950         (RTL_H): Add genrtl.h.
12951
12952 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12953
12954         * parse.y (patch_assignment): Added ArrayStoreException runtime
12955         check.
12956
12957 1999-04-06  Per Bothner  <bothner@cygnus.com>
12958
12959         * expr.c (pop_type_0):  New function.
12960         (pop_type):  Use pop_type_0.
12961         * java-tree.h (pop_type_0):  New declaration.
12962         * verify.c (verify_jvm_instructions):  Check return instructions.
12963
12964         * parse.y (patch_binop):  Don't fold if non-constant and emiting
12965         class files.
12966
12967 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12968
12969         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12970
12971         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
12972         (main_jcf): Don't define.
12973         (process_file): Don't set `main_jcf'.
12974
12975         * java-tree.h (main_jcf): Don't declare.
12976
12977         * jcf-parse.c (main_jcf): Add static definition.
12978
12979         * lang.c (main_jcf): Don't define.
12980
12981 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12982
12983         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
12984
12985         * decl.c (copy_lang_decl): Likewise for `bcopy'.
12986
12987         * jcf-depend.c: Include "config.h", not <config.h>.
12988
12989         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
12990         `bcopy' to PTR.
12991
12992         * jcf-path.c: Include "config.h", not <config.h>.
12993
12994         * lex.c: Don't include various system header files.
12995         (java_init_lex): Cast the argument of `bzero' to PTR
12996
12997         * parse-scan.y (java_push_parser_context): Likewise.
12998
12999         * parse.y (java_push_parser_context): Likewise.
13000         (patch_bc_statement): Match format specifier to variable argument.
13001
13002         * xref.c: Don't include <stdio.h>.
13003
13004 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13005
13006         * parse.y (struct parser_ctxt *ctxp): Now global.
13007         (declare_local_variables): Use WFL compound value for the
13008         declaration source line value, when doing cross-referencing.
13009
13010 1999-03-31  Tom Tromey  <tromey@cygnus.com>
13011
13012         * gjavah.c (print_field_info): Allow constants of other types.
13013         (print_include): Generate include when new name is proper prefix
13014         of already printed name.
13015         (add_namelet): Likewise.
13016         (cxx_keyword_subst): New function.
13017         (print_method_info): Use it.
13018         (print_field_name): New function.
13019         (get_field_name): New function.
13020         (print_field_info): Use get_field_name and print_field_name.
13021
13022 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13023
13024         * Makefile.in (keyword.h): Generate using gperf language 'C', not
13025         'KR-C', so gperf uses the `const' keyword on strings.
13026
13027         * keyword.gperf (java_keyword): Const-ify a char*.
13028
13029 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13030
13031         * parse.y (patch_bc_statement): Fixed identation and a bogus
13032         `printf' format.
13033
13034 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13035
13036         * parse.y (patch_assignment): Allow static variables in other
13037         classes to be assigned.
13038
13039 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13040
13041         * class.c (maybe_add_interface): Remove unused variable
13042         `interface_binfo'.
13043         (make_class_data): Use = for assignment, not ==.  Likewise.
13044         (emit_register_classes): Remove unused variable `decl'.
13045
13046         * lex.c: Fix comment so as not to contain an embedded `/*'.
13047
13048         * verify.c (verify_jvm_instructions): Remove unused variable
13049         `self_type'.
13050
13051 1999-03-27  Per Bothner  <bothner@cygnus.com>
13052
13053         * parse.y (complete_loop_body):  Rename to finish_loop_body.
13054         (complete_labeled_statement):  Rename to finish_labeled_statement.
13055         (complete_for_loop):  Rename to finish_for_loop.
13056         (complete_method_declaration):  Rename to finish_method_declaration.
13057
13058         * java-tree.h (continue_identifier_node):  New global node.
13059         * decl.c:  Define and initialize continue_identifier_node.
13060         * parse.y (generate_labeled_block):  Remove - no longer needed.
13061         (build_loop_body):  Use continue_identifier_node for continue block.
13062         (finish_labeled_statement):  Also do pop_labeled_block actions.
13063         (java_complete_lhs):  POP_LOOP even if error.
13064         (build_labeled_block):  Special handling for continue_identifier_node.
13065         (patch_loop_statement):  Re-organize.
13066         (patch_bc_statement):  Re-write.
13067
13068 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13069
13070         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
13071         using a WFL compound value.
13072         * parse.y (xref.h): Include.
13073         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
13074         WFL compound value.
13075         (register_fields): Set WFL compound value to lineno if doing
13076         xrefs.
13077         (java_complete_expand_method): Call expand_xref if flag_emit_xref
13078         is set.
13079         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
13080         * xref.h (expand_xref): Prototype renamed from xref_generate.
13081
13082 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13083
13084         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
13085         (GET_CURRENT_BLOCK): New macro.
13086         * parse.y (current_static_block): New global variable.
13087         (method_body:): Define action.
13088         (complete_method_declaration): Set current_function_decl to NULL
13089         when work on the current method is done.
13090         (declare_local_variables): Use GET_CURRENT_BLOCK.
13091         (java_method_add_stmt): Likewise.
13092         (java_complete_expand_method): Disable the use of `this' when
13093         expanding <clinit>.
13094         (enter_a_block): If no current method exist, use
13095         current_static_block to link static initializer blocks.
13096         (exit_block): Rewritten to use current_static_block when no current
13097         method decl exists.
13098         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
13099         (patch_return): Forbid the use of `return' in static initializers.
13100         (patch_throw_statement): Fixed indentation. Issue specific error
13101         for uncaught thrown checked exception in static initializer
13102         blocks. Removed FIXME.
13103
13104 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
13105
13106         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
13107         Link gcj from gcc.o.
13108
13109 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13110
13111         * parse.y (find_applicable_accessible_methods_list): When dealing
13112         with interface: ensure that a given interface or java.lang.Object
13113         are searched only once.
13114
13115 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13116
13117         * gjavah.c (print_c_decl): Remove unused argument `flags'.
13118
13119         * jcf-dump.c (print_access_flags): Add braces around if-else.
13120
13121         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
13122         COMBINE_INPUTS.
13123
13124         * lex.c (build_wfl_node): Add static prototype.
13125
13126         * lex.h (build_wfl_node): Remove static prototype.
13127
13128         * parse.y: Include lex.c early enough to declare everything needed.
13129         Ensure calls to `build_wfl_node' pass the proper arguments.
13130         (create_class): Remove unused variable `super_decl'.
13131         (get_printable_method_name): Initialize variable `name'.
13132
13133 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13134
13135         * Changelog: Fixed 1999-03-22 typos.
13136         * lang.c (lang_decode_option): Fixed typo in error string in the
13137         XARG section.
13138
13139 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13140
13141         * Makefile.in (JAVA_OBJS): Added entry xref.o.
13142         (xref.o): New rule.
13143         * java-tree.h (flag_emit_xref): Declared extern.
13144         * lang.c (xref.h): Included.
13145         (flag_emit_xref): New global variable.
13146         (lang_decode_option): Added support for -fxref.
13147         * xref.c: Created.
13148         * xref.h: Likewise.
13149
13150 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
13151
13152         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
13153         linked with.
13154
13155 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13156
13157         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
13158         $(srcdir)/../system.h and $(JAVA_TREE_H).
13159         (jcf-io.o): Depend on $(JAVA_TREE_H).
13160         (mangle.o): Likewise.
13161
13162         * check-init.c (check_cond_init): Add static prototype.
13163
13164         * class.c (build_java_method_type, hashUtf8String,
13165         make_field_value, get_dispatch_vector, get_dispatch_table,
13166         append_gpp_mangled_type, mangle_static_field): Likewise.
13167         (strLengthUtf8): Hide unused definition.
13168         (hashUtf8String): Const-ify.
13169         (make_field_value): Un-ANSI-fy.
13170
13171         * constants.c: Move inclusion of jcf.h above java-tree.h.
13172         (set_constant_entry, find_class_or_string_constant,
13173         find_name_and_type_constant, get_tag_node,
13174         build_constant_data_ref): Add static prototype.
13175
13176         * decl.c (push_jvm_slot, builtin_function,
13177         lookup_name_current_level): Likewise.
13178         (builtin_function): Const-ify.
13179
13180         * except.c (expand_start_java_handler, expand_end_java_handler):
13181         Add static prototype.
13182
13183         * expr.c (flush_quick_stack, push_value, pop_value,
13184         java_stack_swap, java_stack_dup, build_java_athrow,
13185         build_java_jsr, build_java_ret, expand_java_multianewarray,
13186         expand_java_arraystore, expand_java_arrayload,
13187         expand_java_array_length, build_java_monitor, expand_java_pushc,
13188         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
13189         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
13190         expand_compare, expand_test, expand_cond, expand_java_goto,
13191         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
13192         expand_java_field_op, java_push_constant_from_pool): Likewise.
13193
13194         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
13195         (build_java_arraynull_check): Mark parameters `node' and `type'
13196         with ATTRIBUTE_UNUSED.
13197         (note_label): Likewise for parameter `current_pc'.
13198         (expand_java_call, expand_java_ret): Hide unused definition.
13199
13200         * java-tree.h (make_class, build_constants_constructor,
13201         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
13202         init_outgoing_cpool, register_class, emit_register_classes,
13203         java_layout_seen_class_methods): Prototype.
13204         (unicode_mangling_length): Const-ify.
13205         (append_gpp_mangled_name, append_gpp_mangled_classtype,
13206         emit_unicode_mangled_name, format_int, format_uint,
13207         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
13208         jcf_print_utf8_replace, open_class): Prototype.
13209
13210         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
13211         <stdio.h>.  Include tree.h/java-tree.h.
13212         (utf8_equal_string usage, process_class): Add static prototype.
13213         (open_class): Don't prototype this here.
13214         (utf8_equal_string): Match arguments to format specifiers.
13215         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
13216         TABLE_SWITCH, disassemble_method): Likewise.
13217
13218         * jcf-io.c: Include tree.h/java-tree.h.
13219         (open_class, find_classfile, jcf_print_utf8,
13220         jcf_print_utf8_replace): Const-ify.
13221
13222         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
13223         parse_class_file): Add static prototype.
13224         (find_in_current_zip): Match definition to existing static
13225         prototype.
13226
13227         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
13228         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
13229         finish_jcf_block, define_jcf_label, get_jcf_label_here,
13230         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
13231         write_chunks, adjust_typed_op, generate_bytecode_conditional,
13232         generate_bytecode_return, perform_relocations, init_jcf_state,
13233         init_jcf_method, release_jcf_state, generate_classfile):
13234         Add static prototype.
13235         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
13236         (make_class_file_name): Const-ify.
13237
13238         * jcf.h (find_classfile): Const-ify.
13239
13240         * jv-scan.c (reset_report): Remove prototype.
13241
13242         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
13243         (error): Rewrite to allow varargs.
13244
13245         * lang.c (lang_f_options): Const-ify.
13246
13247         * lex.c (java_parse_escape_sequence): Add static prototype.
13248         (java_allocate_new_line): Match definition to existing static
13249         prototype.
13250
13251         * mangle.c Include tree.h/java-tree.h.
13252         (unicode_mangling_length, emit_unicode_mangled_name,
13253         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
13254
13255         * parse.h (jdep_code): Remove trailing comma in enumeration.
13256         (java_get_line_col): Move prototype outside of !JC1_LITE test.
13257         (reset_report): Add prototype.
13258
13259         * verify.c (push_pending_label, merge_types): Add static
13260         prototypes.
13261
13262         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
13263
13264 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13265
13266         * parse.y (find_applicable_accessible_methods_list): Extend the
13267         search to superinterfaces when relevant.
13268         (search_applicable_methods_list): New function.
13269
13270 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13271
13272         * class.c (unmangle_classname): Implemented stricter testing
13273         before setting the QUALIFIED_P flag on an identifier.
13274
13275 1999-03-16  Per Bothner  <bothner@cygnus.com>
13276
13277         * parse.y (java_complete_lhs):  Call force_evaluation_order
13278         after patch_newarray.
13279         (patch_binop):  Don't call fold if there are side effects.
13280
13281 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13282
13283         * parse.y (java_stabilize_reference): Use save_expr instead of
13284         building a SAVE_EXPR node.
13285         (java_complete_lhs): Patch the resulting string of the `+='
13286         operator (if necessary) and complete the RHS after having built
13287         the cast.
13288
13289 1999-03-15  Per Bothner  <bothner@cygnus.com>
13290
13291         * class.c (make_class):  Don't set CLASS_P here (because
13292         this function is also called by build_java_array_type).
13293         (push_class):  Set CLASS_P here instead.
13294         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
13295
13296         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
13297         context.  If the context is class, perfer "super" over "synchronized".
13298         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
13299
13300         * parse.y (create_class):  Don't call parser_check_super here;
13301         it is not robust.  Always wait until later.
13302
13303         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
13304         match what JDK 1.2 does), but don't set ACC_PUBLIC.
13305
13306 1999-03-13  Per Bothner  <bothner@cygnus.com>
13307
13308         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
13309         * lex.h (UNGETC):  Change misleading macro.
13310
13311 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13312
13313         * parse.y (java_stabilize_reference): Return NODE when patching a
13314         COMPOUND_EXPR.
13315         (java_complete_lhs): Put parenthesis around truth values.
13316
13317 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13318
13319         * class.c (layout_class_method): Don't make rtl for interface
13320         methods.
13321         * parse.h (GET_TYPE_NAME): New macro.
13322         * parse.y (if_then_statement:): Fixed indentation.
13323         (if_then_else_statement:): Likewise.
13324         (for_statement:): Fixed spacing.
13325         (try_statement:): Fixed indentation.
13326         (create_interface): Don't force interfaces to be abstract.
13327         (method_header): Abstract methods are OK in interfaces.
13328         (declare_local_variables): Fixed typo in comment.
13329         (java_complete_expand_method): Fixed indentation.
13330         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
13331         non accessible fields.
13332         (java_stabilize_reference): New function.
13333         (java_complete_lhs): Fixed indentation. Use
13334         java_stabilize_reference in compound assignment. Insert the
13335         cast. If not processing `+' fix string constants before processing
13336         binop.
13337
13338 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13339
13340         * constants.c (find_class_or_string_constant): Cast variable `j'
13341         to a `jword' when comparing against one.
13342
13343         * expr.c (java_lang_expand_expr): Remove unused variables
13344         `has_finally_p' and `op0'.
13345
13346         * gjavah.c (print_field_info): Cast a value to jint when comparing
13347         against one.  Likewise for a jlong.
13348         (add_namelet): Likewise cast a `sizeof' to an int when comparing
13349         against a signed quantity.
13350
13351         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
13352         (print_signature): Don't needlessly dereference variable `str'
13353
13354         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
13355         `max_locals' with ATTRIBUTE_UNUSED.
13356         (jcf_parse_class): Likewise for variable `index'.
13357
13358         * parse.h (reverse_jdep_list): Remove static prototype.
13359
13360         * parse.y (build_jump_to_finally): Remove prototype and definition.
13361         (reverse_jdep_list): Add static prototype.
13362
13363         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
13364         `assignment' and `expr_decl'.
13365
13366         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
13367
13368 1999-03-12  Andrew Haley  <aph@cygnus.com>
13369
13370         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
13371         we'll need a directory separator and a null character.
13372
13373 1999-03-10  Per Bothner  <bothner@cygnus.com>
13374
13375         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
13376
13377   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13378
13379         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
13380         interfaces.
13381
13382 1999-03-05  Per Bothner  <bothner@cygnus.com>
13383
13384         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
13385
13386         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
13387
13388         * class.c (layout_class_method):  A static method in a base class
13389         is never overridden, so treat it like it doesn't exist.
13390         However, do complain about private non-static method overriding
13391         public static method.
13392
13393         * parse.y:  Don't set unused INITIALIZED_P flag.
13394         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
13395
13396         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
13397         (build_array_from_name):  Re-order &index[string] to &string[index].
13398
13399         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
13400         error_mark (it might catch more errors, but it is more likely to lose).
13401
13402 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13403
13404         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13405         (parse-scan.o): Depend on toplev.h.
13406
13407         * class.c (make_method_value): Add prototype.  Make it static.
13408         Remove unused second argument, caller changed.
13409
13410         * expr.c (java_lang_expand_expr): Remove unused variable
13411         `return_label'.
13412
13413         * java-tree.h: Don't prototype find_in_current_zip.
13414         Add prototypes for verify_constant_pool, start_java_method,
13415         end_java_method, give_name_to_locals, expand_byte_code,
13416         open_in_zip, set_constant_value, find_constant1, find_constant2,
13417         find_utf8_constant, find_string_constant, find_class_constant,
13418         find_fieldref_index, find_methodref_index, write_constant_pool,
13419         count_constant_pool_bytes and encode_newarray_type.
13420
13421         * jcf-dump.c: Remove unused variable `LONG_temp'.
13422
13423         * jcf-parse.c: Include parse.h.
13424         (jcf_parse_source): Remove unused parameter, all callers changed.
13425         (jcf_figure_file_type): Add static prototype.
13426         (find_in_current_zip): Likewise.  Also remove unused parameter,
13427         all callers changed.
13428         (read_class): Initialize variable `saved_pos'.
13429
13430         * jcf-reader.c (jcf_parse_preamble): Mark variables
13431         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13432
13433         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13434         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13435         (java_parse_doc_section): Initialize variable `seen_star'.
13436         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13437         (java_lex_error): Mark parameters `msg' and `forward' with
13438         ATTRIBUTE_UNUSED.
13439         (java_get_line_col): Mark parameters `filename' and `line' with
13440         ATTRIBUTE_UNUSED.
13441
13442         * parse-scan.y: Include toplev.h.
13443         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13444
13445         * parse.h: use `struct JCF', not plain `JCF'.
13446         (java_parser_context_save_global, java_expand_classes
13447         java_parser_context_restore_global, java_parse): Add prototypes.
13448
13449         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13450         `node'.
13451
13452 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
13453
13454         *  check-init.c (check_init):  COPYN takes word count, not bit count.
13455
13456 1999-02-26  Per Bothner  <bothner@cygnus.com>
13457
13458         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
13459         explicit build_decl.  (Avoids crash in reload when optimizing.)
13460
13461 1999-02-25  Per Bothner  <bothner@cygnus.com>
13462
13463         * decl.c (complete_start_java_method):  Handle synchronized method
13464         even when compiling from bytecode.
13465
13466 1999-02-26  Tom Tromey  <tromey@cygnus.com>
13467
13468         * gjavah.c (add_class_decl): Only generate `#include' if outer
13469         class is not the name of the class we are processing.  Correctly
13470         append `.h' in #include.
13471         (process_file): Clean up newlines around generated `#include's.
13472         (decode_signature_piece): Correctly handle inner classes.
13473         (struct include): New structure.
13474         (all_includes): New global.
13475         (print_include): New function.
13476         (add_class_decl): Use it.
13477         (process_file): Likewise.
13478         (add_class_decl): Generate include for java-array.h if array
13479         seen.
13480         (process_file): Don't generate java-array.h include.
13481
13482         * gjavah.c (add_namelet): Check for standard package names here.
13483         (add_class_decl): Don't check for standard package names here.
13484
13485 1999-02-25  Tom Tromey  <tromey@cygnus.com>
13486
13487         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13488         When reading a zip file, only use strncmp if both strings are
13489         bigger than the buffer length.  Initialize `k' when looping
13490         through zip file.
13491
13492 1999-02-24  Tom Tromey  <tromey@cygnus.com>
13493
13494         * gjavah.c (struct namelet): New structure.
13495         (add_namelet): New function.
13496         (print_namelet): New function.
13497         (print_class_decls): Use add_namelet and print_namelet to generate
13498         namespaces and not classes.
13499         (method_printed): New global.
13500         (HANDLE_END_METHOD): Examine method_printed.
13501         (print_method_info): Set method_printed when required.  Print
13502         error if function to be ignored is marked virtual.  Handle $finit$
13503         method.
13504         (METHOD_IS_FINAL): New macro.
13505         (print_field_info): Use it.
13506         (HANDLE_METHOD): Clear method_printed.
13507         (method_pass): New global.
13508         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13509         (process_file): Do two passes over both fields and methods.
13510         (HANDLE_METHOD): Examine method_pass.
13511         (root): New global.
13512         (add_class_decl): New function.
13513         (print_class_decls): Don't scan over entire constant pool.
13514
13515 1999-02-23  Tom Tromey  <tromey@cygnus.com>
13516
13517         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13518         disable linking in that case.
13519
13520 1999-02-20  Tom Tromey  <tromey@cygnus.com>
13521
13522         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13523         not 0x1f.
13524
13525 1999-02-21  Per Bothner  <bothner@cygnus.com>
13526
13527         * decl.c (build_result_decl), java-tree.h:  New method.
13528         (complete_start_java_method):  Handle synchronized methods.
13529         Don't build DECL_RESULT here.  (Ordering dependency problem.)
13530         (start_java_method):  Call build_result_decl here instead  ...
13531         * parse.y (java_complete_expand_method):  ... and here.
13532         (expand_start_java_method): Don't call complete_start_java_method here.
13533         (java_complete_expand_method):  Call it here instead.
13534         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
13535         * java-tree.h:  ... here.
13536
13537         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
13538         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
13539         for ARRAY_REF - it doesn't work when array bounds are checked.
13540         (patch_array_ref):  Handle it here instead.
13541
13542         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
13543
13544 1999-02-19  Per Bothner  <bothner@cygnus.com>
13545
13546         Force left-to-right evaluation of binary operations etc.
13547         * expr.c (force_evaluation_order), java-tree.h:  New function.
13548         * parse.y (java_complete_lhs):  Pass binary operations, procedure
13549         calls, and ARRAY_REFs to force_evaluation_order.
13550         (various):  Set TREE_SIDE_EFFECTS more carefully.
13551
13552         Tolerate random (non-UTF8) encoding in comments without complaining.
13553         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
13554         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
13555
13556         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
13557         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
13558
13559         * parse.y (java_complete_lhs):  Ignore an empty statement in a
13560         COMPOUND_EXPR.  Don't complain about empty statement after return.
13561
13562 1999-02-19  Per Bothner  <bothner@cygnus.com>
13563
13564         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
13565         in TREE_LIST - just chain the POINTER_TYPEs together.
13566         (resolve_class):  If type already resolved, return decl.
13567         After resolving, update TREE_TYPE(class_type), and name (if array).
13568         * parse.h (do_resolve_class), parse.y:  Make non-static.
13569         * class.c (maybe_layout_super_class):  Take this_class argument.
13570         Do do_resolve_class if necessary.
13571         (layout_class, layout_class_methods): Adjust calls appropriately.
13572         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13573         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
13574         * typeck.c (build_java_array_type):  Don't call layout_class.
13575
13576 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13577
13578         * parse.y (check_pkg_class_access): Allow private class access
13579         within the same package.
13580         (strip_out_static_field_access_decl): New function.
13581         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13582         operator argument before testing its nature.
13583
13584 1999-02-03  Per Bothner  <bothner@cygnus.com>
13585
13586         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
13587         (TRY_EXPR):  Simplify - it no longer has a finally clause.
13588         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
13589         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13590         * expr.c (java_lang_expand_expr):  Likewise.
13591         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
13592         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
13593         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
13594         (build_try_statement):  Remove finally parameter and handling.
13595         (build_try_finally_statement):  New function.
13596         (patch_try_statement):   No longer need to support finally clause.
13597         (try_statement):  Update grammar action rules.
13598         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
13599         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13600
13601 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
13602
13603         * jcf-parse.c (get_constant): Add braces around computation of 'd'
13604         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
13605
13606 1999-02-17  Andrew Haley  <aph@cygnus.com>
13607
13608         * class.c (build_utf8_ref): Back out broken patch which was
13609         intended to to output signatures using '.' as a separator.
13610
13611         * class.c (make_class_data): Output signatures using '.' as a
13612         separator, rather than '/'.
13613         (mangled_classname): Likewise.
13614         (make_field_value): Likewise.
13615         (make_method_value): Likewise.
13616         * constants.c (alloc_class_constant): Likewise.
13617         * expr.c (build_invokeinterface): Likewise.
13618
13619 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13620
13621         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13622         of an ancient workaround.
13623
13624 1999-02-10  Jeffrey A Law  (law@cygnus.com)
13625
13626         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
13627         here anymore.
13628
13629 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13630
13631         * lex.c (yylex): Encode \0 as UTF8.
13632
13633 1999-02-10  Tom Tromey  <tromey@cygnus.com>
13634
13635         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13636         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13637         (libgcj_zip): Renamed.
13638         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13639         LIBJAVA_ZIP_FILE.
13640         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13641
13642         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13643         (GC_NAME): Renamed -lgc to -lgcjgc.
13644
13645 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13646
13647         * lex.c (java_lang_cloneable): Initialize.
13648         * parse.y (java_lang_cloneable): New static variable.
13649         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13650         doing one more qualification round.
13651         (valid_ref_assignconv_cast_p): Reject null source or
13652         destination. Allow an array to be cast into java.lang.Cloneable.
13653         (patch_cast): Swapped two first arguments to first call to
13654         valid_ref_assignconv_cast_p.
13655
13656 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13657
13658         * parse.h: DECL_P renamed JDECL_P.
13659         * parse.y: DECL_P replaced by JDECL_P.
13660         (build_array_from_name): Always use pointer's type.
13661         (patch_bc_statement): Extra code to search continue target in a
13662         for loop. Fixed comments. Continue target is current loop when
13663         unlabeled.
13664
13665 1999-02-05  Andrew Haley  <aph@cygnus.com>
13666
13667         * class.c (make_class_data): The superclass of an interface should
13668         be null, not class Object.
13669
13670         * lex.c (java_lex): Sign extend hex literals.
13671
13672 1999-02-04  Andrew Haley  <aph@cygnus.com>
13673
13674         * class.c (build_utf8_ref): Output signatures using '.' as a
13675         separator, rather than '/'.
13676         (make_class_data): Likewise.
13677
13678 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
13679
13680         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13681         mkstemp.o.  Get them from libiberty now.
13682
13683 1999-02-02  Jeffrey A Law  (law@cygnus.com)
13684
13685         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13686
13687 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13688
13689         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13690         from libiberty.h
13691
13692 1999-02-02  Per Bothner  <bothner@cygnus.com>
13693
13694         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13695         * jcf-write.c (generate_bytecode_return):  New function.
13696         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
13697
13698         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
13699         generate special [fd]const_[01] instructions.
13700
13701         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
13702
13703         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
13704         handling OPCODE_lookupswitch or OPCODE_tableswitch.
13705
13706 1999-02-01  Per Bothner  <bothner@cygnus.com>
13707
13708         * parse.y (patch_method_invocation):  Handle calling static methods,
13709         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13710
13711         * parse.y (java_complete_lhs):  Don't complain about unreachable
13712         exit condition in a do-while statement.
13713
13714 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13715
13716         * lex.c (java_read_char): Fixed utf8 decoding.
13717         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13718         range.
13719         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13720         comments. Local variable `all_primitive' is gone. Broadened
13721         acceptance of `0' to floating point targets. `long' can now be
13722         widened to `double' or `float'.
13723         (valid_method_invocation_conversion_p): Added leading
13724         comment. Fixed tabulation.
13725         (build_string_concatenation): Optimize out left or right empty
13726         string constants.
13727
13728 1999-01-28  Per Bothner  <bothner@cygnus.com>
13729
13730         * jcf-write.c (localvar_alloc):  Only emit entry for
13731         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13732         (generate_bytecode_insns):  Only call put_linenumber if
13733         debug_info_level > DINFO_LEVEL_NONE.
13734         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
13735         is specified, add -g1 (for compatibility wih javac).
13736
13737 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
13738
13739         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13740         gjavah.o, check-init.o, jv-scan.o
13741
13742 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13743
13744         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13745
13746         * gjavah.c: Include config.h and system.h.
13747
13748         * javaop.h (inline): Don't define, its handled by system.h.
13749         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13750         from `inline' to `static inline'.
13751
13752         * jcf.h (inline): Don't define, its handled by system.h.
13753
13754         * lex.c (inline): Likewise.
13755
13756 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
13757
13758         * lang-specs.h: Map -Qn to -fno-ident.
13759
13760 1999-01-29  Richard Henderson  <rth@cygnus.com>
13761
13762         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13763
13764 1999-01-29  Tom Tromey  <tromey@cygnus.com>
13765
13766         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13767         then cast it to Object before calling `append' method.
13768
13769 1999-01-28  Per Bothner  <bothner@cygnus.com>
13770
13771         * check-init.c (check_bool2_init, check_bool_init, check_init):
13772         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13773         * jcf-write.c (generate_bytecode_insns):  Likewise.
13774
13775 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13776
13777         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13778         * parse.y (patch_cast): Allow a boolean to be cast into a
13779         boolean.
13780
13781 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13782
13783         * parse.y: (class_declaration:): Fixed indentation.
13784         (class_member_declaration:): Extra `;' after field declaration now
13785         accepted.
13786         (interface_declaration:): Removed debug messages in error reports.
13787         (patch_binop): Nodes created and returned inherit the orignal
13788         node's COMPOUND_ASSIGN_P flag value.
13789         (patch_cast): Fix cast from char to floating point.
13790
13791 1999-01-25  Andrew Haley  <aph@cygnus.com>
13792
13793         * except.c, java-except.h (expand_resume_after_catch): new
13794         function.
13795         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13796         to branch back to main flow of control after a catch block.
13797
13798 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13799
13800         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13801         $(srcdir)/../system.h.
13802         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13803         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13804         (jcf-write.o): Likewise.
13805         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13806         (mangle.o): Depend on $(srcdir)/../toplev.h.
13807         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13808         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13809
13810         * class.c: Include output.h and parse.h.
13811         (mangled_classname): Add the `const' keyword to a char*.
13812         (find_named_method): Hide unused function definition.
13813         (build_utf8_ref): Change type of variable `c' to unsigned char.
13814         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13815         (build_class_ref): Add the `const' keyword to a char*.
13816         (layout_class_method): Remove unused variable `buf'.
13817
13818         * decl.c (find_local_variable): Remove unused variable `rtl'.
13819         (pushdecl): Likewise for variables `different_binding_level' and
13820         `oldglobal'.
13821         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13822         (maybe_build_cleanup): Likewise for parameter `decl'.
13823
13824         * except.c (expand_start_java_handler): Mark parameter `range'
13825         with ATTRIBUTE_UNUSED.
13826
13827         * expr.c: Include except.h.
13828         (pop_type): Remove unused variable `i'.
13829         (pop_value): Likewise for variables `n_words' and `i'.
13830         (expand_java_arrayload): Likewise for variable `convert'.
13831         (java_lang_expand_expr): Likewise for variables `op0', `type',
13832         `mode', `unsignedp', `node' and `elements'.
13833         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13834         `eh_ranges'.
13835         (process_jvm_instruction): Add a `const' qualifier to a char*.
13836
13837         * gjavah.c (output_directory): Add the `const' keyword to a char*.
13838         (temp_directory): Likewise.
13839         (print_c_decl): Likewise.
13840         (print_method_info): Likewise.
13841         (decode_signature_piece): Likewise.
13842         (print_mangled_classname): Likewise.
13843
13844         * java-except.h: Provide prototypes for maybe_start_try,
13845         maybe_end_try and add_handler.
13846
13847         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13848         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
13849         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13850         init_expr_processing, push_super_field, init_class_processing,
13851         can_widen_reference_to, class_depth, verify_jvm_instructions,
13852         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13853         set_local_type, merge_type_state, push_type, load_type_state,
13854         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13855         emit_unicode_mangled_name): Add prototypes.
13856
13857         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13858         (print_signature_type): Use ISDIGIT, not isdigit.
13859         (print_signature): Remove unused variable `j'.
13860
13861         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13862         int when comparing against one.
13863
13864         * jcf-parse.c: Include toplev.h.
13865
13866         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
13867         (localvar_free): Remove unused variable `i'.
13868         (generate_bytecode_conditional): Likewise for variable `kind'.
13869
13870         * jv-scan.c: Include config.h and system.h.  Remove redundant
13871         OS header and gansidecl.h includes.
13872         (warning): Add the `const' keyword to a char*.  Also add
13873         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
13874         __STDC__, when determining whether to use ANSI-isms.
13875         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
13876         (xmalloc): Don't redundantly prototype here.
13877         (main): Remove unused parameter `envp'.  Also fix the arguments
13878         passed to function `fatal' to match the format specifier.
13879
13880         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13881
13882         * mangle.c: Include toplev.h.
13883         (emit_unicode_mangled_name): Declare parameter `len'.
13884
13885         * parse.y (parse_warning_context): Add the `const' keyword to a
13886         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
13887         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13888         (issue_warning_error_from_context): Add the `const' keyword to
13889         a char*.
13890         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
13891         not `__STDC__' for whether to use ANSI-isms.
13892
13893         * typeck.c (incomplete_type_error): Mark parameters `value' and
13894         `type' with ATTRIBUTE_UNUSED.
13895         (parse_signature_type): Use ISDIGIT, not isdigit.
13896
13897         * verify.c (check_pending_block): Add the `const' keyword to a char*.
13898         (verify_jvm_instructions): Likewise.  Remove unused variables
13899         `field_name' and `default_val'.
13900
13901         * zextract.c: Include config.h and system.h.  Remove redundant
13902         OS header includes.
13903
13904         * zipfile.h: Prototype `read_zip_archive'.
13905
13906 1999-01-21  Andrew Haley  <aph@cygnus.com>
13907
13908         * typeck.c (convert): Allow conversions to void type: some
13909         optimizations in gcc do this.
13910
13911 1999-01-21  Andrew Haley  <aph@cygnus.com>
13912
13913         * typeck.c (convert_ieee_real_to_integer): New function.
13914         (convert): When not using fast-math and using hardware fp, convert
13915         an IEEE NaN to zero.
13916
13917 1999-01-18  Andrew Haley  <aph@cygnus.com>
13918
13919         * parse.y (patch_binop): Do a type conversion from signed to
13920         unsigned and then back to signed when a ">>>" is found.
13921
13922 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13923
13924         * java-tree.h: (check_for_initialization): Added prototype.
13925         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13926         * parse.y (do_resolve_class): Removed unused locals.
13927         (read_import_dir): Likewise.
13928         (resolve_qualified_expression_name): Array creation
13929         expressions are valid primary expressions.
13930         (qualify_ambiguous_name): Likewise.
13931         (patch_synchronized_statement): Removed unused local.
13932
13933 1999-01-17  Jeffrey A Law  (law@cygnus.com)
13934
13935         * Makefile.in (zextract.o): Add dependencies.
13936
13937         * Makefile.in: Do not put ^Ls at the start of a line.
13938
13939 1999-01-15  Per Bothner  <bothner@cygnus.com>
13940
13941         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
13942         sub-type the result of the call that gets the exception value.
13943
13944         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
13945         don't call finish_class.
13946
13947         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
13948         clear found before continuing.
13949
13950         * verify.c (verify_jvm_instructions):  On an array load, allow
13951         and handle top of stack to be TYPE_NULL.
13952
13953         * gjavah.c (generate_access):  Translate Java package private or
13954         protected access to C++ public, but with a comment.
13955
13956 1999-01-13  Andrew Haley  <aph@cygnus.com>
13957
13958         * expr.c (generate_name): Name prefix changed to avoid clashes
13959         with assembler temp labels.
13960
13961         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13962         MODIFY_EXPR.  Without this, code for the assignment may not be
13963         generated at all and the synchronized statement will read an
13964         uninitialized variable.
13965
13966 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13967
13968         * class.c (maybe_layout_super_class): Fixed returned value.
13969         * lex.c: Added 1999 to the copyright.
13970         (java_init_lex): Initialize java_lang_imported.
13971         * lex.h: Added 1999 to the copyright.
13972         * parse.h: Added 1999 to the copyright.
13973         (REGISTER_IMPORT): Fixed typo in trailing macro.
13974         (CURRENT_OSB): New macro.
13975         (struct parser_ctxt): New fields osb_depth, osb_limit.
13976         * parse.y (java_lang_id): New global variable.
13977         (type_import_on_demand_declaration): Don't import java.lang.* twice.
13978         (array_creation_expression:): Use CURRENT_OSB.
13979         (dims:): Uses a stack to keep track of array dimensions.
13980         (cast_expression:): Use CURRENT_OSB.
13981         (find_expr_with_wfl): Return NULL if node found doesn't meet the
13982         conditions.
13983         (register_fields): Fixed typos in comment.
13984         (check_method_redefinition): Fixed comment indentation.
13985         (java_check_regular_methods): Set saved found wfl to NULL after
13986         having reinstalled it in the previously found DECL_NAME.
13987
13988 1999-01-10  Richard Henderson  <rth@cygnus.com>
13989
13990         * gjavah.c (java_float_finite): Use a union to do type punning.
13991         (java_double_finite): Likewise.
13992
13993 1999-01-09  Per Bothner  <bothner@cygnus.com>
13994
13995         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
13996         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
13997         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
13998         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
13999         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
14000         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
14001
14002 1999-01-08  Per Bothner  <bothner@cygnus.com>
14003
14004         * check-init.c (check_init):  If compiling to native, we don't
14005         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
14006
14007 1999-01-08  Tom Tromey  <tromey@cygnus.com>
14008
14009         * parse-scan.y (variable_declarator_id): Set or increment
14010         bracket_count.
14011         (bracket_count): New global.
14012         (formal_parameter): Handle case where bracket pairs trail variable
14013         declarator id.
14014
14015 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
14016
14017         * jcf-parse.c (yyparse): variable len changed from a char to an
14018         int to prevent overflow.
14019
14020 1999-01-06  Per Bothner  <bothner@cygnus.com>
14021
14022         * java-tree.h:  Declare read_class.
14023         * jcf-parse.c (read_class):  New function.
14024         (load_class):  Now just call read_class.
14025
14026         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
14027         * jcf-parse.c (parse_source_file):  Declare save_error_count,
14028         which is needed by java_parse_abort_on_error macro,
14029         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
14030
14031         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
14032         constructor, if initializing a static field.
14033         (patch_new_array_init):  Set TREE_CONSTANT if it is.
14034         * expr.c (java_lang_expand_expr):  For a static array constructor
14035         of primitive elements, allocate the array itself statically.
14036         Disabled until we can set the vtable field statically.
14037
14038         * check-init.c:  New file.  Checks for definite assignment.
14039         * Makefile.in (JAVA_OBJS):  Add check-init.o.
14040         * parse.y (java_complete_expand_method): Call check_for_initialization.
14041         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
14042
14043 1999-01-06  Graham <grahams@rcp.co.uk>
14044
14045         * parse.y : include system.h instead of including
14046         standard headers directly with the exception of <dirent.h>.
14047
14048 1999-01-06  Per Bothner  <bothner@cygnus.com>
14049
14050         * lex.h:  Moved static function declarations to lex.c,
14051         to shut up some -Wall warnings.
14052         * lex.c:  Static function declarations moved here.
14053         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
14054
14055 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14056
14057         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
14058
14059 1998-12-22  Per Bothner  <bothner@cygnus.com>
14060
14061         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
14062         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
14063
14064         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
14065         (localvar_alloc):  Change return type to void,
14066         (emit_unop):  Remove unused variable size.
14067
14068         * jcf-write.c (struct jcf_block):  Add new union.
14069         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
14070         (call_cleanups):  New functions.
14071         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
14072         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
14073         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
14074         * lang.c (lang_init):  Call using_eh_for_cleanups.
14075         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
14076         completing operands to patch_synchronized_statement.
14077         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
14078         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
14079         WITH_CLEANUP_EXPR instead of TRY_EXPR.
14080
14081 1998-12-20  John F. Carr  <jfc@mit.edu>
14082
14083         * Make-lang.in: Comment out control-Ls; they upset some makes.
14084
14085 1998-12-18  Tom Tromey  <tromey@cygnus.com>
14086
14087         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
14088         consistently.
14089
14090 1998-12-17  Tom Tromey  <tromey@cygnus.com>
14091
14092         * parse.y (DIR_SEPARATOR): New define.
14093         (check_class_interface_creation): Use it.
14094
14095         * parse-scan.y (report_main_declaration): Recognize
14096         `java.lang.String' in argument to main.
14097
14098 1998-12-16  Per Bothner  <bothner@cygnus.com>
14099
14100         * parse.y (create_interface):  Remove bogus test.
14101
14102 1998-12-16  Per Bothner  <bothner@cygnus.com>
14103
14104         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
14105         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
14106
14107 1998-12-16  Tom Tromey  <tromey@cygnus.com>
14108
14109         * parse-scan.y (qualified_name): Use correct sprintf format.
14110
14111 1998-12-15  Tom Tromey  <tromey@cygnus.com>
14112
14113         * gjavah.c (print_field_info): Changed how most negative number is
14114         printed.
14115
14116 1998-12-14  Per Bothner  <bothner@cygnus.com>
14117
14118         * parse.y (fold_constant_for_init):  New function.
14119         (resolve_expression_name):  Don't replace static final
14120         constant-initialized fields by its value.
14121         (java_complete_lhs):  New.  Same as java_complete_tree, except does
14122         not replace static final constant-initialized fields by their values.
14123         (register_fields):  If there is an initializer, set DECL_INITIAL and
14124         MODIFY_EXPR_FROM_INITIALIZATION_P.
14125         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
14126         Only call patch_initialized_static_field if
14127         MODIFY_EXPR_FROM_INITIALIZATION_P.
14128         (patch_initialized_static_field):  If not valid constant, clear
14129         DECL_INITIAL.
14130
14131         * parse.y (lookup_field_wrapper):  Fix thinko.
14132
14133         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
14134         set and restore global lineno.
14135
14136 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14137
14138         * gjavah.c (print_field_info): If value to print is the smallest
14139         value of its size, then print as hex to avoid later warnings from
14140         C++ compiler.
14141
14142 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14143
14144         * gjavah.c (decompile_method): Decompile `return null'.
14145         (process_file): Generate `#pragma interface'.
14146         (method_declared): New global.
14147         (print_method_info): Set it.
14148         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
14149         (print_method_info): Handle abstract methods.
14150
14151 1998-12-13  Per Bothner  <bothner@cygnus.com>
14152
14153         * parse.y (patch_method_invocation):  If class_decl is null
14154         (e.g. an array type), use original type.
14155
14156         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
14157         errors about uncaught exception from clone (of array, specifically).
14158
14159 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14160
14161         * gjavah.c (decompile_method): Handle all types of `return'
14162         opcode.  Decompile `return this' and `return'.
14163         (method_access): New global.
14164         (print_method_info): Set it.
14165         (decompile_method): Don't decompile a synchronized method.
14166
14167 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14168
14169         * jcf-reader.c (jcf_parse_one_method): Recognize
14170         HANDLE_END_METHOD.
14171         * gjavah.c (HANDLE_END_METHOD): New macro.
14172         (HANDLE_CODE_ATTRIBUTE): New macro.
14173         (decompile_method): New function.
14174         (print_method_info): Don't print `;\n' at end of function decl.
14175         Include java-opcodes.h.
14176         (decompiled): New global.
14177
14178 1998-12-12  Per Bothner  <bothner@cygnus.com>
14179
14180         * class.c (build_class_ref):  Handle PRIMTYPE.class if
14181         flag_emit_class_files.
14182         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
14183         if flag_emit_class_files.
14184         * parse.y (java_complete_tree):  Pre-liminary support for
14185         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
14186
14187         * parse.y (patch_synchronized_statement):   Don't call monitorexit
14188         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
14189
14190         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
14191
14192         * zipfile.h (opendir_in_zip):  New declaration.
14193         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
14194         (opendir_in_zip):  New function, using code from open_in_zip.
14195         (open_in_zip):  Call opendir_in_zip.
14196         (find_class):  Remove no-longer-used do_class_file parameter,
14197         but add source_ok parameter.  Change logic so if we find a .java file,
14198         we don't look for .class in later classpath emtries.
14199         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
14200         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
14201         * gjavah.c: Update call to find_class.
14202         * jcf-dump.c:  Likewise.
14203
14204         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
14205         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
14206         nothing if body is empty_stmt_node.
14207         Various little fixes so SP gets correctly adjusted.
14208         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
14209         For CALL_EXPR, test if static first.
14210         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
14211         such as the ones we create for Object and Class.
14212         Set and restore current_function_decl.
14213         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
14214         (note_possible_classname):  New function.
14215         (read_import_entry):  Removed.  Merged with read_import_dir.
14216         (read_import_dir):  Don't call find_class - that only gives us
14217         the first classpath entry having the needed package.
14218         Use the struct buffer data structure from buffer.h.
14219         (read_import_dir, find_in_imports_on_demand):  The remembered
14220         class names now use '.' (not '/') as package separator.
14221
14222         * parse.y (java_complete_expand_methods):  Call write_classfile
14223         here, and not in java_expand_classes (which only gets first class).
14224
14225 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14226
14227         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
14228         (register_fields):  If a static fields has an initializer, just
14229         chain it on ctxp->static_initialized, and handle later.
14230         (java_complete_expand_methods):  Force <clinit> first.
14231         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
14232         - it's already been completed.
14233         (patch_initialized_static_field):  New function.
14234         (java_complete_field):  Call it.
14235
14236 1998-12-12  Per Bothner  <bothner@cygnus.com>
14237
14238         * expr.c (encode_newarray_type, build_new_array):  New functions.
14239         * java-tree.h:  Declare build_new_array.
14240         * jcf-write.c (patch_newarray):  Use build_new_array.
14241
14242         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
14243         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
14244
14245         * parse.y (patch_new_array_init):  Re-organize.
14246         Now is passed the actual array (pointer) type of the value.
14247         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
14248         (patch_array_constructor):  Removed - merged into patch_new_array_init.
14249         (java_complete_tree):  Update patch_new_array_init.
14250
14251         * jcf-write.c (find_constant_index):  New function.
14252         (generate_bytecode_insns):  Use find_constant_index.
14253         (generate_classfile):  Use find_constant_index for ConstantValue.
14254
14255 1998-12-11  Tom Tromey  <tromey@cygnus.com>
14256
14257         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
14258         * decl.c (init_decl_processing): Renamed dtable -> vtable.
14259         * class.c (make_class_data): Renamed dtable -> vtable, and
14260         dtable_method_count -> vtable_method_count.
14261
14262 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14263
14264         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
14265         global variables, initialized.
14266         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
14267         Declared new global variables.
14268         * lex.c (java_lex): Return long_zero_node, float_zero_node,
14269         double_zero_node, integer_zero_node upon direct matching.
14270         * parse.y (purify_type_name): Added function prototype.
14271         (duplicate_declaration_error_p): Consider new_type as potentially
14272         being a incomplete type. Use purify_type_name on type string.
14273         (method_header): saved_type: unused variable removed. Don't figure
14274         return type if method name is invalid.
14275         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
14276         processed by patch_unaryop.
14277         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
14278         increment/decrement node into its original type after binary
14279         numeric promotion on its operands.
14280
14281 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14282
14283         * parse.y (array_initializer:): Array init operand is NULL_TREE
14284         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
14285         now an error. Fixed indentation problems.
14286         (patch_string): Handle error_mark_node as an argument.
14287         (patch_new_array_init): Fixed indentation problems.
14288         (array_constructor_check_entry): Removed check on null wfl_value.
14289         Return an error if wfl_value's walk returns an error.
14290
14291 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14292
14293         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
14294         * lex.c (java_lex): Remember column position before advancing one
14295         token. Retain location information on OCB_TK.
14296         * lex.h (typedef struct java_lc): Added new field.
14297         * parse.h (GET_SKIP_TYPE): New macro.
14298         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
14299         * parse.y (build_new_array_init, patch_new_array_init,
14300         patch_array_constructor, maybe_build_array_element_wfl,
14301         array_constructor_check_entry): New function prototypes.
14302         (switch_block:): Tagged <node>.
14303         (OCB_TK): Tagged <operator>.
14304         (array_initializer:): Installed actions.
14305         (variable_initializer): Build location information on element if
14306         necessary.
14307         (switch_statement:): Fixed indentation typo.
14308         (switch_block:): Redefined default action.
14309         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
14310         (patch_assignment): Removed duplicate code.
14311         (maybe_build_array_element_wfl, build_new_array_init,
14312         patch_new_array_init, patch_array_constructor,
14313         array_constructor_check_entry): New functions.
14314
14315 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14316
14317         * parse.y (array_initializer): Tagged <node>.
14318         (variable_initializer:): Use default rule.
14319         (array_initializer:): Defined actions.
14320         (variable_initializers:): Likewise.
14321         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
14322         non-static field accesses.
14323         (patch_invoke): Fixed indentation typo.
14324         (java_complete_tree): Likewise.
14325         (build_labeled_block): Changed leading comment. Generate an error
14326         in case of duplicate loop labels.
14327         (patch_conditional_expr): Patch results of string concatenation
14328         operations.
14329
14330 1998-12-06  Per Bothner  <bothner@cygnus.com>
14331
14332         * constants.c (find_methodref_index):  When the class is an interface,
14333         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
14334
14335         * decl.c (finit_identifier_node):  Use "$finit$", rather than
14336         "<finit>" (which Sun's verifier rejects).
14337         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
14338         (generate_field_initialization_code):  Removed.
14339         (fix_constructors)  Don't add call to $finit$ here (wrong order).
14340         (patch_method_invocation):  Add $finit$ call here.
14341
14342         * java-tree.h (CALL_USING_SUPER):  New macro.
14343         * parse.y (patch_invoke):  Remove im local variable.
14344         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
14345         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
14346         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
14347
14348         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
14349
14350         * parse.y (java_complete_tree):  Don't complain about unreachable
14351         statement if it is empty_stmt_node.
14352
14353         * jcf-write.c (find_constant_wide):  New function.
14354         (push_long_const):  Use find_constant_wide.
14355
14356         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
14357         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
14358         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
14359         Emit invokeinterface when calling an interface method.
14360         Emit invokespecial also when calling super or private methods.
14361
14362         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
14363
14364 1998-12-06  Per Bothner  <bothner@cygnus.com>
14365
14366         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
14367
14368 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14369
14370         * java-tree.h (java_layout_seen_class_methods): New function
14371         prototype.
14372         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
14373         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
14374         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
14375         * parse.y (method_declarator:): Defined action.
14376         (issue_warning_error_from_context): input_filename saved, set to
14377         the appropriate value and restored after java_error is called.
14378         (build_unresolved_array_type): Fixed comment.
14379         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
14380         (method_header): Deal with return type the same way type are
14381         handled for fields and method's parameters and local variables
14382         types are handled.
14383         (check_method_redefinition): Removed extra CR.
14384         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
14385         (java_layout_seen_class_methods): New function.
14386         (java_layout_classes): Call java_layout_seen_class_methods.
14387
14388 1998-12-03  Per Bothner  <bothner@cygnus.com>
14389
14390         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
14391
14392 1998-12-03  Per Bothner  <bothner@cygnus.com>
14393
14394         * jcf-dump.c (main):  Fix error message.
14395         * jcf-path.c (add_entry):  Style fix.
14396
14397 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14398
14399         * class.c (layout_class_method): Call build_java_argument_signature
14400         on constructors too.
14401         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14402         (patch_method_invocation): Define a primary when resolving an
14403         expression name. Augmented comment on code checking illegal `this'
14404         usage. Loosened it test by accepting NEW_CLASS_EXPR.
14405
14406 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14407
14408         * class.c (layout_class_method): Don't report error on non-static
14409         overriding static if the method is private.
14410         * java-tree.h (finish_class): Prototype added.
14411         * lex.c (java_get_line_col): Handle col argument -2 value.
14412         * parse.h: All static method declarations moved to parse.y.
14413         * parse.y: Now contains all static method declarations previously
14414         found in parse.h.
14415         (find_expr_with_wfl, missing_return_error,
14416         unreachable_stmt_error): New functions.
14417         (java_get_real_method_name): Identify constructors bearing class
14418         names in source code compiled classes only.
14419         (java_complete_expand_methods): Call missing_return_error.
14420         (invocation_mode): Private methods invoked as static methods.
14421         (java_complete_tree): Call unreachable_stmt_error.
14422
14423 1998-12-01  Tom Tromey  <tromey@cygnus.com>
14424
14425         * Makefile.in (+target): Removed.
14426         (+xmake_file): Likewise.
14427         (+tmake_file): Likewise.
14428         (.NOEXPORT): Removed duplicate.
14429
14430 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14431
14432         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14433
14434         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
14435
14436         * jvgenmain.c: Remove the xmalloc prototype, we get it from
14437         libiberty.h.  Provide an xmalloc definition.
14438
14439         * jvspec.c: Remove the xmalloc prototype.
14440
14441         * parse-scan.y: Include config.h and system.h.  Don't include
14442         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
14443         Provide an xstrdup definition.
14444
14445 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
14446
14447         * jcf-path.c (add_entry): Recognize ".jar" too.
14448         * lang-specs.h: Likewise.
14449
14450 1998-11-26  Per Bothner  <bothner@cygnus.com>
14451
14452         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
14453         soft_monitorenter_node, soft_monitorexit_node, throw_node.
14454
14455         * jcf-write.c (generate_bytecode_insns):
14456         Handle pre/post-increment/decrement of long.
14457
14458         * jcf-write.c (generate_bytecode_insns):
14459         Handle missing exception handler (finally for synchronized).
14460
14461 1998-11-25  Per Bothner  <bothner@cygnus.com>
14462
14463         * java-tree.h (end_params_node):  Declare global.
14464         * decl.c (end_params_node):  New global.
14465         (init_decl_processing, start_java_method):  Use end_params_node for
14466         end of list of parameter types.  Follows correct gcc conventions.
14467         * expr.c (pop_argument_types, pop_arguments):  Likewise.
14468         * lang.c (put_decl_node):  Likewise.
14469         * typeck.c (various places):  Likewise.
14470         * class.y (various places):  Likewise.
14471         * parse.y (various places):  Likewise.
14472
14473         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
14474         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
14475
14476         * class.c:  Add #include flags.h, remove no-longer needed declaration.
14477
14478         * class.c (layout_class_method):  Remove commented-out code, re-format.
14479         Don't add vtable entry (or index) for private methods.
14480         * expr.c (expand_invoke):  A private method is implicitly final.
14481         * class.c (make_class_data):  If inlining or optimizing,
14482         skip private methods.
14483
14484         * class.c (finish_class):  New function.  Calls existing methods,
14485         but alls emits deferred inline functions.
14486         * jcf-parse.c (parse_class_file):  Call finish_class.
14487         * parse.y (java_complete_expand_methods):  Likewise.
14488
14489         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
14490
14491         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
14492
14493 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
14494
14495         * jcf-write.c (generate_bytecode_conditional): Fix typo.
14496
14497 1998-11-24  Per Bothner  <bothner@cygnus.com>
14498
14499         * (generate_classfile): Always write class access flag with
14500         ACC_SUPER set.
14501
14502 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14503
14504         * class.c (maybe_layout_super_class): New function.
14505         (layout_class): Reorganized. Loop on class methods dispatched into
14506         a new function. Call maybe_layout_super_class.
14507         (layout_class_methods, layout_class_method): New functions.
14508         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14509         class.
14510         (expand_invoke): Likewise.
14511         * java-tree.h (all_class_list): New global variable declared.
14512         (layout_class_methods, layout_class_method): New function
14513         prototypes.
14514         (LAYOUT_SEEN_CLASS_METHODS): New macro.
14515         * jcf-parse.c (all_class_list): New global variable.
14516         (load_class): Extended what class_or_name can be. Use parser
14517         context mechanism to save globals before calling jcf_parse.
14518         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14519         is set on the file name.
14520         (jcf_parse): Layout class methods when Object is loaded, otherwise
14521         record class in all_class_list for delayed method layout.
14522         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14523         * lang.c (put_decl_node): Decode <init> into the decl context
14524         class name.
14525         * lex.c (java_allocate_new_line): Use xmalloc.
14526         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
14527         pointers, not TREE_LIST elements.
14528         (struct parser_ctxt): Fixed comment indentations, added comments
14529         and reordered some fields.
14530         (java_check_methods): Function prototype removed.
14531         * parse.y (java_push_parser_context): Use xmalloc.
14532         (java_parser_context_restore_global): Pop extra pushed ctxp only
14533         when there's nothing next.
14534         (maybe_create_class_interface_decl): Fixed comment, add new
14535         created class decl to all_class_list.
14536         (method_header): Use GET_REAL_TYPE on argument's types.
14537         (method_declarator): Use GET_REAL_TYPE, change type to the real
14538         type in TREE_LIST dependency node. Build argument list with the
14539         real type.
14540         (create_jdep_list): Use xmalloc. Removed allocation error message.
14541         (obtain_incomplete_type): Fixed leading comment. Broadened
14542         incoming argument meaning.
14543         (register_incomplete_type): Use xmalloc. Removed allocation error
14544         message.
14545         (safe_layout_class): Fixed leading comment.
14546         (jdep_resolve_class): Reversed if statement condition and switch
14547         if and else bodies.
14548         (resolve_and_layout): Fixed leading comment. Broadened incoming
14549         argument meaning.
14550         (complete_class_report_errors): New local variable name, for
14551         clarity. purify_type_name used for all error cases.
14552         (java_get_real_method_name): Stricter check on constructors.
14553         (java_check_regular_methods): Reverse methods list only if not
14554         already laid out. Layout artificial constructor.
14555         (java_check_methods): Deleted.
14556         (source_start_java_method): Obtain incomplete type for patchable
14557         method arguments.
14558         (java_layout_classes): Fixed leading comment. Use
14559         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14560         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14561         before returning. Fixed comments.
14562         (java_expand_classes): Check for errors up front.
14563         (patch_method_invocation): Class to search is resolved and laid
14564         out.
14565
14566 1998-11-24  Per Bothner  <bothner@cygnus.com>
14567
14568         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
14569
14570         * javaop.h (int8):  Removed - not used.
14571         (jbyte):  Redefine portably with correct signedness.
14572
14573         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
14574
14575         * jcf-write.c (generate_bytecode_insns):  Fix typo
14576         OPCODE_getstatic to OPCODE_getfield.
14577
14578         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
14579         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
14580         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14581
14582 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14583
14584         * jcf-parse.c (jcf_parse_source): Function returned type is
14585         void. Added prototype.
14586         (jcf_parse): Function returned type is void.
14587         (yyparse): Remove call to fclose on the last parsed file.
14588
14589         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14590
14591 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14592
14593         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14594         (layout_class): Cope with methods featuring WFL in decl names.
14595         * decl.c (unqualified_object_id_node): New global variable,
14596         initialized.
14597         (build_decl_no_layout): Removed.
14598         * expr.c (build_primtype_type_ref): Handle Double.
14599         (java_lang_expand_expr): Fixed indentations.
14600         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14601         (flag_wall, flag_redundant, flag_not_overriding,
14602         flag_static_local_jdk1_1, unqualified_object_id_node): Global
14603         variable declarations.
14604         (build_decl_no_layout): Removed prototype.
14605         (java_get_real_method_name): Added prototype.
14606         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14607         (java_parse_abort_on_error): Macro now just returns.
14608         * jcf-parse.c (jcf_parse_source): Check fclose returned
14609         value. Call emit_register_classes if java_report_errors returns
14610         zero.
14611         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14612         flag_static_local_jdk1_1): New integer flags.
14613         (lang_decode_option): New flags set here.
14614         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14615         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14616         the flag_redundant variable.
14617         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14618         when parsing java.lang.Object class.
14619         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14620         NULL_TREE to build.
14621         (resolve_qualified_expression_name): Fixed indentation.
14622         (patch_array_ref): Changed prototype.
14623         (not_initialized_as_it_should_p): Prototype removed.
14624         (java_report_errors): Added function prototype.
14625         * parse.y (formal_parameter:): Changed error message for not yet
14626         supported final parameters.
14627         (class_type_list:): Set both PURPOSE and VALUE of created
14628         TREE_LIST to be class_type.
14629         (primary_no_new_array:): Handle class literals on primitive types.
14630         (parse_warning_context): Reinstalled correct force_error and
14631         do_warning flags setups.
14632         (java_report_errors): Changed prototype. Return java_error_count
14633         value.
14634         (variable_redefinition_error): Consider treating variable type as
14635         a fake pointer.
14636         (create_interface): Warn about redundant abstract modifier if
14637         flag_redundant is set. Changed error message.
14638         (lookup_field_wrapper): Save/restore globals before/after looking
14639         up field.
14640         (duplicate_declaration_error_p): Consider treating declaration
14641         type as a fake pointer.
14642         (register_fields): Extract real type from dependency node. Check
14643         for duplicate field declaration after type adjustment. Use
14644         DECL_INITIAL to store static final initialized values.
14645         (method_header): Extract real function type from dependency node.
14646         (check_abstract_method_header): Use GET_METHOD_NAME.
14647         (obtain_incomplete_type): Layout fake pointer type.
14648         (safe_layout_class): Don't try to check for methods before layout.
14649         (java_complete_class): Don't check for correct throws clause
14650         elements inheritance here.
14651         (resolve_and_layout): Broadened name parameter meaning.
14652         (reset_method_name): Use GET_METHOD_NAME.
14653         (java_get_real_method_name): New function.
14654         (java_check_regular_methods): Don't check methods in
14655         java.lang.Object.  Verify lineage of throws clause elements. Use
14656         flag_no_overriding in warning report.
14657         (check_throws_clauses): Don't check if class was from
14658         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14659         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14660         (declare_local_variables): Use flag_static_local_jdk1_1 to report
14661         warning on unsupported final local variables. Use build_decl
14662         instead of build_decl_no_layout. Get real local variable type from
14663         dependency node.
14664         (source_start_java_method): Get real parameter type from
14665         dependency node. Call build_decl instead of build_decl_no_layout.
14666         (java_layout_classes): Reverse tree and layout type and class as
14667         required. Mark class as loaded when done.
14668         (resolve_field_access): Fixed indentation. Restricted condition
14669         leading to static field access code generation. Set field_type
14670         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14671         (resolve_qualified_expression_name): Initialize type_found to
14672         null. Handle static field resolved during qualification. Fixed
14673         layout on non primitive field decl types.
14674         (not_accessible_p): Fixed typo in comment.
14675         (patch_method_invocation): Resolve and layout class to search from
14676         type.
14677         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14678         layout non primitive type, if necessary. Make method node only to
14679         report errors.
14680         (find_applicable_accessible_methods_list): Consider WFL'ed method
14681         decl names. Fixed indentation.
14682         (argument_types_convertible): Resolve and layout target type if
14683         necessary.
14684         (java_complete_tree): Fixed indentation problems. Rewrote
14685         CALL_EXPR thrown exceptions check. Re-installed further processing
14686         of the assignment in certain cases.
14687         (patch_assignment): Call maybe_build_primttype_type_ref to perform
14688         inlining on class literals.
14689         (valid_builtin_assignconv_identity_widening_p): Cope with constant
14690         0 literal.
14691         (valid_method_invocation_conversion_p): Likewise.
14692         (patch_string): Temporary disable forbidden use of `this' in
14693         explicit constructor invocations when doing string concatenation
14694         within their scope.
14695         (patch_unaryop): Added comment. Reinstalled code to disable
14696         further check on assignment operation with cast expression RHS.
14697         (patch_switch_statement): Fixed indentation.
14698         (build_try_statement): Call build_decl instead of
14699         build_decl_no_layout.
14700         (patch_synchronized_statement): Likewise.
14701         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14702         IS_UNCHECKED_EXPRESSION_P.
14703         (check_thrown_exceptions_do): Changed leading comment. Resolve and
14704         layout argument exception type.
14705         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14706         of IS_UNCHECKED_EXPRESSION_P.
14707
14708 1998-11-18  Anthony Green  <green@cygnus.com>
14709
14710         * jcf-parse.c (yyparse): Open class file in binary mode.
14711
14712 1998-11-15  Per Bothner  <bothner@cygnus.com>
14713
14714         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
14715
14716         * jcf-write.c (perform_relocations):  Move check out one loop.
14717
14718 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
14719
14720         * Make-lang.in: Fix reference to srcdir.
14721         * jv-scan.c: Add missing xmalloc prototype.
14722         * jvgenmain.c: Ditto.
14723
14724 1998-11-15  Per Bothner  <bothner@cygnus.com>
14725
14726         * decl.c (error_mark_node), java-tree.h:  New global.
14727         * parse.y:  Use empty_stmt_node instead of size_zero_node.
14728         (build_if_else_statement):  If missing else, use empty_stmt_node.
14729
14730         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
14731         (java_complete_expand_method):  Complain if return is missing.
14732         (java_check_regular_methods):  Comment out incorrect error check.
14733         (not_accessible_p):  Fix incorrect handling of protected methods.
14734         (patch_method_invocation):  Pass correct context to not_accessible_p.
14735         (find_applicable_accessible_methods_list):  Likewise.
14736         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
14737         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
14738         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
14739         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
14740
14741         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
14742         (push_int_const):  Remove reundant NOTE_PUSH.
14743         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
14744         (- case SWITCH_EXPR):  Fix code generation bug.
14745         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
14746         (generate_classfile):  More robust for abstract methods.
14747
14748 1998-11-15  Anthony Green  <green@cygnus.com>
14749
14750         * Makefile.in: jv-scan and jvgenmain all require libiberty.
14751         * Make-lang.in: Ditto.
14752
14753         * jv-scan.c: Remove xmalloc and xstrdup definitions.
14754         * jvgenmain: Ditto.
14755
14756 1998-11-15  Per Bothner  <bothner@cygnus.com>
14757
14758         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
14759
14760         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
14761
14762 1998-11-14  Per Bothner  <bothner@cygnus.com>
14763
14764         Allow uses of interface types to verify.  This is not really
14765         type-safe, but it matches what Sun does, and is OK as long as
14766         there are appropriate run-time checks.
14767         * verify.c (merge_types):  If merging two interface types,
14768         just set the result to java.lang.Object.
14769         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
14770
14771 1998-11-13  Tom Tromey  <tromey@cygnus.com>
14772
14773         * gjavah.c (main): Handle --output-class-directory argument.
14774         * jvspec.c (lang_specific_driver): Translate `-d' into
14775         -foutput-class-dir.
14776         * jcf.h (jcf_write_base_directory): Declare.
14777         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14778         * lang-options.h: Mention -foutput-class-dir.
14779         * jcf-write.c (jcf_write_base_directory): New global.
14780         (make_class_file_name): Put generated .class file into `-d'
14781         directory, or into source directory if -d not given.  Function now
14782         static.
14783         (write_classfile): Free class file name.  Handle case where class
14784         file name is NULL.
14785         (DIR_SEPARATOR): New macro.
14786         Include <sys/stat.h>
14787
14788         * Makefile.in (prefix): New macro.
14789
14790 1998-11-12  Per Bothner  <bothner@cygnus.com>
14791
14792         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
14793         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
14794         here (done in patch_invoke instead).
14795         (case_identity):  Moved here from parse.y.
14796
14797         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
14798         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
14799         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
14800         so they can be efficiently scanned without recursion.
14801         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14802         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
14803         in BLOCK iteratively, rather than recursively.
14804
14805         * parse.y (do_unary_numeric_promotion):  New function.
14806         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
14807
14808         * parse.y (patch_newarray):  Various fixes.
14809
14810         Re-do handling of switch statements (for proper block scoping).
14811         * parse.y:  Add just a single block for the enture switch block,
14812         but don't create any "case blocks".
14813         (group_of_labels):  Rmeoved unneeded non-terminal.
14814         CASE_EXPR and DEFAULT_EXPR are added to current block.
14815         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
14816         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14817         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
14818         * parse.y (wfl_operator, print_int_node): Make non-static.
14819         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
14820         as part of recursive scan of block.
14821         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
14822         (patch_switch_statement):  Most tests move dinto java_complete_tree.
14823
14824         * parse.y:  Make various production be non-typed (void).
14825         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
14826         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
14827         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
14828
14829         * jcf-write.c (struct jcf_handler):  New type.
14830         (struct jcf_switch_state):  New type.
14831         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
14832         (alloc_handler, emit_unop, emit_reloc):  New functions.
14833         (adjust_typed_op):  Add extra parameter ("max type" offset).
14834         (emit_switch_reloc, emit_case-reloc):  New function.
14835         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
14836         (generate_bytecode_insns):  Support REAL_CST, switch statements,
14837         exception handling, method calls, object/array creation, and more.
14838
14839         * class.c:  Remove some unused variables.
14840         * constants.c (find_string_constant):  New function.
14841         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
14842         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
14843         if flag_emit_class_files.
14844
14845 1998-11-12  Tom Tromey  <tromey@cygnus.com>
14846
14847         * jcf-io.c (find_class): Added explanatory comment.
14848
14849         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
14850         trailing slash to `.zip' entries.
14851
14852         * jvspec.c (lang_specific_driver): Correctly handle case where
14853         GC_NAME not defined.
14854
14855 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14856
14857         * jvspec.c (GC_NAME): New define.
14858         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
14859         if required.
14860         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14861
14862 1998-11-11  Per Bothner  <bothner@cygnus.com>
14863
14864         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
14865
14866 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14867
14868         * jcf-dump.c (main): Correctly recognize `--'-style long options.
14869
14870 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14871
14872         * class.c (is_compiled_class): Call safe_layout_class for class
14873         compiled from source.
14874         * conver.h (convert_to_integer, convert_to_real,
14875         convert_to_pointer): Added prototypes.
14876         * decl.c (init_decl_processing): Non longer push the decls of
14877         `methodtable', `constants', `Class', `Field', `dispatchTable'
14878         `jexception' and `Method'.
14879         * expr.c (build_invokeinterface): New function.
14880         (expand_invoke): static variable CLASS_IDENT now in
14881         build_invokeinterface. Use build_invokeinterface.
14882         (expand_java_field_op): Moved code to inline
14883         java.lang.PRIMTYPE.TYPE into a function.
14884         (build_primtype_type_ref): New function.
14885         * java-tree.def (INSTANCEOF_EXPR): New tree code.
14886         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14887         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14888         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14889         (DECL_LOCAL_STATIC_VALUE): New macro.
14890         (build_invokeinterface, build_primtype_type_ref): New function
14891         prototypes.
14892         (java_parse_abort_on_error): Macro rewritten.
14893         * jcf-parse.c (current_method): Add comment to declaration.
14894         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14895         Function prototypes fixed.
14896         (jcf_parse_source): push/pop parser context. save/restore global.
14897         (parse_source_file): Fixed leading comment. Now take a
14898         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14899         classes and pop the parser context anymore.
14900         (yyparse): Push parser context, save globals, parse the source
14901         file, restore globals and pop the parser context when processing a
14902         source file.
14903         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14904         * lex.c (java_parse_doc_section): New function.
14905         (java_lex): Call java_parse_doc_section when appropriate. Build an
14906         operator around INSTANCEOF_TK.
14907         * lex.h (java_lineterminator, java_sprint_unicode,
14908         java_unicode_2_utf8, java_lex_error, java_store_unicode):
14909         Prototypes rewritten.
14910         (java_parse_escape_sequence, java_letter_or_digit_p,
14911         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14912         java_read_unicode, java_store_unicode, java_read_char,
14913         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14914         Added function prototypes.
14915         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14916         define.
14917         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14918         New macros
14919         (struct parser_ctxt): New fields: deprecated,
14920         current_parsed_class_un, gclass_list.
14921         (fix_method_argument_names, issue_warning_error_from_context,
14922         resolve_package, lookup_package_type): New function prototypes.
14923         (resolve_expression_name): Fixed function prototype.
14924         (find_applicable_accessible_methods_list): Fixed indentation, added
14925         extra argument in prototype.
14926         (check_final_assignment, build_null_of_type, check_deprecation,
14927         check_method_redefinition, reset_method_name,
14928         java_check_regular_methods, java_check_abstract_methods,
14929         maybe_build_primttype_type_ref): New function prototype.
14930         * parse.y (conver.h): Include.
14931         (INSTANCEOF_TK): Tagged <operator>.
14932         (single_type_import_declaration): Use REGISTER_IMPORT macro.
14933         (relational_expression:): Build binop for instanceof.
14934         (java_push_parser_context): Remember ctxp->gclass_list across
14935         contexts.
14936         (java_pop_parser_context): Simply return if no context
14937         exists. Remember gclass_list across contexts.
14938         (issue_warning_error_from_context): New function.
14939         (parse_error_context): Don't setup ctxp->elc here. Call
14940         issue_warning_error_from_context instead.
14941         (parse_warning_context): Likewise.
14942         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14943         setup. Link new class/interface to ctxp->gclass_list.
14944         (add_superinterfaces): Register interface as incomplete if not
14945         loaded.
14946         (create_class): Remember class unqualified name in
14947         ctxp->current_parsed_class_un. Check class deprecation.
14948         (register_fields): Check field deprecation. Remember static final
14949         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14950         processing INIT.
14951         (method_header): New local variable ORIG_ARG. Use unqualified
14952         current class name for check on constructor errors. Promote return
14953         type if of record type. Argument list fix moved in
14954         fix_method_argument_names, called here. Check method deprecation.
14955         (fix_method_argument_names): New function.
14956         (method_declarator): Promote record typed arguments.
14957         (safe_layout_class): Check class methods before layout.
14958         (java_complete_class): Compute field layout when patched.
14959         (do_resolve_class): Try to load class after having it renamed
14960         after the package name.
14961         (get_printable_method_name): Use DECL_CONTEXT.
14962         (reset_method_name): New function.
14963         (check_method_redefinition): Use reset_method_name.
14964         (java_check_regular_methods): New local variable
14965         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14966         names for error report. Check for compile-time error when method
14967         found has default (package) access.
14968         (java_check_abstract_methods): Now takes an interface DECL node as
14969         an argument. Also reinstall real name on unchecked
14970         overriding/hiding methods for error report.
14971         (java_check_methods): Fixed leading comment. Get classes to verify
14972         from ctxp->gclass_list. Use CHECK_METHODS macro and set
14973         CLASS_METHOD_CHECKED_P on class verification.
14974         (lookup_java_method2): Get real method name if necessary.
14975         (find_in_imports): Don't check package class access here.
14976         (resolve_package, lookup_package_type): New functions.
14977         (java_layout_classes): Fixed leading comment. Take classes to be
14978         laid out from ctxp->gclass_list.
14979         (java_complete_expand_methods): Don't expand native and abstract
14980         methods.
14981         (java_expand_classes): New function.
14982         (resolve_expression_name): Use additional argument ORIG.  Retrieve
14983         values of static final field of primitive types.
14984         (resolve_field_access): Handles static final field of promotive
14985         type.
14986         (resolve_qualified_expression_name): Handle STRING_CST as
14987         primaries and package name resolution. Check deprecation on found
14988         decls. Set where_found and type_found on non static field resolved
14989         during qualification. Layout non primitive field decl types.
14990         (check_deprecation): New function.
14991         (maybe_access_field): Simplified.
14992         (patch_method_invocation_stmt): Local variable CLASS_TYPE
14993         removed. Reverse method's argument when primary is a type. Don't
14994         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
14995         instead. Include abstract class in the list of class searchable
14996         for constructors. Use DECL_CONTEXT of found method for access
14997         checks. Check method deprecation.
14998         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
14999         converting arguments. Handle INVOKE_INTERFACE.
15000         (lookup_method_invoke): Search constructor using existing
15001         infrastructure (don't rely on lookup_java_constructor anymore).
15002         (find_applicable_accessible_methods_list): Extra argument flag
15003         LC. Now include constructor in the search.
15004         (qualify_ambiguous_name): Conditional expression are primaries.
15005         (not_initialized_as_it_should_p): static final are always
15006         initialized.
15007         (java_complete_tree): Pass extra NULL argument to
15008         resolve_expression_name. Stricter test to carry on patching
15009         assignments. New case for INSTANCEOF_EXPR.
15010         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
15011         (check_final_assignment, maybe_build_primttype_type_ref): New
15012         functions.
15013         (patch_assignment): Detect resolved static finals and carry normal
15014         assignment error check on them. Inline PRIMTYPE.TYPE read access.
15015         (try_builtin_assignconv): Access constant 0 on all primitive
15016         types.
15017         (valid_builtin_assignconv_identity_widening_p): Accept identical
15018         types. Accept all promoted type on int type.
15019         (valid_ref_assignconv_cast_p): Accept a null pointer to be
15020         assigned to a reference.
15021         (valid_method_invocation_conversion_p): Accept to check null
15022         pointers.
15023         (build_binop): Merge declaration and initialization of local
15024         variable BINOP.
15025         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
15026         numeric types. Improved validity test for qualify operators on
15027         references.
15028         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
15029         and PREINCREMENT_EXPR. Also detect resolved static finals of a
15030         primitive type and issue the appropriate error message.
15031         (resolve_type_during_patch): Mark class loaded when resolved.
15032         (patch_cast): Allow null to be cased to reference types.
15033         (build_null_of_type): New function.
15034         (patch_array_ref): Handle array on references correctly.
15035         (patch_return): Removed unused local variable MODIFY. Force
15036         boolean to be returned as integers. Allows null to be returned by
15037         a function returning a reference.
15038         * typeck.c (convert_to_integer, convert_to_real,
15039         convert_to_pointer): Prototypes moved to convert.h
15040         (lookup_argument_method): Use method real name, if necessary.
15041
15042 1998-10-30  Tom Tromey  <tromey@cygnus.com>
15043
15044         * class.c (build_class_ref): Changed name of primitive classes to
15045         start with `_Jv_'.
15046
15047         * class.c (make_class_data): Renamed fields: nmethods to
15048         method_count, method_count to dtable_method_count.  Always set
15049         `state' field to 0.
15050         * decl.c (init_decl_processing): Likewise.
15051
15052 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15053
15054         * class.c (layout_class): Don't mangle <finit>, produce
15055         __finit<class> instead. Don't verify artificial methods.
15056         * decl.c (finit_identifier_node): New declared global.
15057         (init_decl_processing): finit_identifier_node initialized.
15058         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
15059         * java-tree.h (finit_identifier_node): Declared as extern.
15060         (struct lang_decl): New field called_constructor.
15061         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
15062         (CLASS_HAS_FINIT_P): New macro.
15063         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
15064         explicit constructor invocation.
15065         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
15066         CALL_SUPER_CONSTRUCTOR_P): New macros.
15067         (write_classfile): Added prototype.
15068         * jcf-parse.c (jcf_parse_source): Parse and remember for
15069         generation if the file was seen on the command line.
15070         (parse_source_file): Don't write the class file here.
15071         (yyparse): Loop on files rewritten. Set current_jcf.
15072         (parse_zip_file_entries): Parse class file only if it was found.
15073         * lang.c (init_parse): Don't open command line provided filename
15074         here.
15075         (lang_parse): Don't set main_jcf anymore.
15076         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
15077         (JCONSTRUCTOR_CHECK): New macro.
15078         (JBSC_TYPE_P): New macro.
15079         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
15080         (COMPLETE_CHECK_OP_2): New macro.
15081         (struct parse_ctxt): New field explicit_constructor_p.
15082         (check_class_interface_creation): Fixed prototype indentation.
15083         (patch_method_invocation_stmt): Prototype reflects added argument.
15084         (patch_invoke): Likewise.
15085         (complete_method_declaration, build_super_invocation,
15086         verify_constructor_circularity,
15087         build_this_super_qualified_invocation, get_printable_method_name,
15088         patch_conditional_expr, maybe_generate_finit, fix_constructors,
15089         verify_constructor_super, create_artificial_method,
15090         start_artificial_method_body, end_artificial_method_body,
15091         generate_field_initialization_code): New function prototypes.
15092         * parse.y: Fixed leading comment
15093         (constructor_header:, constructor_body:, block_end:): Rules tagged
15094         <node>.
15095         (type_declaration:): Call maybe_generate_finit.
15096         (method_declaration:): Action for method_body: placed in new
15097         function complete_method_declaration, called here.
15098         (constructor_declaration:): Defined actions. Removed leading
15099         FIXME.
15100         (constructor_header:): New rule with action.
15101         (constructor_body:): Rule rewritten using block_begin: and
15102         block_end:. Defined actions.
15103         (constructor_declarator:, explicit_constructor_invocation:):
15104         Defined actions.
15105         (block:): Use new rules block_begin: block_end:.
15106         (block_begin:, block_end:): New rules and actions.
15107         (block_statements:): Fixed error message for explicit
15108         constructors.
15109         (method_invocation:): Call build_this_super_qualified_invocation
15110         if primary is `this' or `super' was seen.
15111         (conditional_expression:): Action defined.
15112         (extra_ctxp_pushed_p): New static global flag.
15113         (java_parser_context_save_global): Create parser context if
15114         necessary. Use extra_ctxp_pushed_p to remember it.
15115         (java_parser_context_restore_global): Pop extra parser context if
15116         one exists.
15117         (build_array_from_name): Array on primitive types are marked
15118         loaded.
15119         (register_fields): Restore new name in field initializer
15120         expression if type was altered. Non static fields initialized upon
15121         declaration marked initialized.
15122         (maybe_generate_finit): New function.
15123         (maybe_generate_clinit): Use create_artificial_method,
15124         start_artificial_method_body, end_artificial_method_body. Generate
15125         debug info for enclosed initialization statements.
15126         (method_header): Fixed leading comment. Check constructor
15127         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
15128         accordingly.
15129         (complete_method_declaration, constructor_circularity_msg,
15130         verify_constructor_circularity): New functions.
15131         (get_printable_method_name): New function.
15132         (check_method_redefinition): Don't rename <finit> methods. Fix
15133         declared constructor names. Error message for
15134         constructors modified.
15135         (java_check_regular_methods): Local variable seen_constructor
15136         renamed saw_constructor. Skip verification on constructors. Create
15137         default constructor with create_artificial_method.
15138         (java_check_methods): Removed unnecessary empty line.
15139         (create_artificial_method, start_artificial_method_body,
15140         end_artificial_method_body): New functions.
15141         (java_layout_classes): Changed leading comment. Reverse fields
15142         list if necessary. Always layout java.lang.Object if being
15143         defined.
15144         (java_complete_expand_methods): Verify constructor circularity.
15145         (java_complete_expand_method): Call fix_constructor on
15146         constructors.  Local variable no_ac_found removed. Restore
15147         bindings if method body expansion failed.
15148         (fix_constructors, verify_constructor_super,
15149         generate_field_initialization_code): New function.
15150         (java_expand_classes): Fixed leading comment. Write class file
15151         here.
15152         (resolve_expression_name): Check for illegal instance variable
15153         usage within the argument scope of an explicit constructor
15154         invocation.
15155         (resolve_qualified_expression_name): Pass extra from_super flag
15156         when invoking patch_method_invocation_stmt. New case for
15157         conditional expression when used as a primary. Check for error
15158         when acquiring super.
15159         (patch_method_invocation_stmt): Added extra argument super. New
15160         local variable is_static_flag. Set class_to_search according to
15161         the nature of the constructor invocation. Don't add `this'
15162         argument when expanding NEW_CLASS_EXPR. Check for illegal method
15163         invocation within the argument scope of explicit constructor
15164         invocation. Set is_static according to is_static_flag. Provide
15165         extra `super' argument to patch_invoke invocation.
15166         (patch_invoke): New argument from_super. Loop on arguments
15167         indentation fixed. Pass from_super to invocation_mode. New switch
15168         case INVOKE_SUPER. Fixed error message in switch default case.
15169         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
15170         value.
15171         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
15172         (lookup_method_invoke): Fixed prototypes in candidates list. Error
15173         message takes constructors into account.
15174         (find_applicable_accessible_methods_list): Fixed indentation.
15175         (qualify_ambiguous_name): Take explicit constructor invocation
15176         into account. Deal with a conditional expression as a primary to
15177         a method call.
15178         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
15179         case. Added extra argument to patch_method_invocation_stmt.
15180         Register calls made to explicit constructor `this'. Don't call
15181         save_expr in ARRAY_REF case when emitting class files. Check for
15182         illegal use of this when expanding explicit constructor invocation
15183         arguments.
15184         (complete_function_arguments): Set and reset parser context
15185         explicit_constructor_p field value when appropriate.
15186         (build_super_invocation, build_this_super_qualified_invocation):
15187         New functions.
15188         (patch_assignment): Fixed typo.
15189         (patch_unaryop): Check on final fields occurs only when a decl
15190         exits.
15191         (patch_return): Take constructors into account.
15192         (patch_conditional_expr): New function.
15193         * typeck.c (build_java_signature): Removed unnecessary empty line.
15194
15195 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15196
15197         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
15198
15199 1998-10-28  Tom Tromey  <tromey@cygnus.com>
15200
15201         * decl.c (init_decl_processing): Renamed fields.
15202         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
15203         interface_len, msize fields.
15204
15205         * class.c (make_class_data): Removed subclass_head and
15206         subclass_next fields.
15207         * decl.c (init_decl_processing): Removed subclass_head and
15208         subclass_next fields.
15209
15210 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15211
15212         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
15213         * mangle.c (emit_unicode_mangled_name): Similarly.
15214
15215 1998-10-26  Nick Clifton  <nickc@cygnus.com>
15216
15217         * jcf-parse.c (get_constant): Place braces around code to compute
15218         'd' when REAL_ARITHMETIC is not defined.
15219
15220 1998-10-25  H.J. Lu  (hjl@gnu.org)
15221
15222         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
15223         dependency.
15224
15225 1998-10-23  Tom Tromey  <tromey@cygnus.com>
15226
15227         * lang-specs.h: `.zip' files are input to jc1.
15228
15229 1998-10-22  Per Bothner  <bothner@cygnus.com>
15230
15231         * jvspecs.c:  Add (but don't enable) support for combining multiple
15232         .class and .java input filenames to a single jc1 invocation.
15233         Add support for -C flag (copile to .class files).
15234         Translate -classpath and -CLASSPATH arguments.
15235         * lang-specs.h:  Don't set %2 spec.
15236
15237 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15238
15239         * jcf-path.c (add_entry): Don't add trailing separator if entry is
15240         a .zip file.
15241         (add_path): Don't add trailing separator to non-empty path
15242         elements.
15243
15244         * lang.c (lang_decode_option): Check for -fclasspath and
15245         -fCLASSPATH before examining other `-f' options.
15246
15247         * java-tree.h (finalize_identifier_node): Don't declare.
15248         * class.c (make_class_data): Don't push "final" field.
15249         * decl.c (init_decl_processing): Don't push "final" field.
15250         (finalize_identifier_node): Removed.
15251         (init_decl_processing): Don't set finalize_identifier_node.
15252
15253         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
15254
15255 1998-10-11  Anthony Green  <green@cygnus.com>
15256
15257         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
15258         (JV_SCAN_SOURCES): New macro.
15259         (JCF_DUMP_SOURCES): Likewise.
15260         (jcf-dump$(exeext)): New target.
15261         (jv-scan$(exeext)): New target.
15262
15263 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15264
15265         * Makefile.in (LEX): Removed.
15266         (LEXFLAGS): Likewise.
15267         (SET_BISON): New macro.
15268         (BISON): Removed.
15269         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
15270         spurious diffs in parse.c.
15271         ($(PARSE_SCAN_C)): Likewise.
15272         (PARSE_DIR): New macro.
15273         (PARSE_C): Use it.
15274         (PARSE_SCAN_C): Likewise.
15275         (PARSE_RELDIR): New macro.
15276
15277         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
15278
15279         * jcf-io.c (find_class): Use saw_java_source to determine when to
15280         look for `.java' file.
15281         * jcf-parse.c (saw_java_source): New global.
15282         (yyparse): Set it if `.java' file seen.
15283
15284         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
15285         (GCJH_SOURCES): Likewise.
15286         * Makefile.in (datadir): New macro.
15287         (libjava_zip): Likewise.
15288         (JAVA_OBJS): Added jcf-path.o.
15289         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15290         (../gcjh$(exeext)): Likewise.
15291         (jcf-path.o): New target.
15292         * java-tree.h (fix_classpath): Removed decl.
15293         * jcf-parse.c (fix_classpath): Removed.
15294         (load_class): Don't call fix_classpath.
15295         * parse.y (read_import_dir): Don't call fix_classpath.
15296         * lex.h: Don't mention classpath.
15297         * lex.c (java_init_lex): Don't initialize classpath.
15298         * jcf-io.c (classpath): Removed global.
15299         (find_class): Use jcf_path iteration functions.  Correctly search
15300         class path for .java file.
15301         (open_in_zip): New argument `is_system'.
15302         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
15303         classpath-related options.
15304         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
15305         and -I.
15306         (lang_init): Call jcf_path_init.
15307         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
15308         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
15309         Correctly put braces around second string in each entry.
15310         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
15311         classpath-related options.
15312         (help): Updated for new options.
15313         * jcf.h: Declare functions from jcf-path.c.  Don't mention
15314         `classpath' global.
15315         * jcf-path.c: New file.
15316
15317         * jcf-depend.c: Include jcf.h.
15318
15319         * jcf-write.c (localvar_alloc): Returns `void'.
15320         (localvar_free): Removed unused variable.
15321
15322         * lang.c (OBJECT_SUFFIX): Define if not already defined.
15323         (init_parse): Use OBJECT_SUFFIX, not ".o".
15324
15325 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15326
15327         * class.c (emit_register_classes): Renamed from
15328         emit_register_class.
15329         * java-tree.h (emit_register_classes): Prototype renamed from
15330         emit_register_class.
15331         * jcf-parse.c (yyparse): Call emit_register_classes once before
15332         returning.
15333         * parse.y (java_expand_classes): No longer register classes.
15334
15335 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15336
15337         * class.c (is_compiled_class): New local variable
15338         seen_in_zip. Identify classes found in currently compiled source
15339         file(s).
15340         * decl.c (complete_start_java_method): Fixed typo.
15341         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
15342         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
15343         (CLASS_P): Moved around.
15344         (java_parse_abort_on_error): Macro moved from jcf-parse.c
15345         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
15346         java-parse.h
15347         (jcf_parse_source): Changed leading comment. Removed unnecessary
15348         fclose and CLASS_FROM_SOURCE_P marking.
15349         (parse_source_file): New local variables remember_for_generation
15350         and filename. Mark parsed file name identifier node. Removed block
15351         executed when parse_only was null. Set remember_for_generation.
15352         Use it as an argument to java_pop_parser_context.
15353         (yyparse): New local variables several_files, list, next node and
15354         current_file_list. Split ampersand separated file names into
15355         current_file_list. Iterate through the list and parse accordingly.
15356         * parse.h (java_pop_parser_context): New function prototype.
15357         * parse.y (ctxp_for_generation): New static global variable.
15358         (java_pop_parser_context): New argument generate. Link popped ctxp
15359         to ctxp_for_generation list accordingly.
15360         (java_complete_expand_methods): Fixed indentation.
15361         (java_expand_classes): New function.
15362
15363 1998-10-17  Per Bothner  <bothner@cygnus.com>
15364
15365         * Makefile.in:  Link with libiberty.a instead of memmove.o.
15366
15367 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15368
15369         * lex.c (setjmp.h): No longer included.
15370         * lex.h (setjmp.h): Included.
15371         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
15372         (duplicate_declaration_error_p): Renamed from
15373         duplicate_declaration_error.
15374         (build_array_from_name): New function prototype.
15375         * parse.y (setjmp.h): No longer included.
15376         (variable_declarator_id): Define action.
15377         (build_array_from_name): New function.
15378         (duplicate_declaration_error_p): Renamed from
15379         duplicate_declaration_error.  Fixed leading comment.
15380         (register_fields): Main `for' loop reorganized. Uses
15381         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
15382         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
15383         build_array_from_name.
15384         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
15385         types.
15386         (read_import_dir): Don't try to skip `.' and `..'.
15387         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
15388         build_array_from_name. Main `for' loop reorganized.
15389         (resolve_qualified_expression_name): When building access to a
15390         field, use the type where the field was found, not its own type.
15391         (maybe_access_field): Use field DECL_CONTEXT if the type where the
15392         field was found is null.
15393         (qualify_ambiguous_name): Sweep through all successive array
15394         dimensions.
15395
15396 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15397
15398         * java-tree.h (pop_labeled_block, lang_printable_name,
15399         maybe_add_interface, set_super_info, get_access_flags_from_decl,
15400         interface_of_p, inherits_from_p, fix_classpath,
15401         complete_start_java_method, emit_handlers, init_outgoing_cpool,
15402         make_class_data, register_class, alloc_name_constant): New
15403         function prototypes.
15404         * lang.c (lang_decode_option): Set argc argument unused. Fixed
15405         indentation. Added cast to remove warning.
15406         (lang_printable_name): Set v argument unused.
15407         (lang_print_error): Added argument to lang_printable_name call.
15408         (java_dummy_print, print_lang_decl, print_lang_type,
15409         print_lang_identifier, lang_print_xnode): All argument marked
15410         unused.
15411         * lex.c (java_unget_unicode): Removed unnecessary argument.
15412         (java_allocate_new_line): Unused local variable is gone.
15413         (java_read_char): Added parenthesis in expressions to remove
15414         warnings.  Added final return statement.
15415         (java_read_unicode): Added parenthesis in expression to remove
15416         warning.
15417         (java_parse_end_comment): Fixed java_unget_unicode invocation.
15418         (java_parse_escape_sequence): Likewise.
15419         (java_lex): Unused local variables are gone. Fixed
15420         java_unget_unicode invocation.
15421         * lex.h (set_float_handler): Prototype added when JC1_LITE not
15422         defined.
15423         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15424         lang_printable_name invocation in macro.
15425         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15426         Likewise.
15427         (duplicate_declaration_error): Suppressed unused argument in
15428         prototype.
15429         (identical_subpath_p): Function declaration is gone.
15430         (patch_invoke): Suppressed unused argument in prototype.
15431         (patch_cast, build_labeled_block, check_thrown_exceptions):
15432         Likewise.
15433         * parse.y (setjmp.h): Included
15434         (toplev.h): Likewise.
15435         (field_declaration:): Suppressed unused local
15436         (label_decl:): Fixed build_labeled_block invocation.
15437         (java_pop_parser_context): Put extra parenthesis around assignment
15438         in if.
15439         (yyerror): Suppressed unused local variables.
15440         (variable_redefinition_error): Fixed lang_printable_name
15441         invocation.
15442         (create_interface): Suppressed unused local variables.
15443         (create_class): Likewise.
15444         (duplicate_declaration_error): Suppressed unused argument. Fixed
15445         lang_printable_name invocation.
15446         (register_fields): Suppressed unused local variable. Fixed
15447         duplicate_declaration_error invocation.
15448         (method_header): Suppressed unused local variable.
15449         (method_declarator, parser_check_super): Likewise.
15450         (java_complete_class): Suppressed unused local variable. Fixed
15451         fatal error message.
15452         (complete_class_report_errors): Added default: in switch.
15453         (java_check_regular_methods): Fixed lang_printable_name
15454         invocations.
15455         (check_throws_clauses): Likewise.
15456         (java_check_abstract_methods): Suppressed unused local
15457         variable. Fixed lang_printable_name invocation.
15458         (read_import_entry): Added supplemental return statement.
15459         (read_import_dir): Suppressed unused local variables.
15460         (check_pkg_class_access, declare_local_variables): Likewise.
15461         (source_start_java_method): Suppressed unused extern variable
15462         declarations
15463         (expand_start_java_method): Suppressed unused extern and local
15464         variable declarations.
15465         (java_complete_expand_methods): Likewise.
15466         (java_complete_expand_method): Suppressed unused local variables.
15467         (make_qualified_name): Likewise.
15468         (resolve_qualified_expression_name): Added default: in
15469         switch. Fixed lang_printable_name invocation.
15470         (class_instance_creation_expression): Added parenthesis around
15471         expressions.
15472         (patch_method_invocation_stmt): Fixed lang_printable_name and
15473         patch_invoke invocations.
15474         (check_for_static_method_reference): Fixed lang_printable_name
15475         invocation.
15476         (patch_invoke): Suppressed unused arguments and local variables.
15477         (lookup_method_invoke): Suppressed unused local variables.
15478         (qualify_ambiguous_name): Added default: in switch.
15479         (identical_subpath_p): Function removed.
15480         (patch_assignment): Suppressed unused local variables. Suppressed
15481         unnecessary if statement. Fixed lang_printable_name invocations.
15482         (try_builtin_assignconv): Fixed lang_printable_name invocations.
15483         (valid_ref_assignconv_cast_p): Parenthesis around
15484         expression. Suppressed unused local variables.
15485         (build_binop): Suppressed unused local variables. fixed
15486         lang_printable_name invocations.
15487         (string_constant_concatenation): Suppressed unused local
15488         variables.
15489         (patch_unaryop): Fixed lang_printable_name invocation.
15490         (patch_cast): Suppressed unnecessary argument. Fixed
15491         lang_printable_name invocation.
15492         (patch_array_ref): Fixed lang_printable_name invocation.
15493         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15494         (build_labeled_block): Suppressed unused argument.
15495         (generate_labeled_block): Fixed build_labeled_block invocation.
15496         (build_loop_body): Suppressed unused local variables.
15497         (patch_loop_statement): Likewise.
15498         (patch_exit): Fixed lang_printable_name invocation.
15499         (patch_switch_statement): Likewise.
15500         (case_identity): First argument marked unused.
15501         (patch_try_statement): Fixed lang_printable_name invocations.
15502         (patch_synchronized_statement, patch_throw_statement): Likewise.
15503         (check_thrown_exceptions): Fixed check_thrown_exceptions and
15504         lang_printable_name invocations.
15505         (check_thrown_exceptions_do): Suppressed unused argument.
15506
15507 1998-10-14  Tom Tromey  <tromey@cygnus.com>
15508
15509         * jcf-write.c (write_classfile): Add output class file as target.
15510         * lang-options.h: Added -MD, -MMD, -M, and -MM.
15511         * jcf.h: Added declarations for dependency-tracking functions.
15512         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15513         * lang.c (lang_decode_option): Recognize -MD and -MMD.
15514         (finish_parse): Call jcf_dependency_write.
15515         (dependency_tracking): New global.
15516         (DEPEND_SET_FILE): New define.
15517         (DEPEND_ENABLE): New define.
15518         (init_parse): Enable dependency tracking if required.
15519         Include "flags.h".
15520         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15521         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15522         (../gcjh$(exeext)): Likewise.
15523         (jcf-depend.o): New target.
15524         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15525         (GCJH_SOURCES): Likewise.
15526         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
15527         dep_name argument.
15528         (find_classfile): Added dep_name argument.
15529         (find_class): Compute name of dependency.
15530         (open_in_zip): Call jcf_dependency_add_file.
15531         * gjavah.c (output_file): No longer global.
15532         (usage): Don't mention "gjavah".
15533         (help): Likewise.
15534         (java_no_argument): Likewise.
15535         (version): Likewise.
15536         (main): Recognize and handle -M family of options.
15537         (print_mangled_classname): Return is void.
15538         (process_file): Handle case where output is suppressed.
15539         (HANDLE_END_FIELD): Likewise.
15540         (HANDLE_METHOD): Likewise.
15541         * jcf-depend.c: New file.
15542
15543 1998-10-13  Jeffrey A Law  (law@cygnus.com)
15544
15545         * java-tree.def: Add missing newline at EOF.
15546
15547 1998-10-13  Tom Tromey  <tromey@cygnus.com>
15548
15549         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15550         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
15551         function.
15552         Include <config.h> and "system.h".
15553         (disassemble_method): Undefine RET to avoid clash with
15554         config/i386/i386.h.
15555
15556 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15557
15558         * decl.c (runtime_exception_type_node, error_exception_type_node):
15559         New global variables.
15560         (init_decl_processing): Initialized.
15561         * expr.c (java_lang_expand_expr): Set caught exception type to
15562         null if catch handler argument doesn't exit.
15563         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15564         tree codes.
15565         * java-tree.h (runtime_exception_type_node,
15566         error_exception_type_node): Global variables declared.
15567         (DECL_FUNCTION_THROWS): New macro.
15568         (DECL_FUNCTION_BODY): Modified comment.
15569         (DECL_SPECIFIC_COUNT): Likewise.
15570         (struct lang_decl): New field throws_list.
15571         (IS_UNCHECKED_EXPRESSION_P): New macro.
15572         * lex.c (java_lex): Generate location information for THROW_TK.
15573         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15574         EXCEPTIONS_P): New macros.
15575         (enum jdep_code): New value JDEP_EXCEPTION.
15576         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15577         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15578         PATCH_METHOD_RETURN_ERROR): New macros.
15579         (patch_method_invocation_stmt): Added new argument to prototype.
15580         (patch_synchronized_statement, patch_throw_statement,
15581         check_thrown_exceptions, check_thrown_exceptions_do,
15582         purge_unchecked_exceptions, check_throws_clauses): New function
15583         prototypes.
15584         * parse.y Fixed typo in keyword section.
15585         (throw:): Rule tagged <node>.
15586         (THROW_TK): Keyword tagged <operator>.
15587         (method_header:): Last argument to call to method_header passed
15588         from throws: rule.
15589         (throws:, class_type_list:, throw_statement:,
15590         synchronized_statement:, synchronized:): Defined actions.
15591         (method_header): New local variable current. Register exceptions
15592         from throws clause.
15593         (java_complete_tree): Complete and verify exceptions from throws
15594         clause.
15595         (complete_class_report_errors): Error message on exceptions not
15596         found
15597         (java_check_regular_methods): Fixed typo. Shortcut on private
15598         overriding methods. Changed error message on method
15599         redefinition. Check for throws clause compatibility.
15600         (check_throws_clauses): New function.
15601         (java_check_abstract_methods): Use DECL_NAME for wfl or current
15602         method. Changed error message on method redefinition.
15603         (currently_caught_type_list): New static variable.
15604         (java_complete_expand_methods): Purge unchecked exceptions from
15605         throws clause list. Call PUSH_EXCEPTIONS before walk and
15606         POP_EXCEPTIONS after.
15607         (resolve_qualified_expression_name): Pass new argument as NULL to
15608         patch_method_invocation_stmt.
15609         (patch_method_invocation_stmt): New argument ref_decl. Invoke
15610         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15611         argument list when appropriate. Use new argument if non null to
15612         store selected method decl.
15613         (patch_invoke): Convert if necessary args of builtin types before
15614         forming CALL_EXPR. Argument list no longer reversed here.
15615         (invocation_mode): Treat final methods as static methods.
15616         (java_complete_tree): New cases for THROW_EXPR: and
15617         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15618         function call.
15619         (complete_function_arguments): No more RECORD_TYPE
15620         conversion. Function parameter nodes no longer saved.
15621         (valid_ref_assignconv_cast_p): Avoid handling null type.
15622         (patch_binop): Fixed null constant reference handling.
15623         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15624         BUILD_THROW macros.
15625         (patch_try_statement): Fixed comments. Record caught types in
15626         list, push the list, expand try block and pop the list.
15627         (patch_synchronized_statement, patch_throw_statement,
15628         check_thrown_exceptions, check_thrown_exceptions_do,
15629         purge_unchecked_exceptions): New functions.
15630         * typeck.c (lookup_argument_method): Allow WFL in place of method
15631         DECL_NAME during method definition check
15632
15633 1998-10-09  Tom Tromey  <tromey@cygnus.com>
15634
15635         * gjavah.c (decode_signature_piece): New function.
15636         (print_c_decl): Use it.  Added `name_override' argument.
15637         (print_method_info): Use name_override argument to print_c_decl.
15638         (seen_fields): Removed.
15639         (print_field_info): Don't update seen_fields.
15640         (struct method_name): New structure.
15641         (method_name_list): New global.
15642         (print_method_info): Add new method to list of methods.
15643         (name_is_method_p): New function.
15644         (print_field_info): If field name has same name as method, then
15645         change field name.
15646         (process_file): Parse methods before fields.
15647         (field_pass): New global.
15648         (HANDLE_END_FIELD): Take field_pass into account.
15649
15650 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15651
15652         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15653         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15654
15655 1998-10-03  Anthony Green  <green@cygnus.com>
15656
15657         * jvspec.c: Fix bug in jvgenmain_spec patch.
15658
15659 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15660
15661         * Makefile.in (lang.o:): Install dependency on java-tree.def.
15662         * decl.c (soft_exceptioninfo_call_node): New global variable.
15663         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15664         takes extra integer argument. soft_exceptioninfo_call_node
15665         initialized.
15666         * except.c (java_set_exception_lang_code): New function
15667         (method_init_exceptions): Called here.
15668         (prepare_eh_table_type): New function.
15669         (expand_end_java_handler): Called here.
15670         * expr.c (build_java_throw_out_of_bounds_exception): Now features
15671         one argument. Modified generation of call to
15672         soft_badarrayindex_node to use new argument.
15673         (build_java_arrayaccess): Pass faulty index value to
15674         build_java_throw_out_of_bounds_exception.
15675         (generate_name): New function.
15676         (java_lang_expand_expr): New local variables node, current,
15677         has_finally_p. Expand TRY_EXPR node.
15678         (process_jvm_instruction): Replace top of the stack with thrown
15679         object reference when entering exception handler.
15680         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15681         specific tree codes.
15682         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15683         global.
15684         (DECL_SPECIFIC_COUNT): New macro.
15685         (prepare_eh_table_type, java_set_exception_lang_code,
15686         generate_name): New function declarations.
15687         (match_java_method): Declaration deleted.
15688         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15689         macros.
15690         * lex.c (TRY_TK, CATCH_TK): Generate location information.
15691         * parse.h (redefinition_error, refine_accessible_methods_list,
15692         can_cast_to_p): Function declaration removed.
15693         (classitf_redefinition_error, variable_redefinition_error,
15694         parse_jdk1_1_error, find_applicable_accessible_methods_list,
15695         find_most_specific_methods_list, argument_types_convertible,
15696         enter_a_block, valid_builtin_assignconv_identity_widening_p,
15697         valid_cast_to_p, valid_method_invocation_conversion_p,
15698         try_reference_assignconv, add_stmt_to_compound,
15699         build_jump_to_finally, build_tree_list, patch_try_statement,
15700         java_get_catch_block): New function declarations.
15701         * parse.y (string_buffer_type): Global variable deleted.
15702         (group_of_labels, catches, catch_clause, catch_clause_parameter,
15703         finally): Rules tagged <node>.
15704         (TRY_TK, CATCH_TK): Token tagged <operator>.
15705         (class_body_declaration:, class_member_declaration:,
15706         formal_parameter:, explicit_constructor_invocation:,
15707         interface_member_declaration:, constant_declaration:,
15708         primary_no_new_array:, class_instance_creation_expression:,
15709         array_creation_expression:): Issue error on unsuported JDK1.1
15710         features.
15711         (try_statement:, catches:, finally:): Define actions.
15712         (catch_clause_parameter): New rule.
15713         (catch_clause:): Use new rule catch_clause_parameter.
15714         (parse_jdk1_1_error): New function.
15715         (redefinition_error): Renamed classitf_redefinition_error.
15716         (variable_redefinition_error): New function.
15717         (check_class_interface_creation): Call
15718         classitf_redefinition_error.
15719         (java_complete_tree): Added error message on JDEP_TYPE: case.
15720         (complete_class_report_errors): Fixed indentation.
15721         (declare_local_variables): Call variable_redefinition_error.
15722         (source_end_java_method): Call java_set_exception_lang_code and
15723         emit_handlers where appropriate.
15724         (java_method_add_stmt): Call add_stmt_to_block.
15725         (add_stmt_to_block): New function.
15726         (lookup_method_invoke): Fixed outside comment. new local variable
15727         candicates.  Call find_applicable_accessible_methods_list and
15728         find_most_specific_methods_list when searching for a
15729         method. Modified error report to list possible candidates when
15730         applicable.
15731         (find_applicable_accessible_methods_list,
15732         find_most_specific_methods_list, argument_types_convertible): New
15733         function.
15734         (refine_accessible_methods_list): Function deleted.
15735         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15736         expr (if applicable) before calling patch_array_ref.
15737         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15738         (enter_block): Fixed comment.
15739         (enter_a_block): New function.
15740         (patch_assignment): Reorganized. Call try_reference_assignconv for
15741         references. Call valid_cast_to_p instead of can_cast_to_p.
15742         (try_reference_assignconv,
15743         valid_builtin_assignconv_identity_widening_p): New functions.
15744         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15745         (valid_cast_to_p, valid_method_invocation_conversion_p): New
15746         functions.
15747         (build_string_concatenation): Don't resolve StringBuffer.
15748         (patch_cast): Fixed inverted arguments.
15749         (patch_array_ref): Code to save array expr deleted. Call
15750         valid_cast_to_p instead of can_cast_to_p.
15751         (generate_labeled_block): Call generate_name.
15752         (build_jump_to_finally, build_try_statement, java_get_catch_block,
15753         patch_try_statement): New functions.
15754         * typeck.c (match_java_method): Function deleted.
15755
15756 1998-10-02  Anthony Green  <green@cygnus.com>
15757
15758         * jvspec.c: jvgenmain_spec uses different temporary file names.
15759
15760 1998-10-02  Anthony Green  <green@cygnus.com>
15761
15762         * jvspec.c (lang_specific_driver): Fail if user specifies
15763         --main= when not linking.
15764
15765 1998-09-28  Tom Tromey  <tromey@cygnus.com>
15766
15767         * class.c (make_class_data): Push value for `thread' field.
15768         * decl.c (init_decl_processing): Added `thread' field to class.
15769
15770         * class.c (add_field): Always make static fields externally
15771         visible.
15772
15773 1998-09-26  Anthony Green  <green@cygnus.com>
15774
15775         * expr.c (build_java_athrow,
15776         build_java_throw_out_of_bounds_exception, expand_invoke,
15777         build_newarray, expand_java_multianewarray, build_java_monitor):
15778         Update comments to reflect _Jv_* function names.
15779
15780 1998-09-25  Per Bothner  <bothner@cygnus.com>
15781
15782         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
15783         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
15784         * parse.y (expand_start_java_method):  Likewise.
15785
15786 1998-09-24  Per Bothner  <bothner@cygnus.com>
15787
15788         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
15789
15790         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15791         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
15792         * expr.c:  Remove no-longer-needed calls to promote_type.
15793         * decl.c (give_name_to_locals):  Liekwise.
15794         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
15795         * parse.y:  Add/remove promote_type calls as appropriate.
15796         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
15797         (parse_signature_string):  Likewise.
15798         (build_java_array_type):  Fix for now signature convenions.
15799
15800         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
15801
15802 1998-09-23  Tom Tromey  <tromey@cygnus.com>
15803
15804         * class.c (init_class_processing): libjava function renamed to
15805         _Jv_RegisterClass.
15806
15807 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15808
15809         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15810         * java-tree.def: Fixed DEFTREECODE third argument.
15811         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15812         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15813         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15814         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15815         JAVA_THIS_EXPR): Now replaced by tree code definitions.
15816         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15817         * lang.c (java_tree_code_type, java_tree_code_length,
15818         java_tree_code_name): New arrays.
15819         (lang_init): Append Java tree node definitions to Gcc ones.
15820         * lex.c (expression_obstack): Declared as extern when JC1_LITE
15821         defined.
15822         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15823         wfl_to_string.
15824         (java_lex): Allow declaration of empty string constants. Retain
15825         location information on CASE_TK and DEFAULT_TK.
15826         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15827         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15828         Modified to be more robust.
15829         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15830         (build_new_invocation, try_builtin_assignconv,
15831         patch_switch_statement, string_constant_concatenation,
15832         build_string_concatenation, patch_string_cst, patch_string,
15833         java_expand_switch): New function declarations.
15834         * parse.y: Rules related to switch and EH tagged <node>.
15835         (label_id): Set to NULL_TREE
15836         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15837         tree nodes.
15838         (this_or_super:): Fixed indentation.
15839         (statement:, statement_nsi:, statement_without_trailing_substatement:,
15840         statement_expression:): Removed call to RULE on all sub-rules.
15841         (switch_expression:, switch_labels:): New rules.
15842         (switch_statement:, switch_block:, switch_block_statement_groups:,
15843         switch_block_statement_group:, switch_labels:, switch_label:):
15844         Defined actions.
15845         (throw_statement:, synchronized_statement:, try_statement:):
15846         Defined temporary actions.
15847         (class_instance_creation_expression:): Call
15848         build_new_invocation. Fixed indentation.
15849         (field_access): Fixed indentation.
15850         (method_invocation): Likewise.
15851         (make_qualified_primary): Use THIS_EXPR.
15852         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15853         resolving from SUPER, set *type_found.
15854         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15855         (java_complete_tree): Removed unused local variable `location'. Case
15856         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15857         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15858         on MODIFY_EXPR: and all binary operator tree code cases. Removed
15859         STRING_CST: case. default: checks for patchable strings.
15860         (complete_function_arguments): Transform string constant or
15861         crafted StringBuffer if necessary.
15862         (build_method_invocation): Fixed comments.
15863         (build_new_invocation): New function.
15864         (patch_assignment): Call try_builtin_assignconv to figure a valid
15865         assignment conversion between builtin types.
15866         (try_builtin_assignconv): New function.
15867         (build_binop): Use URSHIFT_EXPR directly to call build.
15868         (operator_string): Use UNARY_PLUS_EXPR.
15869         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15870         operator.
15871         (do_merge_string_cste, merge_string_cste,
15872         string_constant_concatenation, build_string_concatenation,
15873         patch_string, patch_string_cst): New function.
15874         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15875         (patch_unaryop): Likewise. New test of valid ++/-- operands.
15876         (build_newarray_node): Use NEW_ARRAY_EXPR.
15877         (build_this): Use THIS_EXPR.
15878         (build_return): Enable debug information on return statement.
15879         (build_if_else_statement): Likewise.
15880         (complete_labeled_statement): Fixed related comment.
15881         (build_loop_body): Fixed comment.
15882         (build_bc_statement): Enable debug information on break/continue
15883         statements.
15884         (patch_bc_statement): Fixed typos. Handle SWITCH statement
15885         context.
15886         (patch_switch_statement, case_identity, java_expand_switch): New
15887         functions.
15888
15889 1998-09-21  Per Bothner  <bothner@cygnus.com>
15890
15891         * buffer.h (BUFFER_INIT):  New macro.
15892         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
15893         Pass (struct jcf_partial *state) to most functions.
15894         (jcf_block, jcf_relocation):  New types.
15895         Support labels, branches, conditionals, loops.
15896
15897 1998-09-21  Tom Tromey  <tromey@cygnus.com>
15898
15899         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15900
15901 1998-09-21  Per Bothner  <bothner@cygnus.com>
15902
15903         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
15904         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
15905         not integer_type_node (INT_TYPE_SIZ bits).
15906
15907         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
15908
15909         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
15910         * jcf-dump.c (print_exception_table):  New function.
15911         (disassemble_method):  Better handling of wide instructions.
15912         Make more robust for bad input.
15913
15914 1998-09-30  Jeffrey A Law  (law@cygnus.com)
15915
15916         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15917         FreeBSD.
15918
15919 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15920
15921         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15922
15923 1998-09-17  Tom Tromey  <tromey@cygnus.com>
15924
15925         * Makefile.in ($(PARSE_H)): Removed target.
15926
15927 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15928
15929         * Makefile.in (JAVA_OBJS): Add memmove.o
15930         (memmove.o): New target & rules.
15931
15932 1998-09-15  Tom Tromey  <tromey@cygnus.com>
15933
15934         * expr.c (expand_invoke): Don't generate a call to the class init
15935         code.
15936
15937 1998-09-14  Jeffrey A Law  (law@cygnus.com)
15938
15939         * Makefile.in: Add many missing dependencies.
15940         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15941         as appropriate.
15942         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15943         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15944
15945 1998-09-11  Per Bothner  <bothner@cygnus.com>
15946
15947         * decl.c (complete_start_java_method):  If method is static (and
15948         not private) call _Jv_InitClass.
15949         * expr.c (expand_invoke):  Don't call build_class_init.
15950
15951         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
15952
15953 1998-09-10  Jeffrey A Law  (law@cygnus.com)
15954
15955         * Make-lang.in (GCJ): Define before using.
15956
15957 1998-09-09  Jeffrey A Law  (law@cygnus.com)
15958
15959         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15960         losing due to namespace pollution in GNU getopt.h
15961
15962 1998-09-09  Tom Tromey  <tromey@cygnus.com>
15963
15964         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15965         (java.all.cross): Likewise.
15966         (java.rest.encap): Likewise.
15967
15968 1998-09-08  Jeffrey A Law  (law@cygnus.com)
15969
15970         * gjavah.c (print_class_decls): Fix thinko in arglist
15971         * jcv-io.c (find_classfile): Similarly.
15972
15973 1998-09-07  Jeffrey A Law  (law@cygnus.com)
15974
15975         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
15976
15977 1998-09-05  Tom Tromey  <tromey@cygnus.com>
15978
15979         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
15980         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
15981         * Makefile.in (PARSE_C): New macro.
15982         (PARSE_H): Likewise.
15983         (PARSE_SCAN_C): Likewise.
15984         ($(PARSE_C)): Target renamed from parse.c.
15985         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
15986         (clean): Remove parse-scan.c as well.
15987         (parse.o): Depend on $(PARSE_C).
15988
15989 1998-09-05  Anthony Green  <green@cygnus.com>
15990
15991         * README, license.terms: Removed.
15992
15993         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
15994         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
15995         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
15996         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
15997         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
15998         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
15999         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
16000         and Java trademark attribution.
16001
16002 1998-09-04  Tom Tromey  <tromey@cygnus.com>
16003
16004         * Makefile.in: Use gcjh, not gjavah.
16005         * config-lang.in (stagestuff): Use gcjh, not gjavah.
16006         * Make-lang.in: Changed gjavah to gcjh everywhere.
16007
16008 1998-09-03  Per Bothner  <bothner@cygnus.com>
16009
16010         * gjavah.c:  Support new -prepend -add -append flags.
16011         (print_method_info):  Method is not virtual if class is final.
16012
16013 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16014
16015         * jv-scan.c: Fixed copyright assignment.
16016         * keyword.gperf: Likewise.
16017         * keyword.h: Likewise.
16018         * lex.c: Fixed copyright assignment.
16019         (java_lex): Push unicode back when parsing '<'.
16020         * lex.h: Fixed copyright assignment.
16021         * parse-scan.y: Likewise.
16022         * parse.h: Fixed copyright assignment.
16023         (build_debugable_stmt, complete_for_loop): New function prototypes.
16024         * parse.y: Fixed copyright assignment.
16025         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
16026         size_zero_node when completing a loop with no exit condition.
16027         (for_statement_nsi:): Define action.
16028         (for_init:, for_update:): Return size_zero_node when empty.
16029         (declare_local_variables): Call build_debugable_stmt.
16030         (build_debugable_stmt): New function.
16031         (build_loop_body): Build debugable statement around loop
16032         condition part.
16033         (complete_loop_body): Take into account the debugable statement
16034         around the EXIT_EXPR.
16035         (complete_loop_body): New function.
16036         (patch_exit_expr): Fixed condition inversion.
16037
16038 1998-09-02  Tom Tromey  <tromey@cygnus.com>
16039
16040         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
16041         name of thread define.
16042         * jvspec.c (THREAD_NAME): New macro.
16043         (GCLIB): Likewise.
16044         (THREADLIB): Likewise.
16045         (lang_specific_driver): Recognize attempt to link with thread
16046         library or gc library.  Recognize -ljava on command line so it
16047         isn't linked against more than once.
16048
16049 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16050
16051         * parse-scan.y (report_main_declaration): Name of the class
16052         containing `main' can be a qualified name.
16053
16054 1998-08-31  Tom Tromey  <tromey@cygnus.com>
16055
16056         * config-lang.in: Changed gjavac to gjc everywhere.
16057         * Make-lang.in: Changed gjavac to gjc everywhere.
16058
16059 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16060
16061         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
16062         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
16063         and install the files.
16064         * Makefile.in (JAVA_OBJS_LITE): New variable.
16065         (compiler:): Now include jv-scan as a dependency.
16066         (../jv-scan$(exeext), parse-scan.c): New targets.
16067         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
16068         * config-lang.in (compilers): Removed gcj, gjavah from the list.
16069         * jcf-parse.c (parse_source_file): Call java_layout_classes and
16070         check for errors even if parse_only.
16071         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
16072         defined.
16073         (yylex): New function. Uses java_lex body.
16074         (java_lex): Removed commented out statement. Remove local variable
16075         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
16076         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
16077         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
16078         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
16079         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
16080         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
16081         where appropriate.
16082         (java_lex_error): Empty if JC1_LITE is defined.
16083         (java_get_line_col): Return 0 if JC1_LITE is defined.
16084         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
16085         SET_MODIFIER_CTX): Moved into the section containing the macros
16086         conditionally defined by JC1_LITE.
16087         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
16088         argument if JC1_LITE is defined.
16089         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
16090         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
16091         is defined.
16092         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
16093         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
16094         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
16095         to different values according to JC1_LITE.
16096         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
16097         declared if JC1_LITE set.
16098         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
16099         defined if JC1_LITE not set.
16100         (struct parser_ctx): Reorganized and skip the jc1 front end part
16101         if JC1_LITE set.
16102         (java_layout_classes): New function definition.
16103         (java_push_parser_context, java_init_lex, yyparse, yylex,
16104         yyerror): Prototype always declared. All other static function
16105         prototypes declared only if JC1_LITE is not set.
16106         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
16107         declared in parse.h.
16108         (java_layout_classes): New function.
16109         (java_complete_expand_methods): No longer layout the class here.
16110         * parse-scan.y: New file.
16111         * jv-scan.c: New file.
16112
16113 1998-08-25  Tom Tromey  <tromey@cygnus.com>
16114
16115         * gjavah.c (main): Handle -friend option.
16116         (friend_specs): New global.
16117         (generate_access): Handle friend_specs.
16118         (process_file): Likewise.
16119         (MAX_FRIENDS): New macro.
16120         (friend_count): New global.
16121         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
16122         Changed all callers.
16123
16124 1998-08-24  Per Bothner  <bothner@cygnus.com>
16125
16126         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
16127         (main):  Handle processing all the entries of a named .zip archive.
16128         * jcf-io.c (jcf_trim_old_input):  New function.
16129         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
16130
16131 1998-08-24  Per Bothner  <bothner@cygnus.com>
16132
16133         * lang.c (flag_assume_compiled):  Make default be on.
16134
16135 1998-08-21  Per Bothner  <bothner@cygnus.com>
16136
16137         * jcf-dump.c:  Add bunches of flags to control output more.
16138         (process_class):  New function;  support printing more than one class.
16139         (main): Support new --print-main and --javap flags.
16140         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
16141         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
16142
16143 1998-08-20  Per Bothner  <bothner@cygnus.com>
16144
16145         Change mangling of dispatch table to match C++ vtable (w/thunks).
16146         * class.c (build_dtable_decl), java-tree.h:  New function.
16147         (make_class_data):  Call it.
16148         * decl.c (init_decl_processing):  Likewise.
16149
16150 1998-08-19  Warren Levy  <warrenl@cygnus.com>
16151
16152         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
16153         soft_anewarray; adjust args passed.
16154         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
16155         match _Jv_NewObjectArray.
16156
16157 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16158
16159         * decl.c (push_labeled_block, pop_labeled_block): New functions.
16160         * expr.c (loopup_label): Call create_label_decl.
16161         (create_label_decl): New function.
16162         (java_lang_expand_expr): Call expand_start_bindings with argument
16163         set to zero.
16164         * java-tree.h Added space after PROTO in function declarations
16165         when necessary.
16166         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
16167         (create_label_decl, push_labeled_block): New function
16168         declarations.
16169         * lex.c (label_id): Initialize.
16170         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
16171         switch.
16172         * parse.h Added space after PROTO in function declarations when
16173         necessary.
16174         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
16175         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
16176         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
16177         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
16178         macros.
16179         (struct parser_ctxt): New fields current_loop,
16180         current_labeled_block.
16181         (build_if_else_statement, patch_if_else_statement,
16182         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
16183         generate_labeled_block, complete_labeled_statement,
16184         build_bc_statement, patch_bc_statement, patch_loop_statement,
16185         build_new_loop, build_loop_body, complete_loop_body): New function
16186         declarations.
16187         * parse.y (java_warning_count): New global variable.
16188         (label_id): New static variable.
16189         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
16190         (block:): Return size_zero_node when block is empty.
16191         (empty_statement:): Return size_zero_node.
16192         (statement:): Implement supplemental action when for_statement: is
16193         reduced.
16194         (label_decl:): New rule.
16195         (labeled_statement:): Rewritten using label_decl. Actions
16196         implemented.
16197         (labeled_statement_nsi:): Likewise.
16198         (if_then_statement): Actions implemented.
16199         (while_expression): New rule.
16200         (while_statement:): Rewritten using while_expression. Actions
16201         implemented.
16202         (while_statement_nsi:): Likewise.
16203         (do_statement_begin:): New rule.
16204         (do_statement:): Rewritten using do_statement_begin. Actions
16205         implemented.
16206         (for_statement:): Rewritten using for_begin. Actions implemented.
16207         (for_statement_nsi:): Likewise.
16208         (for_header:, for_begin:): New rules.
16209         (for_init:): Actions implemented.
16210         (statement_expression_list:, break_statement:,
16211         continue_statement:): Likewise.
16212         (yyerror): Count number of issued warning(s).
16213         (java_report_errors): Report error(s) and/or warning(s).
16214         (java_complete_class): Use build_java_argument_signature to
16215         recompute completed method signature.
16216         (java_check_regular_methods): New locals method_wfl and aflags.
16217         Use method_wfl instead of lookup_cl during error reports. Fixed
16218         indentation and modified some error messages. Use
16219         lang_printable_name in method instead of the DECL_NAME. New code
16220         to issue warnings on methods not overriding corresponding methods
16221         private to a different package.
16222         (java_method_add_stmt): Call add_stmt_to_compound.
16223         (add_stmt_to_compound): New function.
16224         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
16225         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
16226         (build_if_else_statement, patch_if_else_statement,
16227         build_labeled_block, generate_labeled_block,
16228         complete_labeled_statement, build_new_loop, build_loop_body,
16229         complete_loop_body, patch_loop_statement, build_bc_statement,
16230         patch_bc_statement, patch_exit_expr): New functions.
16231         * typeck.c (build_java_signature): Build argument signature before
16232         enclosing it in between parenthesis.
16233
16234 1998-08-17  Warren Levy  <warrenl@cygnus.com>
16235
16236         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
16237         (JAVA_OBJS): Added reminder comment
16238
16239 1998-08-13  Nick Clifton  <nickc@cygnus.com>
16240
16241         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
16242         be interpreted as a long long.
16243
16244 1998-08-13  Warren Levy  <warrenl@cygnus.com>
16245
16246         * decl.c (init_decl_processing): Use _Jv_InitClass, not
16247         soft_initialise_class.  Use _Jv_NewMultiArray, not
16248         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
16249         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
16250         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
16251         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
16252
16253 1998-08-12  Per Bothner  <bothner@cygnus.com>
16254
16255         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
16256         length_identifier_node):  New global tree node constants.
16257         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
16258         Replace uses by super_identifier_node etc.
16259         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
16260
16261         * parse.y (resolve_field_access):  Don't special-case ".length" if
16262         flag_emit_class_files.
16263         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
16264         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
16265         and ARRAY.length.
16266
16267 1998-08-11  Per Bothner  <bothner@cygnus.com>
16268
16269         * decl.c (init_decl_processing): Remove unused method_type_node fields.
16270         * class.c (make_method_value):  Remove init for removed fields.
16271
16272         * class.c (layout_class):  Use build_java_argument_signature.
16273         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
16274
16275         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
16276         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
16277         (build_java_signature):  Don't use push_java_argument_signature.
16278
16279         * typeck.c (lookup_argument_method):  New function.
16280         * parse.y (java_check_regular_methods):  Use lookup_argument_method
16281         instead of lookup_java_method2 followed by lookup_java_method.
16282
16283         * parse.y (check_method_redefinition):  Minor optimization.
16284
16285         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
16286         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
16287
16288 1998-08-10  Tom Tromey  <tromey@cygnus.com>
16289
16290         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
16291         c-pragma.o.
16292
16293         * gjavah.c (java_float_finite): Use K&R-style definition.
16294         (java_double_finite): Likewise.
16295         (generate_access): Now returns void.  Changed all callers.
16296         (last_access_generated): Removed.
16297         (process_file): Only make a single pass over the .class file.
16298
16299 1998-07-29  Per Bothner  <bothner@cygnus.com>
16300
16301         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
16302         for compatibility for G++ (with -fvtable-thunks).
16303         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
16304
16305         * gjavah.c (process_file):  Use public inheritance for super-class.
16306
16307 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16308
16309         * lex.c (java_init_lex): Initialize ctxp->package.
16310         * parse.h (struct parser_ctxt): package and package_len replaced
16311         by tree package, an identifier node. Field method_decl_list is
16312         gone. Fixed comments.
16313         (lookup_field_wrapper, merge_qualified_name, not_accessible,
16314         class_in_current_package): New function prototypes.
16315         * parse.y (array_type:): Set class loaded flag on primitive type
16316         arrays.
16317         (package_declaration:): Assign ctxp->package to the
16318         identifier node.
16319         (method_invocation:): Handle invocation of method qualified by
16320         `super'.
16321         (single_type_import_declaration:): Removed ambiguity check.
16322         (java_pop_parser_context): New local variable `next'. Reset and
16323         set IMPORT_CLASSFILE_NAME flags on current and previous import
16324         list.
16325         (java_accstring_lookup): Use new local macro COPY_RETURN.
16326         (lookup_field_wrapper): New function.
16327         (parser_qualified_classname): Use merge_qualified_name.
16328         (parser_check_super_interface): Broaden error message.
16329         (do_resolve_class): Check for qualified class name in the current
16330         compilation unit if appropriate.
16331         (process_imports): Check for already defined classes.
16332         (check_pkg_class_access): Got rid of call to
16333         get_access_flags_from_decl.
16334         (java_complete_expand_methods): Call safe_layout_class based on
16335         the current class size.
16336         (make_qualified_primary): Build a WFL qualification on primary if
16337         none exists.
16338         (merge_qualified_name): New function.
16339         (make_qualified_name): Use merge_qualified_name.
16340         (resolve_expression_name): Use safe_lookup_field.
16341         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
16342         (resolve_qualified_expression_name): Likewise. Check on resolved
16343         element accessibility.
16344         (not_accessible_p, class_in_current_package): New functions.
16345         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
16346         (patch_method_invocation_stmt): Merged common pieces. Check
16347         accessibility of invoked method.
16348         (check_for_static_method_reference): Add returned type in error
16349         message.
16350         (invocation_mode): Get rid of bogus check on PRIVATE methods.
16351         (refine_accessible_methods_list): Merged two conditions in test.
16352         (java_complete_class): Sanity check on stabilize_ref gone.
16353         * zextract.c (read_zip_archive): Cast lseek second argument to long.
16354
16355 1998-07-28  Per Bothner  <bothner@cygnus.com>
16356
16357         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
16358
16359 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16360
16361         * gjavah.c (F_NAN): Removed.
16362         (F_NAN_MASK): New macro.
16363         (F_POSITIVE_INFINITY): Removed.
16364         (F_NEGATIVE_INFINITY): Likewise.
16365         (java_float_finite): Rewrote.
16366         (D_NAN_MASK): Renamed.
16367         (java_double_finite): Rewrote.
16368         (D_POSITIVE_INFINITY): Removed.
16369         (D_NEGATIVE_INFINITY): Likewise.
16370
16371         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
16372         If verbose, print underlying representation of value in hex.
16373
16374 1998-07-24  Per Bothner  <bothner@cygnus.com>
16375
16376         * buffer.h, buffer.c:  New files.
16377         * Makefile.in (JAVA_OBJS):  Add buffer.o.
16378
16379         Support locals variables and writing their debug entries to .class.
16380         * jcf-write.c:  Simplify some by user new buffer type.
16381         (vode_buffer_grow):  Removed.
16382         (struct localvar_info):  New type.
16383         (localsvars, localvartable):  New buffers.
16384         (localvar_alloc, localvar_free):  New functions.
16385         (generate_bytecode_insns):  Handle local variables.
16386         (generate_classfile):  Write LocalVariableTable attribute.
16387
16388 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16389
16390         * jcf-io.c (open_in_zip): Check the zipfile magic number.
16391         * zipfile.h (ZIPMAGIC): New macro.
16392
16393 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16394
16395         * Makefile.in (gjavah.o): Updated dependencies.
16396         (jcf-dump.o): Likewise.
16397         (all.indirect): Use ../gjavah.
16398         (../gjavah$(exeext)): Likewise.
16399         (clean): Don't remove gjavah.
16400         (clean): Remove parse.c, not java/parse.c.
16401         * Make-lang.in (java): Added gjavah.
16402         (gjavah$(exeext)): New target.
16403         (GJAVAH_SOURCES): New macro.
16404         (java.all.build): Added gjavah.
16405         (java.all.cross): Likewise.
16406         (java.rest.encap): Likewise.
16407         * config-lang.in (compilers, stagestuff): Added gjavah.
16408
16409 1998-07-23  Tom Tromey  <tromey@cygnus.com>
16410
16411         * gjavah.c (java_float_finite): New function.
16412         (java_double_finite): Likewise.
16413         (F_POSITIVE_INFINITY): New macro.
16414         (F_NEGATIVE_INFINITY): Likewise.
16415         (F_NAN): Likewise.
16416         (D_POSITIVE_INFINITY): Likewise.
16417         (D_NEGATIVE_INFINITY): Likewise.
16418         (D_NAN): Likewise.
16419         (print_field_info): Use java_float_finite and java_double_finite.
16420
16421 1998-07-23  Per Bothner  <bothner@cygnus.com>
16422
16423         * parse.y (method_header):  Name "this" implicit argument.
16424
16425 1998-07-22  Per Bothner  <bothner@cygnus.com>
16426
16427         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
16428         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
16429         (put_linenumber):  New function.
16430         (generate_bytecode_insns, generate_classfile):  Write line numbers.
16431
16432 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16433
16434         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16435         (lookup_name, build_known_method_ref, build_class_init,
16436         build_invokevirtual, invoke_build_dtable, match_java_method,
16437         build_field_ref, pushdecl_force_head, build_java_binop,
16438         binary_numeric_promotion, build_decl_no_layout,
16439         build_java_arrayaccess, build_newarray, build_anewarray,
16440         build_java_array_length_access, build_java_arraynull_check): New
16441         extern function prototypes.
16442         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16443         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16444         java-tree.h.
16445         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16446         to NULL
16447         * jcf.h (jcf_out_of_synch): New extern function prototype.
16448         * parse.h: Static/global function implemented in parse.y
16449         prototyped and declarations moved at the end of the file.
16450         (DECL_P): Check that the argument isn't null.
16451         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16452         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16453         (QUAL_DECL_TYPE): New macro.
16454         (PARAMS): Macro definition removed.
16455         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16456         (return_statement:): Call build_return.
16457         (field_access:): Call make_qualified_primary in sub rule.
16458         (method_invocation:): Build method invocation and call
16459         make_qualified_primary when processing primaries.
16460         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16461         get_type_from_signature.
16462         (java_check_regular_method): Extra integer 0 argument when calling
16463         lookup_java_method2.
16464         (lookup_java_interface_method2): Extra method DECL argument when
16465         calling lookup_java_interface_method2.
16466         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16467         COMPOUND_EXPR node.
16468         (java_complete_expand_method): Layout current class iff not
16469         already done. Don't process interface's methods.
16470         (java_complete_expand_method): Use super class only if it
16471         exists. Use current class otherwise.
16472         (make_qualified_primary): New function.
16473         (resolve_expression_name): Process qualified expression or
16474         expression from primary the same way.
16475         (resolve_expression_name): Two last arguments to
16476         resolve_field_access are now NULL_TREEs.
16477         (resolve_field_access): New variable is_static. Local field must
16478         be DECLs. is_static computed on field DECLs only. Append code in
16479         where_found to the field access if necessary. Use QUAL_DECL_TYPE
16480         to initialize field_type.
16481         (resolve_qualified_expression_name): New local variable,
16482         previous_call_static and is_static. Handle primaries with function
16483         calls, casts, array references and `this'. `super' now handled as
16484         `(super_class)this'. Use is_static to clarify boolean expressions.
16485         Added code to handle case where a proper handle is required to
16486         access a field. Use QUAL_DECL_TYPE where applicable.
16487         (maybe_access_field): New function.
16488         (patch_method_invocation_stmt): New arguments primary, where,
16489         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16490         deleted. Use `where' as a type to search from if specified. Check
16491         for static method reference where forbidden. Append primary or
16492         current_this to the argument list if not calling constructor nor
16493         static methods.
16494         (check_for_static_method_reference): New function.
16495         (patch_invoke): Layout the class on which new is done if
16496         necessary.
16497         (lookup_method_invoke): Changed format to report errors on
16498         methods.
16499         (qualify_ambiguous_name): New local variable this_found. Now
16500         handle things from primaries. Method call are considered
16501         expression names.
16502         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16503         changed into NULLs.
16504         (not_initialized_as_it_should_p): Comply with the new DECL_P.
16505         (java_complete_tree): New case fo RETURN_EXPR. Process function
16506         call arguments in separate function.
16507         (complete_function_arguments): New function.
16508         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16509         anymore.
16510         (patch_assignment): Take the return function slot into account as
16511         a RHS. Distinguish assignment from a return.
16512         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16513         when checking methods in interfaces.
16514         (resolve_type_during_patch): NULL argument to unresolve_type_p
16515         instead of NULL_TREE.
16516         (patch_newarray): Fixed typo in comment.
16517         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16518         (build_return, patch_return): New functions.
16519         * typeck.c (lookup_java_constructor): Fixed typo in comment.
16520
16521 1998-07-21  Per Bothner  <bothner@cygnus.com>
16522
16523         * constants.c (find_name_and_type_constant, find_fieldref_index,
16524         find_methodref_index):  New methods.
16525         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
16526         just return given method.  Also, rename to build_known_method_ref.
16527         (expand_invoke):  Rename call to build_invoke_non_interface.
16528         * java-tree.h, parse.h:  Update prototype.
16529         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
16530         (such as expand_expr_stmt) if flag_emit_class_files.
16531         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
16532         STACK_TARGET, IGNORE_TARGET):  New macros.
16533         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
16534         (generate_bytecode_insn):  New function to generate method's bytecode.
16535         (generate_classfile):  Node generate Code attribute for a method.
16536         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
16537         push_long_const, field_op, adjust_typed_op, maybe_wide):
16538         New functions used by generate_bytecode_insn.
16539
16540         * typeck.c (signature_include_return):  Remove variable.
16541         (push_java_argument_signature, build_java_argument_signature):  New.
16542         (build_java_signature):  Use push_java_argument_signature.
16543         * parse.y:  Use build_java_argument_signature instead of fiddling
16544         with signature_include_return.
16545
16546 1998-07-17  Tom Tromey  <tromey@cygnus.com>
16547
16548         * gjavah.c (print_c_decl): Always generate JArray<>* for array
16549         types.
16550
16551         * Makefile.in (all.indirect): Added gjavah$(exeext).
16552         (gjavah$(exeext)): Added $(exeext).
16553         (clean): Likewise.
16554
16555 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16556
16557         * class.c (layout_class): Call to java_layout_parsed_class replace
16558         by safe_layout_class.
16559         * expr.c (build_java_array_length_access): Removed static storage
16560         class in the function definition.
16561         (build_java_arraynull_check): Likewise.
16562         Also fixed typos in two comments.
16563         * lex.c (java_init_lex): Initialize static global kw_length.
16564         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16565         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16566         java_lex_error.
16567         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16568         * parse.h (resolve_no_layout): New static function declaration.
16569         (get_identifier_in_static): Declaration removed.
16570         (java_layout_parsed_class): Function name declaration changed to
16571         safe_layout_class.
16572         (build_newarray_node, patch_newarray, resolve_type_during_patch,
16573         not_initialized_as_it_should_p, build_this): New static function
16574         declarations.
16575         (pushdecl_force_head, build_java_binop, int_fits_type_p,
16576         binary_numeric_promotion, stabilize_reference,
16577         build_decl_no_layout, build_java_arrayaccess): Extern function
16578         declarations moved into their own section.
16579         (build_newarray, build_anewarray, build_java_array_length_access,
16580         build_java_arraynull_check): New extern function declarations.
16581         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16582         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16583         fake tree codes.
16584         (CALL_CONSTRUCTOR_P): New macro.
16585         * parse.y (kw_length): New static global tree node.
16586         (return_statement): Tagged <node>.
16587         (RETURN_TK): Tagged <operator>.
16588         (variable_declarator_id:): Build variable declaration with an
16589         empty initialization value if a syntax error was found in the
16590         initialization part of the variable declaration.
16591         (statement_without_trailing_substatement:): return_statement: now
16592         uses the default rule.
16593         (return_statement:): Temporarily fixed to return NULL_TREE.
16594         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16595         (class_instance_creation_expression:): Class creation rules now
16596         call build_method_invocation upon reduction.
16597         (array_creation_expression:): Rules call build_newarray_node upon
16598         reduction.
16599         (dim_exprs:): Build a list of dimension expressions.
16600         (dim_expr:): Store location of the OSB_TK in the dimension
16601         expression node.
16602         (method_invocation:): Added a new error rule.
16603         (build_unresolved_array_type): WFL argument may also be an array
16604         on a primitive type. Name of the argument changed to reflect this.
16605         (method_declarator): Insert argument type at the beginning of the
16606         argument type list and later reverse the list.
16607         (unresolved_type_p): Argument 'returned' may be optionally
16608         NULL_TREE.
16609         (java_layout_class_from_source): Function renamed
16610         safe_layout_class.
16611         (resolve_and_layout): Now call resolve_no_layout and
16612         safe_layout_class.
16613         (resolve_no_layout): New function.
16614         (purify_type_name): New function.
16615         (complete_class_report_errors): Call purify_type_name during error
16616         report on a type not found.
16617         (process_imports): error_found local variable doesn't need to be
16618         initialized to zero.
16619         (declare_local_variables): New local type_wfl. Fixed typo in error
16620         message. type_wfl assigned to unresolved type and used to register
16621         incomplete type. Build a WFL around the variable initialization
16622         statement so that debug info can be generated on it.
16623         (source_start_java_method): Reverse argument list after they've
16624         been processed.
16625         (current_this): New static global variable.
16626         (java_complete_expand_methods): Set current_this when appropriate.
16627         (resolve_expression_name): Build correct static and non static
16628         field access bearing a simple name.
16629         (resolve_field_access): Resolve the length field of arrays. Handle
16630         f.m() cases.
16631         (patch_method_invocation_stmt): Set the type of the method
16632         invocation to error_mark_node. This value is later overridden by a
16633         valid type, if any. Don't handle qualified constructor invocation
16634         as qualified method invocation. Call lookup_method_invoke with its
16635         new flag. It's no longer necessary to access the selected method
16636         as the value of a tree list. Handle constructor invocation.
16637         (patch_invoke): Reverse argument list when invoking non interface
16638         methods. Insert call to new as the first argument of the
16639         constructor.
16640         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16641         defined within a final class. Return INVOKE_STATIC if the invoked
16642         method is a constructor.
16643         (lookup_method_invoke): New lc argument is a flag to indicate a
16644         constructor lookup. Now handle constructor lookup. Choose the most
16645         specific method in case several were matching the invocation
16646         requirements. Return a method decl instead of a tree list featuring
16647         one single method decl element.
16648         (refine_accessible_methods_list): New lc flag argument to
16649         indicate that a constructor is being looked up.
16650         (not_initialized_as_it_should_p): New function.
16651         (java_complete_tree): Now process fake tree codes
16652         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16653         save_expr on resolved function call arguments. Case on
16654         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16655         (patch_assignment): LHS can be a field access expression. When
16656         dealing with reference, lhs_type is the promoted type of the
16657         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16658         applicable.
16659         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16660         (patch_binop): Use not_initialized_as_it_should_p where
16661         applicable.
16662         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16663         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16664         where applicable.
16665         (resolve_type_during_patch): New function.
16666         (patch_cast): Call resolve_type_during_patch to resolve type and
16667         report error accordingly.
16668         (patch_array_ref): Use not_initialized_as_it_should_p where
16669         applicable. Array base expression is saved before being
16670         used. Promote the type of an array elements if it contains non
16671         builtin types.
16672         (build_newarray_node, patch_newarray, build_this): New functions.
16673
16674 1998-07-16  Tom Tromey  <tromey@cygnus.com>
16675
16676         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16677         increment it in `for' statement.
16678         (print_field_info): If number is inf or nan, don't print it.
16679         (print_method_info): If method name is `delete', just ignore it.
16680         (print_c_decl): Special-case jstringArray.
16681
16682         * gjavah.c (help): New function.
16683         (no_argument): New function.
16684         (usage): Changed text.
16685         (main): Rewrote argument handling.  Now handles -v, --help,
16686         --version.
16687         (version): New function.
16688         (found_error): New global.
16689         (main): Return found_error.
16690         (generate_access): Set found_error.
16691         (print_c_decl): Likewise.
16692
16693 1998-07-15  Tom Tromey  <tromey@cygnus.com>
16694
16695         * gjavah.c (print_c_decl): Don't print "," when examining field.
16696         Skip type name when looking at "[L" types.
16697         (process_file): Now static.
16698         (generate_access): Now returns int.
16699         (last_access_generated): New global.
16700         (process_file): Clear last_access_generated; make multiple passes
16701         over the class.
16702         (print_field_info): Just return if generate_access returns true.
16703         (print_method_info): Likewise.  Also, allow <init> functions to
16704         pass through.
16705         (print_c_decl): Added is_init argument.  Print constructors
16706         properly.
16707         (print_cxx_classname): Use UTF8_GET to extract characters from
16708         string.
16709         (print_base_classname): New function.
16710         (print_class_decls): New function.
16711         (process_file): Use it.
16712         (utf8_cmp): New function.
16713
16714 1998-07-13  Nick Clifton  <nickc@cygnus.com>
16715
16716         * lang-options.h: Format changed to match changes in gcc/toplev.c
16717         to implement a --help option.
16718
16719 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
16720
16721         * decl.c (init_decl_processing): Revert change to dtable_type.
16722
16723 1998-07-09  Per Bothner  <bothner@cygnus.com>
16724
16725         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16726
16727 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
16728
16729         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16730
16731         * lang.c (lang_init): Default flag_exceptions to 1, without
16732         checking to see if it's 2 first.
16733
16734 1998-07-08  Jeffrey A Law  (law@cygnus.com)
16735
16736         * constants.c: Include "system.h".
16737         * decl.c: Likewise.
16738         * lang.c (flag_new_exceptions): Get via extern now.
16739         (lang_init_options): New functions.  Turn on flag_new_exceptions.
16740
16741 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16742
16743         * lex.c (java_lex): Return 0 when we see an invalid character in
16744         the input.
16745
16746         * lex.c (java_read_char): Specify extra argument when calling
16747         java_lex_error.
16748         (java_read_unicode, java_parse_end_comment,
16749         java_parse_escape_sequence): Likewise,
16750         (java_lex): Specify extra argument when calling
16751         java_lex_error. Test that IDs are beginning with a legal character
16752         for IDs. Handle invalid characters with an error message and a
16753         call to java_lex_error.
16754         (java_lex_error): Adjust column position by new argument
16755         `forward'. Issue an error even if in the middle of reporting an
16756         other error.
16757
16758 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
16759
16760         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16761         we don't explicitly put a null pointer when we're copying it.
16762
16763 1998-07-07  Tom Tromey  <tromey@cygnus.com>
16764
16765         * gjavah.c (print_cxx_classname): New function.
16766         (super_class_name): Likewise.
16767         (print_super_fields): Removed.
16768         (in_super): Removed.
16769         (print_field_info): Never generate #defines.
16770         (print_c_decl): Changed generated types to match JNI.  No longer
16771         print class name before method name.
16772         (print_method_info): Print "static" before static methods.
16773         Print "virtual" before non-final methods.
16774         (usage): Use exit(1), not exit(-1).
16775         (main): Likewise.
16776         (print_field_info): Use %.17g to print a double.
16777         (last_access): New globals.
16778         (process_file): Initialize last_access.
16779         (usage): Now static.
16780         (ACC_VISIBILITY): New define.
16781         (generate_access): New function.
16782         (print_field_info): Call it.
16783         (print_method_info): Likewise.  Also, generate information for all
16784         methods, not just native methods.  Return void.
16785         (print_c_decl): Return void.
16786         (print_field_info): Return void.
16787
16788 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16789
16790         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16791         processing the jc1 grammar file. Prefix bison functions and
16792         variables with java_.
16793         (parse.c): Dependencies on parse.h and lex.h
16794         * expr.c (build_java_arrayaccess): Function now global.
16795         * java-tree.h: Comment reorganized to carry on previous
16796         classification effort.
16797         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16798         RESOLVE_TYPE_NAME_P): New flags on WFLs.
16799         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16800         java_parse (new prefix java_ generated by bison).
16801         (java_layout_parsed_class, java_register_parsed_class): Function
16802         call removed.
16803         (yyparse): Removed unnecessary call to init_outgoing_cpool.
16804         * lex.c (static tree wfl_op): Variable deleted.
16805         (java_init_lex): Initialize kw_super and kw_this. Initialize more
16806         ctxp fields to NULL_TREE.
16807         (java_lex): No longer create WFL for operators. Filename caching
16808         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16809         created as STRING_CST and later expanded. Removed extra argument
16810         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16811         and SUPER.
16812         (build_wfl_node): Removed code in comments.
16813         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16814         store token and location data in the current bison token.
16815         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16816         static/extern function declaration at the beginning of the file.
16817         (struct qualification): Data structure definition deleted.
16818         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16819         (qualify_ambiguous_name): Function declaration modified. Function
16820         now returns nothing.
16821         (build_array_ref, patch_array_ref, make_qualified_name,
16822         resolve_qualified_expression_name, maybe_generate_clinit,
16823         resolve_field_access): New static function declarations.
16824         (build_java_arrayaccess): New extern function declaration.
16825         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16826         (CALL_EXPR_PRIMARY): Macro deleted.
16827         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16828         (struct parser_ctxt): Field initialized_final
16829         removed. non_static_initialized, static_initialized: New fields.
16830         * parse.y (static tree kw_super, static tree kw_this): New global
16831         static.
16832         (%union): tree wfl field of operator member replaced by int
16833         location. WFLs are non longer created for operators.
16834         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16835         (qualified_name:): Now calls make_qualified_name to build the
16836         identifier.
16837         (type_declaration:): Consider generating <clinit> when class
16838         parsing completed.
16839         (variable_declarator:): Directly build an assignment node when the
16840         variable is initialized when declared.
16841         (this_or_super:): Build a WFL and set current location when THIS
16842         or SUPER are parsed.
16843         (expression_statement:): Wrap statement around a WFL.
16844         (primary_no_new_array:): Fixed typo. Changed value returned by
16845         THIS_TK because of its new type (temporary).
16846         (dim_exprs:): Temporary fix because of OSB_TK's new type.
16847         (field_access:): Build qualified name with SUPER.
16848         (method_invocation:): Fixed returned value because of SUPER's new
16849         type.
16850         (array_access:): Use OSB_TK location information.
16851         (post_increment_expression:, post_decrement_expression:,
16852         unary_expression:, pre_increment_expression:,
16853         pre_decrement_expression:, unary_expression_not_plus_minus:,
16854         cast_expression:, multiplicative_expression:,
16855         additive_expression:, shift_expression:, relational_expression:,
16856         equality_expression:, and_expression:, exclusive_or_expression:,
16857         inclusive_or_expression:, conditional_and_expression:,
16858         conditional_or_expression:, assignment:): Use new location/token
16859         information available on operators.
16860         (create_class): Set super_decl_type to NULL_TREE when processing
16861         java.lang.Object.
16862         (register_fields): Field initialization is now a MODIFY_EXPR
16863         node. Chain initialization code to the matching lists (according
16864         to the field declaration modifiers).
16865         (maybe_generate_clinit): New function.
16866         (method_header): Don't set method's DECL_NAME to a WFL when adding
16867         methods to java.lang.Object.
16868         (resolve_and_layout): Now can return NULL_TREE if the type
16869         resolution fails. Otherwise, return the class DECL instead of its
16870         TYPE.
16871         (check_method_redefinition): Don't patch method DECL_NAME if it
16872         belongs to java.lang.Object.
16873         (process_imports): Simply assign error_found to the value returned
16874         by check_pkg_class_access.
16875         (declare_local_variables): Don't use their init statements (if
16876         any) when parsing error were previously found. Reuse MODIFY_EXPR
16877         build during parsing as an init statement.
16878         (java_method_add_stmt): Now return the current method body.
16879         (java_layout_parsed_class, java_register_parsed_class): Functions
16880         removed.
16881         (java_complete_expand_methods): Initialize the constant pool on a
16882         per class basis. Layout the classes before expanding their method
16883         bodies. Don't try expand artificial constructor code if error were
16884         found. Make the classes data and register them if no error were
16885         found.
16886         (java_complete_expand_method): Retrieve an artificial constructor
16887         argument list before entering its body. Assign the top block to
16888         the artificial constructor function body and set types of declared
16889         blocks and compound statements to void. Walk method body if not an
16890         artificial constructor.
16891         (make_qualified_name, cut_identifier_in_qualified): New functions.
16892         (resolve_expression_name): Fixed comments. Save/restore the
16893         current class CLASS_LOADED_P flag value. Build non qualified
16894         static field access and handle qualified expression names.
16895         (resolve_field_access, resolve_qualified_expression_name): New
16896         functions.
16897         (patch_method_invocation_stmt): Use the new expression resolution
16898         scheme, calling resolve_field_access when the function call is
16899         resolved as an expression.
16900         (qualify_ambiguous_name): Function rewritten to work on qualified
16901         expression produced by make_qualified_name.
16902         (java_complete_tree): Promote type when function's argument are
16903         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16904         the assignment to discover further errors if RHS is a expression
16905         name that fails to evaluate. Declare LHS initialized even though
16906         the assignment failed. Don't use the location variable and removed
16907         extra argument in patch function calls. Now handle the ARRAY_REF
16908         case and build internal string representation when STRING_CSTs are
16909         walked.
16910         (build_method_invocation): Don't wrap function call around a WFL.
16911         (build_assignment): Likewise. Use the operator location
16912         information.
16913         (patch_assignment): Handle array access LHSs. Handle error
16914         provenance, resulting in a better error report.
16915         (build_binop): Use op_location from operator as binop location
16916         information.
16917         (build_unaryop, build_incdec, build_cast): Likewise.
16918         (patch_binop): Extract location information from the node. Fixed
16919         typo in error message.
16920         (patch_unary_op): Extract location information from the node.
16921         (build_array_ref, patch_array_ref): New functions.
16922
16923 1998-07-01  Tom Tromey  <tromey@cygnus.com>
16924
16925         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16926         match _Jv_IsInstanceOf.
16927         * decl.c (init_decl_processing): Use _Jv_NewArray, not
16928         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
16929
16930 1998-06-30  Tom Tromey  <tromey@cygnus.com>
16931
16932         * decl.c (init_decl_processing): Functions are now named
16933         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16934
16935 1998-06-29  Per Bothner  <bothner@cygnus.com>
16936
16937         * java-tree.h (load_class):  Add prototype.
16938         * class.c (is_compiled_class):  Add missing arg to load_class.
16939         * expr.c (expand_java_NEW):  Call load_class.
16940         * parse.y (process_import):  Removed bogus use of void return value.
16941
16942 1998-06-25  Per Bothner  <bothner@cygnus.com>
16943
16944         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
16945         Function name is "_Jv_Throw" instead of "soft_athrow".
16946         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
16947         Function name is "_Jv_AllocObject" instead of "soft_new".
16948         Takes an extra parameter (object size).
16949         * expr.c:  Update calls.
16950
16951 1998-06-24  Per Bothner  <bothner@cygnus.com>
16952
16953         * lex.c (java_get_line_col):  Handle end-of-file.
16954         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
16955
16956 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
16957
16958         * lang.c (lang_init): Make -fexceptions the default.
16959         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16960         exception handling is not turned on.
16961
16962 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
16963
16964         * lang.c (flag_new_exceptions): Make this this default.
16965         * decl.c (end_java_method): Call emit_handlers.
16966         * except.c (method_init_exceptions): Set language code and version.
16967         (expand_start_java_handler): Enable exception, and call
16968         expand_eh_region_start.
16969         (expand_end_java_handler): Enable exception, and set up catch blocks.
16970         (emit_handlers): New routine to generate the saved handlers.
16971         * java-except.h (emit_handlers): Add prototype.
16972
16973 1998-06-12  Per Bothner  <bothner@cygnus.com>
16974
16975         We used to have three different representations of the constant pool:
16976         the CPool structure, the tree_constant_pool, and the constructures
16977         used to build the Class object (which may need class and string
16978         constants) in compiled code.  None were appropriate for compiling
16979         to .class files, so I did a major overhaul.
16980
16981         First, the tree_constant_pool array was removed.  Things were
16982         modified to the CPool structure in the JCF could be used.
16983         Second, a "capacity" field was added to the CPool, and functions
16984         written to search for a matching constant, adding one if not found.
16985         The code that generated the Class object was changed to use a CPool.
16986         The actual TREE_LISTs used to build the CONSTRUCTORs used for
16987         the static Class object are now only in build_constants_constructor.
16988         Finally, I wrote code which can generate a .class file (including its
16989         constant pool) from the RECORD_TYPE of a class.  This is a big step
16990         on the way to compiling Java source into .class files.
16991
16992         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
16993         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
16994
16995         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
16996         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
16997         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
16998         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
16999         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
17000         (lang_type):  Removed constant_pool field.
17001         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
17002         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
17003         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
17004         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
17005
17006         * constants.c (current_constant_pool_tags, current_constant_pool_data,
17007         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
17008         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
17009         (set_constant_entry, find_constant1, find_constant2,
17010         find_class_constant, count_constant_pool_bytes, write_constant_pool,
17011         find_utf8_constant, find_class_or_string_constant):  New functions.
17012
17013         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
17014         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
17015         (give_name_to_class, get_class_constant):  Likewise.
17016         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
17017         (get_name_and_type_constant, get_ref_constant):  Removed.
17018         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
17019         * parse.y:  Don't save/restore tree_constant_pool.
17020         * verify.c (verify_jvm_instructions):  Update for new approach.
17021         * expr.c (expand_invoke, expand_java_field_op): Likewise.
17022
17023         * lang-options.h:  Added -femit-class-file, -femit-class-files.
17024         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
17025         (lang_f_options):  Added "emit-class-file(s)".
17026
17027         * expr.c (build_java_arrayaccess):  Generate more efficient array
17028         bounds checking, by using unsigned compare.
17029
17030         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
17031
17032 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17033
17034         * parse.h: New comment on the handling of unresolved type
17035         identifiers. JDEPs are now part of the jdep_code enum.
17036         (typedef struct jdep): Now use enum jdep_code or int, depending on
17037         availability. Both are narrowed down to an 8 bits bitfield.
17038         (CALL_EXPR_PRIMARY): Fixed comment.
17039
17040 1998-06-10  Tom Tromey  <tromey@cygnus.com>
17041
17042         * Make-lang.in (java): Added gjavac and jvgenmain.
17043         (java.start.encap): Depend on gjavac.
17044         (java.rest.encap): Depend on jvgenmain.
17045
17046         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
17047         (JAVA_CROSS_NAME): Likewise.
17048         (java.all.build): Depend on jvgenmain and gjavac.
17049         (java.all.cross): Depend on jvgenmain and gjavac-cross.
17050         (jvgenmain$(exeext)): New target.
17051         (java.install-common): Wrote.
17052         * config-lang.in (compilers, stagestuff): Added gjavac and
17053         jvgenmain.
17054
17055 1998-06-10  Dave Brolley  <brolley@cygnus.com>
17056
17057         * lang.c (lang_decode_option): New argc/argv interface.
17058
17059 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17060
17061         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
17062         * decl.c (build_decl_no_layout): New function.
17063         * expr.c (java_lang_expand_expr): Layout declarations found in
17064         blocks before they're pushed.
17065         * jcf-parse.c (load_class): Save current line when parsing class
17066         file.
17067         (parse_source_file): Register class before expanding their
17068         methods.
17069         * lang.c (put_decl_node): Produce `null' when `void *' is
17070         processed.
17071         * lex.c (static tree wfl_op): New static global, for error report
17072         on casts.
17073         (java_init_lex): wfl_operator and wfl_op initialized
17074         here. Filename caching added for wfl_op. Return wfl_op when `(' is
17075         parsed.
17076         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
17077         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
17078         build_unresolved_array_type): New static function definitions.
17079         (build_decl_no_layout): New extern function declared.
17080         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
17081         faulty modifier exists.
17082         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
17083         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
17084         (UNARY_PLUS_EXPR): New fake operator.
17085         (struct parser_ctxt): New field osb_number.
17086         * parse.y (static tree wfl_operator): New static WFL for operator
17087         bound error messages.
17088         (DECR_TK, INCR_TK): Moved.
17089         (OP_TK): Tagged <operator>.
17090         (array_type:): Now call build_unresolved_array_type.
17091         (dim_expr:): Count the number of '[' seen.
17092         (post_increment_expression, post_decrement_expression,
17093         pre_increment_expression, pre_decrement_expression,
17094         unary_expression_not_plus_minus, unary_expression:): Actions are
17095         now building the corresponding unary expressions.
17096         (cast_expression:): Actions are now building cast expressions.
17097         (build_unresolved_array_type): New function.
17098         (create_interface): Reset the number of declared interfaces.
17099         (create_class): Likewise.
17100         (method_header): Methods declared within the scope of an interface
17101         are now implicitly set public and abstract.
17102         (java_complete_class): Variable's and parameter's type are patched
17103         with a promoted type.
17104         (declare_local_variables): Resolved non builtin types are promoted
17105         before being used to build a variable decl. Removed type patch
17106         posted on variable initialization statement.
17107         (source_start_java_method): Use build_decl_no_layout to build the
17108         decl of a parameter of incomplete type.
17109         (java_register_parsed_class): Process interfaces too. Call
17110         rest_of_decl_compilation on each processed class declarations.
17111         (java_complete_expand_methods): Don't attempt to expand things in
17112         interfaces.
17113         (java_complete_tree): Process CONVERT_EXPR, even though it always
17114         has a type. Propagate error_mark_node to node's type too. Promote
17115         method's call argument type and return error_mark_node if
17116         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
17117         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
17118         handle unary operator nodes.
17119         (build_assignment): Added comment.
17120         (print_int_node): New function.
17121         (patch_assignment): New second argument. New error handling. Use
17122         print_int_node. Handle references. Use can_cast_to_p to issue
17123         different error message according to the context and check upon
17124         the initialization of the RHS.
17125         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
17126         (operator_string): Handle more operators.
17127         (patch_binop): No longer use a function static
17128         wfl_operator. Improved error message on shift distance.
17129         (build_unaryop, build_incdec, build_cast, patch_unaryop,
17130         patch_cast): New functions.
17131
17132 1998-06-05  Per Bothner  <bothner@cygnus.com>
17133
17134         * jvspec.c:  New file.
17135         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
17136
17137         * java-tree.h (identifier_subst):  Add declaration.
17138
17139 1998-06-04  Tom Tromey  <tromey@cygnus.com>
17140
17141         * jvgenmain.c (main): Generate call to JvRunMain.
17142
17143         * class.c (make_class_data): Push value for "sync_info" field.
17144         * decl.c (init_decl_processing): Push "sync_info" field.
17145
17146 1998-06-03  Per Bothner  <bothner@cygnus.com>
17147
17148         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
17149         Java (source) name, not signature.
17150         Set TYPE_ALIGN to (at least) that of element_type.
17151
17152 1998-06-02  Per Bothner  <bothner@cygnus.com>
17153
17154         * class.c:  Moved classname-mangling-rekated code to ...
17155         * mangle.c:  ... this new file.
17156         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
17157         * Makefile.in:  Update for above changes.
17158
17159 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17160
17161         * expr.c (truthvalue_conversion): Convert integer and floating
17162         point value to their truth value.
17163         * lex.c (java_lex): Handle the `null' literal.
17164         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
17165         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
17166         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
17167         New macros.
17168
17169         * parse.y: Reorganization/documentation on token declaration.
17170         (binop_lookup[]): New added new tree codes.
17171         (relational_expression): Build corresponding binary operators.
17172         (equality_expression, conditional_and_expression,
17173         conditional_or_expression): Likewise.
17174         (java_complete_class): Fix crash in debug message.
17175         (java_complete_tree): Check initialization of method call
17176         arguments. Further bogus node evaluation to detect more error
17177         during assignments. Handles more binary operators.
17178         (patch_assignment): Use DECL_P.
17179         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
17180         code.
17181         (operator_string): Handle more case. Compacted source.
17182         (patch_binop): Changed function comment. Checking for
17183         uninitialized first operand takes the compound assignment into
17184         account and uses DECL_P. Checking for uninitialized second operand
17185         delayed to routine's end. Use macros to issue type bound error
17186         messages and issue messages on both operands if their types are
17187         different. Force fixed type into node. Handle all binary
17188         operators.
17189
17190 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17191
17192         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
17193         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
17194         build operator node and return tokens.
17195         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
17196         * parse.h (java_complete_tree): Changed returned type in prototype.
17197         (build_method_invocation, build_assignment, patch_assignment,
17198         patch_binop): New static function declarations.
17199         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
17200         BUILD_EXPR_WFL): New macros.
17201         * parse.y (enum tree_code binop_lookup[]): New static for token to
17202         TREE_CODE lookup.
17203         (%union): Parser union has new sub-structure `operator'.
17204         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
17205         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
17206         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
17207         ASSIGN_ANY_TK): Tokens tagged `operator'.
17208         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
17209         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
17210         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
17211         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
17212         (assignment_operator:): Rule tagged `operator'.
17213         (expression_statement:): Re-installed default rule.
17214         (method_invocation:): Sub rules call build_method_invocation.
17215         (postfix_expression:): Don't attempt to resolve name here. Just
17216         return an ID.
17217         (multiplicative_expression:): Sub-rules build corresponding binop
17218         expression node.
17219         (additive_expression:, shift_expression:, and_expression:,
17220         exclusive_or_expression:, inclusive_or_expression:): Likewise.
17221         (assignment:): Sub rule invoke build_assignment.
17222         (assignment_operator:): Default rules on sub rules.
17223         (force_error): Added documentation on this variable.
17224         (declare_local_variables): Build initialization calling
17225         build_assignment.
17226         (expand_start_java_method): Removed unused rtx declaration. Mark
17227         arguments as already initialized.
17228         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
17229         (java_complete_expand_methods): Don't process next method if
17230         completion of the previous one triggered errors.
17231         (java_complete_expand_method): Call source_end_java_method if no
17232         error were found during completion.
17233         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
17234         locals declaratilon. Handle names found within a class. Return
17235         error_mark_node when things aren't found.
17236         (patch_method_invocation_stmt): Return error_mark_node on failures.
17237         (patch_invoke): Removed unused local. Return the correct node.
17238         (java_complete_tree): Now returns a value. The BLOCK section binds
17239         local identifiers and the type of a BLOCK is now void. Assign the
17240         result of operand completion on COMPOUND_EXPR. Assign the
17241         encapsulated node of a WFL to the result of its completion, except
17242         when the node is an identifier. Now handle MODIFY_EXPR and several
17243         binary operators. Return error_mark_node on errors.
17244         (build_method_invocation, build_assignment, patch_assignment,
17245         build_binop, operator_string, patch_binop): New functions.
17246         * typeck.c (binary_numeric_promotion): New function.
17247
17248 1998-05-21  Per Bothner  <bothner@cygnus.com>
17249
17250         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
17251         Replace most uses of ident_subst by identifier_subst.
17252
17253         * class.c (push_class_static_dummy_field):  Removed function.
17254         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
17255         instead of looking got "class" static field.  Create that decl here.
17256         (class_identifier_node):  Removed;  no longer needed.
17257         (init_class_processing):  Don't init class_identifier_node.
17258         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
17259         Do nreverse 0 times (instead of twice) for Object and Class.
17260         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
17261
17262 1998-05-20  Per Bothner  <bothner@cygnus.com>
17263
17264         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
17265         while initializing linenumber_count and linenumber_table.
17266         Do it before init_function_start (which calls emit_line_note).
17267         * expr.c (expand_byte_code):  Don't need to clear lineno here.
17268
17269 1998-05-18  Tom Tromey  <tromey@cygnus.com>
17270
17271         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
17272         then mangle number as _N_.
17273
17274         * class.c (mangle_class_field): New function.
17275         (build_class_ref): Set assembler name of class reference using
17276         mangle_class_field.
17277         (push_class_static_dummy_field): Likewise.
17278
17279 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
17280
17281         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
17282         of assigning to TREE_CODE.  The latter method exploits a feature
17283         of GCC that is not ANSI compliant.
17284
17285 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17286
17287         * decl.c (pushdecl_force_head): New function.
17288         (pushlevel): Removed conditional printf.
17289         (complete_start_java_method): Don't enter local variable scope if
17290         function is compiled from source code.
17291         * expr.c: parse.h now included
17292         (java_lang_expand_expr): New function.
17293         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
17294         printf. Terminate buffer when doing directories.
17295         * jcf-parse.c (parse_source_file): Call lang_init_source before
17296         parsing and before code generation.
17297         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
17298         use printf if the macro is defined.
17299         * lang.c (lang_init): Install lang_expand_expr hook on
17300         java_lang_expand_expr.
17301         (java_dummy_print): New function.
17302         (lang_init_source): New function.
17303         * lex.c (java_lex): Remember location of an opening brace at the
17304         second nesting level.
17305         (java_is_eol): Unget character seen after a CR if it is EOF.
17306         * parse.h: Now includes lex.h
17307         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
17308         printf if the macro is defined.
17309         (expand_start_java_method, build_expr_block, enter_block,
17310         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
17311         New static function declarations.
17312         (pushdecl_force_head): New extern function declaration.
17313         (INCOMPLETE_TYPE_P): New macro.
17314         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
17315         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
17316         BLOCK_EXPR_ORIGIN): New macros.
17317         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
17318         DECL_SOURCE_LINE_LAST): New macros.
17319         (struct parser_ctxt): Removed field current_method_decl, redundant
17320         with the field current_function_decl. Added fields
17321         first_ccb_indent1 and pending_block.
17322         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
17323         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
17324         tagged <node>
17325         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
17326         (compilation_unit:): Cosmetic on sub rule.
17327         (type_declaration:): Cosmetic on sub rules. Added an error rule.
17328         (variable_initializer:): Installed default rule on expression:.
17329         (method_declaration:): method_header: starts a new
17330         method. method_body: installs the function body, absorbs blocks
17331         emitted for temporary variable scopings, pops function's body block
17332         and merges function's last statement lineno in DECL_SOURCE_LINE.
17333         (method_body:): Installed default rules.
17334         (block:): Call enter_block when an opening brace is seen.  Absorb
17335         scoping blocks and call exit_block when a closing brace is seen.
17336         (block_statement:): Cosmetic changes.
17337         (method_invocation:): Create WFL around CALL_EXPR node.
17338         (patch_stage): Added comment around definition.
17339         (method_header): Try to use first_ccb_indent1 as the first line of
17340         the method, so BP debug info are emitted at the first opening
17341         brace of the function. If the function has no body, use the
17342         location of the function's name. Override currently defined method
17343         name with the matching WFL so we can point redefinition errors
17344         using the location where the function's name was declared.
17345         (check_abstract_method_header): Interprets DECL_NAME as an
17346         identifier or as a WFL, accordingly.
17347         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
17348         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
17349         location and name information out of it and reinstall DECL_NAME to
17350         its original identifier node value.
17351         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
17352         function's source code).
17353         (read_import_dir): Test the value returned by find_class and issue
17354         a fatal accordingly.
17355         (declare_local_variables): Push a new block for the scope of the
17356         new variable(s) if code has been already generated at that nesting
17357         level. Pinpoint redefinition errors using the variable id
17358         WFLs. Generate initialization code if necessary. If the variable
17359         type is incomplete, register a patch on its decl.
17360         (source_start_java_method): Rewritten. Define a new block for the
17361         function's parameters. Build parameter decl out of function's
17362         arguments and register them for a patch if their types are
17363         incomplete.
17364         (expand_start_java_method): Includes the part of
17365         source_start_java_method that was pushing the parameter decls and
17366         completing the method start code.
17367         (source_end_java_method): Removed call the expand_end_bindings and
17368         poplevel (already taken care of). Reinstall function's arguments
17369         and get function's last line of code before calling
17370         expand_function_end.
17371         (java_method_add_stmt): New comment before the function's
17372         code. Complement the second operand of the current COMPOUND_EXPR
17373         if necessary.
17374         (java_complete_expand_methods): Don't generate debug info on line
17375         zero when expanding a generated constructor.
17376         (java_complete_expand_method): Set start and end line numbers for
17377         a artificially generated constructor to one and manually call
17378         enter_block and exit_block when defining it. For all methods:
17379         expand function's start calling the new expand_start_java_method
17380         and invoke java_complete_tree on the effective method's body, if
17381         any.
17382         (resolve_expression_name): Now use lookup_name_in_blocks to search
17383         local variable decls and print out an error when variables are
17384         undefined.
17385         (patch_method_invocation_stmt): Inserted comment before the
17386         function's code.
17387         (lookup_method_invoke): Chain method's arguments using chainon
17388         with the current arg list as a second argument. Inserted missing
17389         IDENTIFIER_POINTER when reporting an error on methods not found.
17390         (refine_accessible_methods_list): Don't retain constructors.
17391         (patch_arguments): Function removed.
17392         (java_complete_tree): Inserted comment before the function's
17393         code. New case for BLOCKs. Moved the WFL case a bit
17394         further. Complete function's arguments.
17395         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
17396         maybe_absorb_scoping_blocks): New functions.
17397
17398 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17399
17400         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
17401         previously set.
17402         * jcf-parse.c (parse_source_file, java_error_count): New forward
17403         and extern declarations.
17404         (java_parse_abort_on_error): Macro moved.
17405         (jcf_parse_source): fatal called if fopen fails. Now calls
17406         parse_source_file.
17407         (parse_source_file): New parse_only parameter. Reflects the
17408         elimination of the second pass.
17409         (yyparse): parse_source_file called with argument set to 0.
17410         * jcf.h (JCF_ZERO): Sets java_source to zero.
17411         * lex.c (java_init_lex): pass argument is gone. Function modified
17412         to be called once during the analysis of a file.
17413         (java_unget_unicode): Fixed typo in fatal message.
17414         (java_get_line_col): Likewise.
17415         (java_lval): Likewise. String literals no longer built during
17416         second pass.
17417         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17418         account.
17419         * parse.h (MODIFIER_WFL): New macro.
17420         (parse_check_super, parser_check_super_interface): Now return int.
17421         (parser_chain_incomplete_item, not_builtin_p,
17422         complete_method_decl): Declarations removed.
17423         (build_method_invocation_stmt, build_invoke): Renamed using the
17424         `patch' instead of `build'
17425         (register-incomplete_type, obtain_incomplete_type,
17426         java_complete_tree, java_complete_expand_method,
17427         unresolved_type_p, create_jdep_list): New function declarations.
17428         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17429         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17430         (jdep): New typedef on new struct _jdep.
17431         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17432         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17433         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17434         JDEP_RESOLVED_P): New macros.
17435         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17436         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17437         JDEP_VARIABLE): New enum values and jdep kinds.
17438         (jdeplist): New typedef on struct _jdeplist.
17439         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17440         macros.
17441         (CALL_EXPR_PRIMARY): New macro.
17442         (struct parser_ctxt): Fields java_pass, current_method_decl,
17443         method_decl_list deleted. New field jdeplist.
17444         (INCOMPLETE_P): Macro deleted.
17445         * parse.y (single_type_import_declaration:): Removed pass switch.
17446         (type_import_on_demand_declaration): Likewise.
17447         (field_declaration:): Removed pass switch on all sub rules.
17448         (class_declaration:): Call the complete_class_decl removed on
17449         class_body rules.
17450         (method_declaration:): Removed second pass switch. No longer chain
17451         methods decl when method_header reduced.
17452         (method_header:): Sub rules no longer depend on pass switch.
17453         (method_declarator:): Likewise.
17454         (method_body:): Likewise.
17455         (abstract_method_declaration:): Likewise.
17456         (block_statement:): Likewise.
17457         (local_variable_declaration:): Likewise.
17458         (argument_list:): Likewise.
17459         (method_invocation:): Likewise. Call to build_method_invocation_stmt
17460         removed. Partial CLASS_EXPR tree node built instead.
17461         (postfix_expression:): Removed pass switch on all sub rules.
17462         (java_pop_parser_context): Free classd_list content.
17463         (yyerror): Call obstrack_grow0 to finalize error message.
17464         (check_class_interface_creation): Comment modified to reflect new
17465         returned value meaning. Removed second pass switch. Return 1 if an
17466         error was found, 0 otherwise. Adjust pointer on filename if a
17467         leading path separator was found.
17468         (maybe_create_class_interface_decl): Removed first pass switch
17469         when linking the class decl to the class_list. Install a new
17470         jdep_list for the class.
17471         (add_superinterfaces): List of unresolved interfaces is
17472         gone. Unresolved interfaces are directly added to the current
17473         dependencies list.
17474         (create_interface): Second pass shortcut removed.
17475         ctpx->modifier_ctx access through MODIFIER_WFL.
17476         (create_class): Second pass shortcut removed. Call to
17477         register_incomplete_type replaces the call to
17478         parser_chain_incomplete_item.
17479         (complete_class_decl): Function removed.
17480         (duplicate_declaration_error): New way of retrieving redeclared
17481         item type.
17482         (register_fields): Call to lookup_modifier_cl replaced by
17483         MODIFIER_WFL. New way of handling unresolved type, using
17484         unresolved_type_p and obtain_incomplete_type.
17485         register_incomplete_type replaces call to parser_chain_incomplete_item.
17486         (patch_stage): New static global variable.
17487         (method_header): New way of handling unresolved type, using
17488         unresolved_type_p and obtain_incomplete_type. patch_stage used to
17489         indicates that the method decl needs to be patched.
17490         (check_abstract_method_header): Call to lookup_modifier_cl
17491         replaced by MODIFIER_WFL.
17492         (method_declarator): Incomplete argument type are registered
17493         calling register_incomplete_type. Patch on the declared method is
17494         issued in that case.
17495         (unresolved_type_p): New function.
17496         (parser_check_super_interface): New comment to reflect function's
17497         modified returned type (int). Function and has a new argument
17498         this_wfl. Call to parse_error_context uses this_wfl instead of
17499         relying on lookup_cl.
17500         (parser_check_super): Comment reflects function's new returned
17501         type (int). Function returns nonzero value on error.
17502         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17503         register_incomplete_type, jdep_resolve_class): New functions to
17504         handle incomplete types in declarations.
17505         (java_complete_class): Rewritten to work with the new incomplete
17506         type handling scheme.
17507         (complete_class_report_errors): Likewise.
17508         (complete_method_decl): Removed: it jobs is now handled by
17509         java_complete_class.
17510         (do_resolve_class): Class loaded in not already loaded and not
17511         found in Java source code.
17512         (java_check_regular_methods, java_check_abstract_methods): Don't
17513         call complete_method_decl anymore.
17514         (lookup_modifier_cl, not_builtin_p): Functions deleted.
17515         (read_import_dir): Got rid of the pass number dependency.
17516         (declare_local_variables): New handling of unresolved types (patch
17517         issued).
17518         (source_start_java_method): New parameter level. Function called
17519         with level set to 1 when argument types are potentially
17520         unresolved.  Called to complete the job with level set to 2 once
17521         types are complete.
17522         (source_end_java_method): Call to permanent_allocation
17523         removed. Waiting to be replaced by a more suitable obstack
17524         management.
17525         (java_complete_expand_methods, java_complete_expand_method,
17526         java_expand_finals): New functions.
17527         (build_method_invocation_stmt): Renamed
17528         patch_method_invocation_stmt. Extracts function call expression
17529         (wfl) and arguments (args) from CALL_EXPR tree operands.
17530         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
17531         call. Patch the function and argument operand of the CALL_EXPR
17532         tree argument.
17533         (patch_argument, java_complete_tree): New functions.
17534
17535 1998-04-20  Per Bothner  <bothner@cygnus.com>
17536
17537         Recover from missing fields and methods (i.e. error instead of fatal).
17538         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
17539         * expr.c (expand_invoke):  Recover from missing method.
17540         (expand_java_field_op):  Recover from missing field.
17541         Inline references to java.lang.{Integer,Char,...}.TYPE.
17542         * typeck.c (get_type_from_signature), java-tree.h:  New function.
17543         * class.c (add_method):  Use get_type_from_signature.
17544         (build_class_ref):  Handle a class that was not found.
17545         * typeck.c (convert):  Handle conversion to pointers (for convenience).
17546         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
17547         instead of lookup_field to handle missing fields.
17548
17549         * jcf-parse.c (process_zip_dir):  Set java_source.
17550
17551 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
17552
17553         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17554
17555 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17556
17557         * jcf-parse.c (load_class): Don't change input_filename before
17558         calling jcf_parse_source (but still do it before calling
17559         jcf_parse).
17560         (jcf_parse_source): Assign input_filename after having saved the
17561         parser context.
17562         * lex.c (java_init_lex): Chain a WFL node to the import on demand
17563         list. ctxp->modifier_ctx zeroed according to its new
17564         definition. ctxp->filename initialized. Removed
17565         JAVA_MODIFIER_CTX_UNMARK.
17566         (java_unget_unicode): Update the character based column position.
17567         (java_allocate_new_line): ref_count not used anymore. Always free
17568         ctxp->p_line. Initialize c_line->char_col to 0.
17569         (java_get_unicode): Update the character based column position.
17570         (java_lex): Use ctxp->elc to store current position in source
17571         file, at the beginning of the parsed token. Set modifier_ctx entry
17572         corresponding to the parse modifier to a WFL node. Return a WFL
17573         node when an identifier is parsed.
17574         (java_lex_error): Now uses ctxp->elc to store current position in
17575         source.
17576         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17577         * lex.h (build_wfl_node): New function definitions.
17578         (struct java_line): ref_count and next fields are gone. New field
17579         char_col.
17580         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17581         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17582         (JAVA_COLUMN_DELTA): New macro.
17583         (java_lc): New typedef on new struct _java_lc.
17584         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17585         (parse_error_context, parse_warning_context): Changed prototypes.
17586         (java_get_line_col): Added as an available global function.
17587         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17588         (IC_DECL): Replaced by macro IC_TYPE
17589         (DEPEND_WFL): New macro.
17590         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17591         wrong modifier.
17592         (exit_java_complete_class): Removed a commented out statement.
17593         (struct parser_ctxt): Added comments on fields. modifier_ctx is
17594         now an array of tree nodes. Deleted fields line_list and
17595         e_line. New field elc, to replace e_line.
17596         * parse.y (array_type:): Build WFL node.
17597         (qualified_name:): Build a single WFL node out of two. Retain
17598         the location information of the first node in the resulting node.
17599         (package_declaration:): Use package name as a WFL node
17600         (single_type_import_declaration:): Use imported name as a WFL node.
17601         (type_import_on_demand_declaration:): Use root of the imported
17602         packages as a WFL node.
17603         (field_declaration:): Removed unused local variable cl.
17604         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17605         (yyerror): New static elc. Removed static error_line, error_pos.
17606         New local code_from_source. Save ctxp->elc into elc at the first
17607         pass. Call java_get_line_col to get a string of the line where
17608         the error occurred.
17609         (debug_line): Removed static function.
17610         (parse_error_context, parse_warning_context): Parameter cl is now
17611         a WFL node. Use its value to initialize ctxp->elc.
17612         (redefinition_error): Parameter cl is now a WFL node.
17613         (parse_add_interface): New parameter wfl. No longer call
17614         lookup_cl, use wfl instead.
17615         (check_class_interface_creation): Parameter cl is now a WFL node.
17616         (maybe_create_class_interface_decl): Likewise.
17617         (add_superinterfaces): New function.
17618         (create_interface): Removed local cl, node, super_decl,
17619         super_decl_type.  Function now uses id as a WFL node. Better
17620         warning/error report on obsolete or forbidden mix of
17621         modifiers. Now calls add_superinterfaces to register interfaces.
17622         (create_class): Removed local cl, node. Local variable id is used
17623         as a WFL node. Better error report on forbidden modifier
17624         mix. Uses add_superinterfaces to register interfaces.
17625         (find_field): Argument cl is now a WFL node. Now store the WFL
17626         node of a fields that needs to be checked for their
17627         initialization.
17628         (method_header): Local variable node non longer used. Local
17629         variable id replaces cl.
17630         (check_modifiers_consistency): Local variable cl is now a WFL
17631         node.
17632         (method_declarator): Local variable cl replaced by parameter id.
17633         (parser_qualified_name): Now uses parameter name as a WFL node.
17634         (parser_check_super_interface): New parameter wfl, for achieve
17635         greater accuracy during error reports.
17636         (parser_chain_incomplete_item): New parameter named location. Used,
17637         along the decl, to construct the incomplete item node.
17638         (java_complete_class): resolve_class now uses WFL node extracted
17639         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17640         where appropriate.
17641         (complete_method_decl): Unresolved function's argument types are WFL.
17642         (resolve_class): Parameter cl is now a WFL node.
17643         (resolve_and_layout): Likewise.
17644         (do_resolve_class): Likewise. Try first to use cl and then do the
17645         lookup on the decl when calling check_pkg_class_access.
17646         (complete_class_report_errors): Use IC_TYPE in place of
17647         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17648         instead of doing a lookup over the decl.
17649         (java_check_final): Use WFL info from field tree list.
17650         (lookup_cl): Rewritten and returns a statically defined WFL node.
17651         (lookup_modifier_cl): Now uses information from WFL nodes.
17652         (process_imports): Likewise.
17653         (read_import_dir): name and cl arguments replaced by a single WFL
17654         node. Function modified accordingly.
17655         (find_in_imports_on_demand): Now uses WFL node.
17656         (check_pkg_class_access): cl argument is now a WFL node.
17657         (declare_local_variables): Fixed to use WFL nodes.
17658         (resolve_expression_name): Likewise.
17659         (build_method_invocation_stmt): name_combo argument renamed
17660         wfl. Function modified to use WFL nodes.
17661         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17662         (lookup_method_invoke): cl is now a WFL node. Added missing
17663         IDENTIFIER_POINTER to class type decl name.
17664
17665 1998-04-14  Dave Brolley  <brolley@cygnus.com>
17666
17667         * lang.c (init_parse): Now returns char* containing the filename.
17668
17669 1998-04-10  Per Bothner  <bothner@cygnus.com>
17670
17671         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
17672
17673         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
17674         * class.c (make_class_data):  If flag_assume_compiled, initial class
17675         state is CSTATE_PREPARED; make superclass and interfaces direct
17676         references, rather than constant pool indexes.
17677
17678 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17679
17680         * parser.y: Include flags.h. Removed debug variable pl.
17681         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17682         (block:): Likewise.
17683         (labeled_statement_nsi:): Generate debug info when reducing
17684         expression_statement:.
17685         (check_pkg_class_access): get_access_flags_from_decl invocation
17686         fixed for new CLASS_* flags location.
17687         (source_end_java_method): Save/restore parser context when
17688         entering/leaving this routine. Restore lineno to its right value
17689         before calling expand_end_bindings.
17690         (build_method_invocation_stmt): build_invoke called with the
17691         current line information.
17692         (build_invoke): New argument cl. Wrap the function call around a
17693         wfl node.
17694         (refine_accessible_methods_list): Changed comment, removed
17695         unnecessary code.
17696         * parse.h: Fixed typo in comments.
17697         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17698         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17699         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17700         parser_ccb_indent.
17701         * lex.c (java_lex): Record the last closing curly bracket of a
17702         function.
17703         * jcf-parse.c (jcf_parse_source): Now calls
17704         java_check_methods. Clarified comment, fixed typo.
17705
17706 1998-04-09  Dave Brolley  <brolley@cygnus.com>
17707
17708         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17709         (finish_parse): Expose for non USE_CPPLIB builds.
17710
17711 1998-04-08  Jeffrey A Law  (law@cygnus.com)
17712
17713         * lang.c (lang_print_xnode): New function.
17714
17715 1998-04-03  Per Bothner  <bothner@cygnus.com>
17716
17717         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
17718         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
17719         used to build a class's dispatch table.
17720         (make_class_data):  Generate dispatch table if flag_assume_compiled.
17721         Set dtable of class object to address of class_dtable_decl.
17722
17723         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
17724         be volatile and have side effects - generates better code.
17725
17726         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
17727         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17728
17729         * expr.c (expand_invoke):  If class is final, method is
17730         effectively final, so can call it directly.
17731
17732         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
17733
17734         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
17735
17736 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17737
17738         * parse.y (build_method_invocation_stmt): Removed extra argument
17739         to build_invoke.
17740
17741 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17742
17743         * expr.c (dtable_indent): Now static global.
17744         (expand_invoke): Now call invoke_build_dtable and
17745         build_invokevirtual.
17746         (invoke_build_dtable, build_invokevirtual): New functions.
17747         * jcf-io.c (find_class): Defer issuing a warning by setting
17748         jcf->outofsynch to 1.
17749         * jcf-parse.c (jcf_out_of_synch): New function.
17750         (load_class): Test this_jcf.outofsynch flag and call
17751         jcf_out_of_synch accordingly.
17752         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17753         comment indentation.
17754         * lex.c (java_get_unicode): Fixed code indentation.
17755         (java_lex): Create string literal. Fixed typo. Removed several
17756         premature obstack_free.
17757         * parse.h: New enums for name resolution and invocation mode.
17758         (struct qualification): New data structure.
17759         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17760         (do_resolve_class, build_method_invocation_stmt,
17761         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17762         debug_line, identical_subpath_p, invocation_mode,
17763         refine_accessible_methods_list, build_invoke,
17764         lookup_method_invoke): New functions declared.
17765         (build_invokevirtual, invoke_build_dtable, match_java_method,
17766         build_field_ref, jcf_out_of_synch): New references to external
17767         functions.
17768         (struct parse_ctxt): Removed artificial_constructor field.
17769         * parse.y: (array_type:): Type defined for this rule.
17770         (class_type:): Installed default rule for interface_type:.
17771         (array_type:): Now build Java array type.
17772         (qualified_name:): Now use obstack_grow0.
17773         (method_declaration:): Skip the artificial constructor added to
17774         the list, if any.
17775         (abstract_method_declaration:): Execute the code only during pass 1.
17776         (block:): Installed default rule in block_statements:.
17777         (block_statement:): Add the statement to the method during pass 2.
17778         (statement_expression): Installed default rule for
17779         method_invocation:.
17780         (argument_list:): Added code to build the argument list.
17781         (method_invocation:): Added call to create the method invocation
17782         node.
17783         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17784         (debug_line): New function for debug.
17785         (complete_class_decl): No longer do something during pass 1.
17786         (method_header): Use BUILD_PTR_FROM_NAME.
17787         (parser_qualified_classname): Use obstack_grow0. Removed bogus
17788         obstack_free.
17789         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17790         function's main comment.
17791         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17792         classes.
17793         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17794         (resolve_class): Now works with arrays.
17795         (do_resolve_class, resolve_and_layout): New functions.
17796         (java_check_regular_methods): Reverse method list before and after
17797         having processed it. No longer set ctxp->artificial_constructor.
17798         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17799         accordingly. Fixed typo in issued error message. Now use
17800         obstack_grow0.
17801         (find_in_imports_on_demand): Now use obstack_grow0.
17802         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17803         (source_end_java_method): Call expand_expr_stmt instead of
17804         expand_expr. Calls it before calling expand_function_end.
17805         (java_method_add_stmt): Do nothing if errors were found during
17806         parsing.
17807         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17808         (build_method_invocation_stmt, build_invoke, invocation_mode,
17809         lookup_method_invoke, refine_accessible_methods_list,
17810         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17811         New functions.
17812         * typeck.c (build_java_signature): Properly end method signature
17813         if return type skipped.
17814         (match_java_method): New function.
17815
17816 1998-03-16  Per Bothner  <bothner@cygnus.com>
17817
17818         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
17819
17820 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17821
17822         * expr.c (build_invoke_non_interface): New function.
17823         (methods_ident, ncode_ident): Now static globals.
17824         (expand_invoke): Use build_invoke_non_interface.
17825         * java-tree.h (struct lang_decl): New field function_decl_body.
17826         (DECL_FUNCTION_BODY): New macro.
17827         * jcf-parse.c (jcf_parse_source): Deeper check before setting
17828         CLASS_FROM_SOURCE_P.
17829         (parse_source_file): Fixed typos. Call java_layout_parsed_class
17830         before starting pass 2. Call to java_generate_parsed_class replaced
17831         by java_register_parsed_class.
17832         * lex.c: Fixed typo in header. Some line width related formating.
17833         * lex.h: Some line width related formating.
17834         * parse.h (source_end_java_method, resolve_expression_name,
17835         complete_class_decl, maybe_create_class_interface_decl,
17836         check_class_interface_creation): New static function declarations.
17837         (java_layout_parsed_class, java_method_add_stmt): New function
17838         declarations.
17839         (struct parser_ctxt): Field mark_class_generate removed. New
17840         fields class_list and artificial_constructor.
17841         * parse.y: Fixed typo in header.
17842         (class_declaration:): Call complete_class_decl when class body
17843         parsed.
17844         (method_declaration:): Call source_end_java_method in pass 2 when
17845         the method body is defined.
17846         (postfix_expression:): Do expression name resolution on sub-rule
17847         name during pass 2.
17848         (create_class, create_interface): Merged common pieces.
17849         (check_class_interface_creation, maybe_create_class_interface_decl):
17850         New functions.
17851         (complete_class_decl): New function.
17852         (register_fields): Fixed line width related typo.
17853         (method_header): Correctly skip first argument when fixing
17854         argument line. Changed the loop.
17855         (java_check_circular_reference): Now use ctxp->class_list.
17856         (java_complete_class): Removed start/stop marking.
17857         (java_check_regular_methods): Now takes a class decl as an
17858         argument.  Add default constructor if none were encountered.
17859         (java_check_methods): Now use ctxp->class_list. Changed call to
17860         java_check_regular_methods.
17861         (source_start_java_method): Set DECL_ARG_TYPE for each function
17862         arguments.
17863         (source_end_java_method, java_method_add_stmt): New functions.
17864         (java_generate_parsed_class): No longer exists.
17865         (java_layout_parsed_class, java_register_parsed_class): New functions.
17866         (resolve_expression_name): New function.
17867
17868 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17869
17870         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17871         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17872         until pass initializations are done. Call read_import_dir with
17873         pass set to 0.
17874         * parse.h: (lookup_modifier_cl): New function declared.
17875         (INTERFACE_FIELD_MODIFIERS): New macro.
17876         (OBSOLETE_MODIFIER_WARNING): New macro.
17877         * parse.y: (register_fields): Class type and current field name in
17878         local variables. Check modifier(s) if adding field(s) to an interface.
17879         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17880         and report errors using the faulty modifier line context.
17881         (lookup_modifier_cl): New function.
17882         (read_import_dir): Detect and report default import processing
17883         failure.
17884
17885 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
17886
17887         Add a pair of -fassume-compiled/-fno-assume-compiled options.
17888         * class.c (is_compiled_class): Return 1 after making sure it
17889         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17890         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17891         * java-tree.h (flag_assume_compiled): Add decl.
17892         * lang.c (lang_f_options): Add the flag.
17893         (flag_assume_compiled): Add decl, default to 0.
17894
17895 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17896
17897         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17898         (is_compiled_class): Likewise.
17899         (layout_class): Likewise.
17900         (layout_class): Detect and lay out classes defined in source code.
17901         (interface_of_p, add_interface_do, may_add_interface): New
17902         function.
17903         (add_interface): Now use add_interface_do.
17904         (add_method_1): New function.
17905         (add_method): Now use add_method_1.
17906         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17907         (complete_start_java_method): New function.
17908         (start_java_mehod): Now call complete_start_java_method.
17909         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17910         (expand_invoke): Likewise and fixed typo.
17911         *gjava.c: (print_super_field): Use new argument to find_class
17912         DO_CLASS_FILE.
17913         (main): Likewise.
17914         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17915         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17916         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17917         IDENTIFIER_NODE.
17918         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17919         (add_method_1, push_class): New prototypes.
17920         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17921         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17922         directory where the class was found.
17923         (find_class): New argument DO_CLASS_FILE. Function find_class
17924         modified accordingly.
17925         *jcf-parse.c: (fix_class_path): New function.
17926         (load_class): Use new VERBOSE argument. load_class now finds and
17927         loads/parses .class/.java files. Save read_state of current_jcf
17928         if necessary.
17929         (java_parser_abort_on_error): New macro.
17930         (jcf_parse_source, parse_source_file): New function.
17931         (jcf_parse): Fixed typo.
17932         (yyparse): Call parse_source_file () only.
17933         (process_zip_dir): Fixed typo, fix zdir->filename_length when
17934         writing the real class name back in the zip directory entry.
17935         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17936         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17937         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17938         (find_class): Prototype fixed.
17939         *lex.c: Added 1998 time stamp.
17940         Removed all static global variables, moved into the parser
17941         context data structure.. Now include unistd.h if SEEK_SET not
17942         defined.
17943         (java_init_lex): Rewritten.
17944         (java_sneak_unicode): Modified current unicode access in current line.
17945         (java_unget_unicode): Likewise.
17946         (java_allocate_new_line): New allocation management.
17947         (java_read_char): Modified access and storage of unget_utf8_value.
17948         New way of processing current unicode.
17949         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17950         (java_get_unicode): Now use the parser context.
17951         (java_lineterminator): Likewise.
17952         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17953         of the reentrant parser implementation. Function now use the
17954         parser context data structure and java_lval. Fixed production of
17955         the float and double constant "out of range" error message. Fixed
17956         obstack use. Return integer value when hitting a modifier. Now
17957         return type for TRUE, FALSE and other predefined types. Return
17958         identifier as a TREE_LIST list containing the current line context
17959         as the TREE_VALUE sub-node.
17960         (java_unicode_2_utf8): Fixed typo in declaration.
17961         (java_lex_error): Now use the parser context data structure.
17962         *lex.h: Added 1998 time stamp.
17963         (struct java_line): New fields ref_count and next.
17964         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17965         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17966         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17967         *parse.h: Added 1998 time stamp.
17968         (java_parse_source_file): Renamed from parse_source_file.
17969         (YYERROR_NOW, YYNOT_TWICE): Fixed.
17970         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17971         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17972         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
17973         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
17974         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
17975         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
17976         (struct parser_ctxt): New data structure to keep the parser context.
17977         *parse.y: Added 1998 time stamp, got rid of static global variables.
17978         (java_error_count, ctxp): New global variables.
17979         (%union): New value field.
17980         (numeric_type, integral_type): Rules removed.
17981         (primitive_type): Rule defined to handle integral, float, double and
17982         boolean types.
17983         (qualified_name, package_declaration,
17984         single_type_import_declaration, type_import_on_demand_declaration,
17985         modifiers, class_declaration, super, interfaces,
17986         interface_type_list, class_body, field_declaration,
17987         field_declaration, variable_declarators, variable_declarator,
17988         variable_declarator_id, method_declaration, method_header,
17989         formal_parameter_list, formal_parameter, method_body, block,
17990         static, interface_declaration, extends_interfaces,
17991         abstract_method_declaration, local_variable_declarators): Rules now
17992         define actions.
17993         (force_error, do_warning): New global statics.
17994         (push_parser_context, parser_context_save_global,
17995         parser_context_restore_global, pop_parser_context): New functions.
17996         (yyerror): Now uses the global parser context. Fixed use of obstack.
17997         (parse_error, parse_error_context, parse_warning_context,
17998         java_accstring_lookup, redefinition_error, check_modifiers,
17999         parser_add_interface, create_interface, create_class, find_field,
18000         duplicate_declaration_error, register_fields, method_header,
18001         check_modifiers_consistency, check_abstract_method_header,
18002         method_declarator, parser_qualified_classname,
18003         parser_check_super_interface, parser_check_super,
18004         parser_chain_incomplete_item, java_check_circular_reference,
18005         layout_class_from_source, java_complete_class,
18006         complete_method_decl, resolve_class, complete_class_report_errors,
18007         java_check_final, check_method_redefinition,
18008         java_check_regular_methods, java_check_abstract_methods,
18009         java_check_methods, lookup_java_interface_method2,
18010         lookup_java_method2, lookup_cl, find_name_in_single_imports,
18011         process_imports, find_in_imports, read_import_entry,
18012         read_import_dir, find_in_imports_on_demand,
18013         check_pkg_class_access, not_builtin_p, declare_local_variables,
18014         source_start_java_method, java_generate_parsed_class): New
18015         functions.
18016         *typeck.c: (signature_include_return): New global variable.
18017         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
18018         to add the function returned type in the signature.
18019
18020 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
18021
18022         * jcf-io.c (open_in_zip): Use strncmp and LEN.
18023
18024 1998-01-29  Dave Brolley  <brolley@cygnus.com>
18025
18026         * Make-lang.in (java.info): Added.
18027         (java.install-info): Added
18028
18029 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
18030
18031         * Makefile.in (clean): Also remove java/parse.c.
18032
18033 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
18034
18035         Add a pair of -fbounds-check/-fno-bounds-check options.
18036         * lang.c (lang_decode_option): Add code to grok arguments.
18037         (flag_bounds_check): Add decl.
18038         (lang_f_options): New array w/ the option in it.
18039         * java-tree.h (flag_bounds_check): Add decl.
18040         * lang-options.h: New file.
18041         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
18042         of a static macro value.
18043         (JAVA_ARRAY_EXCEPTION): Delete macro.
18044
18045 1998-01-23  Per Bothner  <bothner@cygnus.com>
18046
18047         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
18048         * expr.c (build_anewarray):  Add missing promote_type.
18049
18050 1998-01-22  Per Bothner  <bothner@cygnus.com>
18051
18052         Add array types with known length to optimize bounds checking.
18053         * typeck.c (build_java_array_type):  Take length parameter.
18054         (java_array_type_length, build_prim_array_type):  New functions.
18055         * java-tree.h:  Update for new functions.
18056         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
18057         * class.c:  Use build_prim_array_type.
18058         * expr.c (can_widen_reference_to):  Handle known-length array types.
18059         (verify_jvm_instructions):  Keep track of integer push instructions
18060         followed by newarray/anewarray, so we can build known-length arrays.
18061         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
18062         (java_array_data_offset):  New function.
18063         (build_java_array_length_access):  New function.  Optimize if constant.
18064         (build_java_arrayaccess):  Constant fold bounds check.
18065         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
18066         (build_newarray, build_anewarray):  New functions.
18067         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
18068         * verify.c (merge_types):  Handle known-lengh array types.
18069
18070 1998-01-19  Per Bothner  <bothner@cygnus.com>
18071
18072         * expr.c (expand_byte_code):  Fix performace bug, which caused
18073         searching linenumber_table to be linear rather than constant.
18074
18075 1997-12-12  Per Bothner  <bothner@cygnus.com>
18076
18077         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
18078
18079         * decl.c, java-tree.h (soft_fmod_node):  New global.
18080         * decl.c (init_decl_processing):  Define __builtin_fmod.
18081         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
18082         using __builtin_fmod.
18083
18084 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18085
18086         * keyword.h: New file, output of keyword.gperf as processed by
18087         gperf.
18088         * lex.c (java_lex_init): Initialize java_error_flag.
18089         * parse.c (YYERROR_NOW): Uses java_error_flag.
18090         * parse.y: New static java_error_flag. Useless definition of
18091         buffer_error gone.
18092         * parse.y (java_error): Portable error recovery using
18093         java_error_flag (not yet completely tuned).
18094
18095 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
18096
18097         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
18098
18099 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18100
18101         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
18102         (parse.c, lex.c, keyword.h): New rules for Java source code
18103         front-end.
18104         * parse.c: Renamed into jcf-parse.c.
18105         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
18106         * keyword.gperf: New file, Java keywords.
18107         * parse.y: New file, Java language grammar.
18108         * parse.h: New file, Java language grammar definitions.
18109         * lex.c: New file, Java language lexer.
18110         * lex.h: New file, Java language lexer definitions.
18111
18112 1997-12-03  Per Bothner  <bothner@cygnus.com>
18113
18114         * decl.c (clinit_identifier_node), java-tree.h:  New global.
18115         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
18116         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
18117         * expr.c (expand_java_field_op):  Check for invalid assignment
18118         to final field.
18119
18120         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
18121
18122 1997-10-27  Per Bothner  <bothner@cygnus.com>
18123
18124         * verify.c (verify_jvm_instructions):  When processing a handler,
18125         attempt to set the current_subr to the right value.
18126         (More complicated code combines Sep 17 and Oct 22 versions.)
18127
18128 1997-10-24  Per Bothner  <bothner@cygnus.com>
18129
18130         * class.c (push_class):  Figure out (guess) name of source file.
18131         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
18132         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
18133         (parse_class_file):  Change return type from int to void.
18134         Call debug_start_source_file/debug_end_source_file.
18135
18136         * expr.c (build_java_binop):  Fix masking 2nd operand.
18137         * decl.c (init_decl_processing):  Set sizetype first.
18138
18139 1997-10-22  Per Bothner  <bothner@cygnus.com>
18140
18141         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
18142         (Revert Sep 17 change.)
18143
18144 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18145
18146         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
18147         .class extension in their name and fix thing so we don't process
18148         them parse_zip_file_entries().
18149         (parse_zip_file_entries): Cleaned unused local variables.
18150
18151 1997-10-20  Per Bothner  <bothner@cygnus.com>
18152
18153         * expr.c (can_widen_reference_to):  Allows equal array element types.
18154         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
18155         * jcf-dump.c (RET):  Get (and print) index.
18156
18157         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
18158         Promote element type to POINTER_TYPE.
18159
18160 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18161
18162         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
18163         find_in_current_zip, jcf_figure_file_type): Moved from
18164         jcf-reader.c to parse.c.
18165         * zextract.c: (read_zip_archive): takes file_comment_length possible
18166         field into account.
18167
18168 1997-10-20  Per Bothner  <bothner@cygnus.com>
18169
18170         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
18171
18172         * verify.c (merge_types):  Handle array types even better ...
18173
18174 1997-10-17  Per Bothner  <bothner@cygnus.com>
18175
18176         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
18177
18178         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
18179         * class.c (make_class_data):  Don't build fields_decl if no fields.
18180         When building fields_decl, skip if DECL_ARTIFICIAL.
18181
18182         * expr.c (java_stack_swap):  Update stack_type_map.
18183         * verify.c (merge_types):  Handle array types better.
18184
18185 1997-10-15  Per Bothner  <bothner@cygnus.com>
18186
18187         * class.c (add_field):  Don't promote short integral fields to
18188         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
18189         * expr.c (push_value):  Promote and convert short integral values.
18190
18191         * decl.c, java-tree.h (integer_two_node):  New constant node.
18192         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
18193
18194 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18195
18196         * class.c (append_gpp_mangled_type): Use function argument
18197         unpromoted type to generate mangled name.
18198
18199 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18200
18201         * constants.c (build_constant_data_ref): Now uses current_class
18202         instead of main_class.
18203         (build_constants_constructor): Now uses current_class instead of
18204         main_class.
18205         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
18206         of the global variable SeepZipFiles done here.
18207         * zextract.c (read_zip_archive): extra_field optional field taken
18208         into account while computing the position of the class file in the
18209         archive.
18210         * verify.c (verify_jvm_instructions): Use current_jcf to search
18211         the constant pool.
18212         * parse.c (load_class): First search for the class to load in the
18213         current zip file. Saves current_jcf (restored before returning
18214         from that function). Don't call JCF_FINISH in the class was found
18215         in the current ZIP file.
18216         (jcf_parse): If the class was found in the current ZIP file, save
18217         its tree_constant_pool (for later reuse).
18218         (parse_class_file): New function. Process each method defined in
18219         the current class and record the class as to be later registered.
18220         (yyparse): Rewritten. Figure the type of the current file and switch
18221         accordingly.
18222         * lang.c: New global variable current_jcf.
18223         (lang_init): Removed compiling_from_source test (done later, in
18224         yyparse). Removed call the jcf_parse ().
18225         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
18226         (typedef struct JCF): New fields seen_in_zip (to mark a class found
18227         in the current ZIP file) and zip_offset (offset to the class data in
18228         the current zip file).
18229         * jcf-reader.c: zipfile.h included.
18230         localToFile: New ZipFileCache static global variable
18231         (parse_zip_file_entries): New function. Browse the current ZIP
18232         file directory and process each class found.
18233         (process_zip_dir): New function. Register each class found in the
18234         ZIP file directory. The class aren't parsed but a valid JCF is
18235         link to each of them.
18236         (find_in_current_zip): New function. Search for a class in the
18237         current ZIP file directory. If found, prepare the class so that it
18238         can be loaded.
18239         (jcf_figure_file_type): New function. Examine the file structure
18240         to figure a class file, a ZIP file. If none of these categories are
18241         matched, a source file is assumed.
18242         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
18243         SeenZipFile: New global variable.
18244         (open_in_zip): Use zipmember's length to accelerate the search for
18245         a member. If zipmember was NULL and zip file successfully read,
18246         return 0.
18247         * java-tree.h: New global variable current_jcf declared.  Added
18248         declaration for current_constant_pool_tags, current_constant_pool_data,
18249         current_constant_pool_length, current_constant_pool_data_ref.
18250         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
18251         store the JCF of classes seen in a zip file) and tree *constant_pool
18252         (to save a loaded class constant pool). current_class declared here.
18253         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
18254         retrieve method_ref_constant.
18255         (PUSHC): java_push_constant_from_pool now uses current_jcf.
18256         (OBJECT): get_class_constant now uses current_jcf.
18257         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
18258         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
18259         (expand_invoke): Now uses current_class instead of main_class
18260         (build_class_init): Now uses current_class instead of main_class
18261         * class.c: New static global variable registered_class.
18262         (register_class): New function.
18263         (emit_register_class): Modified to use registered_class instead of
18264         main_class
18265         (is_compiled_class): Now take into account class seen in the archive.
18266
18267 1997-10-06  Per Bothner  <bothner@cygnus.com>
18268
18269         * except.h:  Renamed to: java-except.h.
18270         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
18271         * except.c:  Add semi-working (commented out) implementation.
18272
18273         * expr.c (expand_iinc):  Add needed flush_quick_stack.
18274         * parse.c (set_source_filename):  New function.
18275         (give_name_to_class):  Set input_filename from package.classname.java.
18276
18277         * jcf-io.c (find_class):  Don't look first in ".".
18278
18279 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18280
18281         * zextract.c (read_zip_archive): Now takes into account the
18282         extra_field field.
18283         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
18284
18285 1997-09-20  Per Bothner  <bothner@cygnus.com>
18286
18287         * constants.c, java-tree.h (build_internal_class_name):  New function.
18288         (alloc_class_constant):  Re-implement using build_internal_class_name.
18289         * class.c (make_class_data):  Likewise.
18290         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
18291
18292 1997-09-17  Per Bothner  <bothner@cygnus.com>
18293
18294         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
18295         to NULL before pushing an exception handler target.
18296
18297         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
18298         (java_stack_swap, java_stack_dup):  Re-write to be safe from
18299         clobbering registers.
18300         (build_class_init):  New function.
18301
18302 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18303
18304         * typeck.c (build_java_array_type): Temporary use
18305         permanent_obstack to create the array 'length' field.
18306         * expr.c (lookup_label): Temporay use permanent_obstack to create
18307         label if not found.
18308         * class.c (push_super_field): Tempory use permanent_obstack.
18309
18310 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18311
18312         * typeck.c (type_for_mode): Now handles double_type_node and
18313         float_type_node.
18314         * verify.c (verify_jvm_instructions): The instruction following
18315         the wide bytecode is checked. OPCODE_ret added to the list of
18316         wide.
18317
18318 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18319
18320         * class.c (make_class): Temporary use permanent_obstack. Set the
18321         class CLASS_P field to 1.
18322         (push_class): Temporary use permanent_obstack.
18323         (set_super_info): Temporary use permanent_obstack.
18324         (add_method): Temporary use permanent_obstack, set
18325         METHOD_TRANSIENT().
18326         (add_field): Temporary use permanent_obstack. Sets
18327         FIELD_VOLATILE() and FIELD_TRANSIENT().
18328         (build_class_ref): Temporary use permanent_obstack if the class
18329         isn't compiled.
18330         (build_static_field_ref): Temporary use permanent_obstack when
18331         creating field's rtl.
18332         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
18333         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
18334         and fields. Function finalized, as far as flag handling.
18335         (push_class_static_dummy_field): Temporary use permanent_obstack.
18336         (emit_register_class): Force generation of class registration at
18337         -O3 or deeper.
18338         * decl.c (end_java_method): Call permanent_allocation() before
18339         returning.
18340         * expr.c (can_widen_reference_to): Added comment to interface
18341         handling, fixed typo.
18342         (lookup_field): Now uses CLASS_P() to correct FIXME
18343         (expand_invoke): Verification on public && !static &&
18344         !abstract moved into soft_lookupinterfacemethod (kaffe).
18345         Use Object class dtable if objectref is an array when expanding
18346         invokeinterface.
18347         (java_push_constant_from_pool): Temporary use permanent_obstack
18348         for CONSTANT_string
18349         * parse.c (get_ref_constant): Temporary use permanent_obstack to
18350         create constant references.
18351         (get_constant): Temporary use permanent_obstack to create constant.
18352         (load_class): Temporary use permanent_obstack to load class.
18353         (jcf_parse): Temporary use permanent_obstack to perform class
18354         layout.
18355         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
18356         (build_java_signature): Temporary use permanent_obstack.
18357         * verify.c: (verify_jvm_instruction): removed unnecessary verification
18358         on ACC_SUPER flag.
18359         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
18360         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
18361         (CLASS_P): Defined
18362
18363 1997-09-11  Per Bothner  <bothner@cygnus.com>
18364
18365         * class.c (append_gpp_mangled_type):  Fix typo.
18366         (emit_register_class):  Use main_class to get class object, rather
18367         than looking for no-longer-existing static decl starting with _CL.
18368         * typeck.c (parse_signature_type):  Promote array element type
18369         if it is a RECORD_TYPE.
18370
18371 1997-09-10  Per Bothner  <bothner@cygnus.com>
18372
18373         * class.c (push_class_static_dummy_field):  New function.
18374         (mangle_static_field):  New. Do G++-style mangling of static fields.
18375         (layout_class):  Mandle static fields here, not in add_field.
18376         (build_class_ref):  The class object is now a dummy static field.
18377         * decl.c (find_local_variable):  Look for best, instead of first match.
18378         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
18379         (build_java_athrow):  Don't check here if exception is Throwable.
18380         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
18381         (TYPE_USED):  Removed.  No longer used ...
18382         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
18383         * verify.c (push_pending_label):  New function.
18384         (push_pending_block):  Renamed to check_pending_block.
18385         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
18386         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
18387         re-checking possible handlers) after a store (less wasted work).
18388         Check for null handler (finally) before calling add_handler.
18389         Various changes to (finally?) correctly handle try/finally.
18390
18391 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
18392
18393         * class.c: Include stdio.h.
18394
18395 1997-09-04  Per Bothner  <bothner@cygnus.com>
18396
18397         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
18398         to make sure class is initialized before static/special invoke.
18399
18400         * verify.c (verify_jvm_instructions):  On a store instruction,
18401         call find_local_variable to force pre-allocation of decl and rtx.
18402         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
18403
18404 1997-09-03  Per Bothner  <bothner@cygnus.com>
18405
18406         * class.c (build_class_ref):   Strip off "promoted_" if need be.
18407         (make_field_value): Call build_java_signature when needed.
18408         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
18409         * expr.c (build_java_athrow):  Don't push_value of exception.
18410         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18411         match specification of [fd]cmp[lg] for NaNs.
18412         (expand_byte_code):  Add support for exception handler ranges.
18413         * except.c:  Add skeleton for EH code-generation.
18414         * verify.c (merge_types):  Treat all promoted integral types as equal.
18415         * constants.c (build_constants_constructor):  To force creation of
18416         current_constant_pool_data_ref, call build_constant_data_ref.
18417
18418         * javaop.def (lload):  Fix typo.
18419         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
18420
18421 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
18422
18423         * parse.c: Don't include function.h.
18424
18425 1997-08-27  Per Bothner  <bothner@cygnus.com>
18426
18427         * except.[ch]:  New files.
18428         * Makefile.in (JAVA_OBJS):  Add except.o
18429         * expr.c:  Temporary warning about unimplemented exceptions.
18430         * verify.c:  Verify exception handlers.
18431
18432         * jcf-dump.c (disassemble_method):  Print exception table.
18433
18434 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18435
18436         * expr.c (verify_jvm_instructions): Started a thorough
18437         verification of invoke* bytecodes.
18438         (expand_byte_code): flush quick stack if PC is the target of a
18439         branch.  and undef RET (conflicting with config/i386/i386.h).
18440         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18441         used.
18442         (expand_invoke): Now handles invokeinterface and do more
18443         verification according to the bytecode.
18444         (lookup_field): Don't try to load the class if processing
18445         dtable_type.
18446         (can_widen_reference_to): Now handles interfaces.
18447         * decl.c (init_decl_processing): New global variable
18448         soft_lookupinterfacemethod_node, declared in java-tree.h.
18449         Call set_super_info on string_type_node.
18450         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18451         defined.
18452         * class.c (set_super_info): Fills the CLASS_* flags according to
18453         access_flags.
18454         (get_access_flags_from_decl): Handles all class flags.
18455
18456 1997-08-26  Per Bothner  <bothner@cygnus.com>
18457
18458         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
18459         * parse.c (yyparse):  Check for abstract method, and missing code.
18460         * expr.c (expand_byte_code):  Change interface.
18461         * lang.c (put_decl_node):  Print promoted types prettier.
18462         * verify.c (verify_jvm_instruction):  Change interface.
18463         Partial support for scanning exception table.
18464         For load instructions, handle promoted integral types.
18465
18466 1997-08-21  Per Bothner  <bothner@cygnus.com>
18467
18468         * verify.c:  New file, with contents moved from expr.c.
18469         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
18470         * typeck.c (is_array_type_p):  Moved here from expr.c.
18471         * java-tree.h:  Add some now-needed function declarations.
18472         * Makefile.in (JAVA_OBJS): Added verify.o.
18473
18474 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18475
18476         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18477         METHOD_ABSTRACT flag.
18478
18479         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18480         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18481         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18482
18483         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18484         variables.
18485         (start_java_method): Hook for SYNCHRONIZED methods.
18486
18487         * expr.c (build_java_jsr, build_java_ret): New functions
18488         (JSR,PRE): New macros
18489         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18490         (verify_jvm_instructions): tableswitch, lookupswitch,
18491         monitorenter, monitorexit, goto_w: verified.
18492         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18493         (build_java_monitor): New function.
18494         (MONITOR_OPERATION): Modified to call build_java_monitor()
18495         (verify_jvm_instructions): Started a thorough verification of
18496         invoke* bytecodes.
18497
18498 1997-08-19  Per Bothner  <bothner@cygnus.com>
18499
18500         Support verification of jsr/ret subroutines (used for try/finally).
18501         * decl.c (return_address_type_node):  New type node.
18502         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18503         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18504         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
18505         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18506         TYPE_USED):  New macros for special types in type_map.
18507
18508         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
18509         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
18510         BCODE_JUMP_TARGET.
18511         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
18512
18513         * expr.c (can_widen_reference_to):  New function.
18514         (pop_type):  Use it.
18515         (merge_type_state):  Support handling start of subroutine.
18516         (push_pending_block):  Return char* error message, instead of calling
18517         fatal on an error.  Also handle subroutines.
18518         (verify_jvm_instructions):  Handle errors from push_poending_block.
18519         Support jsr and ret instructions.
18520
18521 1997-08-19  Per Bothner  <bothner@cygnus.com>
18522
18523         * jcf-io.c (find_classfile):  Fix thinko.
18524         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
18525
18526 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
18527
18528         * Makefile.in (BISON): Remove.
18529
18530 1997-08-07  Per Bothner  <bothner@cygnus.com>
18531
18532         * Makefile.in:  Convert to autoconf.
18533         * config-lang.in (outputs):  Added java/Makefile.
18534
18535         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
18536         Rename cc1java to jc1.
18537
18538         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
18539         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
18540
18541         * class.c (class_depth):  Do load_class if needed.
18542
18543         Mostly better verification.
18544         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
18545         (init_decl_processing):  Change return type of soft_checkcast.
18546         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
18547         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18548         lang_print_error):  New functions.
18549         (lang_init):  Set global hook print_error_function to lang_print_error.
18550         * expr.c:  In the type_map ptr_type_node is only used for null now.
18551         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
18552         (merge_types):  Dererence pointer to record types before comparing.
18553         (decode_newarray_type, merge_types):  On error just return NULL.
18554         (build_java_binop):  Add preliminary implementation (with warning)
18555         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18556         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
18557         (expand_compare, expand_java_goto, expand_java_call):  Don't
18558         push_pending_block, since that only makes sense when verifying.
18559         (merge_type_state):  Different return codes.
18560         (push_pending_block):  A block may need to be verified more than once.
18561         (expand_byte_code):  Warn about unused code at code generation time.
18562         (verify_jvm_instruction):  Changed logic, since code may need to be
18563         re-verified if type-state has changed.  Also, better error handling.
18564         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18565         Improve newarray, anewarray, ?aload, athrow,
18566         * java-tree.h (LABEL_CHANGED):  New macro.
18567
18568 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18569
18570         * decl.c (soft_athrow_node): New global variable initialized.
18571         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18572         * typeck.c (convert): Added support for REAL_TYPE.
18573         (convert_to_char): New function.
18574         (convert): Handle CHAR_TYPE.
18575         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18576         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18577         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18578         promoted type.
18579         (verify_jvm_instructions): Added break a the end of bogus unop: label.
18580         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18581         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18582         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18583         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18584         to Use The Right Things.
18585         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18586         compatible with INT. BOOLEAN is made equivalent to BYTE.
18587         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18588         OPCODE_ifnonnull): Now supported.
18589         (build_java_athrow): New function.
18590
18591 1997-08-04  Per Bothner  <bothner@cygnus.com>
18592
18593         Rename method name <init> to match G++ (and fix mangling).
18594         * class.c (layout_class):  Replace method name of <init> by class name.
18595         (make_method_value):  Do inverse renaming of constructor from <init>.
18596         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
18597         * typeck.c (lookup_java_constructor):  New function.
18598         * expr.c (expand_invoke):  If method_name is <init>, call
18599         lookup_java_constructor to find constructor.
18600
18601         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
18602
18603 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18604
18605         * parse.c (get_class_constant): Modified to handle array "classes"
18606         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18607         wide type.
18608         (convert): Modified to handle real type.
18609         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18610         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18611         variables declared.
18612         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18613         soft_multianewarray, soft_newarray_node, soft_throw_node): New
18614         global variables initialized.
18615         (find_local_variable): Handles the case of a pointer
18616         (end_java_method): Restore the use of one more scope
18617         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18618         build_java_array_length_access, expand_java_arrayload,
18619         expand_java_arraystore, expand_java_array_length,
18620         expand_java_multianewarray, expand_java_anewarray,
18621         build_java_check_indexed_type, is_array_type_p,
18622         build_java_throw_out_of_bound_exception): New functions.
18623         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18624         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18625         OPCODE_<t>aload): Implemented code for verification.
18626         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18627         ARRAY_NEW_MULTI): Macro defined.
18628         (CONVERT): Modified to invoke convert().
18629         (case OPCODE_aload2): Fixed index typo from 2 to 1.
18630
18631 1997-07-31  Per Bothner  <bothner@cygnus.com>
18632
18633         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
18634         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
18635         (make_class_data):  Field name needs '/' as package prefix.
18636         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
18637
18638 1997-07-25  Per Bothner  <bothner@cygnus.com>
18639
18640         Implement debug information for local variables.
18641         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18642         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18643         DECL_LOCAL_SLOT_CHAIN):  New macros.
18644         (struct lang_decl_var):  New type.
18645         * parse.c (give_name_to_locals):  Move to decl.c.
18646         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
18647         (start_java_method):  Re-write parameter handling.
18648         (pending_local_decls):  New global variable.
18649         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
18650         (find_local_variable):  Accept pc so we can skips decls not in range.
18651         (struct binding_level):  Add end_pc field.
18652         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18653         (various):  Change so current pc gets passed to find_local_variable.
18654
18655         * decl.c (init_decl_processing):  Re-arrange fields in
18656         class_type_node and and method_type_node to match kaffe 0.9.1.
18657         * class.c (make_method_value, make_class_data):  Update
18658         initializations to match.
18659
18660 1997-07-16  Per Bothner  <bothner@cygnus.com>
18661
18662         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18663         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
18664         (push_super_field):  New function.
18665         (make_class_data):  Handle inheritance of class static initializer.
18666         (layout_class):  New name mangling.
18667         * constants.c (build_constant_data_ref):  Init type of data array
18668         to a one-element array.
18669         (build_constants_constructor):  Set DECL_SIZE from complete array type.
18670         * decl.c:  Rename class_type, object_type etc to class_type_node,
18671         object_type_node etc.  Make former inherit from latter.
18672         * expr.c (expand_invoke):  Add cast of function address.
18673         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
18674         * parse.c (yyparse):  Don't call layout_class here.
18675         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
18676
18677 1997-06-14  Per Bothner  <bothner@cygnus.com>
18678
18679         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
18680         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
18681         (alloc_class_constant):  New.
18682         * expr.c (expand_invoke):  Make sure method's class is initialized.
18683         * class.c (interits_from_p, emit_register_class):  New functions.
18684         * parse.c (yyparse):  Call emit_register_class.
18685
18686 1997-06-09  Per Bothner  <bothner@cygnus.com>
18687
18688         * constants.c:  New file, to handle constant pool.
18689         * Makefile.in (JAVA_OBJS):  Add constants.o.
18690         * decl.c (init_decl_processing):  Update, fix, finish various structs.
18691         (pushdecl_top_level):  New.
18692         * parse.c (layout_class):  Moved to class.c.
18693         * expr.c (java_push_constant_from_pool):  New function.
18694         * class.c (build_class_ref):  Make work fully
18695         (make_class_data):  Emit super-class, constant pool, interface vector.
18696
18697 1997-06-03  Per Bothner  <bothner@cygnus.com>
18698
18699         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
18700         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
18701         * class.c (class_depth):  New function.
18702         (lookup_named_class):  Replaced by new function lookup_class.
18703         * decl.c (object_type_node, string_type_node):  New.
18704         Remove various types that we no longer need.
18705         * expr.c (verify_jvm_instructions):  New separate verifier pass.
18706         (push_type, pop_type):  New functions for verifier.
18707         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
18708         (expand_byte_code):  Simplify, since we assume already verified.
18709         (expand_invoke):  Now mostly works.
18710         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18711         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
18712         * parse.c:  Wait to allocate class object until we know its name.
18713         (layout_class):  Calculate DECL_VINDEX for each virtual method.
18714         * typeck.c (get_array_type):  Rename to ...
18715         (build_java_array_type):  ... and provide working implementation.
18716         (build_java_signature):  New function - build Java signature of type.
18717         (set_java_signature):  New function - cache signature with type.
18718         (lookup_java_method):  New function.
18719
18720 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
18721
18722         * class.c (ident_subst):  Take extra SUFFIX parameter.
18723         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
18724         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
18725         (build_class_ref):  Actually implement.
18726         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
18727         * decl.c (builtin_function):  New.
18728         (init_decl_processing):  Update for current Kaffe.  Declare some
18729         builtin Kaffe functions.
18730         * expr.c (build_address_of):  New.
18731         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18732         Renamed (from expand_java_new etc), and added working implementations.
18733         (build_field_ref):  Now also handle static fields.
18734         (expand_invoke):  Implement invokestatic, and start implement rest.
18735         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
18736         * javaop.def:  Rename invokevirt -> invokevirtual.
18737         * lang.c (use_handles):  Removed.
18738         * parse.c:  Add support for ConstantValue attribute.
18739         Handle nested loading of a class.  (JPOOL_UTF):  New.
18740
18741 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
18742
18743         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
18744
18745 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
18746
18747         * Make-lang.in (java.install-man):  New empty rule.
18748         * typeck.c (set_local_type):  New function.
18749         * expr.c (STORE_INTERNAL):  Call find_local_variable,
18750         not find_stack_slot.  Call set_local_type.
18751
18752 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
18753
18754         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
18755         and building RECORD_TYPE CONSTRUCTORs.
18756         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18757
18758         * lang.c (use_handles):  Change the default to 0.
18759         * decl.c:  Define and build class_type, field_type, utf8const_type.
18760         * class.c (make_class_data, make_field_value,
18761         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18762         hashUtf8String, strLengthUtf8, mangled_classname:
18763         Functions to build reflective data structures.
18764         * parse.c (yyparse):  Call make_class_data.
18765
18766         * jcf-io.c (open_class, find_classfile):  New functions.
18767         * jcf-dump.c:  Support reading classfile from explicitly-named
18768         class file (without CLASSPATH searching).
18769
18770 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18771
18772         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
18773         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18774         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18775         (get_constant):  Now trivial for CONSTANT_Utf8.
18776
18777         * jcf.h:  Make NEW_CPOOL the default.
18778         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
18779
18780 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18781
18782         New directory.