OSDN Git Service

* collect2.c, gcc.c, gcov-dump.c, gcov.c, gen-protos.c,
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2
3         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4         to `unlock_stream' with `unlock_std_streams'.
5
6 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
7
8         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
9         instead of just expr.h.
10
11 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12
13         * gjavah.c (main): Unlock the stdio streams.
14         * jcf-dump.c (main): Likewise.
15         * jv-scan.c (main): Likewise.
16         * jvgenmain.c (main): Likewise.
17
18 2005-04-23  DJ Delorie  <dj@redhat.com>
19
20         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
21         parse.y: Adjust warning() callers.
22
23 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
24
25         * gcj.texi (Object fields): Change "Integer" to "Int" in example
26         contructor.
27
28 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
29
30         * gcj.texi: Fix typos and bogus example.
31
32 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
33
34         * except.c: Fix a comment typo.
35
36 2005-04-19  Julian Brown  <julian@codesourcery.com>
37
38         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
39         indirect dispatch with PIC.
40
41 2005-04-18  Andrew Haley  <aph@redhat.com>
42
43         * java-except.h (struct eh_range.handler): Remove unused field.
44         (handle_nested_ranges): Remove function declaration.
45         (sanity_check_exception_range): Add function declaration.       
46         * verify.c (verify_jvm_instructions): Remove call to
47         handle_nested_ranges.
48         * verify-glue.c (verify_jvm_instructions_new): Call
49         sanity_check_exception_range.
50         * except.c (link_handler, eh_range_freelist, link_handler,
51         handle_nested_ranges): Remove.
52         (add_handler): Rewrite.
53         (sanity_check_exception_range): New function.
54         (print_ranges): New function.
55
56 2005-04-13  Julian Brown  <julian@codesourcery.com>
57
58         * decl.c (finish_method): Give methods once-only linkage.
59
60 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
61
62         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
63
64 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
65
66         * java-tree.h: Don't use PARAMS().
67
68 2005-04-07  Per Bothner  <per@bothner.com>
69
70         * class.c (push_class): By default, suppress debug output.
71         (finish_class): Enable debug output for classes we're emitting.
72
73 2005-04-07  Andrew Haley  <aph@redhat.com>
74
75         * gcj.texi: Correct gcj-dbtool instructions.
76
77 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
78
79         * gcj.texi: Fix a typo.
80         * lang.c: Fix a comment typo.
81
82 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
83
84         * gcj.texi (Invoking gij): Add descriptions of new -X options.
85         Mention recognized-and-ignored compatibility options.
86         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
87         JvFree.
88         (About CNI): Add Memory allocation section.
89
90 2005-04-01  Tom Tromey  <tromey@redhat.com>
91
92         * decl.c (java_init_decl_processing): Fix types of
93         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
94         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
95         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
96
97 2005-03-31  Jan Hubicka  <jh@suse.cz>
98
99         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
100         * class.c: Include cgraph.h
101         (make_local_functoin_alias): Mark aslias as needed.
102         * resource.c: Include cgraph.h
103         (compile_resource_data): Go via cgraph interface.
104
105 2005-03-30  Ian Lance Taylor  <ian@airs.com>
106
107         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
108
109 2005-03-30  Tom Tromey  <tromey@redhat.com>
110
111         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
112         inner_class_info_index==0 or outer_class_info_index==0.
113
114 2005-03-29  Tom Tromey  <tromey@redhat.com>
115
116         * gcj.texi (libgcj Runtime Properties): Document
117         gnu.gcj.runtime.endorsed.dirs.
118
119 2005-03-24  Anthony Green  <green@redhat.com>
120
121         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
122         'gcj-dbtool -p'.
123
124 2005-03-23  Tom Tromey  <tromey@redhat.com>
125
126         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
127         (parse_version): Use it.
128
129 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
130
131         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
132
133 2005-03-18  Andrew Haley  <aph@redhat.com>
134
135         PR java/20522
136         * decl.c (update_aliases): Don't update variables that are about
137         to die.
138         (maybe_poplevels): Add comment.
139
140 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
141
142         PR java/20502
143         * jcf-parse.c (duplicate_class_warning): New function.
144         (java_parse_file): Call duplicate_class_warning if 
145         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
146         (parse_zip_file_entries): Likewise. Also set
147         CLASS_FROM_CURRENTLY_COMPILED_P.
148
149 2005-03-16  Andrew Haley  <aph@redhat.com>
150
151         * expr.c (expand_java_arrayload): Don't generate a
152         NullPointerException based on the type of the node.
153         (build_java_array_length_access): Likewise.
154
155 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
156
157         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
158
159 2005-03-11  Tom Tromey  <tromey@redhat.com>
160
161         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
162         (libgcj Runtime Properties): Document the default .db.
163
164 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
165
166         PR java/20312
167         * parse.y (checks_throws_clauses): Check exceptions list even when
168         the base class does not come from a source file being compiled.
169         (java_complete_lhs): Remove unused variable 'wfl'.
170
171 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
172
173         PR java/20338
174         * decl.c (finish_method): Emit _Jv_InitClass for private static
175         methods inside inner classes as well.
176
177 2005-03-08  Julian Brown  <julian@codesourcery.com>
178         * Revert patch from 2005-03-08 for causing bootstrap failure on
179         ppc-darwin.
180
181 2005-03-08  Julian Brown  <julian@codesourcery.com>
182
183         * decl.c (finish_method): Give methods once-only linkage.
184
185 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
186
187         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
188
189 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
190
191         * verify-glue.c (vfy_is_assignable_from): Perform static check using
192         can_widen_reference_to if the C++ ABI is in use.
193         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
194         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
195         type_isresolved, init_state, set_pc, state_get_pc,
196         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
197         (verify_fail): Report the current PC from the verifier context.
198         (free_state): Remove #if 0 block to enable this function.
199         (free_verifier_context): Call free_state on state_list iterator
200         values before freeing them.
201         * expr.c (pop_type_0): Pop correct type for error message when stack
202         contains a multi-word type.
203
204 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
205
206         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
207         for known NULL array length access.
208
209 2005-03-07  Tom Tromey  <tromey@redhat.com>
210
211         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
212
213 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
214
215         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
216         typeck.c: Update copyright.
217
218 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
219
220         Remove xref code.
221         * xref.c, xref.h: Remove file.
222         * Make-lang.in (java/xref.o): Remove.
223         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
224         * lang.c (flag_emit_xref): Remove definition.
225         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
226         * typeck.c (convert): Remove use of do_not_fold.
227         * parse.y (do_not_fold): Remove definition.
228         (parser grammar): Remove xref code.
229         (maybe_create_class_interface_decl, create_class): Likewise.
230         (register_fields, method_header, finish_method_declaration): Likewise.
231         (declare_local_variables, source_end_java_method): Likewise.
232         (java_complete_expand_classes): Do not set do_not_fold.
233         (java_complete_expand_method): Remove xref code.
234         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
235         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
236         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
237         (patch_synchronized_statement, patch_throw_statement): Likewise.
238         (maybe_build_class_init_for_field): Likewise.
239
240 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
241
242         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
243         instead of IS_NON_TYPE_CODE_CLASS.
244
245 2005-03-04  Andrew Haley  <aph@redhat.com>
246
247         PR java/18362
248         * class.c (set_method_index): Don't set method_index if it is
249         NULL_TREE.
250         (layout_class_method): Don't complain about "non-static method foo
251         overrides static method" in the case of indirect dispatch.
252
253 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
254
255         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
256         warning.
257         * Make-lang.in: Don't elide warnings in jcf-io.c.
258
259 2005-03-01  Per Bothner  <per@bothner.com>
260
261         PR java/8608
262         * check-init.c (wfl): Remove static.
263         (final_assign_error, check_init): Replace calls to parse_error_context
264         by plain error.
265         (check_init): Save, set, and restore input_location for each exp.
266
267 2005-03-01  Per Bothner  <per@bothner.com>
268
269         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
270         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
271         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
272
273 2005-03-01  Per Bothner  <per@bothner.com>
274
275         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
276
277 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
278
279         PR libgcj/16923
280         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
281         JvVMOption.
282
283 2005-02-22  Tom Tromey  <tromey@redhat.com>
284
285         PR java/20056:
286         * verify-impl.c (EITHER): New define.
287         (types_compatible): Handle it.
288         (check_field_constant): Use it.
289
290 2005-02-18  Tom Tromey  <tromey@redhat.com>
291
292         PR java/20056:
293         * verify-impl.c (types_equal): Fixed test.
294
295         PR java/20056:
296         * verify-glue.c (vfy_class_has_field): New function.
297         * verify.h (vfy_class_has_field): Declare.
298         * verify-impl.c (check_field_constant): Added 'putfield'
299         argument.
300         (verify_instructions_0): Updated.
301         (types_equal): New function.
302
303 2005-02-14  Tom Tromey  <tromey@redhat.com>
304
305         PR java/19921:
306         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
307         stack effect of multianewarray.
308
309 2005-02-14  Andrew Haley  <aph@redhat.com>
310
311         PR java/19907
312         * expr.c (expand_byte_code): Call promote_arguments().
313         (promote_arguments): New function.
314         * decl.c (check_local_unnamed_variable): Remove special case for
315         new verifier.
316         (find_local_variable): Promote all boolean types to int
317         when searching for local variable decls.
318
319 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
320
321         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
322         parse-scan.y: Update copyright.
323
324 2005-02-11  Per Bothner  <per@bothner.com>
325
326         PR java/15543
327         * parse-scan.y (input_location): Remove variable.
328         (main_input_filename): New - replaces input_filename, which isn't
329         settable if USE_MAPPED_LOCATION.
330         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
331         so we don't reference input_location or wfl_operator in that case.
332         * jv-scan.c (expand_location): Remove - no longer used.
333         (main): Set main_input_filename rather than input_filename.
334
335 2005-02-09  Richard Henderson  <rth@redhat.com>
336
337         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
338         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
339
340 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
341
342         * expr.c (add_type_assertion): Use the proper enumeration type,
343         since this is what htab_find_slot() is expecting.
344
345 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
346
347         * gcj.texi: Update copyright dates.
348
349 2005-02-02  Tom Tromey  <tromey@redhat.com>
350
351         * gcj.texi (libgcj Runtime Properties): Default library_control
352         to 'cache'.
353
354 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
355
356         PR java/15543
357         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
358         (modifiers) when square brackets are present in a declaration for
359         a final paramter.
360         * jv-scan.c (main): Set input_filename and input_line.
361
362 2005-02-01  Tom Tromey  <tromey@redhat.com>
363
364         PR java/19742:
365         * gjavah.c (get_field_name): Don't override name for JNI header.
366
367 2005-02-01  Roger Sayle  <roger@eyesopen.com>
368
369         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
370         of unsigned types using iushr and lushr JVM bytecodes.
371
372 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
373
374         PR java/19738
375         * gjavah.c (jni_print_float): Do not emit floating-point
376         initialiser for a static final field.
377         (jni_print_double): Likewise.
378
379 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
380
381         Revert:
382         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
383         * gjavah.c (print_field_info): Mark static data members of
384         floating-point type with "__extension__".
385
386 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
387
388         * gjavah.c (print_field_info): Mark static data members of
389         floating-point type with "__extension__".
390
391 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
392
393         PR java/9157
394         * parse.y (build_string_concatenation): Remove redundant if.
395         (patch_conditional_expr): Attempt to patch_string() the condition
396         of a ?: as well, in addition to its other operands.
397
398 2005-01-25  Tom Tromey  <tromey@redhat.com>
399
400         * Make-lang.in (java/java-tree-inline.o): Removed.
401
402 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
403
404         PR java/19070
405         * parse.y (patch_binop): Allow comparisons against NULL only
406         if the other operand is of a reference type.
407
408 2005-01-24  Tom Tromey  <tromey@redhat.com>
409
410         * java-tree.h (gcj_abi_version): Declare.
411         * class.c (make_class_data): Push gcj_abi_version into "next"
412         field.  Renamed field.
413         * decl.c (gcj_abi_version): New global.
414         (parse_version): New function.
415         (java_init_decl_processing): Call it.  Renamed 'next' field.
416         Include version.h.
417         (GCJ_BINARYCOMPAT_ADDITION): New define.
418
419 2005-01-24  Roger Sayle  <roger@eyesopen.com>
420
421         PR java/19295
422         * jcf-write.c (generate_bytecode_insns): Conversions between
423         integer types of the same precision shouldn't generate widening
424         or narrowing conversion bytecodes.
425
426 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
427
428         * java-except.h, java-tree.h: Remove unused prototypes.
429
430 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
431
432         PR java/18091:
433         * jcf-write.c (perform_relocations): Don't call memcpy if source
434         and destination are the same.
435
436 2005-01-17  Tom Tromey  <tromey@redhat.com>
437
438         * verify-impl.c (get_short): Sign extend.
439         (get_int): Likewise.
440
441 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
442
443         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
444         with TYPE_SIZE.
445
446 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
447
448         * verify.c: Revert to the version before the BC-ABI merge.
449
450 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
451
452         PR java/19277
453         * check-init.c (check_init): Take care of references that do not
454         have an explicit final variable declaration (e.g. array length
455         access) for pre/post in/de-crement operators.
456
457 2005-01-08  Mark Wielaard  <mark@klomp.org>
458
459         * parse.y (process_imports): Allocate (and free) original_name only
460         when not already defined.
461         * jcf-parse.c (read_class): Free results of find_class() and
462         lrealpath().
463         (java_parse_file): Keep pointer to head of file_list and free when
464         done. Free result of lrealpath().
465
466 2005-01-05  Tom Tromey  <tromey@redhat.com>
467
468         * gcj.texi (Standard Properties): java.ext.dirs is now used.
469
470 2004-12-20  Andrew Haley  <aph@redhat.com>
471
472         * typeck.c: Use fold_convert for ints and booleans.
473
474 2004-12-17  Andrew Haley  <aph@redhat.com>
475
476         PR java/18931
477         * typeck.c (convert): Use a CONVERT_EXPR when converting to
478         BOOLEAN_TYPE or CHAR_TYPE.
479         (convert_to_boolean, convert_to_char) : Remove.
480         * convert.h (convert_to_boolean, convert_to_char) : Remove.
481         * expr.c (expand_load_internal): Do type conversion if type is not
482         as required.
483
484 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
485
486         PR target/18459
487         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
488         Update comment.
489
490 2004-12-07  Andrew Haley  <aph@redhat.com>
491
492         PR java/18811:
493         * jcf-parse.c (load_class): Remove sanity test for missing inner
494         class file.
495
496 2004-12-06  Tom Tromey  <tromey@redhat.com>
497
498         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
499         (java.uninstall): Likewise.
500         (java.maintainer-clean): Likewise.
501         (.INTERMEDIATE): Likewise.
502         (java.install-man): Likewise.
503         (gcj-dbtool.pod): New target.
504         * gcj.texi (Code Generation): Document -findirect-dispatch.
505         (libgcj Runtime Properties): Document
506         gnu.gcj.precompiled.db.path.
507         (Top): Link to "Invoking gcj-dbtool".
508
509 2004-12-06  Tom Tromey  <tromey@redhat.com>
510
511         PR java/14853:
512         * java-tree.h (extract_field_decl): Declare.
513         * parse.y (extract_field_decl): Renamed from
514         strip_out_static_field_access_decl.  No longer static.
515         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
516
517 2004-12-03  Tom Tromey  <tromey@redhat.com>
518
519         * lang.c (flag_new_verifier): Define.
520         (java_post_options): Set flag_new_verifier if indirect dispatch
521         is being used.
522         * lang.opt (fnew-verifier): Removed.
523
524 2004-12-03  Tom Tromey  <tromey@redhat.com>
525
526         PR bootstrap/14614:
527         * Make-lang.in (java.install-common): Only install transformed
528         gcjh if gcj-cross exists.
529
530 2004-12-03  Andrew Haley  <aph@redhat.com>
531
532         PR java/18812
533         * except.c (link_handler): Patch 'outer' field of siblings of the
534         range we're demoting.
535
536 2004-12-03  Andrew Haley  <aph@redhat.com>
537
538         PR java/18697
539         * class.c (layout_class_method): Don't fail to override a method
540         simply because it has DECL_ARTIFICIAL set.
541
542 2004-12-02  Tom Tromey  <tromey@redhat.com>
543
544         PR java/16675:
545         * parse.y (craft_constructor): Special case null_pointer_node.
546
547 2004-12-02  Tom Tromey  <tromey@redhat.com>
548
549         PR java/18741:
550         * java-gimplify.c (java_gimplify_expr): Don't call
551         SET_EXPR_LOCATION unless wrapped tree is an expression.
552
553 2004-11-27  Per Bothner  <per@bothner.com>
554
555         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
556         Fix fencepost error in 'i', which got executed one too many times.
557         Also, fold memcpy into explicit loop, as originally intended.
558         Also, free temporary 'buf' which otherwise leaks.
559
560 2004-11-27  Per Bothner  <per@bothner.com>
561
562         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
563         local static variables if not USE_MAPPED_LOCATION.
564
565 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
566
567         * class.c, decl.c, expr.c: Fix comment typos.
568
569 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
570
571         PR java/18305
572         * decl.c (end_java_method): Call
573         attach_init_test_initialization_flags on all the init_decls.
574         * parse.y (attach_init_test_initialization_flags): Move to ...
575         * expr.c (attach_init_test_initialization_flags): here and
576         support BIND_EXPR also.
577         * java-tree.h (attach_init_test_initialization_flags): Prototype.
578         * jcf-parse.c (parse_class_file): Don't disable class init
579         optimization.
580
581 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
582
583         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
584         in diagnostics.
585
586 2004-11-24  Richard Henderson  <rth@redhat.com>
587
588         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
589         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
590
591 2004-11-24  Tom Tromey  <tromey@redhat.com>
592
593         * verify.c (defer_merging): Don't use C++-style comment.
594         * verify.h (java_opcode): Added java_opcode_end.
595         * class.c (build_class_ref): Remove C++ comment and old FIXME.
596
597         * verify-impl.c (vfy_push_type): Removed bogus "return".
598         (initialize_stack): Use vfy_alloc and vfy_free.
599         (verify_instructions_0): Likewise.
600
601         * Merged gcj-abi-2-dev-branch to trunk.
602
603 2004-11-24  Andrew Haley  <aph@redhat.com>
604
605         * jcf-parse.c (parse_class_file): Set file_start_location.
606
607 2004-11-10  Tom Tromey  <tromey@redhat.com>
608
609         * class.c (make_field_value): Don't call build_static_field_ref.
610         (build_static_field_ref): Don't emit direct references when using
611         indirect dispatch.
612
613         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
614         -verbose:class into man page synopsis.
615
616 2004-11-09  Tom Tromey  <tromey@redhat.com>
617
618         * expr.c (build_java_arraystore_check): Still generate check if
619         element type is itself an array.
620
621 2004-11-08  Tom Tromey  <tromey@redhat.com>
622
623         * java-tree.h (soft_check_assignment_node): Removed.
624         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
625         * decl.c (java_init_decl_processing): Don't initialize
626         soft_check_assignment_node.
627
628 2004-11-05  Tom Tromey  <tromey@redhat.com>
629
630         * class.c (layout_class_methods): Don't add Miranda methods when
631         using indirect dispatch.
632
633 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
634
635         * class.c (make_class_data): Call emit_assertion_table to set the
636         'assertion_table' field.
637         (build_signature_for_libgcj): Move here from expr.c.
638         (add_assertion_table_entry): New function. Callback for assertion
639         hashtable traversal.
640         (emit_assertion_table): New. Take class argument, and generate
641         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
642         * decl.c (init_decl_processing): Define assertion_entry_type record.
643         Push 'assertion_table' class field instead of 'verify'.
644         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
645         (type_assertion_hash): Include 'assertion_code' in hash.
646         (add_type_assertion): Rewritten. Take class and assertion_code
647         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
648         (can_widen_reference_to): Use new add_type_assertion() arguments.
649         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
650         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
651         (verify_identifier_node): Removed.
652         (assertion_entry_type, assertion_table_type): New.
653         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
654         assertion code definitions.
655         (struct type_assertion): Add assertion_code. Rename 'source_type' and
656         'target_type' to 'op1' and 'op2'.
657         (add_type_assertion): Declare.
658         (lang_printable_name_wls): Remove unused definition.
659         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
660         to emit runtime assertion.
661         (vfy_note_stack_type): Clean up non-C90 declarations.
662         (vfy_note_local_type): Likewise.
663         * verify.h (vfy_is_assignable_from): Declare.
664         * verify-impl.c (is_assignable_from_slow): Remove unused function.
665         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
666         instead of is_assignable_from_slow().
667         (types_compatible): Reinstate ref_compatible() call.
668
669 2004-11-04  Tom Tromey  <tromey@redhat.com>
670
671         * class.c (build_static_field_ref): Reverted previous patch.
672
673         * class.c (build_static_field_ref): Don't emit direct references
674         when using indirect dispatch.
675
676 2004-11-03  Tom Tromey  <tromey@redhat.com>
677
678         * expr.c (expand_java_arrayload): Set lhs_type_node.
679         (expand_java_arraystore): Set rhs_type_node.
680
681 2004-11-02  Tom Tromey  <tromey@redhat.com>
682
683         * jcf-parse.c (compute_class_name): Use filename length from zip
684         directory, not strlen.
685
686         * expr.c (expand_invoke): Mark new interface methods as abstract.
687
688 2004-11-01  Tom Tromey  <tromey@redhat.com>
689
690         * verify-impl.c (push_jump): Removed check for uninitialized
691         objects.
692         (push_exception_jump): Likewise.
693         (handle_ret_insn): Likewise.
694         (handle_jsr_insn): Likewise.
695         (state_check_no_uninitialized_objects): Removed.
696
697         * decl.c (check_local_unnamed_variable): Recognize
698         promoted-to-int parameters when using the new verifier.
699         * expr.c (expand_java_arraystore): Explicitly request array type
700         when using new verifier.
701         (expand_java_arrayload): Likewise.
702         (invoke_build_dtable): Don't pass object_type_node as
703         expression argument to build_java_indirect_ref.
704         (build_java_check_indexed_type): Do nothing.
705         (build_java_arraystore_check): Handle case where array doesn't
706         have array type.
707         (build_java_array_length_access): Likewise.
708         (expand_invoke): Handle case where interface overrides a method
709         from Object.
710         (pop_type_0): Always succeed for reference types.
711         (process_jvm_instruction): Don't pop a value in a dead
712         exception handler.
713         (pop_arguments): Convert arguments to correct types.
714
715 2004-10-29  Andrew Haley  <aph@redhat.com>
716
717         * jcf-parse.c (give_name_to_class): Remove line that was
718         incorrectly merged.
719
720 2004-10-29  Andrew Haley  <aph@redhat.com>
721
722         * jcf-parse.c (set_source_filename): Add code to build new sfname.
723
724 2004-10-20  Andrew Haley  <aph@redhat.com>
725
726         * decl.c (end_java_method): Don't expand if flag_syntax_only.
727
728 2004-10-26  Tom Tromey  <tromey@redhat.com>
729
730         * verify.h (vfy_notify_verified): Removed.
731         * verify-glue.c (vfy_notify_verified): Removed.
732
733 2004-10-26  Tom Tromey  <tromey@redhat.com>
734
735         * verify-impl.c (debug_print_state): Declare `i' before code.
736         (merge_types): Modify `t' when it is null_type.
737
738 2004-10-26  Tom Tromey  <tromey@redhat.com>
739
740         * verify-impl.c (type_print): Renamed from print.  Now static and
741         takes an argument.
742         (debug_print_state): Use type_print.
743
744 2004-10-25  Tom Tromey  <tromey@redhat.com>
745
746         * expr.c (build_invokeinterface): Compute correct offset for
747         index into interface methods.
748
749 2004-10-20  Tom Tromey  <tromey@redhat.com>
750
751         * java-tree.h (verify_jvm_instructions_new): Declare.
752
753         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
754         command line.
755
756         * verify-impl.c (verify_instructions): Correctly handle wide
757         types on the stack.
758         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
759         (vfy_get_component_type): Strip pointer types.
760         (vfy_find_class): Use get_type_from_signature.  Strip pointer
761         types.
762         Include java-except.h.
763
764 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
765
766         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
767         vfy_push_type_t, set_variable, add_new_state, merge_into,
768         handle_jsr_insn, branch_prepass, check_class_constant,
769         check_wide_constant, get_one_type, compute_static_types,
770         verify_instructions_0): Clean up C99 declarations after statements.
771
772 2004-10-20  Tom Tromey  <tromey@redhat.com>
773
774         * verify-impl.c (merge_refs): Compare reference against iterator,
775         not ref2.
776
777         * verify-glue.c (vfy_tag): Mask off resolved flag.
778
779 2004-10-19  Tom Tromey  <tromey@redhat.com>
780
781         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
782         (init_state_with_stack): Initialize `this_type' in state.
783         (verify_method): Use debug_print.
784         * verify-glue.c (vfy_is_primitive): Removed debugging print.
785         (vfy_note_stack_depth): Reverted last patch.
786         (vfy_note_stack_type): Note pointer to Object, not Object.
787         (vfy_note_local_type): Likewise.
788
789         * verify.h (vfy_note_instruction_seen): Declare.
790         * verify-glue.c (verify_jvm_instructions_new): Set
791         BCODE_EXCEPTION_TARGET on target instruction.
792         (vfy_note_instruction_seen): New function.
793         * verify-impl.c (FLAG_INSN_SEEN): New define.
794         (verify_instructions_0): Set flag on instruction.  Save state for
795         PC=0 later.
796         (verify_instructions): Call vfy_note_instruction_seen.
797
798         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
799         (verify_jvm_instructions_new): Call method_init_exceptions,
800         add_handler, and handle_nested_ranges.
801         * verify-impl.c (verify_method): Return 1 on success.
802         (verify_instructions_0): Save the state at PC=0.
803
804         * verify-impl.c (init_type_from_class): Set is_resolved and
805         ref_next on new ref_intersection.
806         (init_type_from_string): Likewise.
807
808 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
809
810         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
811         if flag_new_verifier is set.
812         * java-tree.h (flag_new_verifier): Declare.
813         * lang.opt (fnew-verifier): New option.
814         * verify-impl.c: Work around namespace pollution by undef'ing
815         'current_class'.
816         (struct verifier_context): Make 'bytecode' const.
817         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
818         (types_compatible): For the BC-ABI, always consider reference types
819         compatible.
820         (check_class_constant): Use vfr->current_class.
821         (check_constant): Likewise.
822         (check_wide_constant): Likewise.
823         (check_field_constant): Check for 'L' at start of type name.
824         (get_one_type): Return pointer instead of type. Set type result in
825         caller via passed type pointer.
826         (compute_argument_types): Update to use new get_one_type arguments.
827         (compute_return_type): Likewise.
828         (make_verifier_context): New. Allocate and initialize 'vfr'.
829         (free_verifier_context): New. Free 'vfr' and its contents.
830         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
831         and free_verifier_context.
832
833 2004-10-15  Tom Tromey  <tromey@redhat.com>
834
835         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
836         * verify.h (vfy_fail): Fixed formatting.
837
838         * verify-impl.c (vfr): Fixed comment formatting.
839         (collapse_type): New function.
840         (verify_instructions): Notify compiler about type map.
841         * verify.h (vfy_note_stack_depth): Updated.
842         (vfy_note_stack_type): Likewise.
843         (vfy_note_local_type): Likewise.
844         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
845         Declare.
846         * verify-glue.c (vfy_note_stack_depth): Correctly size type
847         state.  Added `method' argument.
848         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
849         argument.
850         (vfy_note_local_type): New function.
851         (vfy_unsuitable_type): Likewise.
852         (vfy_return_address_type): Likewise.
853         (vfy_null_type): Likewise.
854
855         * verify.h (VFY_IN_GCC): Removed.
856         (VFY_WANT_TYPEMAP): Removed.
857         * verify-impl.c (verify_instructions_0): Removed useless "\".
858         (struct state) <next>: Uncomment.
859
860 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
861
862         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
863         C-style.
864
865 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
866
867         * Make-lang.in (verify.o): Re-enabled this target.
868         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
869         (vfy_get_interface): Likewise.
870         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
871         * verify.h (verify_jvm_instructions_new): Declare.
872         * verify-impl.c (free_state): Temporarily comment out unused
873         function.
874
875 2004-10-06  Tom Tromey  <tromey@redhat.com>
876
877         * java-tree.h (JV_STATE_READ): New enum value.
878
879 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
880
881         * verify.h: New file.
882
883 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
884
885         * verify-impl.c, verify-glue.c, verify.h: New files.
886         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
887
888 2004-09-24  Andrew Haley  <aph@redhat.com>
889
890         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
891         for a slot if it's of pointer type.
892
893 2004-09-14  Tom Tromey  <tromey@redhat.com>
894
895         * class.c (make_class_data): Correctly initialize "state" field.
896         Initialize "engine" field.
897         * decl.c (java_init_decl_processing): Add "engine" field.
898
899 2004-09-10  Andrew Haley  <aph@redhat.com>
900
901         PR java/12760
902         * expr.c (build_invokeinterface): Use fast method for interface
903         dispatch.
904         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
905         JTI_ITABLE_PTR_TYPE.
906         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
907         (emit_symbol_table): Add new arg, element_size.
908         * decl.c (java_init_decl_processing): Initialize Class.itable.
909         * class.c (GEN_TABLE): New macro.
910         (gen_indirect_dispatch_tables): Use it.  Add itable.
911         (make_class_data): Add new arg for emit_symbol_table().
912         Emit itable.
913         (add_miranda_methods): Make sure search_class has been parsed.
914         (emit_symbol_table): Add new arg, element_size.
915
916 2004-09-06  Andrew Haley  <aph@redhat.com>
917
918         * verify.c (merge_types): Return Object for all merges of
919         interfaces.
920         * expr.c (add_type_assertion): Don't generate assertions when
921         source type is array of Object.
922
923 2004-09-03  Andrew Haley  <aph@redhat.com>
924
925         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
926
927         * lang.c (java_post_options): Force flag_verify_invocations if
928         we're not using indirect dispatch.
929
930         * expr.c (pop_type_0): Move test for interfaces before call to
931         can_widen_reference_to().
932         (build_signature_for_libgcj): Remove generation of canonical array
933         type.
934         (add_type_assertion): Canonicalize both arrays.
935         Don't assert that type X can be assigned to Object.
936         Don't assert that type X an be assigned to type X.
937         Don't assert that Object can be assigned to type X.
938         (can_widen_reference_to): Warn whenever we generate an assertion.
939         (process_jvm_instruction): Use throwable_type_node for the type of
940         an exception class.
941
942 2004-09-01  Andrew Haley  <aph@redhat.com>
943
944         * decl.c (java_init_decl_processing): Change
945         verify_identifier_node to "__verify".
946         * expr.c (add_type_assertion): Use verify_identifier_node for name.
947         * java-tree.h (verify_identifier_node): Change to "__verify".
948
949         * expr.c (build_signature_for_libgcj): New function.
950         (add_type_assertion): Use it to construct signatures for
951         source_type and target_type.
952
953 2004-08-27  Andrew Haley  <aph@redhat.com>
954
955         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
956         (verify_identifier_node): New.
957         (TYPE_VERIFY_METHOD): New.
958         (struct type_assertion): New type.
959         * expr.c (type_assertion_eq): New function.
960         (type_assertion_hash): New function.
961         (add_type_assertion): New function.
962         (can_widen_reference_to): Call add_type_assertion().
963         * decl.c (java_init_decl_processing): Add verify_identifier_node.
964         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
965         (finish_class): Output TYPE_VERIFY_METHOD (type).
966
967         * decl.c (end_java_method): Nullify unused fields.
968
969 2004-08-17  Andrew Haley  <aph@redhat.com>
970
971         * verify.c (defer_merging): Quieten.
972         * jcf-parse.c (load_class): Only try to open a class file if it's
973         java.lang.Object or if it's part of the current compilation.
974         Check that the class we just tried to load is the class we just
975         loaded.  Quieten.
976         (java_parse_file): Set flag_verify_invocations off if we're
977         compiling from .class.
978         (parse_zip_file_entries): Abort if we try to read a dummy class.
979         * expr.c (can_widen_reference_to): Quieten.
980         (build_invokevirtual): Abort if we try to invokevirtual an
981         interface.
982         (expand_invoke): Don't build a non-interface call to an interface.
983         (build_instanceof): Don't do premature optimization if
984         flag_verify_invocations is not set.
985         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
986         from superclass.
987         (build_static_field_ref): Add correct type conversion for
988         field_address.
989         (add_miranda_methods): Disable generation of Miranda methods for
990         dummy classes.
991         (layout_class_method): Don't complain about non-static method
992         overrides static method with dummy classes.
993
994 2004-08-13  Tom Tromey  <tromey@redhat.com>
995
996         * class.c (build_static_field_ref): Re-enable atable lookups for
997         static fields.
998
999         * parse.y (strip_out_static_field_access_decl): Indentation fix.
1000
1001 2004-08-11  Tom Tromey  <tromey@redhat.com>
1002
1003         * gcj.texi (libgcj Runtime Properties): Document new properties.
1004
1005 2004-08-06  Andrew Haley  <aph@redhat.com>
1006
1007         * jcf-parse.c (load_class): Check that we really have loaded the
1008         class we're looking for.
1009
1010 2004-07-19  Andrew Haley  <aph@redhat.com>
1011
1012         * verify.c (verify_jvm_instructions): Comment change only.
1013
1014         * typeck.c (build_java_array_type): Add size field to array name.
1015
1016         * java-tree.h (LOCAL_SLOT_P): New.
1017         (update_aliases): Add PC argument.
1018         (pushdecl_function_level): New function.
1019
1020         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1021         MODIFY_EXPR, and SAVE_EXPR.
1022         (java_gimplify_modify_expr): New function.
1023
1024         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1025         (expand_iinc): Pass PC to update_aliases().
1026         (STORE_INTERNAL): Likewise.
1027         (process_jvm_instruction): Likewise.
1028
1029         * decl.c (base_decl_map): New variable.
1030         (uniq): New variable.
1031         (update_aliases): Rewrite with more thorough checking.
1032         (debug_variable_p): New function.
1033         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1034         (check_local_named_variable): Delete whole function.
1035         (initialize_local_variable): New function.
1036         (check_local_unnamed_variable): Add checks and comments.
1037         (find_local_variable): Rewrite.
1038         (java_replace_reference): New function.
1039         (function_binding_level): New variable.
1040         (pushdecl_function_level): New function.
1041         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1042         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1043         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1044         function_binding_level.
1045         (end_java_method): Null unused fields to save memory.
1046
1047 2004-06-29  Andrew Haley  <aph@redhat.com>
1048
1049         * except.c (expand_start_java_handler): Push a new binding level.
1050         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
1051         register_exception_range() to register where we'll do it.
1052         (expand_end_java_handler): Remove old bogus code.  Replace with
1053         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1054         the top of the expression we're curently building.
1055         (maybe_end_try): Delete.
1056         * decl.c (binding_level.exception_range): New field.
1057         (clear_binding_level): Add field exception_range.  Reformat.
1058         (poplevel): Call expand_end_java_handler().
1059         (poplevel): Call java_add_stmt only if functionbody is false.
1060         (maybe_poplevels): Don't call maybe_end_try() from here.
1061         (end_java_method): Clear no longer used trees in function decl.
1062         (register_exception_range): New function.
1063         * java-tree.h (register_exception_range, struct eh_range): Declare.
1064
1065 2004-06-22  Andrew Haley  <aph@redhat.com>
1066
1067         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1068         the otable.
1069         * check-init.c (get_variable_decl): Teach check-init about
1070         FIELD_DECLs addressed via the otable.
1071         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1072         CLASS_PARSED_P.
1073
1074 2004-05-28  Andrew Haley  <aph@redhat.com>
1075
1076         * jcf-parse.c (load_class): Don't try to read a class that we've
1077         already read.
1078
1079         * expr.c (build_invokeinterface): Use the old-fashioned way of
1080         doing indirect dispatch: look up interfaces by name.
1081         * java-tree.h (enum java_tree_index): Add
1082         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1083         * decl.c (java_init_decl_processing): Add
1084         soft_lookupinterfacemethodbyname_node.
1085
1086         * gjavah.c (print_method_info): Final methods have vtable entries,
1087         so gjavah needs to output them.
1088         * class.c (layout_class_method): Generate vtable entries for final
1089         methods.
1090         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1091         dispatch, even if a method is final.
1092
1093 2004-05-25  Andrew Haley  <aph@redhat.com>
1094
1095         * class.c (build_symbol_entry): Convert the names of constructors
1096         to init_identifier_node when generating an entry for the indirect
1097         dispatch table.
1098
1099         * expr.c (build_known_method_ref): Generate indirect calls for
1100         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1101
1102 2004-05-24  Andrew Haley  <aph@redhat.com>
1103
1104         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1105         atable element is of the right type.
1106
1107         * class.c (build_static_field_ref): Cast pointer to correct type
1108         for field.
1109
1110 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1111
1112         * Merged with HEAD as of 20040514. Diff against
1113         gcj-abi-2-merge-20040514.
1114
1115 2004-04-16  Andrew Haley  <aph@redhat.com>
1116
1117         * verify.c (check_pending_block): Disable subroutine checks.
1118         (defer_merging): New function.
1119         (merge_types): If types are dummy, use defer_merging to combine them.
1120         (verify_jvm_instructions): If invocation is invokeinterface and
1121         target is dummy, assume target really is an interface.
1122
1123         * parse.y (patch_invoke): Break out call to java_create_object.
1124
1125         * lang.c (flag_verify_invocations): New.
1126
1127         * jcf-parse.c (load_class): If we've already failed to load a
1128         class, don't try again.
1129         (load_class): If we can't find a .class file, don't fail, but emit
1130         a warning.
1131         (parse_class_file): Don't act on dummy methods.
1132
1133         * java-tree.h (flag_verify_invocations): New.
1134         (TYPE_DUMMY): New.
1135         (lang_type.dummy_class): New field.
1136         (java_create_object): New function.
1137         (METHOD_DUMMY): New.
1138
1139         * expr.c (build_field_ref): Widen field offset.
1140         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1141         that each of its elements is compatible with the one we're
1142         popping.
1143         (pop_type_0): Issue a warning to say that we need to generate a
1144         runtime check.
1145         (java_create_object): New function.
1146         (build_field_ref): Only generate hard refs if we're not using
1147         indirect dispatch.
1148         (expand_java_field_op): If we're using !verify_invocations and we
1149         see a missing field, generate a decl for it.
1150
1151         (expand_invoke): If a class doesn't have the method we seek and
1152         we're using !flag_verify_invocations, generate a decl for the
1153         method now.
1154
1155         (build_known_method_ref): Always use indirect dispatch via the
1156         atable for static methods.
1157
1158         (expand_java_NEW): Break out object creation into new function,
1159         java_create_object.
1160
1161         (can_widen_reference_to): Issue a warning to say that we need to
1162         generate a runtime check.
1163
1164         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1165         (make_method_value): Also use index for interfaces.
1166         (make_class_data): Skip dummy field for inherited data.
1167         Don't build method array for dummy methods.
1168         Set size_in_byte to -1 when using inirect dispatch
1169         Don't build a hard class ref if we don't have a hard ref to our
1170         superclass, or if we're using inirect dispatch.
1171         Null out dispatch tables.
1172
1173         (layout_class_method): Don't complain about non-static method
1174         overrides static method is method is artificial.
1175
1176         (build_static_field_ref): Disable atable references to static
1177         fields for the time being.
1178
1179         (layout_class_methods): Check for CLASS_INTERFACE as
1180         well as CLASS_ABSTRACT.
1181
1182 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1183
1184         * class.c (make_class_data): Don't check flag_inline_functions.
1185         * lang.c (flag_really_inline): Remove unused flag.
1186         (java_handle_option): Don't set it here.  Remove special handling
1187         of flag_inline_functions for Java.
1188         (java_init): Don't set flag_inline_trees here.  Already done...
1189         (java_post_options): ...here.  Don't clear flag_inline_functions.
1190
1191 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1192
1193         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1194         (java_gimplify_exit_block_expr): New function.
1195         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1196         LABELED_BLOCK_EXPR.
1197         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1198         (EXIT_BLOCK_EXPR): Likewise.
1199         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1200         (LABELED_BLOCK_BODY): Likewise.
1201         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1202         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1203         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
1204         TREE_OPERAND.
1205         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1206         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1207         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
1208         second operand of EXIT_BLOCK_EXPR.
1209         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1210         TREE_OPERAND.
1211         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1212
1213 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1214
1215         * xref.h (xref_flag_value): Remove.
1216         (xref_set_data, xref_get_data): Likewise.
1217         (xref_set_current_fp): Likewise.
1218         (XREF_NONE): Likewise.
1219         (XREF_GET_DATA): Likewise.
1220         * xref.c (xref_flag_value): Remove.
1221         (xref_set_data, xref_get_data): Likewise.
1222         (xref_set_current_fp): Likewise.
1223
1224 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1225
1226         * gjavah.c (output_directory): Make static.
1227         (temp_directory): Likewise.
1228
1229 2004-11-15  Tom Tromey  <tromey@redhat.com>
1230
1231         * decl.c (instn_ptr_type_node): Removed.
1232         (lineNumbers_ptr_type_node): Removed.
1233         (jint_type): Removed.
1234         (jint_ptr_type): Removed.
1235
1236 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
1237
1238         PR java/15576
1239         * check-init.c (check_init): Ignore DECL_EXPR.
1240         * expr.c (always_initialize_class_p): Reenable.
1241         (build_class_init): Use a variable to store the decl.  Also use
1242         boolean_false_node instead of integer_zero_node.
1243         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1244         to the block.
1245
1246 2004-11-08  Tom Tromey  <tromey@redhat.com>
1247
1248         PR java/16843:
1249         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1250         generating a JNI header.
1251         (print_field_info): Handle JNI headers.
1252         (jni_print_float): Likewise.
1253         (jni_print_double): Likewise.
1254
1255 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
1256
1257         * decl.c (end_java_method): Remove duplicated code.
1258
1259 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
1260             Gerald Pfeifer  <gerald@pfeifer.com>
1261
1262         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1263         as well.
1264
1265 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
1266
1267         PR java/17265
1268         * class.c: Reinstate 2004-08-18 patch.
1269         (make_local_function_alias): Don't create an alias for extern (native)
1270         functions.
1271
1272 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
1273
1274         PR java/17265
1275         * class.c (make_local_function_alias): Revert 2004-08-18 change.
1276         (make_method_value): Likewise.
1277
1278 2004-10-21  Andrew Haley  <aph@redhat.com>
1279
1280         PR java/18091:
1281         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1282
1283 2004-10-20  Andrew Haley  <aph@redhat.com>
1284
1285         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1286         Remove duplicated code block.
1287
1288 2004-10-18  Steven Bosscher  <stevenb@suse.de>
1289
1290         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1291         New rules to work around old Bison warnings.
1292
1293 2004-10-17  Steven Bosscher  <stevenb@suse.de>
1294
1295         * class.c (ident_subst): Always alloca buffer.
1296         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1297         opcode after including javaop.def.
1298         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1299         conditional expression that exits, to avoid warnings.
1300         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1301         a user of an extension.
1302         * win32-host.c: Move check down to have non-empty file when
1303         WIN32 is not defined.
1304
1305         * Make-lang.in (java-warn): Add STRICT_WARN.
1306         (java/jcf-io.o-warn): Don't have Werror for this file.
1307         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1308
1309 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
1310
1311         * expr.c (expr_add_location): Move declaration to before all
1312         statements.
1313         * parse.y (java_expand_classes): Ditto.
1314         * lex.c (java_peek_unicode): Ditto.
1315
1316 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1317
1318         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1319         if possible, else convert `foo' to 'foo'.
1320         * class.c: Likewise.
1321         * decl.c: Likewise.
1322         * expr.c: Likewise.
1323         * jcf-io.c: Likewise.
1324         * jcf-parse.c: Likewise.
1325         * lang.c: Likewise.
1326         * lex.c: Likewise.
1327         * parse.h: Likewise.
1328
1329 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1330
1331         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1332         rename parameter 'msg' to 'msgid' in function declaration.
1333         (issue_warning_error_from_context): Likewise.
1334         (yyerror): Rename parameter 'msg' to 'msgid'.
1335         (all over): Use new quoting style for diagnostics.
1336
1337 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1338
1339         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1340         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1341         Update copyright.
1342
1343 2004-10-14  Matt Austern  <austern@apple.com>
1344
1345         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1346         pointer_set_t* now.
1347
1348 2004-10-13  Tom Tromey  <tromey@redhat.com>
1349
1350         PR java/15578:
1351         * lang.opt (--extdirs): Document.
1352         * jvspec.c (lang_specific_driver): Recognize -encoding and
1353         -extdirs.
1354
1355 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
1356
1357         * parse.y (issue_warning_error_from_context): Use va_list *
1358         instead of va_list parameter.
1359         (parse_error_context): Update call.
1360         (parse_warning_context): Likewise.
1361
1362 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
1363
1364         * parse.y, parse-scan.y: Add list of diagnostic messages to
1365         insulate translation template from version of yacc/bison used
1366         to compile the grammar.
1367
1368 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
1369
1370         Prepare for %q, %< and %> in diagnostic message strings.
1371         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1372         Name second parameter 'msgid'.
1373         * parse.y: Additionally include pretty-print.h and diagnostic.h.
1374         (issue_warning_error_from_context): Use pretty-printer functions
1375         instead of vsprintf for constructing formatted messages. Rename
1376         parameter 'msg' to 'msgid'.
1377         (parse_error_context): Rename parameter 'msg' to 'msgid'.
1378         (parse_warning_context): Likewise.
1379
1380 2004-10-05  Andrew Haley  <aph@redhat.com>
1381
1382         PR java/17779
1383         * jcf-parse.c (parse_zip_file_entries): If a class has a
1384         superclass and a TYPE_SIZE of zero, lay it out.
1385
1386 2004-09-30  Andrew Haley  <aph@redhat.com>
1387
1388         PR java/17733
1389         * jcf-parse.c (compute_class_name): Rewrite.
1390
1391 2004-10-01  Jan Hubicka  <jh@suse.cz>
1392
1393         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1394
1395 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1396
1397         * lex.c: Fix a comment typo.
1398
1399 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1400
1401         * java-tree.h: Fix a comment typo.
1402
1403 2004-09-30  Per Bothner  <per@bothner.com>
1404
1405         Simplify lexer.  Implement --enable-mapped-location support.
1406         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
1407         (parse_source_file_1): Pass filename as extra parameter, so we can call
1408         linemap_add and set input_location here, rather than in both callers.
1409         (read_class): Pass copied filename to parse_source_file_1.
1410         Don't initialize wfl_operator - only needed for source compilation.
1411         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
1412         * lex.h:  Remove a bunch of debugging macros.
1413         * lex.h (struct_java_line, struct java_error):  Remove types.
1414         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
1415         (struct java_lc_s):  Remove prev_col field.
1416         (struct java_lexer):  New fields next_unicode, next_columns, and
1417         avail_unicode.  New position field, and maybe token_start field.
1418         Don't need hit_eof field - use next_unicode == -1 instead.
1419         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
1420         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
1421         * parse.h:  Various changes for USE_MAPPED_LOCATION.
1422         (EXPR_WFL_EMIT_LINE_NOTE): XXX
1423         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1424         (struct parser_ctxt):  New file_start_location field.
1425         Remove p_line, c_line fields since we no longer save lines.
1426         Remove elc, lineno, and current_jcf fields - no longer used.
1427         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
1428         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1429         source_location and is probably not needed anymore anyway.
1430         Use new expr_add_Location function.
1431         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
1432         (java_pop_parser_context):  Minor cleanup.
1433         (java_parser_context_save_global, java_parser_context_restore_global,
1434         java_pop_parser_context):  Save/restore input_location as a unit.
1435         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
1436         a source_location instead of a wfl context node.
1437         (check_class_interface_creation):  input_filename is not addressable.
1438         (create_artificial_method):  Calling java_parser_context_save_global
1439         and java_parser_context_restore_global is overkill.  Instead,
1440         temporarily set input_location from class decl.
1441         (java_layout_seen_class_methods): Set input_location from method decl.
1442         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1443         (finish_loop_body):  Likewise.
1444         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
1445         (java_sprint_unicode):  Take a character, not index in line.
1446         (java_sneak_uncode):  Replaced by java_peek_unicode.
1447         (java_unget_unicode):  No longer used.
1448         (java_allocate_new_line. java_store_unicode):  Removed, since we
1449         no longer remember "lines".
1450         (java_new_lexer):  Update for new data structures.
1451         (java_read_char):  Move unget_value checking to java_read_unicode.
1452         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1453         efficient functions that are used directly when lexing.
1454         (java_read_unicode_collapsing_terminators):  No longer needed.
1455         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1456         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1457         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
1458         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
1459         combine switch branches, and test for common token kinds earlier.
1460         (java_lex_error):  Rewrite.
1461         * jv-scan.c (expand_location): New function, copied from tree.c.
1462         (main): Set ctxp->filename instead of setting input_filename directly.
1463
1464 2004-09-30  Per Bothner  <per@bothner.com>
1465
1466         More cleanup for --enable-mapped-location.
1467         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
1468         input_location here.  Instead do it in give_name_to_class.
1469         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1470         * expr.c (expand_byte_code): Call linemap_line_start.
1471         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
1472         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
1473         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
1474         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
1475         to USE_MAPPED_LOCATION case.
1476
1477         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
1478         * jcf-parse.c (java_parse_file): Don't set input_filename.
1479         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1480         Create a list of TRANSLATION_UNIT_DECL.
1481         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
1482         reason is so we can set a DECL_SOURCE_LOCATION for each file.
1483         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1484         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1485         (file_start_location):  New static.
1486         (set_source_filename):  Avoid extra access to input_filename macro.
1487         Concatenate new name with class's package prefix.
1488         (set_source_filename, give_name_to_class): Update.
1489         (give_name_to_class):  Set class's "line 0" input_location here.
1490         (parse_class_file):  Set input_location as a unit.
1491
1492         * jcf-parse.c (load_class): Sanity test if missing inner class file.
1493
1494 2004-09-29  Per Bothner  <per@bothner.com>
1495
1496         * java-tree.h:  Redefine some macros and add some declaration
1497         to handle the USE_MAPPED_LOCATION case.
1498         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
1499         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
1500         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1501         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1502
1503         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1504         * decl.c (finish_method, java_add_stmt): Likewise.
1505         * java-gimplify.c (java-gimplify.c):  Likewise.
1506         * jcf-write.c (generate_bytecode_insns):  Likewise.
1507         * lang.c (java_post_options): Likewise - call linemap_add.
1508
1509 2004-09-29  Andrew Haley  <aph@redhat.com>
1510
1511         PR java/17007
1512         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1513         result of TRUNC_MOD_EXPR.
1514         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1515         * decl.c (java_init_decl_processing): Mark
1516         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1517
1518 2004-09-28  Tom Tromey  <tromey@redhat.com>
1519
1520         PR java/15710:
1521         * class.c (add_miranda_methods): Load superinterface if not
1522         already loaded.
1523
1524 2004-09-28  Andrew Haley  <aph@redhat.com>
1525
1526         PR java/17586
1527         * jcf-parse.c (load_class): Don't try to read a class that we've
1528         already read.
1529
1530 2004-09-28  Andrew Haley  <aph@redhat.com>
1531
1532         * jcf-parse.c (load_class): Back out previous broken patch.
1533
1534 2004-09-28  Andrew Haley  <aph@redhat.com>
1535
1536         PR java/17586
1537         * jcf-parse.c (load_class): Don't try to read a class that we've
1538         already read.
1539         Check that we really did read the right class.
1540
1541 2004-09-25  Tom Tromey  <tromey@redhat.com>
1542
1543         PR java/17500:
1544         * parse.y (create_artificial_method): Use add_method_1.
1545
1546 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
1547
1548         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1549         comment typos.
1550         * gcj.texi: Fix typos.
1551
1552 2004-09-24  Tom Tromey  <tromey@redhat.com>
1553
1554         PR java/15656:
1555         * parse.y (class_instance_creation_expression): Set `$$' to NULL
1556         in error parts of rule.
1557         (unary_expression): Don't call error_if_numeric_overflow when $1
1558         is NULL.
1559
1560 2004-09-24  Tom Tromey  <tromey@redhat.com>
1561
1562         PR java/16789:
1563         * parse.y (resolve_qualified_expression_name): Set
1564         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1565         * expr.c (force_evaluation_order): Check for empty argument list
1566         after stripping COMPOUND_EXPR.
1567
1568 2004-09-23  Andrew Haley  <aph@redhat.com>
1569
1570         PR java/16927:
1571         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1572         COND_EXPRs.
1573
1574 2004-09-23  Tom Tromey  <tromey@redhat.com>
1575
1576         PR java/17329:
1577         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1578         where operand is null.
1579
1580 2004-09-23  Tom Tromey  <tromey@redhat.com>
1581
1582         PR java/17380:
1583         * parse.y (not_accessible_p): Allow access to protected members
1584         even when class is not static.
1585
1586 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1587
1588         * Make-lang.in: Revert the gcc-none.o change.
1589
1590 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
1591
1592         * parse.y (patch_anonymous_class): VEC_space returns true if there
1593         is space.
1594
1595 2004-09-21  Matt Austern  <austern@apple.com>
1596
1597         Fix bootstrap.
1598         * gjavah.c (free_method_name_list): Fix function definition so
1599         it's a proper C prototype.
1600
1601 2004-09-21  Tom Tromey  <tromey@redhat.com>
1602
1603         PR java/17575:
1604         * gjavah.c (free_method_name_list): New method.
1605         (main): Call it.
1606
1607 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
1608             Zack Weinberg  <zack@codesourcery.com>
1609
1610         * java-tree.def: Use tree_code_class enumeration constants
1611         instead of code letters.
1612         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1613         new tree-class enumeration constants.
1614
1615 2004-09-13  Tom Tromey  <tromey@redhat.com>
1616
1617         PR java/17216:
1618         * class.c (layout_class_method): Put synthetic methods into the
1619         vtable.
1620
1621 2004-09-11  Andrew Pinski  <apinski@apple.com>
1622
1623         * Make-lang.in (java/ggc-none.c): Change dependency
1624         for ggc.h into $(GGC_H).
1625
1626 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1627
1628         * Make-lang.in (java/win32-host.o): Add dependency on
1629         coretypes.h.
1630         * win32-host.c: Add includes for coretypes.h, jcf.h
1631
1632 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1633
1634         * Make-lang.in (GCJH_OBJS): Change dependency from
1635         ggc-none.o to java/ggc-none.o
1636         (JCFDUMP_OBJS): Likewise.
1637         (java/ggc-none.o): New target.
1638
1639 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
1640
1641         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
1642         * class.c (build_utf8_ref, build_static_field_ref,
1643         make_field_value, make_method_value, get_dispatch_table,
1644         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1645         * constants.c (get_tag_node, build_ref_from_constant_pool,
1646         build_constants_constructor): Likewise.
1647         * decl.c (java_init_decl_processing): Likewise.
1648         * expr.c (build_java_array_length_access, build_newarray,
1649         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1650         build_java_binop, build_field_ref, expand_java_add_case,
1651         expand_java_call, build_known_method_ref, build_invokevirtual,
1652         build_invokeinterface, build_jni_stub): Likewise.
1653         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1654         * jcf-parse.c (get_constant): Likewise.
1655         * lex.c (do_java_lex): Likewise.
1656         * parse.y (patch_binop, patch_unaryop, patch_cast,
1657         build_newarray_node, patch_newarray): Likewise.
1658         * resource.c (compile_resource_data): Likewise.
1659         * typeck.c (build_prim_array_type): Likewise.
1660
1661 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1662
1663         * decl.c (java_init_decl_processing): Adjust
1664         initialize_sizetypes call.
1665
1666 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
1667
1668         * jv-scan.c (fancy_abort): Add.
1669
1670 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1671
1672         * expr.c (build_java_arrayaccess): Use convert to change
1673         len's type.
1674
1675 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
1676
1677         * class.c (make_local_function_alias): Allocate extra space for 'L'
1678         in name buffer. Reported by Thomas Neumann.
1679
1680 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
1681
1682         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1683         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
1684         * lex.c (do_java_lex): Adjust.
1685         (error_if_numeric_overflow): Likewise.
1686
1687 2004-08-18  Andrew Pinski  <apinski@apple.com>
1688
1689         * class.c (make_local_function_alias): Only make a new decl if we
1690         support alias attribute on all decls.
1691
1692 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
1693
1694         * class.c (make_local_function_alias): New function. Create local
1695         alias for public method DECL.
1696         (make_method_value): Use make_local_function_alias.
1697         * parse.y (craft_constructor): Don't special-case anonymous classes.
1698         Always set ctor_name to init_identifier_node.
1699         (lookup_method_invoke): Call layout_class_method when creating
1700         anonymous class constructor.
1701
1702 2004-08-18  Richard Henderson  <rth@redhat.com>
1703
1704         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1705         default case.  Treat '<' similarly.  Update for
1706         is_gimple_formal_tmp_var name change.
1707
1708 2004-08-17  Andrew Haley  <aph@redhat.com>
1709
1710         * lang.c (lang_printable_name): Obey verbose flag.
1711         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1712         lang_printable_name().
1713         (verify_constructor_circularity, get_printable_method_name,
1714         check_abstract_method_definitions, java_check_regular_methods,
1715         java_check_abstract_methods, check_inner_class_access,
1716         fix_constructors, patch_method_invocation, patch_return):
1717         Likewise.
1718         * expr.c (pop_type_0): Likewise.
1719
1720         * java-tree.h (lang_printable_name_wls): Delete.
1721
1722 2004-08-16  Tom Tromey  <tromey@redhat.com>
1723
1724         PR java/8473:
1725         * parse.y (primary): Changed for initialized and uninitialized
1726         array creations.
1727         (array_access): Handle array_creation_initialized.
1728         (array_creation_expression): Split into
1729         array_creation_initialized and array_creation_uninitialized.
1730
1731 2004-08-16  Andrew Haley  <aph@redhat.com>
1732
1733         * jcf-write.c (find_constant_index): Canonicalize NaNs when
1734         generating bytecode.
1735
1736 2004-08-16  Elliot Lee <sopwith@redhat.com>
1737
1738         PR java/9677
1739         * jcf-parse.c (java_parse_file): Handle filenames with embedded
1740         spaces, and quoted filelists.
1741
1742 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1743
1744         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1745         * class.c (build_utf8_ref, build_static_field_ref,
1746         make_field_value, make_method_value, get_dispatch_table,
1747         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1748         * constants.c (get_tag_node,  build_ref_from_constant_pool,
1749         build_constants_constructor): Likewise.
1750         * decl.c (java_init_decl_processing): Likewise.
1751         * expr.c (build_java_array_length_access, build_newarray,
1752         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1753         build_java_binop, build_field_ref, expand_java_add_case,
1754         expand_java_call, build_known_method_ref, build_invokevirtual,
1755         build_invokeinterface, build_jni_stub): Likewise.
1756         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1757         * jcf-parse.c (get_constant): Likewise.
1758         * lex.c (do_java_lex): Likewise.
1759         * parse.y (patch_binop, patch_unaryop, patch_cast,
1760         build_null_of_type, patch_newarray): Likewise.
1761         * resource.c (compile_resource_data): Likewise.
1762         * typeck.c (build_prim_array_type): Likewise.
1763
1764 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
1765
1766         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1767         Don't create BLOCK here or call java_gimplify_block.
1768
1769 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
1770
1771         * java-tree.h (flag_deprecated): Removed.
1772         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1773         * parse.y (check_deprecation): Check warn_deprecated instead of
1774         flag_deprecated.
1775
1776 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
1777
1778         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1779         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1780         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1781         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1782         flag_force_classes_archive_check, flag_optimize_sci,
1783         flag_indirect_dispatch): Remove explicit declarations.
1784         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
1785         final comment.
1786
1787 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
1788
1789         PR bootstrap/14893
1790         * Make-lang.in (java.install-man): Install from either build
1791         tree or source tree, whichever has the file first.
1792
1793 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1794
1795         * jcf-parse.c (get_constant): Adjust force_fit_type call.
1796         * lex.h (SET_LVAL_NODE_TYPE): Remove.
1797         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1798         (do_java_lex): Likewise. Adjust force_fit_type call.
1799
1800 2004-08-04  Roger Sayle  <roger@eyesopen.com>
1801             Andrew Haley  <aph@redhat.com>
1802
1803         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1804         checking trees as they're being built.
1805         (convert): Call convert_ieee_real_to_integer if we're
1806         converting a constant, even if we're writing a class file.
1807
1808 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
1809
1810         PR java/16701
1811         * parse.y (fold_constant_for_init): Call resolve_field_access with
1812         correct current_class context.
1813
1814 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1815
1816         * decl.c (update_aliases, initialize_local_variable): Replace calls
1817         to build with calls to buildN.
1818         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1819         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1820         * parse.h (BUILD_THROW): Likewise.
1821         * parse.y (switch_expression, synchronized_statement,
1822         catch_clause_parameter, array_creation_expression,
1823         conditional_expression, make_qualified_name,
1824         resolve_qualified_expression_name, patch_method_invocation,
1825         patch_invoke, build_method_invocation, build_new_invocation,
1826         build_assignment, patch_assignment, build_binop, patch_binop,
1827         build_string_concatenation, build_incdec, patch_unaryop,
1828         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1829         patch_return, build_if_else_statement, build_labeled_block,
1830         build_new_loop, build_loop_body, build_bc_statement,
1831         build_assertion, encapsulate_with_try_catch, build_try_statement,
1832         build_try_finally_statement, patch_synchronized_statement,
1833         emit_test_initialization): Likewise, replace build with buildN.
1834
1835 2004-07-28  Eric Christopher  <echristo@redhat.com>
1836
1837         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1838         (java_unsafe_for_reeval): Ditto.
1839
1840 2004-07-26    <hp@bitrange.com>
1841
1842         * parse.y (build_super_invocation): Adjust declaration order to
1843         avoid declaration after statement.
1844
1845 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
1846
1847         * decl.c: Rename all identifiers named `class' to `cl'.
1848
1849 2004-07-25  Richard Henderson  <rth@redhat.com>
1850
1851         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1852
1853 2004-07-23  Mike Stump  <mrs@apple.com>
1854
1855         * boehm.c (set_bit): Improve type safety wrt unsignedness.
1856         * gjavah.c (throwable_p, decode_signature_piece,
1857         print_full_cxx_name, print_include, add_namelet, add_class_decl,
1858         process_file): Likewise.
1859         * jcf-dump.c (main): Likewise.
1860         * jcf-io.c (read_zip_member): Likewise.
1861         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1862         give_name_to_class, get_class_constant): Likewise.
1863         * jcf-write.c (find_constant_wide, push_long_const,
1864         generate_classfile): Likewise.
1865         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1866         * parse.y (read_import_dir): Likewise.
1867         * typeck.c (parse_signature_type): Likewise.
1868         * verify.c (verify_jvm_instructions): Likewise.
1869         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1870
1871 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
1872
1873         * Make-lang.in: Replace rmic and rmiregistry references with
1874         grmic and grmiregistry.
1875         * gcj.texi: Likewise.
1876
1877 2004-07-20  Andrew Haley  <aph@redhat.com>
1878
1879         PR java/16431.
1880         * verify.c (verify_jvm_instructions): Comment change only.
1881
1882         * typeck.c (build_java_array_type): Add size field to array name.
1883
1884         * java-tree.h (LOCAL_SLOT_P): New.
1885         (update_aliases): Add PC argument.
1886         (pushdecl_function_level): New function.
1887
1888         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1889         MODIFY_EXPR, and SAVE_EXPR.
1890         (java_gimplify_modify_expr): New function.
1891
1892         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1893         (expand_iinc): Pass PC to update_aliases().
1894         (STORE_INTERNAL): Likewise.
1895         (process_jvm_instruction): Likewise.
1896
1897         * decl.c (base_decl_map): New variable.
1898         (uniq): New variable.
1899         (update_aliases): Rewrite with more thorough checking.
1900         (debug_variable_p): New function.
1901         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1902         (check_local_named_variable): Delete whole function.
1903         (initialize_local_variable): New function.
1904         (check_local_unnamed_variable): Add checks and comments.
1905         (find_local_variable): Rewrite.
1906         (java_replace_reference): New function.
1907         (function_binding_level): New variable.
1908         (pushdecl_function_level): New function.
1909         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1910         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1911         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1912         function_binding_level.
1913         (end_java_method): Null unused fields to save memory.
1914
1915 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1916
1917         * class.c (add_interface_do): Remove.
1918         (set_super_info, interface_of_p, maybe_add_interface,
1919         add_interface, make_class_data, layout_class,
1920         add_miranda_methods): Adjust BINFO accessors and addition.
1921         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1922         accessors.
1923         * jcf-write.c (generate_classfile): Likewise.
1924         * parse.y (patch_anonymous_class, check_inner_circular_reference,
1925         check_circular_reference, java_complete_class,
1926         check_abstract_method_definitions,
1927         java_check_abstract_method_definitions,
1928         check_interface_throws_clauses, java_check_abstract_methods,
1929         lookup_java_interface_method2,
1930         find_applicable_accessible_methods_list): Adjust BINFO accessors
1931         and addition.
1932         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1933
1934 2004-07-18  Roger Sayle  <roger@eyesopen.com>
1935
1936         * builtins.c (max_builtin, min_builtin,
1937         java_build_function_call_expr): Replace calls to build with buildN.
1938         * class.c (build_class_ref, build_static_field_ref,
1939         get_dispatch_table, make_class_data, layout_class_method): Likewise.
1940         * constants.c (build_ref_from_constant_pool): Likewise.
1941         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1942         add_stmt_to_compound): Likewise.
1943         * except.c (build_exception_object_ref, expand_end_java_handler):
1944         Likewise.
1945         * java-gimplify.c (java_gimplify_case_expr,
1946         java_gimplify_default_expr, java_gimplify_block,
1947         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1948         * jcf-write.c (generate_bytecode_insns): Likewise.
1949         * typeck.c (convert_ieee_real_to_integer): Likewise.
1950
1951 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1952
1953         * java-tree.h (builtin_function): Declare.
1954
1955 2004-07-16  Steven Bosscher  <stevenb@suse.de>
1956
1957         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1958         abuse restore_line_number_status.
1959
1960 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
1961
1962         g++/15861
1963         * jcf-parse.c (java_emit_static_constructor): Specify default
1964         priority.
1965
1966 2004-07-13  Per Bothner  <per@bothner.com>
1967
1968         * java-tree.h (all_class_filename):  Remove useless macro.
1969         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
1970         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
1971         * parse.y (java_parser_context_restore_global):  Replace
1972         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1973         * jcf-parse.c (read_class, java_parse_file):  Likewise.
1974
1975 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1976
1977         PR java/16474
1978         gjavah.c (print_field_info): Emit constant only if field is static.
1979
1980 2004-07-11  Roger Sayle  <roger@eyesopen.com>
1981
1982         * expr.c (java_truthvalue_conversion, flush_quick_stack,
1983         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1984         build_java_ret, build_java_throw_out_of_bounds_exception,
1985         build_java_array_length_access, java_check_reference,
1986         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1987         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1988         expand_java_arrayload, build_java_monitor, expand_java_return,
1989         expand_load_internal, expand_java_NEW, build_get_class,
1990         build_instanceof, expand_java_CHECKCAST, expand_iinc,
1991         build_java_soft_divmod, build_java_binop, build_field_ref,
1992         expand_compare, expand_java_goto, expand_java_switch,
1993         expand_java_add_case, build_class_init, build_known_method_ref,
1994         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1995         expand_invoke, build_jni_stub, expand_java_field_op,
1996         java_expand_expr, expand_byte_code, STORE_INTERNAL,
1997         force_evaluation_order, emit_init_test_initialization): Convert
1998         calls to "build" into calls to the prefered "buildN" functions.
1999
2000 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
2001
2002         * java-tree.h (set_block): Remove.
2003         * lang.c (java_clear_binding_stack): New.
2004         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2005         * decl.c (struct binding_level): Remove this_block.
2006         (clear_binding_level): Likewise.
2007         (poplevel): Don't handle this_block.
2008         (set_block): Remove.
2009
2010 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
2011
2012         * class.c (common_enclosing_context_p): Remove statement with no
2013         side-effects.
2014
2015 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
2016
2017         PR java/8618
2018         * parse.y (create_anonymous_class): Remove 'location' argument. Use
2019         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
2020         (craft_constructor): Inherit access flags for implicit constructor
2021         from the enclosing class.
2022         (create_class): Fix comment typo.
2023         (resolve_qualified_expression_name): Pass type of qualifier to
2024         not_accessible_p, not the type in which target field was found.
2025         (not_accessible_p): Handle inner classes. Expand protected
2026         qualifier-subtype check to enclosing instances, but don't apply this
2027         check to static members. Allow protected access to inner classes
2028         of a subtype. Allow private access within common enclosing context.
2029         (build_super_invocation): Get WFL line number info from current
2030         class decl.
2031         (build_incomplete_class_ref): Update for new create_anonymous_class
2032         signature.
2033         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2034         common_enclosing_instance_p.
2035         * class.c (common_enclosing_context_p): New. Determine if types
2036         share a common enclosing context, even across static contexts.
2037         (common_enclosing_instance_p): Renamed from
2038         common_enclosing_context_p. Determines if types share a common
2039         non-static enclosing instance.
2040         * java-tree.h (common_enclosing_instance_p): Declare.
2041         * jcf-write.c (get_method_access_flags): New. Surpress private flag
2042         for inner class constructors.
2043         (generate_classfile): Use get_method_access_flags.
2044
2045 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
2046
2047         * class.c (interface_of_p): Check for null TYPE_BINFO.
2048
2049 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2050
2051         * class.c (make_class): Do not create binfo here.
2052         (set_super_info): Create it here.
2053         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2054
2055 2004-07-08  Richard Henderson  <rth@redhat.com>
2056
2057         * expr.c (case_identity, get_primitive_array_vtable,
2058         java_expand_expr, emit_init_test_initialization): Remove.
2059         * java-tree.h (java_expand_expr): Remove.
2060         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2061
2062 2004-07-07  Per Bothner  <per@bothner.com>
2063
2064         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
2065         get internal error due to mismatched types.
2066
2067         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
2068
2069         * gcj.texi (Linking):   New node.  Document -lgij usage.
2070
2071 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2072
2073         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2074         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2075         * java/class.c (set_super_info, class_depth, interface_of_p,
2076         maybe_add_interface, add_interface, make_class_data,
2077         layout_class, add_miranda_methods): Adjust BINFO macros.
2078         * expr.c (can_widen_reference_to, lookup_field): Likewise.
2079         * jcf-write.c (generate_classfile): Likewise.
2080         * parse.y (patch_anonymous_class,
2081         check_inner_circular_reference, check_circular_reference,
2082         java_complete_class, check_abstract_method_definitions,
2083         java_check_abstract_method_definitions,
2084         check_interface_throws_clauses, java_check_abstract_methods,
2085         lookup_java_interface_method2,
2086         find_applicable_accessible_methods_list): Likewise.
2087         * typeck.c (find_method_in_interface): Likewise.
2088         * verify.c (merge_types): Likewise.
2089
2090 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2091
2092         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2093         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2094
2095 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2096
2097         * class.c (make_class): Use make_tree_binfo.
2098         (set_super_info, add_interface_do): Likewise.
2099         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2100
2101 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2102
2103         * verify.c: Correct array element access formatting thinko.
2104
2105 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2106
2107         * verify.c: Insert a short blurb at the start referring to the JVMS.
2108         (merge_type_state): Remove redundant nested if statement.
2109         (verify_jvm_instructions): Ensure current_subr is initialised to
2110         NULL_TREE.
2111         Minor formatting fixes all over the place.
2112
2113 2004-07-02  Richard Henderson  <rth@redhat.com>
2114
2115         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2116
2117 2004-07-01  Richard Henderson  <rth@redhat.com>
2118
2119         * class.c (registerClass_libfunc): Remove.
2120         (init_class_processing): Don't set it.
2121         (emit_register_classes): Take list_p parameter.  Fill it in
2122         with _Jv_RegisterClass calls.
2123         * decl.c (java_init_decl_processing): Don't call
2124         init_resource_processing.
2125         * jcf-parse.c (java_emit_static_constructor): New.
2126         (java_parse_file): Call it.
2127         * resource.c (registerResource_libfunc): Remove.
2128         (init_resource_processing): Remove.
2129         (write_resource_constructor): Take list_p parameter.  Fill it in
2130         with _Jv_RegisterResource calls.
2131         * java-tree.h: Update prototypes.
2132
2133 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
2134
2135         PR java/1262
2136         * class.c (layout_class_method): Do not override package-private
2137         method if its in a different package.
2138         (split_qualified_name): Move here from parse.y. Rename from
2139         breakdown_qualified. Add comment.
2140         (in_same_package): Move here from parse.y. Add comment.
2141         * java-tree.h (break_down_qualified, in_same_package): Declare.
2142         (in_same_package): Likewise.
2143         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2144         Callers updated.
2145
2146 2004-06-29  Andrew Haley  <aph@redhat.com>
2147
2148         * except.c (expand_start_java_handler): Push a new binding level.
2149         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2150         register_exception_range() to register where we'll do it.
2151         (expand_end_java_handler): Remove old bogus code.  Replace with
2152         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2153         the top of the expression we're curently building.
2154         (maybe_end_try): Delete.
2155         * decl.c (binding_level.exception_range): New field.
2156         (clear_binding_level): Add field exception_range.  Reformat.
2157         (poplevel): Call expand_end_java_handler().
2158         (poplevel): Call java_add_stmt only if functionbody is false.
2159         (maybe_poplevels): Don't call maybe_end_try() from here.
2160         (end_java_method): Clear no longer used trees in function decl.
2161         (register_exception_range): New function.
2162         * java-tree.h (register_exception_range, struct eh_range): Declare.
2163
2164 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
2165
2166         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2167
2168 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
2169
2170         Formatting fixes.
2171         * expr.c (class_has_finalize_method): Fix method name indentation.
2172         (expand_java_call): Remove K&R style parameter declaration.
2173         (expand_invoke): Fix statement indentation.
2174         (expand_java_field_op): Likewise.
2175         * parse-scan.y: Fix typo.
2176         (reset_report): Fix method name indentation.
2177         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2178         line. Fix typos.
2179         * verify.c (verify_jvm_instructions): Document parameters, insert
2180         page break.
2181         * lang.c (lang_init_source): Fix method name indentation.
2182         * class.c (common_enclosing_context_p): Likewise.
2183         (emit_symbol_table): Fix parameter list indentation.
2184         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2185         parameter declaration.
2186         * constants.c: Fix copyright notice indentation.
2187         * typeck.c (find_method_in_superclasses): Fix parameter list
2188         indentation.
2189         (find_method_in_interfaces): Likewise.
2190         * zextract.c (makelong): Fix method name indentation.
2191
2192 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2193
2194         PR java/15715.
2195         * parse.y (create_interface): Set correct access modifiers for
2196         interfaces.
2197         * jcf-write.c (get_classfile_modifiers): New function.
2198         (generate_classfile): Use get_classfile_modifiers, not
2199         get_access_flags.
2200
2201 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2202
2203         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2204         dependency to current parser context, not NULL_TREE, for top-level
2205         classes.
2206         (jdep_resolve_class): Enable member access check for all inner
2207         class dependencies.
2208
2209 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2210
2211         * parse.y (qualify_and_find): Pass type decl, not identifier, to
2212         load_class.
2213
2214 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2215
2216         PR java/15734
2217         * expr.c (expand_java_field_op): Ensure that target class for static
2218         field access has been loaded.
2219
2220 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2221             Ranjit Mathew  <rmathew@hotmail.com>
2222
2223         PR java/1207, java/16178
2224         * jcf-parse.c (load_class): Return immediately if passed a type decl
2225         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2226         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2227         before calling load_class.
2228         (qualify_and_find): Likewise.
2229         (find_in_imports_on_demand): Likewise.
2230         (find_applicable_accessible_methods_list): Likewise.
2231
2232 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
2233
2234         * parse.y (java_layout_seen_class_methods): Don't call load_class
2235         on class defined by source parser.
2236
2237 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2238
2239         * parse.y (set_nested_class_simple_name_value): Removed.
2240         (java_complete_expand_class): Remove calls to
2241         set_nested_class_simple_name_value.
2242
2243 2004-06-22  Andrew Haley  <aph@redhat.com>
2244             Ranjit Mathew  <rmathew@hotmail.com>
2245
2246         Fixes PR java/16113.
2247         * decl.c (force_poplevels): Remove call to expand_end_bindings.
2248
2249 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
2250
2251         * parse.y (create_class): Correct diagnostic message about
2252         java.lang.Object extending anything else.
2253
2254 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2255
2256         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2257         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2258         * constants.c (build_ref_from_constant_pool): Likewise.
2259         * expr.c (build_java_array_length_access): Likewise.
2260         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2261         (invoke_build_dtable, build_invokevirtual): Likewise.
2262         (build_invokeinterface, java_expand_expr): Likewise.
2263         (emit_init_test_initialization): Likewise.
2264         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2265         * parse.y (make_qualifed_name, build_array_ref): Likewise.
2266
2267 2004-06-21  Andrew Haley  <aph@redhat.com>
2268
2269         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2270         block.
2271
2272 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2273
2274         * jcf.h (struct JCF): Change java_source, right_zip and finished
2275         to unsigned int.
2276         * lex.h (struct java_lexer): Change hit_eof, read_anything,
2277         byte_swap and use_fallback to unsigned int.
2278         * parse.h (struct _jdep): Change flag0 to unsigned int.
2279
2280 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
2281
2282         Fixes PR java/13948
2283         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2284         before trying to lay out its methods.
2285         * jcf-parse.c (read_class): Track parsed files using canonical paths
2286         obtained via lrealpath from libiberty.
2287         (java_parse_file): Likewise.
2288         (parse_source_file_1): Rename formal parameter to reflect its
2289         modified purpose. Minor formatting fix.
2290
2291 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2292
2293         * class.c (emit_register_classes): Make the function uninlinable,
2294         do not set current_function_cannot_inline.
2295         * resource.c (write_resource_constructor): Do not reset
2296         flag_inline_functions around rest_of_compilation.
2297
2298 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
2299
2300         PR java/15769
2301         * expr.c (java_truthvalue_conversion): Handle
2302         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2303         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2304         i.e. return the expression.
2305
2306 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
2307
2308         * gjavah.c: Include version.h
2309
2310 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
2311
2312         * jcf-write.c (generate_bytecode_conditional): Correct handling
2313         of unordered conditionals. Add comment.
2314
2315 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
2316             Per Bothner  <per@bothner.com>
2317
2318         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2319         local variable was initialised upon declaration.
2320         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2321         variable was final and initialised upon declaration.
2322         * check-init.c (check_final_reassigned): Give error only if a blank
2323         final is not definitely unassigned or if an initialised final is
2324         reassigned.
2325         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2326         assignment expressions. Remove case MODIFY_EXPR, label do_default.
2327         (check_init): Perform initialised-variable-removing-optimisation
2328         only on non-final local variables.
2329
2330 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2331
2332         * jcf-write.c (generate_bytecode_conditional): Handle binops
2333         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2334         and LTGT_EXPR.
2335         (generate_bytecode_insns): Likewise.
2336
2337 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2338
2339         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2340         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2341
2342 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2343
2344         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2345         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2346
2347 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2348
2349         * decl.c (struct binding_level): Add GTY marker. Compile
2350         binding_depth unconditionally.
2351         (current_binding_level, free_binding_level, global_binding_level):
2352         Likewise.
2353         (clear_binding_level): Unconditionally set binding_depth.
2354         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2355
2356 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2357
2358         * lex.c (java_new_lexer): Set 'encoding'.
2359         (java_read_char): Improve error message for unrecognized characters.
2360         * lex.h (struct java_lexer): New field 'encoding'.
2361
2362 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
2363
2364         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2365
2366 2004-05-21  Mark Wielaard  <mark@klomp.org>
2367
2368         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2369         extern.
2370
2371 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
2372
2373         * typeck.c: Remove non-printable character 160.
2374
2375 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
2376
2377         * check-init.c: Correct minor typos.
2378
2379 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2380
2381         * Make-lang.in, expr.c, java-gimplify.c: Rename
2382         tree-simple.[ch] to tree-gimple.[ch].
2383
2384 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
2385
2386         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2387
2388 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2389
2390         Merge from tree-ssa-20020619-branch.  See
2391         ChangeLog.tree-ssa for details.
2392
2393         * Make-lang.in, builtins.c, check-init.c, class.c,
2394         constants.c, decl.c, except.c, expr.c, java-except.h,
2395         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2396         lang.c, lang.opt, parse.y, resource.c: Merged.
2397         * java-gimplify.c: New file.
2398
2399 2004-05-10  Andrew Haley  <aph@redhat.com>
2400
2401         * parse.y (create_class): Set TYPE_VFIELD.
2402         * decl.c (java_init_decl_processing): Likewise.
2403
2404         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2405         * class.c (make_method_value): Replace DECL_VINDEX with call to
2406         get_method_index().
2407         (get_dispatch_vector): Likewise.
2408         (layout_class_method): Likewise.
2409         Replace set of DECL_VINDEX with call to set_method_index().
2410         (set_method_index): New function.
2411         (get_method_index): New function.
2412         * java-tree.h (set_method_index): New function decl.
2413         (get_method_index): New function decl.
2414
2415 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
2416
2417         * parse.y (check_pkg_class_access): Add new argument
2418         and use it when cl is NULL to call lookup_cl on it.
2419         (parser_check_super_interface): Do not call lookup_cl.
2420         Pass this_decl to check_pkg_class_access and NULL
2421         instead of lookup_cl.
2422         (parser_check_super): Update for change in
2423         check_pkg_class_access.
2424         (do_resolve_class): Likewise.
2425         (process_imports): Likewise.
2426         (find_in_imports_on_demand): Likewise.
2427         (resolve_qualified_expression_name): Likewise.
2428
2429 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
2430
2431         Fixes PR java/9685, PR java/15073
2432         * parse.y (accessibility_string): New method.
2433         (not_accessible_field_error): Use accessibility_string()
2434         instead of java_accstring_lookup().
2435         (resolve_qualified_expression_name): Check with
2436         check_pkg_class_access() before allowing access using
2437         qualified names.
2438         Fix comment typo.
2439         Use check_pkg_class_access() instead of not_accessible_p()
2440         for unqualified types.
2441         (not_accessible_p): Use DECL_CONTEXT (member) instead of
2442         REFERENCE for package-private access checking.
2443         (patch_method_invocation): Use accessibility_string() instead
2444         of java_accstring_lookup().
2445
2446 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
2447
2448         Fixes PR java/15133
2449         * gjavah.c (struct method_name): Add member is_native.
2450         (overloaded_jni_method_exists_p): Match candidate method only if
2451         it is native.
2452         (print_method_info): Initialise is_native flag from the method's
2453         access flags.
2454
2455 2004-04-30  Roger Sayle  <roger@eyesopen.com>
2456
2457         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2458         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2459
2460 2004-04-22  Roger Sayle  <roger@eyesopen.com>
2461
2462         * resource.c (write_resource_constructor): Guard call to possibly
2463         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2464
2465 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
2466
2467         * class.c (make_class_data): Add new field aux_info.
2468         * decl.c (java_init_decl_processing): Push type and decl for
2469         `aux_info'.
2470
2471 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
2472
2473         * expr.c (expand_java_NEW): Don't use size argument for
2474         _Jv_AllocObject calls.
2475         * parse.y (patch_invoke): Likewise.
2476
2477 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2478
2479         * expr.c (build_invokeinterface): Remove unused variables to
2480         fix warnings.
2481
2482 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2483
2484         * class.c (get_interface_method_index): New function. Return dispatch
2485         index for interface method.
2486         (make_method_value): For interface methods, set index field to
2487         iface dispatch index, not DECL_VINDEX.
2488         * expr.c (build_invokeinterface): Use get_interface_method_index.
2489
2490 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2491
2492         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2493
2494 2004-03-31  Andrew Haley  <aph@redhat.com>
2495
2496         PR java/14104
2497         * jcf-io.c (opendir_in_zip): Tidy up error handling.
2498
2499 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
2500
2501         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2502         form of GTY markers.
2503
2504 2004-03-25  Marcus Meissner  <meissner@suse.de>
2505
2506         PR java/14689:
2507         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2508
2509 2004-03-23  Tom Tromey  <tromey@redhat.com>
2510
2511         PR java/14315:
2512         * jcf-write.c (make_class_file_name): Don't report if mkdir
2513         failed with EEXIST.
2514
2515 2004-03-23  Tom Tromey  <tromey@redhat.com>
2516
2517         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2518
2519 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
2520
2521         * class.c, gjavah.c, lang.c: Fix comment typos.
2522         * gcj.texi: Fix typos.
2523
2524 2004-03-19  Per Bothner  <per@bothner.com>
2525
2526         * gcj.texi (Code Generation):  Document new flags and assert defaults.
2527
2528         * class.c (assume_compiled_node_struct):  Rename type to
2529         class_flag_node_struct, as it is now also used for enable_assertions.
2530         Rename assume_compiled_node typedef.  Rename excludep field to value.
2531         (find_assume_compiled_node):  Rename function to find_class_flag_node.
2532         Minor optimization - avoid needless strlen.
2533         (add_assume_compiled):  Some tweaking and optimization.
2534         Rename and generalize to add_class_flag takem an extra parameter.
2535         (add_assume_compled):  New just calls add_class_flag.
2536         (add_enable_assert, enable_assertions):  New functions.
2537         (enable_assert_tree):  New static.
2538         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2539         * lang.opt (fenable-assertions, fenable-assertions=,
2540         fdisable-assertions, fdisable-assertions=):  New options.
2541         * lang.c (java_handle_option):  Handle new options.
2542         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
2543         class in an interface - create helper class nested in outer interface.
2544         (build_assertion):  Short-circuit if enable_assertions is false.
2545
2546 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2547
2548         * java-tree.h: Changes throughout to add checking to macros
2549         and numerous whitespace changes.
2550         (VAR_OR_FIELD_CHECK): New macro.
2551         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2552         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2553
2554 2004-03-16  Per Bothner  <per@bothner.com>
2555
2556         * jcf-jump.c (options):  New --print-constants option.
2557         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
2558
2559         * jcf-dump.c (flag_print_constant_pool):  Default to off.
2560         (print_constant_terse_with_index):  New helper function.
2561         (various places):  Check flag_print_constant_pool where missing.
2562         (main):  If verbose set flag_print_constant_pool.
2563         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
2564
2565 2004-03-15  Andrew Haley  <aph@redhat.com>
2566
2567         PR java/14581
2568         * parse.y (java_complete_lhs): Check that final variable has an
2569         initializer.
2570
2571 2004-03-12  Andrew Haley  <aph@redhat.com>
2572
2573         PR java/14551
2574         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2575         conversion.
2576
2577 2004-02-29  Roger Sayle  <roger@eyesopen.com>
2578
2579         * jcf-parse.c (java_parse_file): Handle the case that input_filename
2580         is NULL.
2581
2582 2004-02-27  Per Bothner  <per@bothner.com>
2583
2584         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
2585         suggestion:  Use build_incomplete_class_ref.
2586         This fixes PR java/13508, java/11714.
2587
2588 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
2589
2590         * java/parse.h: Update copyright.
2591
2592 2004-02-26  Andrew Haley  <aph@redhat.com>
2593
2594         PR java/14231:
2595         * parse.y (check_interface_throws_clauses): Check for
2596         !METHOD_INVISIBLE (iface_method).
2597         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2598         well as CLASS_ABSTRACT.
2599
2600 2004-02-25  Per Bothner  <per@bothner.com>
2601
2602         * parse.y (build_assertion):  If we're in an inner class, create the
2603         class$ helper routine in the outer class.
2604
2605 2004-02-19  Richard Henderson  <rth@redhat.com>
2606
2607         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2608
2609 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
2610
2611         * Make-lang.in (java.install-man): Add extra dependencies.
2612
2613 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
2614
2615         * Make-lang.in: Install man pages under the same names
2616         (possibly transformed) as the program they document.
2617
2618 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
2619
2620         * gjavah.c: Include "intl.h".
2621         (error): New function.
2622         (main): Call gcc_init_libintl.
2623         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2624         print_stub_or_jni, process_file, main): Use error rather than
2625         fprintf.
2626         (print_method_info, usage, help, version, main): Mark strings for
2627         translation with _.  Avoid splitting up sentences.  Send
2628         information messages to stdout.
2629         * jcf-dump.c: Include "intl.h".
2630         (main): Call gcc_init_libintl.
2631         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2632         Mark error, usage and version messages for translation with _.
2633         Avoid splitting up sentences.
2634         * jv-scan.c: Include "intl.h".
2635         (fatal_error, warning): Change parameter s to msgid.  Translate
2636         messages.
2637         (main): Call gcc_init_libintl.
2638         (usage, help, version): Mark error, usage and version messages for
2639         translation with _.  Avoid splitting up sentences.
2640         * jvgenmain.c: Include "intl.h".
2641         (main): Call gcc_init_libintl.
2642         (usage, main): Mark error messages for translation with _.
2643         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2644         JVGENMAIN_OBJS): Add intl.o.
2645         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2646         java/jvgenmain.o): Update dependencies.
2647
2648 2004-02-08  Per Bothner  <per@bothner.com>
2649
2650         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
2651         class don't use not_accessible_field_error, which can get confused.
2652
2653 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
2654
2655         Make-lang.in (po-generated):  Delete.
2656
2657 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
2658
2659         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2660         Depend on target.h.
2661         * decl.c: Include target.h.
2662         (start_java_method): Replace PROMOTE_PROTOTYPES with
2663         targetm.calls.promote_prototypes.
2664         * expr.c: Include target.h.
2665         (pop_arguments): Replace PROMOTE_PROTOTYPES with
2666         targetm.calls.promote_prototypes.
2667         * parse.y: Include target.h.
2668         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2669         with targetm.calls.promote_prototypes.
2670
2671 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
2672
2673         * typeck.c: Update copyright.
2674
2675 2004-02-02  Tom Tromey  <tromey@redhat.com>
2676
2677         * decl.c (java_init_decl_processing): Remove duplicate
2678         gnu/gcj/RawData.
2679
2680 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
2681
2682         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2683
2684 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
2685
2686         * expr.c (build_field_ref): Move variable
2687         definition up.
2688
2689 2004-01-28  Andrew Haley  <aph@redhat.com>
2690
2691         * expr.c (build_field_ref): Widen field offset.
2692
2693 2004-01-27  Andrew Haley  <aph@redhat.com>
2694
2695         java/13273
2696         * parse.y (check_interface_throws_clauses): Make sure class_decl
2697         has been loaded.
2698
2699 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
2700
2701         PR java/13733
2702         * parse.y (patch_assignment): Don't modify lhs_type for
2703         reference assignments.
2704
2705 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2706
2707         * Make-lang.in: Replace $(docdir) with doc.
2708         (java.info, java.srcinfo, java.man, java.srcman): New rules.
2709         (java.install-man): Revamp rule.
2710
2711 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2712
2713         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2714         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2715         instead of deferred backquote.
2716
2717 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
2718
2719         * typeck.c (find_method_in_interfaces): Move variable
2720         definition up.
2721
2722 2004-01-16  Andrew Haley  <aph@redhat.com>
2723
2724         PR java/13273:
2725         * typeck.c (shallow_find_method): New.
2726         (find_method_in_superclasses): New.
2727         (find_method_in_interfaces): New.
2728         (lookup_do): Rewrite.
2729         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2730
2731         * jcf-parse.c (read_class): Save and restore output_class.
2732         * decl.c (java_expand_body): Set output_class from fndecl.
2733
2734 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
2735
2736         * class.c (gen_indirect_dispatch_tables): Fix string length
2737         calculations.
2738
2739 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
2740
2741         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2742         (java.srcextra): Copy above back to source directory if requested.
2743         (po-generated): Delete reference to $(parsedir).
2744         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2745         Use implicit rule.
2746
2747 2004-01-14  Jan Hubicka  <jh@suse.cz>
2748
2749         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2750         estimation.
2751
2752 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
2753
2754         * java-tree.h (java_expand_expr): Change prototype.
2755         * expr.c (java_expand_expr): Add alt_rtl parameter.
2756
2757 2004-01-09  Andrew Haley  <aph@redhat.com>
2758
2759         PR java/12755:
2760         * parse.y (java_fix_constructors):  Set output_class.
2761         (java_reorder_fields): Likewise.
2762         (java_layout_classes): Likewise.
2763         (java_expand_classes): Generate indirect dispatch tables.
2764         (java_expand_classes): Set output_class.
2765         (java_finish_classes): Likewise.
2766         * lang.c (java_init): Turn on always_initialize_class_p if we're
2767         using indirect dis[atch.
2768         (java_decl_ok_for_sibcall): Use output_class, not current_class.
2769         (java_get_callee_fndecl): Use class local atable.
2770         * jcf-parse.c
2771         (always_initialize_class_p): Decl moved to java-tree.h.
2772         (HANDLE_CLASS_INFO): Set output_class.
2773         (read_class): Likewise.
2774         (parse_class_file): Call gen_indirect_dispatch_tables.
2775         (parse_zip_file_entries): Set output_class.
2776         (java_parse_file): Set output_class.  Don't emit symbol tables.
2777         * java-tree.h (output_class): New.
2778         Remove global declarations for otable, atable, and ctable.
2779         (always_initialize_class_p): moved here from decl.c.
2780         (DECL_OWNER): New.
2781         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2782         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2783         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2784         (struct lang_type): Add otable_methods, otable_decl,
2785         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2786         ctable_decl, catch_classes, type_to_runtime_map.
2787         * expr.c (build_field_ref): Make otable, atable, and ctable class
2788         local rather than global.
2789         (build_known_method_ref): Likewise.
2790         (build_invokeinterface): Likewise.
2791         (java_expand_expr): Pass runtime type (rather than actual type) to
2792         expand_start_catch.
2793         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2794         this class.  Look up each class in that map to delete duplicates.
2795         (expand_end_java_handler): Pass runtime type (rather than actual
2796         type) to expand_start_catch.
2797         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2798         (do_nothing): New.
2799         (java_init_decl_processing): Rearrange things.  Remove global
2800         declarations of otable, atable, and ctable.
2801         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2802         (java_expand_body): Set output_class.
2803         * constants.c (build_constant_data_ref): Use output_class, not
2804         current_class.
2805         (alloc_name_constant): Likewise.
2806         * class.c (gen_indirect_dispatch_tables): New.
2807         (build_class_ref): Generate hard reference to superclass, even if
2808         using indirect dispatch.
2809         (build_static_field_ref): Use class local atable.
2810         (make_class_data): Generate hard reference to superclass, even if
2811         using indirect dispatch.
2812         Generate symbolic references to interfaces when using indirect
2813         dispatch.
2814         (make_class_data): Emit otable, atable, and ctable.
2815         Make otable, atable, and ctable class local rather than global.
2816         (emit_catch_table): Make otable, atable, and ctable class local
2817         rather than global.
2818
2819 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
2820
2821         * parse.y (catch_clause_parameter): Fix typo.
2822
2823         PR java/13404
2824         * parse.y: (catch_clause_parameter): Return early if $3, aka
2825         formal_parameter, is null.
2826
2827 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2828
2829         * class.c: Remove uses of "register" specifier in
2830         declarations of arguments and local variables.
2831         * decl.c: Likewise.
2832         * expr.c: Likewise.
2833         * gjavah.c: Likewise.
2834         * jcf-dump.c: Likewise.
2835         * jcf-io.c: Likewise.
2836         * jcf-parse.c: Likewise.
2837         * jcf-write.c: Likewise.
2838         * keyword.h: Likewise.
2839         * parse.y: Likewise.
2840         * typeck.c: Likewise.
2841         * verify.c: Likewise.
2842
2843 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
2844
2845         * Make-lang.in (GCJ_CROSS_NAME): Delete.
2846         (java.install_common, java.install-man): Adjust for above.
2847         (java.uninstall): Likewise.
2848
2849 2003-12-03  Michael Koch  <konqueror@gmx.de>
2850
2851         * class.c (make_class_data):
2852         Push field value to 'hack_signers' instead of 'signers'.
2853         * decl.c (java_init_decl_processing):
2854         Push field 'hack_signers' instead of 'signers'.
2855
2856 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
2857
2858         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2859         including iconv.h.
2860
2861 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
2862
2863         PR java/12374:
2864         * parse.y (qualify_ambiguous_name): Remove lots of broken
2865         field access processing - there's no need to do that here,
2866         because we have resolve_field_access.  Remove
2867         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2868         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2869         used.
2870
2871 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
2872
2873         Fix PR java/13237
2874         * parse.y (java_complete_lhs): Save location prior to patching
2875         CALL_EXPR.
2876
2877 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
2878
2879         PR java/12548
2880         * resource.c (write_resource_constructor): Append
2881         "_resource" to constructor identifier name.
2882
2883 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
2884
2885         Fix PR java/13183.
2886         * constants.c (cpool_for_class): New function.
2887         (outgoing_cpool): Remove global variable.
2888         (alloc_name_constant): Use cpool_for_class.
2889         (build_constants_constructor): Likewise.
2890         * decl.c (java_expand_body): Set current_class.
2891         * java-tree.h (outgoing_cpool) Remove declaration.
2892         (init_outgoing_cpool): Likewise.
2893         * jcf-parse.c (init_outgoing_cpool): Remove function.
2894         (parse_class_file): Don't call init_outgoing_cpool.
2895         * parse.y (java_complete_expand_methods): Don't call
2896         init_outgoing_cpool.  Don't save outgoing_cpool.
2897         (java_expand_classes): Don't restore outgoing_cpool.
2898         (java_finish_classes): Likewise.
2899
2900 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
2901
2902         * Make-lang.in: (java.install-common) Add
2903         symlink for $(target_noncanonical)-gcjh for
2904         native builds.
2905
2906 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2907
2908         * Make-lang.in (java.extraclean): Delete.
2909
2910 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2911
2912         * Make-lang.in (check-java): Add.
2913
2914 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
2915
2916         Fix PR java/13024.
2917         * except.c (prepare_eh_table_type): Allocate variable-sized
2918         buffer `buf' with alloca.
2919
2920 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2921
2922         Fix PR java/12857.
2923
2924         decl.c (java_init_decl_processing): Don't initialize
2925         class_not_found_type_node, no_class_def_found_type_node.
2926
2927         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2928         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2929         (class_not_found_type_node, no_class_def_found_type_node):
2930         Don't define.
2931
2932         parse.y (build_dot_class_method_invocation): Add this_class
2933         argument.  Qualify method invocations to a different class.
2934         (create_new_parser_context): Initialize saved_data_ctx to 0.
2935         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2936         (build_dot_class_method): Don't load classes.  Register
2937         incomplete types.
2938         (build_incomplete_class_ref): Special cases for interfaces
2939         and inner classes.  Move build_dot_class_method call to here...
2940         (patch_incomplete_class_ref): ...from here.  Pass current_class
2941         to build_dot_class_method_invocation.
2942         (build_assertion): Pass class_type to
2943         build_dot_class_method_invocation.
2944         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2945
2946 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2947
2948         Fix PR java/12739.
2949         * java-tree.h (BLOCK_EMPTY_P): Define.
2950         * parse.y (java_complete_lhs): Check for empty blocks
2951         in TRY_FINALLY_EXPR case.
2952
2953 2003-11-17  Andrew Haley  <aph@redhat.com>
2954
2955         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2956         (struct lang_decl_var:freed): New variable.
2957         * decl.c (poplevel): Mark local vars that have gone out of scope.
2958         (push_jvm_slot): Don't use the RTL of a var that has gone out of
2959         scope.
2960
2961 2003-11-16  Jason Merrill  <jason@redhat.com>
2962
2963         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2964         and TAGS files that include them for each front end.
2965
2966 2003-11-15  Tom Tromey  <tromey@redhat.com>
2967
2968         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2969
2970 2003-11-12  Jason Merrill  <jason@redhat.com>
2971
2972         PR optimization/12547
2973         * lang.c (java_tree_inlining_walk_subtrees): Just walk
2974         BLOCK_EXPR_BODY directly.
2975
2976 2003-11-12  Andrew Haley  <aph@redhat.com>
2977
2978         PR java/11045
2979         * parse.y (fold_constant_for_init): Check that we really do have a
2980         constant.
2981
2982         PR java/11533
2983         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2984         init_test_decls being inlined.
2985
2986         PR java/12890:
2987         * parse.y (do_resolve_class): Check return value from
2988         breakdown_qualified().
2989
2990 2003-11-11  Tom Tromey  <tromey@redhat.com>
2991
2992         PR java/12915:
2993         * parse.y (merge_string_cste): Handle case where we have a
2994         pointer that happens to be zero, not null_pointer_node.
2995
2996 2003-11-10  Tom Tromey  <tromey@redhat.com>
2997
2998         * jcf-parse.c (classify_zip_file): Correctly compare
2999         filename_length against length of manifest file's name.
3000
3001 2003-11-08  Tom Tromey  <tromey@redhat.com>
3002
3003         PR java/12894:
3004         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3005
3006 2003-11-06  Andrew Haley  <aph@redhat.com>
3007
3008         * expr.c (java_stack_swap): Make sure destination stack slots are
3009         of the correct type.
3010
3011 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
3012
3013         * Make-lang.in (dvi): Move targets to $(docobjdir).
3014         (gcj.dvi): Simplify rule and adjust target.
3015         (gcj.info): Simplify rule.
3016         (gcj.pod): New intermediate rule.
3017         (gcjh.pod): Likewise.
3018         (jv-scan.pod): Likewise.
3019         (jcf-dump.pod): Likewise.
3020         (gij.pod): Likewise.
3021         (jv-convert.pod): Likewise.
3022         (rmic.pod): Likewise.
3023         (rmiregistry.pod): Likewise.
3024         (gcj.1): Delete.
3025         (gcjh.1): Delete.
3026         (jv-scan.1): Delete.
3027         (jcf-dump.1): Delete.
3028         (gij.1): Delete.
3029         (jv-convert.1): Delete.
3030         (rmic.1): Delete.
3031         (rmiregistry.1): Delete.
3032
3033 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
3034
3035         Fixes PR java/12866.
3036         * parse.y (resolve_qualified_expression_name): Move test
3037         for outer field access methods from here...
3038         (check_thrown_exceptions) ...to here.
3039
3040 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
3041
3042         * .cvsignore: Delete.
3043
3044 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
3045
3046         * verify.c (verify_jvm_instructions): Don't warn about legal
3047         eh binding regions generated for example by jdk 1.4.1.
3048
3049 2003-10-24  David S. Miller  <davem@redhat.com>
3050
3051         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3052
3053 2003-10-22  Andrew Haley  <aph@redhat.com>
3054
3055         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3056         (java_get_callee_fndecl): New.
3057
3058         * jcf-parse.c (java_parse_file): Call emit_catch_table().
3059
3060         * java-tree.h (ctable_decl): New.
3061         (catch_classes):  New.
3062         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3063
3064         * decl.c (java_init_decl_processing): Add catch_class_type.
3065         Add ctable_decl.
3066         Add catch_classes field.
3067
3068         * class.c (build_indirect_class_ref): Break out from
3069         build_class_ref.
3070         (make_field_value): Check flag_indirect_dispatch.
3071         (make_class_data): Ditto.
3072         Tidy uses of PUSH_FIELD_VALUE.
3073         Add field catch_classes.
3074         (make_catch_class_record): New.
3075
3076         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3077
3078 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3079
3080         * jcf-write.c: Follow spelling conventions.
3081         * parse.y: Likewise.
3082
3083 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3084
3085         * ChangeLog: Fix typos.
3086         * expr.c: Fix comment typos.
3087         * jcf-write.c: Likewise.
3088         * lang.c: Likewise.
3089         * lex.c: Likewise.
3090         * mangle.c: Likewise.
3091         * parse-scan.y: Likewise.
3092         * parse.y: Likewise.
3093
3094 2003-10-22  Tom Tromey  <tromey@redhat.com>
3095
3096         * expr.c (expand_byte_code): Only warn about dead bytecode when
3097         extra_warnings is set.
3098
3099 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
3100
3101         Fix for PR java/12586.
3102         * mangle.c (find_compression_record_match): Don't iterate through
3103         package namespace elements unless they all match compression_table
3104         entries.
3105
3106 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
3107
3108         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3109         (generate-manpages): Likewise.
3110         (java.maintainer-clean): Likewise.
3111         (gcj.info): Likewise.
3112         (gcj.1): Likewise.
3113         (gcjh.1): Likewise.
3114         (jv-scan.1): Likewise.
3115         (jcf-dump.1): Likewise.
3116         (gij.1): Likewise.
3117         (jv-convert.1): Likewise.
3118         (rmic.1): Likewise.
3119         (rmiregistry.1): Likewise.
3120         (java.install-man): Likewise.
3121         (parse-scan.o): Move and define complete compile line.
3122         (parse.o): Likewise.
3123         (jcf-tree-inline.o): Move.
3124
3125 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
3126
3127         * Make-lang.in (info): Update dependencies.
3128         (java.install-info): Remove.
3129         ($(srcdir)/java/gcj.info): Replace with ...
3130         ($(docobjdir)/gcj.info): ... this.
3131
3132 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
3133
3134         * Make-lang.in: Replace uses of $(target_alias) with
3135         $(target_noncanonical).
3136
3137 2003-10-09  Tom Tromey  <tromey@redhat.com>
3138
3139         * decl.c (java_init_decl_processing): Declare signers field.
3140         * class.c (make_class_data): Set signers field.
3141
3142 2003-10-09  Jason Merrill  <jason@redhat.com>
3143
3144         * parse.y (patch_assignment): Use make_node to create a BLOCK.
3145         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3146         POINTER_TYPE.
3147
3148 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
3149
3150         * Make-lang.in (java.info): Replace with ...
3151         (info): ... this.
3152         (java.dvi): Replace with ...
3153         (dvi): ... this.
3154         (java.generated-manpages): Replace with ...
3155
3156 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
3157
3158         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3159
3160 2003-10-01  Andrew Haley  <aph@redhat.com>
3161
3162         * jcf-parse.c (java_parse_file): Write otable and atable.
3163         * java-tree.h (atable_methods): New.
3164         (atable_decl): New.
3165         (atable_syms_decl): New.
3166         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3167         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3168         (symbol_*type): Rename method_symbol* to symbol*type.
3169         (emit_offset_symbol_table): Delete.
3170         (emit_symbol_table): New.
3171         (get_symbol_table_index): New.
3172         (atable_type): New.
3173         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3174         (build_known_method_ref): Likewise.
3175         (get_symbol_table_index): Rename from get_offset_table_index.
3176         Parameterize to allow re-use by differing types of symbol table.
3177         (build_invokevirtual): Pass table to get_offset_table_index.
3178         * decl.c (java_init_decl_processing): Push types and decls for
3179         atable and atable_syyms.
3180         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3181         (make_class_data): Add new fields atable and atable_syms.
3182         (emit_symbol_table): Rename from emit_offset_symbol_table.
3183         Parameterize to allow re-use by different types of symbol table.
3184         (build_symbol_entry): Renamed from build_method_symbols_entry.
3185
3186 2003-09-30  Roger Sayle  <roger@eyesopen.com>
3187
3188         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3189         semantics for SAVE_EXPR, by caching the result in a temporary.
3190
3191 2003-09-28  Richard Henderson  <rth@redhat.com>
3192
3193         * check-init.c (check_init): Save and restore input_location
3194         instead of file and line separately.
3195         * decl.c (java_expand_body): Likewise.
3196         * jcf-write.c (generate_bytecode_insns): Likewise.
3197         * parse.y (safe_layout_class): Likewise.
3198         * jcf-parse.c (read_class, parse_class_file): Likewise.
3199         (java_parse_file): Use %H for warning locator.
3200
3201 2003-09-28  Roger Sayle  <roger@eyesopen.com>
3202
3203         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3204         with void-type branches instead of using a COMPOUND_EXPR.
3205
3206 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
3207
3208         * decl.c (java_optimize_inline, dump_function): Remove.
3209         * java-tree.h (java_optimize_inline): Remove declaration.
3210         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3211         * parse.y (source_end_java_method, java_expand_classes):
3212         Likewise.  Remove dead code.
3213
3214 2003-09-27  Roger Sayle  <roger@eyesopen.com>
3215
3216         * lang.c (java_init_options): Set flag_evaluation_order.
3217         * expr.c (force_evaluation_order): Don't attempt to force
3218         evaluation order of binary operations using save_expr.
3219         * parse.y (java_complete_lhs): No longer need to call
3220         force_evaluation_order when constructing binary operators.
3221
3222 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3223             Bryce McKinlay  <bryce@mckinlay.net.nz>
3224
3225         PR java/1333:
3226         * parse.y (not_accessible_field_error): New function.
3227         (resolve_expression_name): Check field access permissions.
3228         (resolve_qualified_expression_name): Use
3229         not_accessible_field_error.
3230         (resolve_qualified_expression_name): Likewise.
3231
3232 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3233
3234         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3235
3236 2003-09-23  Roger Sayle  <roger@eyesopen.com>
3237
3238         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3239         with equal operands without side-effects.
3240
3241 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
3242
3243         * decl.c (java_init_decl_processing): Don't emit otable decls
3244         if flag_indirect_dispatch is not set.
3245
3246 2003-09-21  Richard Henderson  <rth@redhat.com>
3247
3248         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3249         resource.c: Revert.
3250
3251 2003-09-21  Richard Henderson  <rth@redhat.com>
3252
3253         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3254         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3255
3256 2003-09-20  Richard Henderson  <rth@redhat.com>
3257
3258         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3259
3260 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3261
3262         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3263         * check-init.c (check_init): Likewise.
3264
3265 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3266
3267         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3268
3269 2003-09-16  Andrew Haley  <aph@redhat.com>
3270
3271         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3272
3273 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
3274
3275         Fixes PR java/9577
3276         * mangle.c (find_compression_record_match): Skip
3277         over a "6JArray" (the array template mangled string)
3278         IDENTIFIER_NODE.
3279         (mangle_array_type): Correct minor typo.
3280         (atms): Move definition to the beginning.
3281
3282 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
3283
3284         * class.c (add_miranda_methods): Ensure super-interfaces are laid
3285         out. Fix for PR java/12254.
3286
3287 2003-09-11  Richard Henderson  <rth@redhat.com>
3288
3289         * parse.y (source_end_java_method): Update for new
3290         cgraph_finalize_function argument.
3291
3292 2003-09-09  Richard Henderson  <rth@redhat.com>
3293
3294         * parse.y (source_end_java_method): Update call to
3295         cgraph_finalize_function.
3296
3297 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
3298
3299         * decl.c (java_expand_body): New function.
3300         * expr.c (build_class_init): Set DECL_IGNORED_P.
3301         * java-tree.h (start_complete_expand_method,
3302         java_expand_body): Declare.
3303         * jcf-parse.c (cgraph.h): Include.
3304         (java_parse_file): Handle flag_unit_at_a_time.
3305         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3306         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3307         (java_estimate_num_insns): Use walk_tree_without_duplicates.
3308         (java_start_inlining): New function.
3309         * parse.h (java_finish_classes): Declare.
3310         * parse.y: Include cgraph.h.
3311         (block): Don't special-case empty block production.
3312         (craft_constructor): Set DECL_INLINE.
3313         (source_end_java_method): Handle flag_unit_at_a_time.
3314         Replace inline code with call to java_expand_body.
3315         (start_complete_expand_method): Remove static modifier.
3316         (java_expand_method_bodies): Patch function tree for
3317         class initialization and/or synchronization as needed.
3318         Don't begin RTL expansion yet.
3319         (java_expand_classes): Check flag_unit_at_a_time before
3320         calling finish_class.
3321         (java_finish_classes): New function.
3322         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3323         (patch_assignment): Set DECL_CONTEXT on temporary variable.
3324         (emit_test_initialization): Set DECL_IGNORED_P.
3325
3326 2003-09-03  Roger Sayle  <roger@eyesopen.com>
3327
3328         * builtins.c (enum builtin_type): Delete unused enumeration.
3329         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3330
3331 2003-08-28  Tom Tromey  <tromey@redhat.com>
3332
3333         * gcj.texi (Extensions): Document gcjlib URLs.
3334
3335 2003-08-20  Tom Tromey  <tromey@redhat.com>
3336
3337         * gcj.texi (Extensions): Added xref.
3338         (libgcj Runtime Properties): Document
3339         gnu.gcj.runtime.VMClassLoader.library_control.
3340
3341 2003-08-20  Andrew Haley  <aph@redhat.com>
3342
3343         * except.c (prepare_eh_table_type): Use new encoding for exception
3344         handlers when using -fno-assume-compiled.
3345
3346 2003-08-13  Tom Tromey  <tromey@redhat.com>
3347
3348         * gcj.texi (Invoking gij): Document -X and -?.
3349
3350 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
3351
3352         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3353         GCJH_OBJS, JCFDUMP_OBJS
3354         * win32-host.c: Removed the unnecessary and broken dependency
3355         on jcf.h
3356
3357 2003-08-11  Tom Tromey  <tromey@redhat.com>
3358
3359         * parse.y (java_check_regular_methods): Typo fixes.  Call
3360         check_interface_throws_clauses.  Use
3361         check_concrete_throws_clauses.
3362         (check_interface_throws_clauses): New function.
3363         (check_concrete_throws_clauses): New function.
3364         (hack_is_accessible_p): New function.
3365         (find_most_specific_methods_list): Added FIXME.
3366         * typeck.c (lookup_do): Use `flags' argument to decide what to
3367         do.  Reimplemented.
3368         (lookup_argument_method_generic): New function.
3369         (lookup_argument_method2): Removed.
3370         * jcf.h (ACC_INVISIBLE): New define.
3371         * jcf-write.c (generate_classfile): Skip invisible methods.
3372         * class.c (add_miranda_methods): New function.
3373         (layout_class_methods): Use it.
3374         (get_access_flags_from_decl): Use ACC_INVISIBLE.
3375         * java-tree.h (METHOD_INVISIBLE): New define.
3376         (lang_decl_func) [invisible]: New field.
3377         (lookup_argument_method_generic): Declare.
3378         (SEARCH_INTERFACE): New define.
3379         (SEARCH_SUPER): Likewise.
3380         (SEARCH_ONLY_INTERFACE): Likewise.
3381         (SEARCH_VISIBLE): Likewise.
3382         (lookup_argument_method2): Removed declaration.
3383
3384 2003-08-05  Tom Tromey  <tromey@redhat.com>
3385
3386         Fix for PR java/11600:
3387         * parse.y (java_complete_lhs): See whether we're calling a method
3388         on an array.
3389         (check_thrown_exceptions): Added `is_array_call' argument;
3390         fixed `clone' checking; updated all callers.
3391
3392 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
3393
3394         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3395
3396 2003-08-03  Tom Tromey  <tromey@redhat.com>
3397
3398         * java-tree.h (METHOD_TRANSIENT): Removed.
3399         * decl.c (pushdecl): Removed some dead code.
3400         * class.c (get_access_flags_from_decl): Can't have transient
3401         method.
3402         (add_method_1): Can't have a transient method.
3403
3404 2003-07-28  Andreas Jaeger  <aj@suse.de>
3405
3406         * jvspec.c: Convert to ISO C90 prototypes.
3407
3408 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3409
3410         * decl.c (force_poplevels): Fix warning call.
3411
3412 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3413
3414         * expr.c (expand_java_field_op): Don't use xxx_with_decl
3415         (expand_java_field_op): Likewise.
3416         * class.c (layout_class_method): Likewise
3417         (emit_register_classes): Likewise.
3418         * decl.c (pushdecl): Likewise.
3419         (poplevel): Likewise.
3420         (force_poplevels): Likewise.
3421         (give_name_to_locals): Likewise.
3422         * check-init.c (check_for_initialization): Likewise.
3423
3424 2003-07-24  Jason Merrill  <jason@redhat.com>
3425
3426         * java-tree.h: Move boolean_type_node et al to the back end.
3427
3428 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3429
3430         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3431         casts.
3432
3433 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
3434
3435         * lang.opt: Don't show -MD_ and -MDD_.
3436
3437 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
3438
3439         * lang-options.h: Remove.
3440         * lang.opt: Add help text.
3441
3442 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
3443
3444         * expr.c: Remove the last argument to expand_assignment().
3445
3446 2003-07-09  Jan Hubicka  <jh@suse.cz>
3447
3448         * java-tree.h (DECL_NUM_STMTS): Rename to...
3449         (DECL_ESTIMATED_INSNS): ... this.
3450         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3451         New static functions.
3452         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3453         * parser.y (add_stmt_to_compound): Do not account statements.
3454
3455 2003-07-08  Mark Wielaard  <mark@klomp.org>
3456
3457         * gcj.texi: CNI now expands to Compiled Native Interface.
3458
3459 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3460
3461         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3462
3463 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3464
3465         * expr.c (expand_byte_code): Adjist emit_line_note call.
3466
3467 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
3468
3469         * lang.c (java_handle_option): Don't handle filenames.
3470
3471 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
3472
3473         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3474         DIR_SEPARATOR.
3475         Use FILENAME_CMP.
3476         * jcf-write.c: Don't default-define DIR_SEPARATOR.
3477         * jcf.h: Delete COMPARE_FILENAMES definition.
3478
3479 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
3480
3481         * lang.c (java_init_options): Update prototype.
3482
3483 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3484
3485         * decl.c (poplevel): Adjust define_label call.
3486
3487 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3488
3489         * gjavah.c (flag_jni): Make non-static.
3490         * parse-scan.y (ctxp): Make non-static.
3491
3492         * class.c (build_method_symbols_entry)
3493         * expr.c (get_offset_table_index)
3494         * jcf-parse.c (jcf_parse):
3495         Mark the definition static, matching the forward declaration.
3496
3497 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
3498
3499         * lang.c (java_handle_option): Don't check for missing arguments.
3500
3501 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3502
3503         * class.c (push_class): Use a location_t to save place.
3504         (emit_register_classes): Set input_location. Adjust
3505         expand_function_end call.
3506         * resource.c (write_resource_constructor): Likewise.
3507         * decl.c (end_java_method): Adjust expand_function_end call.
3508         * parse.y (source_end_java_method): Likewise.
3509
3510 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3511
3512         * lang.c (java_handle_option): Likewise.
3513
3514 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
3515
3516         * lang.c (java_handle_option): Special-casing of optional
3517         joined arguments no longer needed.
3518         * lang.opt: Update switches that take optional argument.
3519
3520 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3521
3522         * lang.opt: Declare Java.
3523         * lang.c (java_init_options): Update.
3524
3525 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3526
3527         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3528
3529 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3530
3531         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3532         * lang.c (java_handle_option): -MD and -MMD have an underscore.
3533         * lang.opt: -MD and -MMD have an underscore.
3534
3535 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3536
3537         * class.c (emit_register_classes): Adjust init_function_start
3538         call.
3539         * decl.c (complete_start_java_method): Likewise.
3540         * resource.c (write_resource_constructor): Likewise.
3541
3542 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3543
3544         * Make-lang.in: Update to use options.c and options.h.
3545         * lang.c: Include options.h not j-options.h.
3546         (java_handle_option): Abort on unrecognized option.
3547         (java_init_options): Request Java switches.
3548
3549 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
3550
3551         * Make-lang.in: Handle mostlyclean.
3552
3553 2003-06-11  Tom Tromey  <tromey@redhat.com>
3554
3555         * lang.c (java_handle_option): Update dependency_tracking for
3556         OPT_MF case.
3557
3558         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3559         empty argument.
3560
3561 2003-06-10  Andrew Haley  <aph@redhat.com>
3562
3563         * resource.c (write_resource_constructor): Use expand_expr to
3564         generate the address of the label attached to a resource.
3565         * Make-lang.in (java/resource.o): Add expr.h
3566
3567 2003-06-10  Andrew Haley  <aph@redhat.com>
3568
3569         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3570         (java_decl_ok_for_sibcall): New.
3571
3572 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
3573
3574         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3575         (java/j-options.c, java/j-options.h): New.
3576         * java-tree.h (resource_name, compile_resource_file,
3577         compile_resource_data): Constify.
3578         * jcf-write.c (jcf_write_base_directory): Similarly.
3579         * jcf.h (jcf_write_base_directory): Similarly.
3580         * lang.c: Include j-options.h.
3581         (cl_options_count, cl_options, string_option, java_decode_option,
3582         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3583         process_option_with_no): Remove.
3584         (resource_name): Constify.
3585         (LANG_HOOKS_HANDLE_OPTION): Override.
3586         (java_handle_option): New.
3587         (java_init): Don't call jcf_path_init.
3588         (java_init_options): Call jcf_path_init.
3589         * lang.opt: New.
3590         * resource.c (compile_resource_data, compile_resource_file): Constify.
3591
3592 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
3593
3594         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3595         (struct lang_decl_func): Add last_line field.
3596         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3597         DECL_SOURCE_LINE_LAST): Remove.
3598         * parse.y (missing_return_error, finish_method_declaration,
3599         lookup_cl, start_artificial_method_body, source_end_java_method,
3600         start_complete_expand_method): Adjust.
3601
3602 2003-06-08  Tom Tromey  <tromey@redhat.com>
3603
3604         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3605         fno-assume-compiled.
3606
3607 2003-06-08  Roger Sayle  <roger@eyesopen.com>
3608
3609         * builtins.c (define_builtin_type, builtin_types): Delete.
3610         (define_builtin): Rewritten to take just the built-in code,
3611         the function's name, type and fallback library function name.
3612         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3613         (initialize_builtins): Overhaul to define the GCC builtins
3614         used by gcj manually, providing the Java run-time's
3615         implementations as the fallback library function.
3616
3617 2003-06-08  Anthony Green  <green@redhat.com>
3618
3619         * parse.y (patch_cast): Fix conversions from floating-point to
3620         integral types.
3621
3622 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
3623
3624         * Make-lang.in: Update.
3625         * lang.c: Include opts.h. Define cl_options_count and cl_options.
3626
3627 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3628
3629         * lang.c (java_init_options): Update.
3630
3631 2003-06-05  Jan Hubicka  <jh@suse.cz>
3632
3633         * Make-lang.in:  Add support for stageprofile and stagefeedback
3634
3635 2003-05-31  Roger Sayle  <roger@eyesopen.com>
3636
3637         * lang.c (java_init_options): Prescribe wrap-around two's
3638         complement arithmetic overflow by setting flag_wrapv.
3639
3640 2003-05-29  Roger Sayle  <roger@eyesopen.com>
3641
3642         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3643         (builtin_record): Add an additional builtin_code field to
3644         record which GCC built-in corresponds to the Java function.
3645         (java_builtins):  Add new entries for atan, atan2, exp, log,
3646         pow and tan.
3647         (max_builtin, min_builtin, abs_builtin): Perform constant
3648         folding on the resulting tree.
3649         (java_build_function_call_expr): Likewise, perform constant
3650         folding on the resulting tree.
3651         (initialize_builtins): The NULL creators are now allowed in
3652         the java_builtins table, which is now terminated by an entry
3653         with builtin_code == END_BUILTINS.
3654         (check_for_builtin): Likewise.  If the matching creator is
3655         NULL, construct the call using java_build_function_call_expr
3656         directly with the decl for the corresponding builtin_code.
3657
3658 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3659
3660         * win32-host.c: Normalize copyright boilerplate.
3661
3662 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3663
3664         * parse.y (print_int_node): Use string concatentation on
3665         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3666         function calls into one.
3667
3668 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
3669
3670         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3671         fatal_io_error with calls to fatal_error; add ": %m" to the end of
3672         all the affected error messages.
3673
3674 2003-05-13  Richard Henderson  <rth@redhat.com>
3675
3676         * class.c (layout_class_method): Set DECL_EXTERNAL.
3677         * decl.c (java_mark_decl_local, java_mark_class_local): New.
3678         * java-tree.h (java_mark_class_local): Declare.
3679         * jcf-parse.c (parse_class_file): Use it.
3680         * parse.y (java_expand_classes): Likewise.
3681
3682 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
3683
3684         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3685         * lex.h: #include input.h.
3686         * jv-scan.c (input_filename): Remove.
3687
3688 2003-05-02  Tom Tromey  <tromey@redhat.com>
3689
3690         PR java/10491:
3691         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3692         (handle_inner_classes): New function.
3693
3694 2003-05-01  Tom Tromey  <tromey@redhat.com>
3695
3696         PR java/10459:
3697         * parse.y (finish_for_loop): Do nothing if update expression is a
3698         EXPR_WFL_NODE wrapping nothing.
3699         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3700
3701 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
3702
3703         * lex.h (input_lineno): Remove declaration.
3704         * parse-scan.y: #include input.h.
3705         (input_filename): Remove declaration.
3706         (input_location): Add definition.
3707         (input_line): Remove definition.
3708
3709 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3710
3711         * lex.h (lineno): Rename to ...
3712         (input_line): ... here
3713         * parse-scan.y (lineno): Rename to ...
3714         (input_line): ... here.
3715         (reset_report): Rename lineno to input_line.
3716         * check-init.c (check_init): Likewise.
3717         * class.c (push_class): Likewise.
3718         * decl.c (complete_start_java_method, end_java_method): Likewise.
3719         * expr.c (expand_byte_code): Likewise.
3720         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3721         * jcf-write.c (generate_bytecode_insns): Likewise.
3722         * lex.c (java_init_lex, java_allocate_new_line,
3723         do_java_lex): Likewise.
3724         * parse.h (YYNOT_TWICE): Likewise.
3725         * parse.y (empty_statement, expression_statement,
3726         java_pop_parser_context, java_parser_context_save_global,
3727         yyerror, register_fields, method_header, safe_layout_class,
3728         find_in_imports_on_demand, create_artificial_method,
3729         source_end_java_method, start_complete_expand_method,
3730         build_thisn_assign, java_complete_lhs,
3731         maybe_absorb_scoping_block): Likewise.
3732
3733 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
3734
3735         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3736         '/' when computing java source filename
3737
3738 2003-04-13  Tom Tromey  <tromey@redhat.com>
3739
3740         * gjavah.c (print_c_decl): Indentation fix.
3741
3742 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3743
3744         * class.c (make_field_value, make_method_value, get_dispatch_table)
3745         (make_class_data, emit_offset_symbol_table)
3746         * constants.c (build_constants_constructor)
3747         * java-tree.h (START_RECORD_CONSTRUCTOR)
3748         * parse.y (maybe_build_array_element_wfl):
3749         Use build_constructor.
3750
3751 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
3752
3753         PR java/10253:
3754         * parse.y (string_convert_int_cst): Always use at least one digit
3755         in string conversion. Remove ASCII dependence.
3756         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3757
3758 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
3759
3760         * Make-lang.in: added win32-host.c
3761         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3762         resolves to open() on non-Win32 platforms and
3763         Win32-specific jcf_open_exact_case() on Win32
3764         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3765         when trying .java and .class files
3766         * win32-host.c: added to repository. Defines
3767         Win32-specific jcf_open_exact_case()
3768
3769 2003-04-10  Andrew Haley  <aph@redhat.com>
3770
3771         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3772         (maybe_free_localvar): Renamed from localvar_free.
3773         Add new arg, really.
3774         (generate_bytecode_insns): Set new variable, jsrs.
3775         Only free local vars if no jsr insns have been emittted.
3776         Call maybe_free_localvar, not localvar_free.
3777
3778 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
3779
3780         * gcj.texi: Remove @ at start of file.
3781
3782 2003-03-25  Tom Tromey  <tromey@redhat.com>
3783
3784         * parse.y (create_interface): Call CHECK_DEPRECATED.
3785
3786 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
3787
3788         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3789
3790 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3791
3792         * javaop.h (jfloat, jdouble): Make them structures mirroring
3793         the bit fields of IEEE float and double respectively.
3794         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3795         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3796         (union Word, union DWord): Delete.
3797         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3798
3799         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3800         D_NAN_MASK): Delete.
3801         (jni_print_float, jni_print_double): New.  Generate
3802         hexadecimal floating constants.
3803         (print_field_info): Use jni_print_float/double.
3804
3805         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
3806         finite floating point numbers for output; special case
3807         non-finite floats.
3808
3809 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3810
3811         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3812         Replace 0 and 1 with true and false in return statements.
3813
3814 2003-03-19  Tom Tromey  <tromey@redhat.com>
3815
3816         * lex.c (do_java_lex): Renamed from java_lex.
3817         (java_lex): New function.
3818         Include timevar.h.
3819
3820 2003-03-13  Tom Tromey  <tromey@redhat.com>
3821
3822         * parse.y (resolve_inner_class): Error if qualifier is a primitive
3823         type.
3824
3825 2003-03-04  Andrew Haley  <aph@redhat.com>
3826
3827         * gjavah.c (is_first_data_member): New global variable.
3828         (print_c_decl): If it's the first data member, align it as the
3829         superclass.
3830         (process_file): Set is_first_data_member.
3831
3832 2003-03-11  Tom Tromey  <tromey@redhat.com>
3833
3834         * parse.y (resolve_field_access): Initialize class if field is
3835         found in another static field.
3836         * expr.c (build_class_init): Don't optimize out initialization of
3837         implemented interface.
3838
3839 2003-03-11  Andrew Haley  <aph@redhat.com>
3840
3841         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3842         warning.
3843
3844 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3845
3846         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3847         and DIR_SEPARATOR_2 for a target.
3848         Correct minor typos.
3849
3850         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3851         and DIR_SEPARATOR_2 for a target into account.
3852
3853 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3854
3855         * lang.c (java_init): Update prototype, move code to java_post_options.
3856         (java_post_options): Similarly.
3857
3858 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
3859
3860         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3861         compare file name components depending on the case-sensitivity
3862         or otherwise of the host file system.
3863
3864         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3865         "strcmp" to compare file name components.
3866         Use IS_DIR_SEPARATOR instead of comparing directly against
3867         DIR_SEPARATOR.
3868         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3869         comparing directly against DIR_SEPARATOR.
3870
3871 2003-03-04  Tom Tromey  <tromey@redhat.com>
3872
3873         * Make-lang.in (java.tags): New target.
3874
3875 2003-03-01  Roger Sayle  <roger@eyesopen.com>
3876
3877         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3878         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3879
3880 2003-03-01  Tom Tromey  <tromey@redhat.com>
3881
3882         * parse.y (jdep_resolve_class): Only check deprecation if we found
3883         a decl.
3884
3885 2003-02-28  Tom Tromey  <tromey@redhat.com>
3886
3887         PR java/9695:
3888         * class.c (maybe_layout_super_class): Always pass a WFL to
3889         do_resolve_class.
3890         * parse.y (do_resolve_class): Updated comment to explain
3891         parameters.
3892
3893 2003-02-26  Tom Tromey  <tromey@redhat.com>
3894
3895         * jcf-write.c (generate_classfile): Check whether class is
3896         deprecated before writing attribute count.
3897
3898 2003-02-25  Roger Sayle  <roger@eyesopen.com>
3899
3900         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3901         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3902
3903 2003-02-23  Tom Tromey  <tromey@redhat.com>
3904
3905         * lang-options.h: Added -Wdeprecated.
3906         * gcj.texi (Warnings): Document -Wdeprecated.
3907         * java-tree.h (flag_deprecated): Declare.
3908         * lang.c (lang_W_options): Added deprecated.
3909         (flag_deprecated): New global.
3910         * chartables.h: Rebuilt.
3911         * gen-table.pl (process_one): Look at whitespace.
3912         (print_tables): Define LETTER_SPACE, LETTER_MASK.
3913         * parse.h (CLEAR_DEPRECATED): New macro.
3914         (CHECK_DEPRECATED_NO_RESET): New macro.
3915         * jcf-parse.c (handle_deprecated): New function.
3916         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3917         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3918         * parse.y (resolve_type_during_patch): Check deprecation.
3919         (jdep_resolve_class): Likewise.
3920         (process_imports): Likewise.
3921         (resolve_expression_name): Likewise.
3922         (check_deprecation): Strip arrays from decl.  Check
3923         flag_deprecated.
3924         (patch_method_invocation): Also check the particular constructor
3925         for deprecation.
3926         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3927         * jcf-write.c (append_deprecated_attribute): New function.
3928         (generate_classfile): Generate deprecated attribute when
3929         appropriate.
3930         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
3931         (java_lex) [case '*']: Simplify logic.
3932         (java_start_char_p): Use LETTER_MASK.
3933         (java_part_char_p): Likewise.
3934         (java_space_char_p): New function.
3935
3936 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3937
3938         Change base class access representation.
3939         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3940         (add_interface_do): Likewise.
3941
3942 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
3943
3944         * decl.c (java_init_decl_processing): Change
3945         soft_lookupjnimethod_node to reflect the change in
3946         signature of _Jv_LookupJNIMethod in libjava/jni.cc
3947         * expr.c (build_jni_stub): Calculate and pass the size
3948         on the stack of the arguments to a JNI function. Use
3949         new target macro MODIFY_JNI_METHOD_CALL to allow a
3950         target to modify the call to a JNI method.
3951
3952 2003-02-08  Roger Sayle  <roger@eyesopen.com>
3953
3954         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3955         instead of basename to avoid compiler warnings on Tru64.
3956
3957 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
3958
3959         * gcj.texi: Update to GFDL 1.2.
3960
3961 2003-01-31  Andrew Haley  <aph@redhat.com>
3962
3963         * parse.y (java_expand_classes): Scan the whole class list looking
3964         for access methods that haven't yet been expanded.
3965
3966 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3967
3968         Fix for java/4269:
3969
3970         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3971         to fix bootstrap on sparc-unknown-netbsdelf1.5.
3972         * jcf-parse.c: Likewise.
3973
3974 2003-01-31  Mark Wielaard  <mark@klomp.org>
3975
3976         * gjavah.c (throwable_p): Allocate 1 more byte for string.
3977
3978 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3979
3980         * class.c (make_class): Use BINFO_ELTS.
3981         (set_super_info): Likewse.
3982         (add_interface_do): Likewise.
3983
3984 2003-01-30  Tom Tromey  <tromey@redhat.com>
3985
3986         * jcf-parse.c (read_class): Update identifier's class value if it
3987         changed during parsing.
3988
3989 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
3990
3991         * Make-lang.in (po-generated): Find the targets in $(parsedir).
3992         Propagate change to all other rules as required.
3993         (java/parse-scan.o): Add explicit dependency on
3994         $(parsedir)/java/parse-scan.c .
3995
3996 2003-01-29  Tom Tromey  <tromey@redhat.com>
3997
3998         * parse.y (patch_assignment): Only transform the rhs of an
3999         assignment when compiling to native.
4000
4001 2003-01-28  Tom Tromey  <tromey@redhat.com>
4002
4003         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
4004
4005 2003-01-28  Tom Tromey  <tromey@redhat.com>
4006
4007         * lex.c (java_lex): Don't include UEOF as part of token.
4008         (java_read_unicode): Error if \u sequence prematurely terminated.
4009
4010 2003-01-27  Tom Tromey  <tromey@redhat.com>
4011
4012         * parse.y (java_check_regular_methods): Check for construct after
4013         checking types in throws clause.
4014
4015 2003-01-24  Tom Tromey  <tromey@redhat.com>
4016
4017         * class.c (build_static_field_ref): Only a String or numeric field
4018         can fold to a constant.
4019
4020 2003-01-23  Tom Tromey  <tromey@redhat.com>
4021
4022         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
4023         file name in resource buffer.
4024
4025 2003-01-23  Tom Tromey  <tromey@redhat.com>
4026
4027         * expr.c (build_known_method_ref): Use method's context to find
4028         method table index.
4029
4030 2003-01-23  Tom Tromey  <tromey@redhat.com>
4031
4032         * constants.c (set_constant_entry): Allocated cleared memory.
4033
4034 2003-01-22  Tom Tromey  <tromey@redhat.com>
4035
4036         * java-tree.h: Don't use PARAMS.
4037         * resource.c: Add prototypes for all functions.
4038         (write_resource_constructor): Use `const char *' to avoid
4039         warning.
4040
4041 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
4042
4043         * jcf-parse.c (process_zip_dir): Remove unused variable.
4044
4045 2003-01-22  Tom Tromey  <tromey@redhat.com>
4046
4047         * expr.c (build_invokeinterface): Abort if method's context is not
4048         an interface.
4049
4050 2003-01-22  Tom Tromey  <tromey@redhat.com>
4051
4052         * gcj.texi (Input and output files): Mention non-class entries.
4053         * decl.c (java_init_decl_processing): Call
4054         init_resource_processing.
4055         * java-tree.h (compile_resource_data, write_resource_constructor,
4056         compile_resource_file, init_resource_processing): Declare.
4057         * config-lang.in (gtfiles): Added resource.c.
4058         * Make-lang.in (gt-java-resource.h): New target.
4059         (JAVA_OBJS): Added resource.o.
4060         (java/resource.o): New target.
4061         * resource.c: New file.
4062         * class.c (compile_resource_file): Moved to resource.c.
4063         (registerResource_libfunc): Likewise.
4064         (utf8_decl_list): Mark with GTY; now static.
4065         * jcf-parse.c (classify_zip_file): New function.
4066         (parse_zip_file_entries): Use it; compile .properties files.
4067         (process_zip_dir): Use classify_zip_file and compute_class_name.
4068         Don't write class name into zip directory.
4069         (java_parse_file): Call write_resource_constructor.
4070         (compute_class_name): New function.
4071         * jcf-io.c (read_zip_member): Reindented.
4072
4073 2003-01-21  Tom Tromey  <tromey@redhat.com>
4074
4075         * class.c (supers_all_compiled): New function.
4076         (make_class_data): Use it.
4077
4078 2003-01-21  Tom Tromey  <tromey@redhat.com>
4079
4080         * parse.y (method_header): Native method can't be strictfp.
4081         No method can be transient or volatile.
4082
4083 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4084
4085         Make-lang.in (jvspec.o-warn): Add -Wno-error.
4086
4087 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
4088
4089         * check-init.c: Fix comment typos.
4090         * class.c: Likewise.
4091         * constants.c: Likewise.
4092         * decl.c: Likewise.
4093         * except.c: Likewise.
4094         * expr.c: Likewise.
4095         * java-except.h: Likewise.
4096         * java-tree.h: Likewise.
4097         * javaop.h: Likewise.
4098         * jcf-dump.c: Likewise.
4099         * jcf-io.c: Likewise.
4100         * jcf-parse.c: Likewise.
4101         * jcf-write.c: Likewise.
4102         * lang.c: Likewise.
4103         * mangle.c: Likewise.
4104         * typeck.c: Likewise.
4105         * verify.c: Likewise.
4106
4107 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4108
4109         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
4110         * jcf-write.c: Include "tm_p.h".
4111
4112 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4113
4114         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
4115
4116 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4117
4118         * builtins.c (java_build_function_call_expr): Renamed from
4119         build_function_call_expr.  All callers changed.
4120
4121         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
4122         * jcf-parse.c: Include tm_p.h.
4123
4124         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
4125         warning.
4126
4127 2003-01-14  Tom Tromey  <tromey@redhat.com>
4128
4129         * class.c (make_class_data): Check that super is compiled before
4130         building class reference to it.
4131
4132 2003-01-14  Andrew Haley  <aph@redhat.com>
4133
4134         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4135         varargs function -- correct.
4136
4137 2003-01-14  Andrew Haley  <aph@redhat.com>
4138
4139         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
4140
4141 2003-01-14  Andrew Haley  <aph@redhat.com>
4142
4143         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4144         varargs function -- correct.
4145
4146         * parse.y (patch_assignment): Copy the rhs of an assignment into a
4147         temporary if the RHS is a reference.
4148
4149 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4150
4151         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
4152         * keyword.h: Regenerated.
4153
4154         * All Files: Convert to ISO C style function definitions.
4155
4156 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4157
4158         * parse.y (check_pkg_class_access): ANSIfy definition.
4159
4160 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4161
4162         * decl.c, parse-scan.y, parse.y: Don't cast return value of
4163         xmalloc et al.
4164
4165         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
4166
4167 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4168
4169         Merge from pch-branch:
4170
4171         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
4172
4173         * Make-lang.in (java/gjavah.o): Update dependencies.
4174         * gjavah.c: Include ggc.h.
4175
4176         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
4177
4178         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
4179         (JCFDUMP_OBJS): Add ggc-none.o.
4180         (java/jcf-dump.o): Depend on GGC_H.
4181         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
4182         CPool substructures.
4183         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
4184         * jcf-dump.c: Include ggc.h.
4185
4186         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4187
4188         * jcf.h (union cpool_entry): New.
4189         (struct CPool): Use gengtype to mark.  Change field 'data' to be
4190         an array of unions.
4191         (struct JCF): Use gengtype to mark.
4192         (CPOOL_UINT): Update for new cpool_entry type.
4193         (CPOOL_USHORT1): Likewise.
4194         (CPOOL_USHORT2): Likewise.
4195         (CPOOL_FINISH): Use GC to free cpool subfields.
4196         * parse.h (struct parser_ctxt): Mark field current_jcf.
4197         * lex.c (java_init_lex): Use GC to allocate struct JCF.
4198         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
4199         (main_jcf): Use gengtype to mark.
4200         (ggc_mark_jcf): Delete.
4201         (get_constant): Update for new cpool_entry type.
4202         (give_name_to_class): Likewise.
4203         (get_class_constant): Likewise.
4204         (init_outgoing_cpool): Use GGC to allocate struct CPool.
4205         (java_parse_file): Use GGC to allocate struct JCF.
4206         (init_jcf_parse): Don't call ggc_add_root.
4207         * jcf-reader.c (jcf_parse_constant_pool): Update for new
4208         cpool_entry type.
4209         * java-tree.h (current_jcf): Use gengtype to mark.
4210         (CPOOL_UTF): Update for new cpool_entry type.
4211         (outgoing_cpool): Use gengtype to mark.
4212         (struct lang_type): GC struct JCF and struct CPool.
4213         * config-lang.in (gtfiles): Add jcf.h.
4214         * constants.c (find_tree_constant): New.
4215         (set_constant_entry): Allocate cpool subfields using GGC.  Update
4216         for new cpool_entry type.
4217         (find_constant1): Update for new cpool_entry type.
4218         (find_constant2): Likewise.
4219         (find_utf8_constant): Use find_tree_constant.
4220         (find_class_or_string_constant): Remove unnecessary cast to jword.
4221         Update for new cpool_entry type.
4222         (count_constant_pool_bytes): Update for new cpool_entry type.
4223         (write_constant_pool): Likewise.
4224         (alloc_name_constant): Use find_tree_constant.
4225         (build_constants_constructor): Update for new cpool_entry type.
4226
4227         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4228
4229         * parse.y (mark_parser_ctxt): Delete.
4230         (goal): Don't use ggc_add_root.
4231         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
4232         (java_pop_parser_context): Let GC free parser_ctxt.
4233         (java_parser_context_resume): Likewise.
4234         * parse.h (struct parser_ctxt): Use gengtype to mark.
4235         (ctxp): Likewise.
4236         (ctxp_for_generation): Likewise.
4237         * lex.h (struct java_lc_s): Mark for gengtype.
4238         (java_lexer): Rearrange for gengtype.
4239         * config-lang.in (gtfiles): Add lex.h, parse.h.
4240
4241 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4242
4243         * All Files: Remove PARAMS macro.
4244
4245         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
4246         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
4247         `__STDC__' macros.
4248
4249         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
4250         VA_CLOSE.
4251
4252 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4253
4254         * Make-lang.in (java.install-common, java.uninstall,
4255         java.install-info, java.install-man): Prepend $(DESTDIR)
4256         to destination paths in all (un)installation commands.
4257         (java.install-common): Rewrite $(LN) command to support
4258         DESTDIR with "ln" as well as with "ln -s".
4259
4260 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4261
4262         * java-tree.h: Protect against multiple inclusion.
4263
4264 2003-01-07  Tom Tromey  <tromey@redhat.com>
4265
4266         * class.c (add_assume_compiled): Don't adjust parent if we're
4267         already at the root of tree.
4268
4269 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4270
4271         * lang.c (dump_compound_expr): Prototype.
4272
4273 2003-01-03  Tom Tromey  <tromey@redhat.com>
4274
4275         Fix for PR java/8712:
4276         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
4277         when simply checking against `null'.
4278
4279 2003-01-03  Tom Tromey  <tromey@redhat.com>
4280
4281         * gcj.texi (Standard Properties): Document http.proxyHost and
4282         http.proxyPort.
4283
4284         * gcj.texi (GNU Classpath Properties): Document new properties.
4285
4286 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4287
4288         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
4289         java/lang-options.h, java/mangle.c, java/mangle_name.c,
4290         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
4291
4292 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4293
4294         * Make-lang.in, boehm.c, buffer.c,
4295           buffer.h, builtins.c, class.c,
4296           config-lang.in, constants.c,
4297           convert.h, decl.c, except.c,
4298           expr.c, java-except.h,
4299           java-tree.h, javaop.def,
4300           jcf-parse.c, jcf-write.c,
4301           jv-scan.c, jvgenmain.c,
4302           jvspec.c, keyword.gperf,
4303           keyword.h, lang-options.h,
4304           lang-specs.h, lang.c, lex.c,
4305           lex.h, mangle.c, mangle_name.c,
4306           parse-scan.y, parse.h, parse.y,
4307           typeck.c, verify.c, xref.c,
4308           xref.h: Replace "GNU CC" with
4309           "GCC" in the copyright header.
4310
4311         * check-init.c, gjavah.c, javaop.h,
4312           jcf-depend.c, jcf-dump.c, jcf-io.c,
4313           jcf-path.c, jcf-reader.c, jcf.h,
4314           zextract.c, zipfile.h: These files are
4315           "part of GCC". Also say "GCC" not "GNU CC".
4316
4317 2002-12-30  DJ Delorie  <dj@redhat.com>
4318
4319         * Make-lang.in: Protect against texi2pod/pod2man failing.
4320
4321 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
4322
4323         * gcj.texi: Use @copying.
4324
4325 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4326
4327         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
4328         print_cxx_classname.
4329         (print_cxx_classname): Add add_scope parameter.
4330         (print_class_decls): Do not emit a semicolon after the extern
4331         "Java" block.
4332         (process_file): Adjust calls to print_cxx_classname.
4333
4334 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4335
4336         * gcj.texi: Include Cover Texts in man page.
4337
4338 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
4339
4340         * class.c (build_static_field_ref): Check FIELD_FINAL.
4341
4342         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
4343         instead of current_constant_pool_data_ref.
4344         * java-tree.h (current_constant_pool_data_ref): Undefine.
4345         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
4346         * jcf-parse.c (init_outgoing_cpool): Don't initialize
4347         current_constant_pool_data_ref.
4348
4349         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
4350         not build_internal_class_name.
4351
4352         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
4353         Use it when class ref isn't certain to be compiled.
4354
4355 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4356
4357         * gcj.texi: Include gcc-common.texi.
4358         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
4359         $(srcdir)/doc/include/gcc-common.texi.
4360
4361 2002-12-22  Anthony Green  <green@redhat.com>
4362
4363         * gcj.texi (Limitations): Add note about org.xml.sax and
4364         org.w3c.dom.
4365
4366 2002-12-20  Tom Tromey  <tromey@redhat.com>
4367
4368         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
4369         where minimum case value is Integer.MIN_VALUE.
4370         Fixes PR java/8955.
4371
4372 2002-12-18  Andrew Haley  <aph@redhat.com>
4373
4374         * parse.y (patch_invoke): Force evaluation order when `check' is
4375         set.  For PR libgcj/8945.
4376
4377 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
4378
4379         * gcj.texi: Change version number to 3.4.
4380
4381 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
4382         Andrew Haley <aph@redhat.com>
4383
4384         * parse.y (source_end_java_method): Remove custom encoding of line
4385         numbers for a function decl before passing it to the back end.
4386
4387 2002-12-03  Andrew Haley  <aph@redhat.com>
4388
4389         * class.c (make_class_data): New field, "chain".
4390         * decl.c (java_init_decl_processing): Likewise.
4391
4392 2002-12-02  Tom Tromey  <tromey@redhat.com>
4393
4394         For PR java/8740:
4395         * parse.y (do_resolve_class): Handle qualified name via
4396         recursion.
4397
4398 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4399
4400         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
4401         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
4402         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
4403         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
4404         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
4405         Include coretypes.h and tm.h.
4406         * Make-lang.in: Update dependencies.
4407
4408 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4409
4410         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
4411
4412 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4413
4414         * jcf-reader.c: Don't expand JCF_readu4 inside the
4415         expansion of JCF_SKIP.
4416
4417 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4418
4419         * jcf-reader.c: Don't expand JCF_readu4 inside the
4420         expansion of JCF_SKIP.
4421
4422 2002-11-22  Tom Tromey  <tromey@redhat.com>
4423
4424         * parse.y (patch_binop): Cast right hand side of shift expression
4425         to `int'.  Fixes PR java/8676.
4426
4427 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
4428             Andrew Haley <aph@redhat.com>
4429
4430         * gcc/java/jcf-write.c (write_classfile): Remove target
4431         class file, if it exists, before renaming the temporary
4432         class file to it.
4433
4434 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
4435
4436         * jvspec.c (lang_specific_spec_functions): New.
4437
4438 2002-11-18  Tom Tromey  <tromey@redhat.com>
4439
4440         Fix for PR java/7912:
4441         * expr.c (can_widen_reference_to): Allow cast of array to
4442         Cloneable or Serializable.
4443         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4444         (java_io_serializable_identifier_node): Likewise.
4445         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4446         (valid_ref_assignconv_cast_p): Use new identifier nodes.
4447         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4448         java_io_serializable.
4449         * decl.c (java_init_decl_processing): Initialize
4450         java_lang_cloneable_identifier_node and
4451         java_io_serializable_identifier_node.
4452         (java_lang_cloneable_identifier_node): New global.
4453         (java_io_serializable_identifier_node): Likewise.
4454
4455 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
4456
4457         * buffer.c: Remove unnecessary casts.
4458         * check-init.c: Likewise.
4459         * class.c: Likewise.
4460         * constants.c: Likewise.
4461         * decl.c: Likewise.
4462         * except.c: Likewise.
4463         * gjavah.c: Likewise.
4464         * jcf-io.c: Likewise.
4465         * jcf-parse.c: Likewise.
4466         * jcf-path.c: Likewise.
4467         * jvspec.c: Likewise.
4468         * lang.c: Likewise.
4469         * lex.c: Likewise.
4470         * verify.c: Likewise.
4471
4472 2002-11-06  Tom Tromey  <tromey@redhat.com>
4473
4474         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4475         a JNI header.
4476
4477 2002-11-05  Tom Tromey  <tromey@redhat.com>
4478
4479         Fix for PR java/6388.
4480         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4481         * java-tree.h (enum java_tree_index): New values
4482         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4483         (decimal_int_max, decimal_long_max): New defines.
4484         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
4485         (error_if_numeric_overflow): Rewrote range checking.
4486         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4487         decimal_long_max.
4488
4489 2002-11-02  Tom Tromey  <tromey@redhat.com>
4490
4491         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4492
4493         * class.c (make_method_value): Put class name, not signature, into
4494         `throws' field.  For PR java/8415.
4495
4496 2002-10-24  Tom Tromey  <tromey@redhat.com>
4497
4498         * gcj.texi (Invoking gij): Document --showversion.
4499         (Standard Properties): java.library.path now set.
4500
4501 2002-10-23  Tom Tromey  <tromey@redhat.com>
4502
4503         * gjavah.c (decode_signature_piece): In JNI mode, print
4504         `jobjectArray' when array depth is nonzero.
4505         Fixes PR java/8296.
4506
4507 2002-10-15  Andrew Haley  <aph@redhat.com>
4508
4509         * parse.y (patch_invoke): Call force_evaluation_order on a static
4510         arg list.
4511         (resolve_qualified_expression_name): Call force_evaluation_order
4512         on a arg list that is part of a Qualified Expression Name.
4513
4514         * lang.c (dump_compound_expr): New.
4515         (java_dump_tree): New.
4516
4517 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
4518
4519         * gcj.texi: Added item describing the GCJ runtime property
4520         "gnu.gcj.progname".
4521
4522 2002-10-15  Richard Henderson  <rth@redhat.com>
4523
4524         * jcf-parse.c (get_constant): Fix type warning.
4525
4526 2002-10-15  Andrew Haley  <aph@redhat.com>
4527
4528         * java-tree.h (java_inlining_merge_static_initializers): Declare.
4529         (java_inlining_map_static_initializers): Declare.
4530
4531 2002-10-14  Andrew Haley  <aph@redhat.com>
4532
4533         * tree-inline.c (remap_block): All local class initialization
4534         flags go in the outermost scope.
4535         (expand_call_inline): Call java_inlining_map_static_initializers.
4536         (expand_call_inline): Call java_inlining_merge_static_initializers.
4537         * java/lang.c (merge_init_test_initialization): New.
4538         (java_inlining_merge_static_initializers): New.
4539         (inline_init_test_initialization): New.
4540         (java_inlining_map_static_initializers): New.
4541
4542 2002-10-11  Mark Wielaard  <mark@klomp.org>
4543
4544         * gcj.texi (Compatibility): Add Limitations and Extensions section.
4545
4546 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4547
4548         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4549
4550 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4551
4552         * parse.y (merge_string_cste): Add parentheses around & within |.
4553
4554 2002-10-08  Tom Tromey  <tromey@redhat.com>
4555
4556         * parse.y (variable_declarator_id): Simplify error path for
4557         array declarator error.  For PR java/8003.
4558
4559 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
4560
4561         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
4562         bug_report_url.
4563
4564 2002-10-08  Andrew Haley  <aph@redhat.com>
4565
4566         * parse.y (attach_init_test_initialization_flags): Check for
4567         error_mark_node.
4568
4569 2002-10-07  Anthony Green  <green@redhat.com>
4570
4571         * parse.y (merge_string_cste): Fix bug in string concatenation.
4572
4573 2002-10-03  Michael Koch  <konqueror@gmx.de>
4574
4575         * gcj.texi (Standard properties):
4576         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4577
4578 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4579
4580         PR optimization/6627
4581         * lang.c (java_init): If storing the vbit in function
4582         pointers, ensure that force_align_functions_log is atleast
4583         one to aid compatability with g++ vtables.
4584
4585 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
4586
4587         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4588         foul of type-based aliasing.
4589
4590 2002-09-30  Anthony Green  <green@redhat.com>
4591
4592         * gcj.texi (Invoking jv-scan): Fix texinfo.
4593
4594 2002-09-28  Anthony Green  <green@redhat.com>
4595
4596         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4597         (Code Generation): Add -fno-assert documentation.
4598         * jv-scan.c (flag_assert): New global.
4599         (options): Add assert option.
4600         (help): Add --no-assert documentation.
4601         * parse-scan.y (flag_assert): New global.
4602         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4603         (flag_assert): New global.
4604         * java-tree.h (flag_assert): New global.
4605         * lex.c (java_lex): Obey flag_assert.
4606         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4607         calling cc1.
4608
4609 2002-09-26  Andrew Haley  <aph@redhat.com>
4610
4611         * expr.c (build_java_array_length_access): Check for null pointer.
4612         * expr.c (expand_java_arrayload): Likewise.
4613
4614 2002-09-21  Richard Henderson  <rth@redhat.com>
4615
4616         * jcf-parse.c (get_constant): Decode from IEEE no matter
4617         what the target format.
4618
4619 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
4620
4621         * ChangeLog: Follow spelling conventions.
4622         * class.c: Likewise.
4623         * decl.c: Likewise.
4624         * expr.c: Likewise.
4625         * gjavah.c: Likewise.
4626         * java-tree.h: Likewise.
4627         * jcf-dump.c: Likewise.
4628         * jcf-parse.c: Likewise.
4629         * jvspec.c: Likewise.
4630         * lang.c: Likewise.
4631         * mangle.c: Likewise.
4632         * parse.y: Likewise.
4633
4634 2002-09-17  Tom Tromey  <tromey@redhat.com>
4635
4636         * lex.c (java_read_unicode_collapsing_terminators): Handle case
4637         where \r appears at EOF.  Fixes PR java/7950.
4638
4639 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4640
4641         * jvspec.c (lang_specific_driver): Remove unused variable.
4642
4643 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4644
4645         * java-tree.h (union lang_tree_node): Add chain_next option.
4646
4647 2002-09-16  Richard Henderson  <rth@redhat.com>
4648
4649         * jcf-parse.c (get_constant): Runtime check for IEEE format;
4650         use new real.h interface.
4651         * jcf-write.c (find_constant_index): Use new real.h interface.
4652         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4653
4654 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4655
4656         * lang.c: Follow spelling conventions.
4657
4658 2002-09-11  Per Bothner  <per@bothner.com>
4659
4660         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
4661         constant to the type of the field.
4662         (java_complete_tree):  Remove now-redundant code.
4663
4664         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
4665
4666 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
4667
4668         For PR java/5794:
4669         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4670         return label if a ret instruction for the jsr has been reached.
4671
4672 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
4673
4674         * parse.y (DIR_SEPARATOR): Don't define.
4675         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4676
4677 2002-08-28  Andrew Haley  <aph@redhat.com>
4678
4679         * verify.c (verify_jvm_instructions): Allow exception handler
4680         inside code that is being protected, but generate a warning.
4681         * except.c (link_handler): Initialize `expanded' in new eh_range.
4682         (binding_depth, is_class_level, current_pc): Declare extern.
4683
4684 2002-09-01  Mark Wielaard <mark@klomp.org>
4685
4686         * gcj.texi: Add chapter about system properties.
4687         Fixed some typos.
4688
4689 2002-08-26  Tom Tromey  <tromey@redhat.com>
4690
4691         * parse.y (try_builtin_assignconv): Allow narrowing primitive
4692         conversion if RHS_TYPE is byte, short, or char.
4693
4694 2002-08-22  Tom Tromey  <tromey@redhat.com>
4695
4696         * gcj.texi (Invoking gij): Document -cp and -classpath.
4697
4698 2002-08-21  Tom Tromey  <tromey@redhat.com>
4699
4700         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4701         $(prefix)/share.  For PR libgcj/7633.
4702
4703         For PR java/6005 and PR java/7611:
4704         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4705         (java_can_use_bit_fields_p): New function.
4706
4707 2002-08-16  Tom Tromey  <tromey@redhat.com>
4708
4709         * gcj.texi (Class Initialization): Mention class initialization of
4710         arrays.
4711
4712 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
4713
4714         * Make-lang.in (java-tree-inline.o): New.
4715         (JAVA_OBJS): Add java-tree-inline.o.
4716         * parse.y (source_end_java_method): Call java_optimize_inline.
4717         (java_expand_method_bodies): Save method's tree in
4718         DECL_SAVED_TREE.
4719         (add_stmt_to_compound): Keep track of the number of statments.
4720         * lang.c (java_init): Enable flag_inline_trees.
4721         (java_post_options): If flag_inline_functions is on, enable
4722         flag_inline_trees instread.
4723         (decl_constant_value): New.
4724         (java_tree_inlining_walk_subtrees): New.
4725         * java-tree.h (DECL_NUM_STMTS): New macro.
4726         (java_optimize_inline): Declare.
4727         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4728         Handle a LABEL_EXPR.
4729         * decl.c (build_result_decl): If we already have a DECL_RESULT
4730         don't make another.
4731         (dump_function): New.
4732         (java_optimize_inline): New.
4733         (dump_function): New.
4734
4735 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
4736
4737         For PR java/7483:
4738         * parse.y (build_assertion): Invert return from
4739         desiredAssertionStatus.
4740
4741 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4742
4743         * jcf-write.c (get_access_flags): Return correct access flags for
4744         private and protected inner classes.
4745
4746 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4747
4748         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4749
4750 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4751
4752         * mangle_name.c: Don't include obstack.h twice.
4753         * xref.c: Don't include obstack.h.
4754
4755 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4756
4757         * class.c: (permanent_obstack): Delete declaration.
4758         * constants.c: (permanent_obstack): Delete declaration.
4759         * except.c: (permanent_obstack): Delete declaration.
4760         * expr.c: (permanent_obstack): Delete declaration.
4761         * jcf-parse.c: (permanent_obstack): Delete declaration.
4762         (saveable_obstack): Delete declaration.
4763         * parse.h: (permanent_obstack): Delete declaration.
4764         * typeck.c: (permanent_obstack): Delete declaration.
4765
4766 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
4767
4768         * gcj.texi (version-gcc): Increase to 3.3.
4769
4770 2002-07-22  Tom Tromey  <tromey@redhat.com>
4771
4772         * lex.c (java_lex): Check for `e' or `E' after 0.
4773
4774 2002-07-21  Richard Henderson  <rth@redhat.com>
4775
4776         * lang.c (java_unsafe_for_reeval): New.
4777         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4778
4779 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
4780
4781         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4782         (jcf_path_init): Use GET_ENVIRONMENT.
4783
4784 2002-07-10  Roger Sayle  <roger@eyesopen.com>
4785             Zack Weinberg <zack@codesourcery.com>
4786
4787         * builtins.c (initialize_builtins): Remove defines that
4788         handled C/C++ specific junk hereby removed from builtins.def.
4789
4790 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
4791
4792         * lang.c (java_post_options): Update prototype.
4793
4794 2002-07-05  Roger Sayle  <roger@eyesopen.com>
4795
4796         * builtins.c (initialize_builtins): Ignore the additional
4797         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
4798         the builtins.def file.
4799
4800 2002-07-01  Tom Tromey  <tromey@redhat.com>
4801
4802         For PR libgcj/7073:
4803         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4804         specially.
4805
4806 2002-07-01  Roger Sayle  <roger@eyesopen.com>
4807
4808         * java/decl.c (builtin_function): Accept additional parameter.
4809         (java_init_decl_processing): Pass an additional NULL_TREE
4810         argument to builtin_function.
4811
4812 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
4813
4814         * gcj.texi: Fixed gcj invocation example so that it compiles.
4815
4816 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4817
4818         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4819         * parse.y (mark_parser_ctxt): Likewise.
4820         (check_modifiers, declare_local_variables): Avoid incorrect
4821         hardcoded constant 10.
4822
4823         * lex.c (java_read_char): Avoid "comparison is always true"
4824         warning.
4825
4826 2002-06-25  Andreas Schwab  <schwab@suse.de>
4827
4828         * expr.c (JSR): Avoid undefined operation on PC.
4829
4830 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4831
4832         * decl.c (clear_binding_level): Const-ify.
4833
4834 2002-06-13  Akim Demaille  <akim@epita.fr>
4835
4836         * parse.y (class_declaration, interface_declaration): Make sure
4837         all their rules have an action, in order to avoid meaningless `$$
4838         = $1' and their type clashes.
4839
4840 2002-06-11  Tom Tromey  <tromey@redhat.com>
4841
4842         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4843         * parse-scan.y (statement_without_trailing_substatement): Added
4844         assert_statement.
4845         (assert_statement): New rule.
4846         * java-tree.h (struct lang_type) [assertions]: New field.
4847         (TYPE_USES_ASSERTIONS): New macro.
4848         (CLASS_USES_ASSERTIONS): Likewise.
4849         (FIELD_SYNTHETIC): New define.
4850         * lex.c (java_lval;): Added ASSERT_TK.
4851         * parse.y (ASSERT_TK): Added.
4852         (statement_without_trailing_substatement): Added assert_statement.
4853         (assert_statement): New rule.
4854         (build_assertion): New function.
4855         (maybe_generate_pre_expand_clinit): Create and initialize
4856         $assertionsDisabled.
4857         (lookup_package_type): Removed decl.
4858         * keyword.h: Rebuilt.
4859         * keyword.gperf (assert): New token.
4860
4861 2002-06-10  Akim Demaille  <akim@epita.fr>
4862
4863         * parse.y (interface_type_list, class_member_declaration)
4864         (unary_expression_not_plus_minus): Remove duplicate %type.
4865         Whitespace changes.
4866
4867 2002-06-09  Tom Tromey  <tromey@redhat.com>
4868
4869         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4870
4871         * parse.y (method_header): Give error message in all cases.
4872         Fixes PR java/6865.
4873
4874 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4875
4876         Don't use RTL inlining. Fix for PR java/6820.
4877         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4878         (flag_really_inline): New.
4879         (java_decode_option): Set flag_really_inline if -finline-functions
4880         is seen.
4881         (java_post_options): New function. Turn off inlining unless
4882         flag_really_inline is set.
4883
4884 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4885
4886         * gjavah.c (throwable_p): Accept argument as either a classname or
4887         signature fragment. Create null-terminated classname string for super
4888         when calling itself recursively.
4889         (decode_signature_piece): Skip first character from class name
4890         signature when calling throwable_p.
4891
4892 2002-06-08  H.J. Lu  (hjl@gnu.org)
4893
4894         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4895
4896 2002-06-04  Tom Tromey  <tromey@redhat.com>
4897
4898         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4899
4900 2002-06-04  Michael Koch  <konqueror@gmx.de>
4901
4902         * gcj.texi (Input Options): Fixed typo.
4903
4904 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
4905
4906         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4907         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4908         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4909         and all now-pointless local variables.  Rename other local
4910         variables to reflect their not being handles.
4911
4912         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4913         #if JCF_USE_STDIO blocks.
4914
4915         * parse.y: Add missing semicolon at end of rule.
4916
4917 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4918
4919         * check-init.c (attach_initialized_static_class): Delete, unused.
4920         * parse.y: Use htab_t instead of struct hashtable, update
4921         all uses.
4922         * java-tree.h: Include hashtab.h instead of hash.h.
4923         (struct lang_decl_func): Use htab_t, set up for gengtype.
4924         (struct init_test_hash_entry): Delete.
4925         (struct treetreehash_entry): New.
4926         (java_treetreehash_find): New
4927         (java_treetreehash_new): New prototype.
4928         (java_treetreehash_create): New prototype.
4929         (java_mark_tree): Delete prototype.
4930         (java_hash_hash_tree_node): Delete prototype.
4931         (java_hash_compare_tree_node): Delete prototype.
4932         (attach_initialized_static_class): Delete prototype.
4933         * expr.c (build_class_init): Update to use java_treetreehash
4934         functions.
4935         (java_expand_expr): Update to use htab_t.
4936         (emit_init_test_initialization): Likewise.
4937         * decl.c (java_mark_tree): Delete.
4938         * class.c (init_test_hash_newfunc): Delete.
4939         (java_hash_hash_tree_node): Delete.
4940         (java_hash_compare_tree_node): Delete.
4941         (add_method_1): Update to use java_treetreehash functions.
4942         (JAVA_TREEHASHHASH_H): New macro.
4943         (java_treetreehash_hash): New function.
4944         (java_treetreehash_compare): New function.
4945         (java_treetreehash_find): New function.
4946         (java_treetreehash_new): New function.
4947         (java_treetreehash_create): New function.
4948         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4949
4950         * Make-lang.in (java/parse.o): Depend on debug.h.
4951         * java-tree.h (struct lang_identifier): Use gengtype.
4952         (union lang_tree_node): New.
4953         (struct lang_decl_func): Use gengtype.
4954         (struct lang_decl_var): Likewise.
4955         (struct lang_decl): Likewise.
4956         * parse.y: Include debug.h.
4957         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4958
4959         * lang.c (struct language_function): New dummy structure.
4960
4961         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4962         descriminator for DECL_LANG_SPECIFIC.
4963         (struct lang_decl_func): Rename from struct lang_decl.
4964         (enum lang_decl_desc): New.
4965         (struct lang_decl): Make it a union.  Update all the accessor macros.
4966         (struct lang_type): Use gengtype.
4967         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4968         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4969         are now the same size.
4970         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4971         use discriminator to mark DECL_LANG_SPECIFIC.
4972
4973         * Make-lang.in (gt-java-builtins.h): New rule.
4974         (java/builtins.o): Add dependency on gt-<filename>.h.
4975         * builtins.c: Use gengtype for roots.
4976         (union string_or_tree): Use gengtype.
4977         (struct builtin_record): Use gengtype.
4978         * config-lang.in (gtfiles): Add builtins.c.
4979
4980         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4981         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4982         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4983         gt-java-parse.h, gtype-java.h): Add rules to generate.
4984         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4985         (class.o): Add dependency on gt-*.h.
4986         (constants.o): Likewise.
4987         (decl.o): Likewise.
4988         (expr.o): Likewise.
4989         (jcf-parse.o): Likewise.
4990         (jcf-write.o): Likewise.
4991         (lang.o): Likewise.
4992         * config-lang.in (gtfiles): New.
4993         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4994         * constants.c: Replace uses of ggc_add_* with GTY markers.
4995         Include gt-*.h.
4996         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4997         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4998         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4999         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
5000         Include gt-*.h.
5001         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
5002         Include gt-*.h.
5003         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5004         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
5005         gt-*.h.
5006         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5007         Include gtype-java.h.
5008
5009 2002-06-02  Tom Tromey  <tromey@redhat.com>
5010
5011         Fix for PR java/5913:
5012         * parse.y (patch_binop): Call patch_string on op1.
5013
5014 2002-06-02  Tom Tromey  <tromey@redhat.com>
5015
5016         Fix for PR java/1343, PR java/6336:
5017         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
5018         formatting.  Changed return type.
5019         (anonymous_class_counter): Moved to top of file.
5020         (maybe_make_nested_class_name): Append number to class name for
5021         function-local classes.
5022
5023 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5024
5025         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
5026         * Make-lang.in: Update dependency lists.
5027
5028 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
5029
5030         * gjavah.c (throwable_p): Do not free the name of the class after
5031         passing it to find_class.
5032         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
5033         * jcf-io.c (dirent.h): Include it.
5034         (fnmatch.h): Likewise.
5035         (compare_path): New function.
5036         (java_or_class_file): Likewise.
5037         (memoized_dirlist_entry): New type.
5038         (memoized_dirlist_lookup_eq): New function.
5039         (memoized_dirlists): New variable.
5040         (caching_stat): New function.
5041         (memoized_class_lookup_eq): New function.
5042         (memoized_class_lookups): Likewise.
5043         (find_class): Use memoized_class_lookups and caching_stat.
5044         * jcf.h (JCF_USE_SCANDIR): Define.
5045         * parse.y (java_expand_classes): Write the class files in reverse
5046         order.
5047
5048 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5049
5050         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
5051
5052 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
5053
5054         * jcf-write.c (write_classfile): Unlink the temporary file if it
5055         cannot be renamed.  Use concat to build up the name of the
5056         temporary file.
5057
5058 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
5059
5060         * jcf-write.c (write_classfile): Write the file to a
5061         temporary file and then rename it.
5062
5063 2002-05-07  Tom Tromey  <tromey@redhat.com>
5064
5065         * gjavah.c (throwable_p): Use xstrdup, not strdup.
5066
5067         Fix for PR java/1200:
5068         * gjavah.c (throwable_p): New function.
5069         (decode_signature_piece): Use it.  A `WeakReference' isn't the
5070         same as a `jweak'.
5071         Include hashtab.h.
5072         (gcjh_streq): New function.
5073
5074 2002-05-07  Andreas Jaeger  <aj@suse.de>
5075
5076         * parse.y (finish_for_loop): Fix if statement.
5077
5078 2002-05-06  Tom Tromey  <tromey@redhat.com>
5079
5080         Fix for PR java/5941:
5081         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
5082         loop update expression.
5083         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
5084         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
5085
5086 2002-05-04  Mark Wielaard  <mark@klomp.org>
5087
5088         For PR java/6519:
5089         * parse.y (build_string_concatenation): Return just op1 only when op2
5090         is null and op1 is a STRING_CST, otherwise always construct a
5091         StringBuffer.
5092
5093 2002-04-27  Tom Tromey  <tromey@redhat.com>
5094
5095         For PR java/6382:
5096         * parse.y (string_convert_int_cst): New function.
5097         (merge_string_cste): Use it.
5098
5099 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5100
5101         * java-tree.h (java_parse_file): Update.
5102         (java_set_yydebug): Remove.
5103         * jcf-parse.c (yydebug): Remove.
5104         (java_set_yydebug): Die.
5105         (java_parse_file): Update.
5106         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5107
5108 2002-04-24  Tom Tromey  <tromey@redhat.com>
5109
5110         For PR java/6425:
5111         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
5112         EXPR_WFL_QUALIFICATION of qual_wfl.
5113
5114 2002-04-23  Per Bothner  <per@bothner.com>
5115
5116         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
5117         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
5118         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
5119
5120 2002-04-23  Tom Tromey  <tromey@redhat.com>
5121
5122         For PR java/6314:
5123         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
5124         recognize `-fcompile-resource='.
5125         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
5126         a bit.
5127
5128 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5129
5130         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
5131         paths. Fixes PR java/2791.
5132
5133 2002-04-19  Andrew Haley  <aph@redhat.com>
5134
5135         * jcf-write.c (push_long_const): lo, hi: New variables.
5136         Use rshift_double to extract the high part of a 64-bit long.
5137         Use WORD_TO_INT to extract the low part.
5138
5139         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
5140         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
5141         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
5142
5143 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5144
5145         * typeck.c (incomplete_type_error): Remove.
5146
5147 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5148
5149         * class.c (make_class_data): Set DECL_ALIGN on static class data,
5150         for hash synchronization.
5151         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
5152         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
5153         class_type_node.
5154
5155 2002-04-16  Mark Wielaard  <mark@klomp.org>
5156
5157         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
5158         negative zero.
5159
5160 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5161
5162         Fix for PR java/6294:
5163         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
5164         interfaces.
5165
5166 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5167
5168         Fix for PR java/6085:
5169         * parse.y (patch_method_invocation): Always use build_access_to_thisn
5170         to get enclosing "this" argument for inner-class constructor
5171         invocation. Pass correct arguments to build_access_to_thisn.
5172
5173 2002-04-10  Andreas Jaeger  <aj@suse.de>
5174
5175         * gcj.texi (Input Options): Fix extdirs patch.
5176
5177 2002-04-10  Anthony Green  <green@redhat.com>
5178
5179         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
5180
5181 2002-04-09  Anthony Green  <green@redhat.com>
5182
5183         * gcj.texi (Input Options): Add --extdirs documentation.
5184         * jcf-dump.c (OPT_extdirs): New macro.
5185         (options): Add extdirs option.
5186         (help): Describe --extdirs.
5187         (main): Handle OPT_extdirs.
5188         * gjavah.c (OPT_extdirs): New macro.
5189         (options): Add extdirs option.
5190         (help): Describe --extdirs.
5191         (main): Handle OPT_extdirs.
5192         * jcf-path.c (jcf_path_init): Add extdirs support.
5193         (jcf_path_extdirs_arg): New function.
5194         (extensions): New variable to hold extensions path entries.
5195         * jvspec.c: Remove -fextdirs= when compiling main().
5196         * lang.c (java_decode_option): Handle -fextdirs=.
5197         * jcf.h (jcf_path_extdirs_arg): Declare new function.
5198         * Make-lang.in: Compile jcf-path with version info for use in
5199         identifying the appropriate libgcj.jar.
5200
5201 2002-04-08  Tom Tromey  <tromey@redhat.com>
5202
5203         For PR libgcj/5303:
5204         * .cvsignore: Added rmic.1 and rmiregistry.1.
5205         * gcj.texi (Top): Link to new nodes.
5206         (Invoking rmic): New node.
5207         (Invoking rmiregistry): Likewise.
5208         * Make-lang.in (java.generated-manpages): Added rmic.1 and
5209         rmiregistry.1.
5210         (java.maintainer-clean): Likewise.
5211         ($(srcdir)/java/rmic.1): New target.
5212         ($(srcdir)/java/rmiregistry.1): Likewise.
5213         (java.install-man): Handle rmic.1 and rmiregistry.1.
5214
5215 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5216
5217         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
5218         Add note about handling uncaught exceptions. Add an exception handler
5219         to example.
5220
5221 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5222
5223         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
5224         after using it to patch CALL_EXPR.
5225
5226 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5227
5228         * gcj.texi (Invocation): Document CNI invocation API.
5229
5230 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5231
5232         * expr.c (truthvalue_conversion): Rename.  Update.
5233         (expand_compare): Update.
5234         * java-tree.h (java_truthvalue_conversion): New.
5235         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5236
5237 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5238
5239         * java-tree.h (java_mark_addressable): New.
5240         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5241         * typeck.c (mark_addressable): Rename, update.
5242
5243 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5244
5245         * expr.c (build_java_binop): Update.
5246         * java-tree.h (java_signed_type, java_unsigned_type,
5247         java_signed_or_unsigned_type): Update.
5248         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5249         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5250         * parse.y (patch_binop): Update.
5251         * typeck.c (signed_or_unsigned_type, unsigned_type,
5252         signed_type): Update.
5253
5254 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5255
5256         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5257         (java_dummy_print): Remove.
5258         (lang_print_error): Rename.  Exit early if inhibiting output.
5259         (inhibit_error_printing_function): New.
5260         (java_init): Don't set hook.
5261         (lang_init_source): Use new boolean.
5262
5263 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5264
5265         * parse.y (do_resolve_class): Fix infinite recursion.
5266
5267 2002-03-29  Tom Tromey  <tromey@redhat.com>
5268
5269         * parse.y (check_inner_circular_reference): Ignore incomplete
5270         types.
5271
5272 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5273
5274         * Make-lang.in (builtins.o): Update.
5275         * boehm.c (get_boehm_type_descriptor): Update.
5276         * builtins.c: Include langhooks.h.
5277         * decl.c (java_init_decl_processing): Update.
5278         * java-tree.h (java_type_for_mode, java_type_for_size): New.
5279         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
5280         Redefine.
5281         * typeck.c (type_for_mode, type_for_size): Update.
5282
5283 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5284
5285         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
5286
5287 2002-03-28  Tom Tromey  <tromey@redhat.com>
5288
5289         * except.c (expand_end_java_handler): If the handler type is NULL,
5290         use java.lang.Throwable.  Fixes PR java/5986.
5291
5292 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5293
5294         Fix for PR java/4715:
5295         * jcf-parse.c (parse_source_file_3): New function.
5296         (read_class): Call it.
5297         (java_parse_file): Likewise.
5298
5299 2002-03-28  Jan Hubicka  <jh@suse.cz>
5300
5301         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
5302
5303 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5304
5305         * parse.y (resolve_package): Initialize "decl".
5306         (lookup_package_type): Remove unused function.
5307
5308 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5309
5310         Fix for PR java/5993:
5311         * parse.y (resolve_package): Return the decl if resolution was
5312         successful. Don't special case "java.lang" and "java.lang.reflect"
5313         packages. Set type_name to the merged identifier.
5314         (resolved_qualified_expression_name): Print error using "name" if
5315         resolve_package returns NULL_TREE.
5316
5317 2002-03-27  Tom Tromey  <tromey@redhat.com>
5318
5319         * expr.c (expand_invoke): Don't generate null pointer check if
5320         we're calling <init>.
5321
5322 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5323
5324         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
5325         fix prototype.
5326         * java-tree.h (java_lang_expand_expr): Similarly.
5327         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5328         (java_init): Don't set hook.
5329
5330 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5331
5332         Fix for PR java/5850:
5333         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
5334         context if field was not found in the current scope.
5335         * expr.c (lookup_field): Don't look in enclosing contexts.
5336
5337 2002-03-26  Tom Tromey  <tromey@redhat.com>
5338
5339         Fix for PR java/5942:
5340         * parse.y (init_src_parse): Added sanity check.
5341         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
5342         elements, not 11.
5343
5344 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5345
5346         * decl.c (lang_mark_tree): Rename java_mark_tree.
5347         * java-tree.h (java_mark_tree): New.
5348         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5349
5350 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
5351
5352         * lex.c: Change java_perform_atof to take normal parameters
5353         instead of a pointer to a parameter block.  Call it directly
5354         from java_lex.
5355
5356 2002-03-22  Mark Wielaard  <mark@klomp.org>
5357
5358         Fix for PR java/5368:
5359         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
5360         when printing error message.
5361
5362 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5363
5364         * decl.c (maybe_build_cleanup): Remove.
5365
5366 2002-03-22  Tom Tromey  <tromey@redhat.com>
5367
5368         Andrew Haley  <aph@cambridge.redhat.com>
5369
5370         * expr.c (build_field_ref): Don't build a check if the field is a
5371         member of `this'.
5372
5373 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
5374
5375         Fix for PR java/6026:
5376         * lex.c (java_lex): Fix parsing of consecutive floats.
5377
5378 2002-03-21  Tom Tromey  <tromey@redhat.com>
5379
5380         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
5381         class.
5382
5383 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5384
5385         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5386         insert_block, getdecls, kept_level_p, global_bindings_p): New.
5387
5388 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5389
5390         * gcj.texi: @code{gcj} becomes @command{gcj}.
5391         @code{gcc} becomes @command{gcc}.
5392         GcjRaw changed to gnu.gcc.RawData.
5393
5394 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5395
5396         * decl.c (start_java_method): Use new hook.
5397         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5398         (java_init): Remove old hook.
5399
5400 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
5401
5402         * builtins.c (define_builtin): Do nothing if `type' is null.
5403         Fixes PR java/5876.
5404
5405 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5406
5407         * parse.y (parser_check_super_interface): Fix error message
5408         grammar/order.
5409
5410 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5411
5412         * jcf-parse.c (get_constant): Delete unused variables.
5413
5414 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5415
5416         * java-tree.h (java_parse_file): New.
5417         * jcf-parse.c (yyparse): Rename java_parse_file.
5418         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5419
5420 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5421
5422         * parse.y (craft_constructor): Return the constructor decl.
5423         (java_expand_classes): Update comments.
5424         (lookup_method_invoke): Call fix_constructors immediately for
5425         anonymous class. Fixes PR java/5935.
5426
5427 2002-03-15  Anthony Green  <green@redhat.com>
5428
5429         * jcf-parse.c (yyparse): Don't emit class registration
5430         constructor when compiling resource files.
5431
5432 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5433
5434         * lang.c (java_tree_code_type, java_tree_code_length,
5435         tree_code_name): Delete.
5436         (tree_code_type, tree_code_length, tree_code_name): Define.
5437         (java_init): Don't try to copy into the various tree_code
5438         arrays.
5439
5440 2002-03-12  Tom Tromey  <tromey@redhat.com>
5441
5442         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5443         UTF-8, not UCS-2.  Fixes PR java/5923.
5444
5445         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5446         a call_expr wrapped in a convert.  Fixes PR java/5848.
5447
5448 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5449
5450         * jcf-write.c (write_classfile): Improve error strings.
5451
5452 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5453
5454         * lex.c: Adjust comments to GNU standards.
5455
5456 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5457
5458         Fix for PR java/5902:
5459         * lex.c (java_lex): Fix parsing of literals.
5460
5461 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5462
5463         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5464         to prevent it getting evaluated twice in the store checking case.
5465         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5466         examining OBJECT.
5467
5468 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5469
5470         * decl.c (java_init_decl_processing): Make sure class_type_node
5471         alignment is not less than 64 bits if hash synchronization is enabled.
5472
5473 2002-03-08  Per Bothner  <per@bothner.com>
5474
5475         * parse.y (java_complete_lhs):  Check if patch_assignment
5476         returned an error-mark.
5477
5478         * parse.y (try_builtin_assignconv):  Don't special-case zero.
5479
5480 2002-03-08  Per Bothner  <per@bothner.com>
5481
5482         Fix for PR java/5812.
5483         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
5484         here instead of in JSR macro.  Likewise with load_type_state call.
5485         Do the latter on if the return_pc has been verified (the jsr returns).
5486         (JSR):  Now just call build_java_jsr.
5487
5488 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
5489
5490         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5491         (java.install-common): Link native driver to
5492         JAVA_TARGET_INSTALL_NAME.
5493
5494 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
5495
5496         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5497         * builtins.c(sin_builtin): Likewise
5498         * builtins.c(sqrt_builtin): Likewise
5499
5500 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
5501
5502         * java/expr.c, java/jcf-parse.c, java/lex.c:
5503         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5504         REAL_ARITHMETIC blocks unconditional.  Delete some further
5505         #ifdef blocks predicated on REAL_ARITHMETIC.
5506
5507 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5508
5509         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5510         explicit sizeof/sizeof.
5511         * decl.c (java_init_decl_processing): Likewise.
5512         * jcf-parse.c (init_jcf_parse): Likewise.
5513         * parse.y (init_src_parse): Likewise.
5514
5515 2002-03-02  Per Bothner  <per@bothner.com>
5516
5517         Make --CLASSPATH by a synonym for --classpath and -classpath.
5518         Implement --bootclasspath.
5519         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
5520         (classpath_l):  Remove.
5521         (jcf_path_CLASSPATH_arg):  Remove.
5522         (jcf_path_bootclasspath_arg):  New function.
5523         (jcf_path_seal):  Simplify accordingly.
5524
5525         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
5526         (jcf_path_CLASSPATH):  Remove declaration.
5527         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
5528         (lang_specific_driver):  Translate -bootclasspath.
5529         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
5530         * lang.c (decode_lang_options):  Do jcf_path_init first.
5531         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
5532         * gjavah.c:  Also handle --bootclasspath.
5533         Handle --CLASSPATH as a synonum for --classpath.
5534         * jcf-dump.c: Likewise.
5535
5536         "." is not part of system path, but is the default for --classpath.
5537         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
5538         (jcf_path_seal):  Add "." if no CLASSPATH specified.
5539
5540         * gcj.texi:  Document changes.
5541
5542 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5543
5544         * expr.c (build_java_arraystore_check): Fix formatting.
5545
5546 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5547
5548         Fix for PR java/5758, java/5632:
5549         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5550         inner-class separator too.
5551         * parse.y (do_resolve_class): New local `decl_result.'
5552         Progressively build a name for what can have been loaded.
5553
5554 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5555
5556         * expr.c (java_array_data_offset): Removed function.
5557         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
5558         (build_java_array_length_access): Obtain "length" value using a
5559         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
5560         (build_java_arrayaccess): Correct comment. Access "data" using a
5561         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
5562         (build_java_arraystore_check): New function.
5563         (expand_java_arraystore): Use build_java_arraystore_check.
5564         * parse.y (patch_assignment): Simplify code to insert a store check
5565         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
5566         * check-init.c (check_init): Update to reflect that an array length
5567         access is now a COMPONENT_REF.
5568         * gcj.texi (Code Generation): Improve documentation of
5569         -fno-bounds-check. Add documentation for -fno-store-check.
5570         * java-tree.h (flag_store_check): Declare.
5571         (build_java_arraystore_check): Declare.
5572         * lang.c (flag_store_check): Initialize to 1.
5573         (lang_f_options): Add store-check option.
5574         * jvspec.c: Don't pass store-check option to jvgenmain.
5575         * lang-options.h: Add help string for -fno-store-check.
5576
5577 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5578
5579         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5580         * java-tree.h (java_dup_lang_specific_decl): New.
5581         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5582
5583 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5584
5585         * builtins.c, decl.c: Delete traditional-mode-related code
5586         copied from the C front end but not used, or used only to
5587         permit the compiler to link.
5588
5589 2002-02-22  Tom Tromey  <tromey@redhat.com>
5590
5591         Fix for PR java/2369:
5592         * jvspec.c (verify_class_name): New function.
5593         (lang_specific_driver): Call it.
5594         (JAVA_START_CHAR_P): New macro.
5595         (JAVA_PART_CHAR_P): Likewise.
5596
5597 2002-02-22  Per Bothner  <per@bothner.com>
5598
5599         * class.c:  Change vtable to be more compatible with g++ v3 abi.
5600         (get_dispatch_table):  Prepend offset-to-top (always 0) and
5601         type_info pointer (currently unimplemented hence NULL) to vtable.
5602         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5603         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
5604         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5605         (build_dtable_decl):  Add declarations for new fields.
5606
5607 2002-02-20  Per Bothner  <per@bothner.com>
5608
5609         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5610         to finit$ (otherwise generate_bytecode_insns drops it). However, we
5611         don't need to set it on the COMPOUND_EXPR - the caller does that.
5612
5613 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5614
5615         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5616         `--CLASSPATH' becomes `--classpath.'
5617         * gjavah.c: Likewise.
5618         * jcf-dump.c: Likewise.
5619         * lang-options.h: Likewise.
5620         * lang.c: Likewise.
5621         * jcf-path.c: Updated comment.
5622         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5623         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5624         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5625         (jcf_path_CLASSPATH_arg): Ditto.
5626         (classpath_u): Updated leading comment.
5627
5628 2002-02-20  Per Bothner  <per@bothner.com>
5629
5630         * builtins.c (check_for_builtin):  New function.
5631         (build_call_or_builtin):  Remove.
5632         * java-tree.h:  Update accordingly.
5633         * expr.c (expand_invoke):  Use build + check_for_builtin instead
5634         of build_call_or_builtin.
5635         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
5636         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5637         flag (which had caused jcf-write to incorrectly emit invokevirtual).
5638
5639 2002-02-17  Tom Tromey  <tromey@redhat.com>
5640
5641         * java-tree.h (TYPE_STRICTFP): New macro.
5642         (struct lang_type) [strictfp]: New field.
5643         (CLASS_STRICTFP): New macro.
5644         (METHOD_STRICTFP): New macro.
5645         (struct lang_decl) [strictfp]: New field.
5646         * parse.y (method_header): Disallow strictfp constructor or
5647         abstract method.
5648         (STRICT_TK): Move before MODIFIER_TK.
5649         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5650         (METHOD_MODIFIERS): Likewise.
5651         (INTERFACE_MODIFIERS): Likewise.
5652         * jcf-write.c (get_access_flags): Likewise.
5653         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5654         (add_method_1): Likewise.
5655         (get_access_flags_from_decl): Likewise.
5656         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
5657         recognize strictfp flag.
5658         * jcf.h (ACC_STRICT): New define.
5659
5660 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
5661
5662         * class.c(build_utf8_ref): Move declaration of decl_size
5663
5664 2002-02-07  Tom Tromey  <tromey@redhat.com>
5665
5666         * gcj.texi (Input Options): --CLASSPATH does not suppress system
5667         path.
5668
5669 2002-02-04  Anthony Green  <green@redhat.com>
5670
5671         * class.c (build_utf8_ref): Put UTF-8 constants into merged
5672         sections if available.
5673
5674 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5675
5676         * parse.y (java_expand_classes): Fix typo in static field loop.
5677
5678 2002-02-02  Richard Henderson  <rth@redhat.com>
5679
5680         * class.c (add_field): Mark static fields external.
5681         (build_class_ref): Remove redundant set.
5682         * parse.y (java_expand_classes): Mark static fields of classes
5683         to be compiled as local.
5684         * jcf-parse.c (parse_class_file): Likewise.
5685
5686 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5687
5688         * gcj.texi (About CNI): New node.
5689
5690 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5691
5692         PR java/5080
5693         * jcf-parse.c : Check for HAVE_LOCALE_H before using
5694         setlocale() with LC_CTYPE as a parameter.
5695         * jv-scan.c: Same.
5696
5697 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
5698
5699         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5700         Follow GNU Coding Standards for --version.
5701
5702 2002-01-28  Tom Tromey  <tromey@redhat.com>
5703
5704         * expr.c (build_jni_stub): Ensure storage for `meth' is
5705         generated.
5706         * parse.y (java_complete_expand_methods): Set
5707         current_function_decl before building JNI stub.
5708
5709 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5710
5711         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5712         BUILT_IN_SQRTF.
5713
5714 2002-01-22  Tom Tromey  <tromey@redhat.com>
5715
5716         * decl.c (java_init_decl_processing): Use add_predefined_file.
5717         Predefine RawData.java.
5718         (predef_filenames): Removed.
5719         (java_init_decl_processing): Don't register predef_filenames.
5720         * jcf-parse.c (add_predefined_file): New function.
5721         (predefined_filename_p): Rewrote.
5722         (predefined_filename_p): No longer static.
5723         * decl.c (java_init_decl_processing): Call initialize_builtins.
5724         * Make-lang.in (JAVA_OBJS): Added builtins.o.
5725         (java/builtins.o): New target.
5726         * builtins.c: New file.
5727         * parse.y (patch_invoke): Use build_call_or_builtin.
5728         * java-tree.h (build_call_or_builtin): Declare.
5729         (initialize_builtins): Declare.
5730         (java_set_exception_lang_code): Removed unused declaration.
5731         (PREDEF_FILENAMES_SIZE): Removed.
5732         (java_tree_index): Added JTI_PREDEF_FILENAMES.
5733         (predef_filenames): New define.
5734         (add_predefined_file): Declare.
5735         (predefined_filename_p): Declare.
5736         * expr.c (expand_invoke): Use build_call_or_builtin.
5737
5738 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5739
5740         * parse.y (patch_switch_statement): Fix format specifier.
5741
5742 2002-01-16  Tom Tromey  <tromey@redhat.com>
5743
5744         More for PR java/5365:
5745         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5746         default.
5747         (process_file): Generate include for
5748         java.lang.UnsupportedOperationExceptions.
5749
5750 2002-01-15  Andreas Jaeger  <aj@suse.de>
5751
5752         * .cvsignore: Add man pages.
5753
5754 2002-01-15  Tom Tromey  <tromey@redhat.com>
5755
5756         Fix for PR java/5365:
5757         * gjavah.c (process_file): Turn class name into a file name.
5758
5759 2002-01-14  Matthias Klose  <doko@debian.org>
5760
5761         * gcj.texi: Fix whitespace and formatting errors in the
5762         synopsis of the man pages. Update copyright.
5763
5764 2002-01-14  Tom Tromey  <tromey@redhat.com>
5765
5766         For PR libgcj/5303:
5767         * Make-lang.in (java.install-man): Handle jv-convert man page.
5768         (java.generated-manpages): Added jv-convert.1.
5769         (java.uninstall): Remove jv-convert.1.
5770         (java.maintainer-clean): Likewise.
5771         ($(srcdir)/java/jv-convert.1): New target.
5772         * gcj.texi (Top): Link to jv-convert node.
5773         (Individual utilities): Likewise.
5774         (Invoking jv-convert): New node.
5775
5776 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
5777             Martin Kahlert  <martin.kahlert@infineon.com>
5778
5779         * jcf-parse.c (get_constant): Don't swap lo/hi for big
5780         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5781
5782 2002-01-03  Graham Stott  <grahams@redhat.com>
5783
5784         * class.c (compile_resource_file): Update copyright date.
5785         Constify filename parameter.
5786         (java-tree.h): Update copyright date.
5787         (compile_resource_file): Constify filename parameter.
5788
5789 2002-01-03  Graham Stott  <grahams@redhat.com>
5790
5791         * gcc/jcf-parse.c: Update copyright date.
5792         (yyparse): Constify resource_filename.
5793
5794 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5795
5796         * parse.y (src_parse_roots): Don't needlessly zero init.
5797
5798 2001-12-31  Tom Tromey  <tromey@redhat.com>
5799
5800         * parse.y (dump_java_tree): New function.
5801         (source_end_java_method): Call it.
5802         (end_class_declaration): Likewise.
5803         * lang.c (java_decode_option): Call dump_switch_p.
5804
5805 2001-12-28  Tom Tromey  <tromey@redhat.com>
5806
5807         * gen-table.pl: Don't process characters after \uffff.  Added
5808         comment pointing to input file.
5809
5810 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5811
5812         * gen-table.pl: Const-ify output.  Document the location of a
5813         suitable unicode input file.
5814
5815         * chartables.h: Regenerate.
5816
5817 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5818
5819         * chartables.h: Const-ify.
5820         * gjavah.c (options): Likewise.
5821         * jcf-dump.c (options): Likewise.
5822         * jv-scan.c (options): Likewise.
5823         * lex.c (java_start_char_p, java_part_char_p): Likewise.
5824         * parse.y (binop_lookup): Likewise.
5825
5826 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5827
5828         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5829         the static arrays that are output.
5830         * jvspec.c (jvgenmain_spec): Make static.
5831         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5832         * keyword.h: Regenerate.
5833         * lang.c (string_option, process_option_with_no, lang_f_options,
5834         lang_W_options): Const-ify.
5835         * lex.c (java_lex): Likewise.
5836
5837 2001-12-21  Richard Henderson  <rth@redhat.com>
5838
5839         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5840         (get_boehm_type_descriptor): ... here.  Arrange for the
5841         TREE_TYPE to get set properly.
5842
5843 2001-12-21  Richard Henderson  <rth@redhat.com>
5844
5845         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5846         only if the target requires collect2.
5847
5848         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5849
5850 2001-12-20  Tom Tromey  <tromey@redhat.com>
5851
5852         For PR java/4509:
5853         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5854         CAN_COMPLETE_NORMALLY for the node.
5855         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5856         generate code for second branch if first branch can't complete
5857         normally.
5858         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5859         the loop head if the loop body can't complete normally.
5860
5861 2001-12-20  Tom Tromey  <tromey@redhat.com>
5862
5863         For PR java/4766:
5864         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5865         case where `finally' clause can't complete normally.
5866
5867 2001-12-20  Tom Tromey  <tromey@redhat.com>
5868
5869         Fixes PR java/5057:
5870         * parse.y (analyze_clinit_body): Added this_class parameter.
5871         Check for more cases where we must keep <clinit>.
5872         (maybe_yank_clinit): Cleaned up flow control.
5873
5874 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5875
5876         * decl.c (java_init_decl_processing): Don't initialize
5877         finit_leg_identifier_node.
5878         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5879         (finit_leg_identifier_node): Remove.
5880         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5881
5882 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5883
5884         * mangle.c (mangle_member_name): Don't special-case for
5885         NO_DOLLAR_IN_LABEL.
5886         * mangle_name.c (unicode_mangling_length): Likewise.
5887         (append_unicode_mangled_name): Likewise.
5888         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5889         code.
5890
5891 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5892
5893         * expr.c (build_java_array_length_access): Don't force null pointer
5894         check unless flag_check_references is set.
5895
5896 2001-12-20  Tom Tromey  <tromey@redhat.com>
5897
5898         Fix for PR java/3417:
5899         * parse.y (patch_assignment): Added special processing for
5900         `return'.
5901         (patch_return): Don't convert booleans to integers, and don't
5902         special-case `null'.
5903
5904 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5905
5906         * config-lang.in (diff_excludes): Remove.
5907
5908 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
5909
5910         * gcj.texi: Update link to GCC manual.
5911
5912 2001-12-17  Tom Tromey  <tromey@redhat.com>
5913
5914         * parse.y (link_nested_class_to_enclosing): Removed useless
5915         statement.
5916
5917 2001-12-16  Tom Tromey  <tromey@redhat.com>
5918
5919         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5920         Fixes PR java/5088.
5921
5922 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5923
5924         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5925         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5926         spelling errors.
5927
5928 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5929
5930         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5931
5932 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5933
5934         * decl.c (java_init_decl_processing): Build otable_type correctly.
5935         otable_decl is an otable_type.
5936
5937 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5938
5939         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5940         otable_type, otable_ptr_type, method_symbol_type,
5941         method_symbols_array_type, method_symbols_array_ptr_type): New
5942         field/global tree definitions.
5943         (flag_indirect_dispatch): New flag.
5944         * decl.c (java_init_decl_processing): Initialize new otable and
5945         otable_syms type nodes and decls. Add new field "index" to
5946         method_type_node.
5947         * class.c (build_method_symbols_entry): New function.
5948         (make_method_value): Set "index" to to method's vtable index for
5949         virtual methods when indirect-dispatch is not used.
5950         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5951         and set vtable_method_count to -1. Set otable and otable_syms field
5952         if indirect-dispatch is used and there was something to put in them.
5953         (build_method_symbols_entry): New function.
5954         (emit_offset_symbol_table): New function.
5955         * expr.c (get_offset_table_index): New function.
5956         (build_invokevirtual): Build array reference to otable at the index
5957         returned by get_offset_table_index, and use the result as the vtable
5958         offset.
5959         (build_invokeinterface): Similar.
5960         * jcf-parse.c (yyparse): If indirect-dispatch, call
5961         emit_offset_symbol_table at the end of compilation, after all classes
5962         have been generated.
5963         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5964         * lang.c (flag_indirect_dispatch): Define.
5965         (lang_f_options): Add indirect-dispatch flag.
5966
5967 2001-12-14  Matthias Klose  <doko@debian.org>
5968
5969         * gcj.texi: Markup for man page generation. Document missing
5970         options printed by <tool> --help.
5971         Terminate description of gij's -ms option with a dot.
5972         * Make-lang.in ($(srcdir)/java/*.1): New targets.
5973         (java.generated-manpages java.install-man, java.uninstall,
5974         java-maintainer-clean) Updated.
5975
5976 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
5977
5978         * class.c (get_dispatch_table): Fix java vtable layout
5979         for TARGET_VTABLE_USES_DESCRIPTORS.
5980         * decl.c (java_init_decl_processing): Initialize
5981         alloc_no_finalizer_node, finalize_identifier_node.
5982         * expr.c (class_has_finalize_method): New function.
5983         (expand_java_NEW): Generate calls for finalizer-free allocation.
5984         (build_invokevirtual): Fix java vtable layout for
5985         TARGET_VTABLE_USES_DESCRIPTORS.
5986         * java-tree.h (enum java_tree_index): New entries:
5987         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5988         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5989         (class_has_finalize_method): declare.
5990         (HAS_FINALIZER_P): New macro.
5991         * parse.y (patch_invoke): Generate calls for finalizer-free
5992         allocation.
5993
5994 2001-12-12  Matthias Klose  <doko@debian.org>
5995
5996         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5997         whitespace at end of line.
5998
5999 2001-12-11  Tom Tromey  <tromey@redhat.com>
6000
6001         * lex.c (java_init_lex): Define wfl_to_string as
6002         gnu.gcj.runtime.StringBuffer unless generating bytecode.
6003
6004 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
6005
6006         * class.c (make_method_value): Use null_pointer_node to
6007         represent empty exception table.
6008
6009 2001-12-10  Tom Tromey  <tromey@redhat.com>
6010
6011         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
6012
6013 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
6014
6015         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
6016
6017 2001-12-09  Per Bothner  <per@bothner.com>
6018
6019         * check-init.c (current_switch_has_default):  New static field.
6020         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
6021         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
6022         DEFAULT_EXPR seen, simulate a default alternative that copies state.
6023
6024 2001-12-09  Tom Tromey  <tromey@redhat.com>
6025
6026         * check-init.c (check_init): Don't allow pre- or post- increment
6027         or decrement of final variable.
6028         (final_assign_error): Minor error message rewording.
6029
6030 2001-12-08  Tom Tromey  <tromey@redhat.com>
6031
6032         * java-tree.h: Fixed typo.
6033
6034         * gjavah.c (decompile_method): Don't decompile to `return this'
6035         for static methods.
6036
6037         * gjavah.c (cxx_keywords): Re-sorted.
6038         * lex.c (cxx_keywords): Re-sorted.
6039
6040         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
6041         else.
6042
6043         * gjavah.c (print_namelet): Clear subnamelets.
6044         (HANDLE_METHOD): Set `method_printed' earlier.
6045
6046 2001-12-07  Tom Tromey  <tromey@redhat.com>
6047
6048         * lang.c (lang_f_options): Added
6049         optimize-static-class-initialization.
6050         (java_decode_option): Removed special case.
6051
6052 2001-12-07  Per Bothner  <per@bothner.com>
6053
6054         * check-init.c (check_init):  Fix typo freeing memory twice.
6055
6056 2001-12-05  Per Bothner  <per@bothner.com>
6057
6058         Restore support for static class initialization optimization.
6059         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
6060         * check-init.c (check_int):  At end of BLOCK handle initialization
6061         blocks, which used to be done in java_complete_expand_method but did
6062         not handle the case where check_for_initialization might allocate
6063         more than a word of bits.
6064         * decl.c (lang_make_tree):  The smic field is now a tree.
6065         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
6066         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
6067
6068         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
6069
6070         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
6071         Change from a hash table to a list.
6072         (struct_lang_decl):  Change field 'smic' to match.
6073         * class.c (add_method_1):  Initialize
6074         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
6075         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
6076         (java_expand_method_bodies): -here, since 'smic' is now a list.
6077         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
6078
6079         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
6080
6081         * class.c (java_hash_compare_tree_node):  Fix casts.
6082
6083 2001-12-04  Per Bothner  <per@bothner.com>
6084
6085         * check-init.c:   Handle definite unassignment to finals in addition
6086         to definite assignment.
6087         (loop_current_locals):  New field.
6088         (num_current_locals, int start_current_locals, num_current_words):
6089         Make static.
6090         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
6091         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
6092         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
6093         (get_variable_decl, check_final_reassigned):  New functions.
6094         (check_init, check_bool_init):  Modify as needed for checking finals.
6095         (check_for_initialization):  Take extra parameter and return void.
6096         Do extra start-up logic to check final fields for assignment.
6097         * parse.y (check_static_final_variable_assignment_flag,
6098         reset_static_final_variable_assignment_flag, check_final_assignment,
6099         check_final_variable_local_assignment_flag,
6100         reset_final_variable_indirect_assignment_flag,
6101         reset_final_variable_global_assignment_flag):  Remove functions.
6102         (java_complete_expand_methods, outer_field_access_fix,
6103         patch_assignment): Remove no-longer used logic.
6104         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
6105         * parse.y (register_fields, java_complete_tree):  Update accordingly.
6106
6107         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
6108         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
6109         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
6110
6111         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
6112
6113         * java-tree.h (DECL FINAL):  New bit-field.
6114         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
6115         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
6116         (DECL_INIT_CALLS_THIS):  New macro.
6117         (struct lang_decl):  New bit-field init_calls_this.
6118         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
6119         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
6120         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
6121         use it for both local variables and final fields.
6122         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
6123         and local_final.
6124         (struct lang_type):  Remove hfv bit-field.
6125         (check_for_initialization):  Change to return void.
6126
6127         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
6128         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
6129         * check-init.c (final_assign_error):  New helper function.
6130         (check_final_reassigned, check_init):  Use it.
6131         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
6132
6133         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
6134         bit-fields to unsigned.
6135
6136 2001-12-03  Per Bothner  <per@bothner.com>
6137
6138         * parse.y (patch_binop):  Minor constant folding.
6139
6140         * parse.y (build_current_thisn):  Shorter 'buffer'.
6141
6142 2001-12-03  Per Bothner  <per@bothner.com>
6143
6144         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
6145         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
6146         * jcf-write.c (generate_bytecode_insns):  Remove support for
6147         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
6148         * check-init.c (check_init):  Likewise.
6149
6150 2001-12-03  Per Bothner  <per@bothner.com>
6151
6152         * verify.c (subroutine_nesting):  New function.
6153         (verify_jvm_instructions):  Use it to fix logic for checking that
6154         we're done with the current subroutine.
6155
6156         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
6157         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
6158
6159 2001-12-03  Per Bothner  <per@bothner.com>
6160
6161         * jcf.h:  Fix obvious typo in comment.
6162         * typeck.c (build_null_signature):  Add comment.
6163
6164 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6165
6166         * expr.c: Remove leading capital from diagnostic messages, as
6167         per GNU coding standards.
6168         * jcf-io.c: Similarly.
6169         * jcf-parse.c: Similarly.
6170         * jv-scan.c: Similarly.
6171         * jvspec.c: Similarly.
6172         * mangle.c: Similarly.
6173
6174 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
6175             Alexandre Petit-Bianco  <apbianco@redhat.com>
6176
6177         * expr.c (build_java_arrayaccess): Call save_expr on array for
6178         correct evaluation order, modified comment, fixed indentation.
6179         * parse.y: (patch_assignment): Correctly extract the array base
6180         from the tree generate by build_java_arrayaccess, added comments.
6181         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
6182         Fixes PR java/3096, PR java/3803, PR java/3965.
6183
6184 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6185
6186         * expr.c (expand_byte_code): Remove trailing periods from messages.
6187         * jcf-parse.c (load_class, jcf_parse): Similarly.
6188         * jcf-write.c (generate_classfile): Similarly.
6189         * lex.c (java_lex): Similarly.
6190
6191 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6192
6193         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
6194
6195 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6196
6197         * Make-lang.in (java.generated-manpages): New dummy target.
6198
6199 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6200
6201         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6202         ASM_FINAL_SPEC.
6203         (lang_specific_pre_link): Use set_input to set input_filename.
6204         Append `main' here.
6205         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6206         (main): Fix definition.
6207         Strip `main' from classname.
6208         Fixes PR java/227.
6209
6210 2001-11-18  Roger Sayle <roger@eyesopen.com>
6211
6212         * parse.h (java_expand_switch): Remove old prototype.
6213
6214 2001-11-18  Tom Tromey  <tromey@redhat.com>
6215
6216         Fix for PR java/1401:
6217         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
6218         arg0 is null.
6219         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
6220         correctly.
6221
6222 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6223
6224         * lang.c (finish_parse): Rename to java_finish.
6225         (LANG_HOOKS_FINISH, java_finish): New.
6226
6227 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6228
6229         * decl.c (init_decl_processing): Rename java_init_decl_processing.
6230         * java-tree.h: New prototype.
6231         * lang.c (java_init): Update prototype.  Combine with old init_parse.
6232
6233 2001-11-13  Tom Tromey  <tromey@redhat.com>
6234
6235         * gjavah.c (method_signature): New global.
6236         (HANDLE_METHOD): Set it.
6237         (decompile_return_statement): New function.
6238         (decompile_method): Use it.
6239         (print_method_info): Removed `synth' argument.
6240
6241 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6242
6243         * java-tree.h (java_set_yydebug): New.
6244         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
6245         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
6246         (print_lang_decl, print_lang_type, print_lang_identifier,
6247         print_lang_statistics, lang_print_xnode): Remove.
6248
6249 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6250
6251         * jcf-parse.c (init_lex): Remove.
6252         * lang.c (language_string, lang_identify): Remove.
6253         (struct lang_hooks): Constify.
6254         (LANG_HOOKS_NAME): Override.
6255         (init_parse): Update.
6256
6257 2001-11-08  Andreas Franck  <afranck@gmx.de>
6258
6259         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
6260         program_transform_name the way suggested by autoconf.
6261         (java.install-common): Also transform auxiliary program names with
6262         program_transform_name.
6263
6264 2001-11-08  Tom Tromey  <tromey@cygnus.com>
6265
6266         * parse.y (trap_overflow_corner_case): New rule.
6267         (unary_expression): Use it.
6268         * lex.c (java_init_lex): Don't set minus_seen.
6269         (yylex): Don't use minus_seen.  Communicate overflow to parser for
6270         it to handle.
6271         (error_if_numeric_overflow): New function.
6272         * parse.h (minus_seen): Removed field.
6273         (JAVA_RADIX10_FLAG): New define.
6274
6275 2001-11-07  Tom Tromey  <tromey@redhat.com>
6276
6277         Patch for PR java/1414:
6278         * parse.y (case_label_list): New global.
6279         (goal): Register case_label_list with GC.
6280         (java_complete_lhs): Save new case on case_label_list.
6281         (patch_switch_statement): Check for duplicate case labels.
6282
6283 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
6284
6285         * parse.y (patch_assignment): Removed unused third argument.
6286         (java_complete_lhs): Removed unused third argument to patch_assignment.
6287
6288 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6289
6290         * lang.c: Include langhooks-def.h.
6291         * Make-lang.in: Update.
6292
6293 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6294
6295         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6296
6297 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6298
6299         * mangle.c (find_compression_record_match): Don't match compression
6300         records for package name elements unless they occur at the start of
6301         the name. Fix for PR java/4717.
6302
6303 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6304
6305         * expr.c (expand_java_field_op): Don't special-case references to
6306         java.lang.PRIMTYPE.TYPE.
6307         (build_primtype_type_ref): Removed.
6308         * java-tree.h (build_primtype_type_ref): Remove prototype.
6309         * parse.y (maybe_build_primttype_type_ref): Removed.
6310         (complete_function_arguments): Don't special-case references to
6311         java.lang.PRIMTYPE.TYPE.
6312         (patch_assignment): Likewise.
6313         (array_constructor_check_entry): Likewise.
6314
6315 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6316
6317         * mangle.c (static tree compression_table): Fixed leading comment.
6318         * parse.h (struct parser_ctxt): Fixed field comment.
6319         * parse.y (check_pkg_class_access): New prototype, fixed leading
6320         comment, new parameter used to emit error only if passed as true.
6321         (parse_check_super): Pass extra argument to check_pkg_class_access.
6322         (do_resolve_class): Likewise.
6323         (process_imports): Likewise.
6324         (read_import_dir): Fixed indentation.
6325         (find_in_imports_on_demand): New local class_type_name. Local
6326         node_to_use deleted. while loop changed into for loop. Report
6327         multiple definition only for accessible classes. Improved error
6328         message.
6329         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
6330         assigned to parameter list, fixed indentation. while loop changed
6331         into for loop, restore TREE_CHAIN on local `tem' before the next
6332         iteration.
6333
6334 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6335
6336         * lang.c (lang_get_alias_set): Deleted.
6337
6338 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6339
6340         * gjavah.c (jni_print_char): Fix thinko in last change.
6341
6342         * gjavah.c (jni_print_char, decode_signature_piece): Use
6343         safe-ctype macros and/or fold extra calls into fewer ones.
6344         * lex.c (java_read_unicode, java_lex): Likewise.
6345         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
6346         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
6347         * mangle_name.c (append_unicode_mangled_name,
6348         unicode_mangling_length): Likewise.
6349
6350 2001-10-17  Richard Henderson  <rth@redhat.com>
6351
6352         * Make-lang.in (java/lang.o): Depend on langhooks.h.
6353
6354 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
6355
6356         * lang.c (langhooks.h): Included.
6357         (LANG_HOOKS_INIT): Redefined.
6358         (LANG_HOOKS_INIT_OPTIONS): Likewise.
6359         (LANG_HOOKS_DECODE_OPTION): Likewise.
6360         (struct lang_hooks lang_hooks): New initialization.
6361
6362 2001-10-11  Per Bothner  <per@bothner.com>
6363
6364         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
6365         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
6366         The former is simpler, and jcf-write.c handles it better.
6367         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
6368         or WITH_CLEANUP_EXPR.
6369         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
6370         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
6371
6372         * parse.y (patch_if_else_statement):  If the condition is constant,
6373         optimize away the test.
6374
6375 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6376
6377         * parse.y (patch_cast): Call patch_string on the first operand of
6378         the incoming node, update it if necessary. Fixes PR java/4510.
6379
6380 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6381
6382         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
6383         when name qualifier matches a package name.
6384
6385 2001-10-08  Tom Tromey  <tromey@redhat.com>
6386
6387         Fix for PR java/4489:
6388         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
6389         force a new label when computing `body_block'.
6390
6391 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6392
6393         * jcf-io.c (format_uint): Const-ify.
6394         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
6395         * lex.c (java_get_line_col): Likewise.
6396         * parse.y (build_incdec): Likewise.
6397
6398 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
6399
6400         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
6401         a NULL enclosing context if appropriate. Fixes PR java/4466.
6402
6403 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6404
6405         * parse.y (patch_assignment): Use lvalue's original TYPE when
6406         building the final COMPOUND_EXPR.
6407         (try_reference_assignconv): Fixed leading comment.
6408
6409 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
6410
6411         * parse.y (check_final_variable_indirect_assignment): For
6412         COMPOUND_EXPR, return only if finals were found initialized
6413         properly, if not, keep on checking.
6414         (check_final_variable_global_assignment_flag): New local
6415         error_found, set when appropriate and used to decide whether to
6416         report uninitialized finals. Fixed typo in comment.
6417
6418 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6419
6420         * decl.c (init_decl_processing): Fixed typo in predef_filenames
6421         last three initializations. Fixes PR java/4360.
6422
6423 2001-09-21  Richard Henderson  <rth@redhat.com>
6424
6425         * class.c (get_dispatch_table): Handle function descriptors.
6426         (build_dtable_decl): Likewise.
6427         * expr.c (build_invokevirtual): Likewise.
6428
6429 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
6430
6431         * parse.y (patch_method_invocation): Build class initialization
6432         when static finals are used to qualify method invocation.
6433         Fixes PR java/4366.
6434
6435 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
6436
6437         * parse.h: (WFL_STRIP_BRACKET): Re-written using
6438         build_type_name_from_array_name.
6439         (STRING_STRIP_BRACKETS): New macro.
6440         * parse.y (build_type_name_from_array_name): New function.
6441         (array_creation_expression:): Accumulate []s instead of [s.
6442         (cast_expression:): Accumulate []s instead of [s after cast type
6443         name.
6444         (build_array_from_name): Local string deleted, use
6445         build_type_name_from_array_name.
6446         (build_unresolved_array_type): Accumulate []s instead of [s after
6447         type name.
6448         (register_fields): Fixed comment.
6449         (resolve_class): Local name, base deleted, new locals tname and
6450         array_dims. Use build_type_name_from_array_name. Use array_dims to
6451         build array type.
6452         (purify_type_name): Use STRING_STRIP_BRACKETS.
6453
6454 2001-09-18  Andreas Jaeger  <aj@suse.de>
6455
6456         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6457         * jv-scan.c: Likewise.
6458
6459 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6460
6461         * parse.y (patch_method_invocation): Inner class creation context
6462         check not enforced within constructors. Fixes PR java/1873.
6463
6464 2001-09-16  Tom Tromey  <tromey@redhat.com>
6465
6466         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6467         NOTE_PUSH for single-case push.  Fixes PR java/4189.
6468
6469 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6470
6471         * java-tree.h (TYPE_IMPORT_LIST): New macro.
6472         (TYPE_IMPORT_DEMAND_LIST): Likewise.
6473         (struct lang_type): New fields import_list and import_demand_list.
6474         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6475         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6476         (do_resolve_class): New local saved_enclosing_type, initialized,
6477         passed as parameter to find_in_imports and find_in_imports_on_demand.
6478         (find_in_imports): Added paramater enclosing_type, use its
6479         TYPE_IMPORT_LIST when applicable.
6480         (find_in_imports_on_demand): Added parameter enclosing_type, use
6481         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6482         declaration and initialization.
6483         (fold_constant_for_init): Switch/restore current_class to the
6484         appropriate context.
6485
6486 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
6487
6488         * verify.c (verify_jvm_instructions): Fix typo.
6489
6490 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6491
6492         * expr.c (expand_invoke): Const-ification.
6493         * parse.y (patch_method_invocation): Likewise.
6494
6495 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6496
6497         * gjavah.c (cxx_keywords): Const-ification.
6498         * keyword.gperf (java_keyword): Likewise.
6499         * lang.c (java_tree_code_name): Likewise.
6500         * lex.c (cxx_keywords): Likewise.
6501         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6502
6503 2001-09-11  Richard Henderson  <rth@redhat.com>
6504
6505         * parse.h (ctxp_for_generation): Mark extern.
6506
6507 2001-09-10  Richard Henderson  <rth@redhat.com>
6508
6509         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6510
6511 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6512
6513         * typeck.c (java_array_type_length, build_prim_array_type):
6514         Represent empty arrays by NULL index.
6515
6516 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
6517
6518         * java-tree.h (compile_resource_file): Grouped with other prototypes.
6519         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6520
6521 2001-09-06  Anthony Green  <green@redhat.com>
6522
6523         * class.c (O_BINARY): Define if necessary.
6524         (registerResource_libfunc): Declare.
6525         (init_class_processing): Initilize registerResource_libfunc.
6526         (compile_resource_file): New function.
6527         * java-tree.h (resource_name): Declare.
6528         (compile_resource_file): Declare.
6529         * jcf-parse.c (yyparse): Handle compiling java resource files.
6530         * lang.c (java_decode_option): Handle -fcompile-resource option.
6531         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6532         resource files.
6533         * gcj.texi (Code Generation): Add documentation for -R flag.
6534
6535 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
6536
6537         * jcf-write.c (generate_classfile): Issue an error in case of
6538         field/initial value mismatch.
6539         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6540         being initialized and we're generating bytecode.
6541         (java_complete_lhs): In MODIFY_EXPR section: added comments,
6542         set DECL_INITIAL properly when appropriate.
6543         Fixes PR java/4230
6544         Fixes PR java/4204
6545
6546 2001-09-01  Per Bothner  <per@bothner.com>
6547
6548         * parse.y (maybe_yank_clinit):  A field without an initializer is not
6549         relevant.  All initializers except static final and constant require
6550         <clinit>, regardless of flag_emit_class_files.
6551
6552 2001-08-31  Per Bothner  <per@bothner.com>
6553
6554         * class.c (set_constant_value):  When not emitting class files, then a
6555         String ConstantValue is a utf8const_ptr_type.
6556
6557 2001-08-30  Per Bothner  <per@bothner.com>
6558
6559         * jcf-write.c (generate_classfile):  Check that field is primitive
6560         or string before emitting ConstantValue attribute.
6561
6562 2001-08-30  Per Bothner  <per@bothner.com>
6563
6564         * parse.y (resolve_qualified_expression_name):  If creating a
6565         COMPOUND_EXPR, set it's type correctly.
6566
6567 2001-08-30  Per Bothner  <per@bothner.com>
6568
6569         * jcf-io.c (open_class):  Set filename field.
6570
6571         * jcf-parse,c (parse_class_file):  Set current_function_decl
6572         for better error message when Code attribute is missing.
6573
6574         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
6575         better diagnostics, especially for constructors.
6576
6577 2001-08-30  Per Bothner  <per@bothner.com>
6578
6579         * jcf-write.c (generate_classfile):  Don't write ConstantValue
6580         attribute if field is not final, for compatibility with jdk.
6581
6582         * jcf-write.c (generate_classfile):  Convert ConstantValue values
6583         to correct type.  Work-around for front-end bug.
6584         * class.c (set_constant_value):  Error if constant has wrong type.
6585
6586 2001-08-30  Per Bothner  <per@bothner.com>
6587
6588         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
6589         "Double" are printed at verbosity 1.
6590
6591         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
6592
6593         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
6594
6595 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
6596
6597         * parse.y (patch_assignment): Don't verify final re-assignment here.
6598         (java_complete_lhs): Verify assignments to finals calling
6599         patch_assignment. Verify re-assignments to finals before calling
6600         patch_assignment.
6601
6602 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
6603
6604         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6605         Fixes PR java/1413
6606
6607 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6608
6609         * lex.c (java_lex): new local found_hex_digits. Set and then used
6610         in test to reject invalid hexadecimal numbers.
6611         * parse.y (java_complete_tree): Prevent unwanted cast with
6612         initialized floating point finals.
6613         (patch_binop): Emit a warning when detecting a division by zero,
6614         mark result not constant, don't simplify non integer division.
6615
6616 2001-08-28  Per Bothner  <per@bothner.com>
6617
6618         * jcf-write.c  (generate_bytecode_insns):  For increments and
6619         decrements just recurse to push constant.  Improvement on Mark's patch.
6620
6621 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
6622
6623         * jcf-write.c (generate_bytecode_insns): Generate an integer to
6624         real conversion for increments and decrements of reals.
6625
6626 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6627
6628         * parse.y (resolve_qualified_expression_name): Handle unresolved
6629         qualified expressions, prevent numerical qualifiers, fixed typo.
6630         Fixes PR java/4141
6631
6632 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6633
6634         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6635         don't report anything but deprecated class when marked so. Handle
6636         VAR_DECL.
6637         (patch_method_invocation): Check deprecation on methods and types.
6638         (patch_binop): code becomes an enum tree_code, added default: to
6639         switch to handle that. Detect division by zero, try to fold and
6640         return before using a subroutine.
6641
6642 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
6643
6644         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6645         file smaller than 4 bytes.
6646         * parse.y (check_inner_circular_reference): New function.
6647         (check_circular_reference): Likewise.
6648         (array_initializer:): Accept {,}.
6649         (java_check_circular_reference): Rewritten using
6650         check_circular_reference and check_inner_circular_reference.
6651         (java_complete_expand_method): Unconditionally save and restore
6652         the unpurged exception list.
6653         (build_dot_class_method_invocation): Unmangle signature parameter.
6654
6655 2001-08-21  Tom Tromey  <tromey@redhat.com>
6656
6657         * decl.c (init_decl_processing): Add `throws' field to method
6658         descriptor.
6659         * class.c (make_method_value): Compute `throws' field for method.
6660
6661 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6662
6663         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6664         circularity is detected.
6665         (ctors_unchecked_throws_clause_p): Fixed leading comment.
6666
6667 2001-08-17  Richard Henderson  <rth@redhat.com>
6668
6669         * class.c (emit_register_classes): Add align parameter to
6670         call to assemble_integer.
6671
6672 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
6673
6674         * jcf-parse.c (load_class): New locals saved and class_loaded. If
6675         loading a class_or_name fails, try considering an innerclass name
6676         and load the enclosing context.
6677         * parse.y (resolve_inner_class): New function.
6678         (find_as_inner_class): Added leading comment.
6679         (register_incomplete_type): Keep the current context as enclosing
6680         context for JDEP_FIELD dependencies.
6681         (do_resolve_class): Locals new_class_decl and super initialized to
6682         NULL. Call resolve_inner_class, explore the enclosing context
6683         superclass if necessary.
6684         Fixes PR java/4007
6685
6686 2001-08-16  Tom Tromey  <tromey@redhat.com>
6687
6688         * jcf-dump.c (main): Updated for change to jcf_path_seal.
6689         * gjavah.c (main): Updated for change to jcf_path_seal.
6690         * lang.c (version_flag): New global.
6691         (java_decode_option): Recognize `-version'.
6692         (java_init): Update for change to jcf_path_seal.
6693         * jcf.h (jcf_path_seal): Added `print' argument.
6694         * jcf-path.c (jcf_path_seal): Added `print' argument.
6695
6696 2001-08-13  Zack Weinberg  <zackw@panix.com>
6697
6698         * Make-lang.in (java/decl.o): Update dependencies.
6699         * decl.c: Include libfuncs.h, don't include toplev.h.
6700
6701 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6702
6703         * decl.c (init_decl_processing): exception_type_node,
6704         class_not_found_type_node, and no_class_def_found_type_node
6705         initialized. predef_filenames augmented accordingly.
6706         instinit_identifier_node initialized.
6707         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6708         * java-tree.h (enum java_tree_index): New entries
6709         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6710         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6711         (exception_type_node): New macro.
6712         (class_not_found_type_node): Likewise.
6713         (no_class_def_found_type_node): Likewise.
6714         (instinit_identifier_node): Likewise.
6715         (PREDEF_FILENAMES_SIZE): Adjusted.
6716         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6717         (struct lang_type): Fixed typo in bitfield name.
6718         (DECL_INSTINIT_P): New macro.
6719         (ID_INSTINIT_P): Likewise.
6720         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6721         attribute.
6722         * parse.y (encapsulate_with_try_catch): New function.
6723         (generate_instinit): Likewise.
6724         (build_instinit_invocation): Likewise.
6725         (ctors_unchecked_throws_clause_p): Likewise.
6726         (add_instance_initializer): Deleted.
6727         (build_instance_initializer): Likewise.
6728         (in_instance_initializer): Likewise.
6729         (check_method_redefinition): instinit$ not to be verified.
6730         (java_complete_expand_methods): Generate instinit$, simplified code.
6731         (build_dot_class_method): Eliminated unnecessary locals. Use
6732         encapsulate_with_try_catch, removed unnecessary code.
6733         (fix_constructors): New local iii. Use build_instinit_invocation.
6734         (patch_method_invocation): Added comment.
6735         (maybe_use_access_method): Don't consider instinit$.
6736         (find_applicable_accessible_methods_list): Shorten the search for
6737         instinit$ too.
6738         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6739         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6740         (patch_throw_statement): Likewise. Fixed typo.
6741
6742 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
6743
6744         Revert:
6745         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6746         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6747         ASM_FINAL_SPEC.
6748         (lang_specific_pre_link): Use set_input to set input_filename.
6749         Append `main' here.
6750         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6751         (main): Fix definition.
6752         Strip `main' from classname.
6753         Fixes PR java/227.
6754
6755 2001-08-11  Zack Weinberg  <zackw@panix.com>
6756
6757         * lex.h: Don't include setjmp.h.  Don't define
6758         SET_FLOAT_HANDLER or prototype set_float_handler.
6759
6760 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6761
6762         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6763         `poplevel' in the right order.
6764
6765 2001-08-09  Richard Henderson  <rth@redhat.com>
6766
6767         * Make-lang.in (class.o): Depend on TARGET_H.
6768         * class.c (emit_register_classes): Use target hooks instead of
6769         assemble_constructor and assemble_destructor.
6770
6771 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
6772
6773         * check-init.c (flags.h): Include
6774         (check_init): Don't report uninitialized static class
6775         initialization flags, don't free bit index when doing static class
6776         initialization optimization.
6777         (check_for_initialization): Return type changed to `unsigned int.'
6778         (attach_initialized_static_class): New function.
6779         * class.c (add_method_1): Create the initialized static class
6780         table if necessary.
6781         (finish_class): Always emit deferred inline methods.
6782         * decl.c (emit_init_test_initialization): Moved to expr.c
6783         (complete_start_java_method): Don't traverse
6784         DECL_FUNCTION_INIT_TEST_TABLE.
6785         (lang_mark_tree): Mark hash tables in function decls.
6786         * expr.c (emit_init_test_initialization): Moved from decl.c.
6787         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6788         initialization flag, set DECL_CONTEXT and
6789         LOCAL_CLASS_INITIALIZATION_FLAG.
6790         (java_lang_expand_expr): Emit initialization code for static class
6791         initialized flags when entering block, if necessary.
6792         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6793         * java-tree.h (flag_optimize_sci): New global variable declaration.
6794         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6795         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6796         (LOCAL_FINAL_P): Fixed typo in comment.
6797         (FINAL_VARIABLE_P): Likewise.
6798         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6799         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6800         (struct lang_decl): New fields `ict', `smic' and `cif.'
6801         (check_for_initialization): New returned value for global.
6802         (attach_initialized_static_class): New global function.
6803         (STATIC_CLASS_INIT_OPT_P): New macro.
6804         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6805         * lang.c (java_decode_option): Handle
6806         `-fno-optimize-static-class-initialization'
6807         * parse.y (start_complete_expand_method): New function.
6808         (java_expand_method_bodies): Likewise.
6809         (attach_init_test_initialization_flags): Likewise.
6810         (adjust_init_test_initialization): Likewise.
6811         (emit_test_initialization): Likewise.
6812         (java_complete_expand_methods): Nullify abstract and native method
6813         bodies.
6814         (java_complete_expand_method): New locals `fbody', `block_body'
6815         and `exception_copy.' Reorganized: directly return on empty method
6816         bodies, call `start_complete_expand_method', remember definitely
6817         initialized static class in function, don't expand method bodies.
6818         (java_expand_classes): Call `java_expand_method_bodies' before
6819         `finish_class' when compiling to native.
6820         (resolve_expression_name): Use `orig' after building outer class
6821         field access.
6822         (patch_invoke): Remember static method invocations.
6823
6824 2001-08-06  Richard Henderson  <rth@redhat.com>
6825
6826         * class.c (emit_register_classes): Pass a symbol_ref and priority
6827         to assemble_constructor.
6828
6829 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
6830
6831         * java-tree.h (all_class_filename): New macro.
6832         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6833         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6834         newly created IDENTIFIER_NODE to `all_class_filename.'
6835
6836 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
6837
6838         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6839         Use ggc_add_tree_root to register roots.
6840
6841 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6842
6843         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6844         second operand calling check_init.
6845         * decl.c (complete_start_java_method): Swaped second and third
6846         arguments while creating WITH_CLEANUP_EXPR node.
6847         * jcf-write.c (generate_bytecode_insns): Use second operand
6848         instead of third when handling WITH_CLEANUP_EXPR.
6849         * parse.y (java_complete_lhs): Expand second operand of
6850         WITH_CLEANUP_EXPR nodes.
6851         (patch_synchronized_statement): Swaped second and third arguments
6852         while creating WITH_CLEANUP_EXPR node.
6853
6854 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
6855
6856         * parse.y (create_interface): Avoid cyclic inheritance report when
6857         syntax error encountered during class definition.
6858         Fixes PR java/2956
6859
6860 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6861
6862         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6863         ASM_FINAL_SPEC.
6864         (lang_specific_pre_link): Use set_input to set input_filename.
6865         Append `main' here.
6866         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6867         (main): Fix definition.
6868         Strip `main' from classname.
6869         Fixes PR java/227.
6870
6871 2001-07-18  Tom Tromey  <tromey@redhat.com>
6872
6873         For PR java/2812:
6874         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6875         * lex.c (java_new_lexer): Use ICONV_CONST.
6876         (java_read_char): Likewise.
6877         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6878         (jv-scan$(exeext)): Likewise.
6879
6880 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6881
6882         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6883         * parse.y (check_class_interface_creation): Allow `private' if the
6884         enclosing is not an interface.
6885         (create_interface): Interface tagged public if the enclosing
6886         context is an interface.
6887         (create_class): Class tagged public if the enclosing context
6888         is an interface.
6889         Fixes PR java/2959
6890
6891 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6892
6893         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6894         Fixes PR java/2665
6895
6896 2001-07-14  Tim Josling  <tej@melbpc.org.au>
6897
6898         * check-init.c (check_init): Remove references to EXPON_EXPR.
6899
6900 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6901
6902         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6903         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6904         Fixes PR java/3602
6905
6906 2001-07-13  Tom Tromey  <tromey@redhat.com>
6907
6908         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6909         invocation.
6910
6911 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6912
6913         * parse.y (patch_method_invocation): Don't override primary if one
6914         is already provided, but let this$<n> be built. Fixed comment.
6915
6916 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6917
6918         * parse.y (empty_statement:): Report empty statement error only
6919         when found at class declaration level.
6920         Fixes PR java/3635
6921
6922 2001-07-12  Tom Tromey  <tromey@redhat.com>
6923
6924         * expr.c (expand_load_internal): New function.
6925         (LOAD_INTERNAL): Use it.
6926
6927 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
6928
6929         * parse.y (verify_constructor_super): Compare anonymous class ctor
6930         args with `valid_method_invocation_conversion_p.'
6931         Fixes PR java/3285
6932
6933 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6934
6935         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6936         `-fsyntax-only.' Fixes PR java/3248
6937
6938 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6939
6940         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6941
6942 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6943
6944         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6945         current function is static. Fixes PR java/1970
6946
6947 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6948
6949         * parse.y (patch_method_invocation): Add enclosing context to ctor
6950         calls if necessary. Fixes PR java/2953
6951
6952 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6953
6954         * parse.y (resolve_package): Abort if qualified expression member
6955         isn't right.
6956         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6957         Fixes PR java/1391
6958
6959 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
6960
6961         * verify.c: Don't use // comments.
6962
6963 2001-07-05  Tom Tromey  <tromey@redhat.com>
6964
6965         * lang.c (flag_assume_compiled): Removed.
6966         * java-tree.h (flag_assume_compiled): Removed.
6967         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6968         -fhash-synchronization, -fuse-divide-subroutine,
6969         -fcheck-references, -femit-class-file, -femit-class-files,
6970         -fassume-compiled.  Updated --encoding information.  Changed
6971         -foutput-class-dir to `-d'.
6972
6973 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
6974
6975         * jcf-parse.c (parse_class_file): Add lineno parameter to
6976         debug_start_source_file call.
6977
6978 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6979
6980         * gcj.texi: Use gpl.texi.
6981         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6982         dependencies and use doc/include in search path.
6983
6984 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
6985
6986         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6987         `this'.  If so, don't build instance initializers.
6988
6989 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6990
6991         * parse.y (resolve_expression_name): Improved error message for
6992         inner class cases. Fixes PR java/1958
6993
6994 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6995
6996         * lang.c: #include diagnostic.h
6997         (lang_print_error): Add a `diagnostic_context *' parameter.
6998         (java_dummy_print): Likewise.
6999         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
7000
7001 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7002
7003         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
7004         * jcf.h (typedef struct JCF): New bitfield `finished.'
7005         (JCF_FINISH): Set `finished.'
7006         (JCF_ZERO): Reset `finished.'
7007         Fixes PR java/2633
7008
7009 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7010
7011         * parse.y (class_body_declaration:): Don't install empty instance
7012         initializers.
7013         Fixes PR java/1314
7014
7015 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7016
7017         * class.c (set_super_info): Call `set_class_decl_access_flags.'
7018         (set_class_decl_access_flags): New function.
7019         * java-tree.h (set_class_decl_access_flags): New prototype.
7020         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
7021         (parse_class_file): New local `decl_max_locals.' Take wide types
7022         into account to compute DECL_MAX_LOCALS.
7023         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
7024         imports on demand.
7025
7026 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
7027
7028         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
7029
7030 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7031
7032         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
7033         * parse.y (do_resolve_class): Moved comments out to leading comment
7034         section. Removed local `start', New local `_ht' and
7035         `circularity_hash.'  Record `enclosing' in hash table and search
7036         it to detect circularity.  Use `enclosing' as an argument to
7037         `lookup_cl.' Free the hash table when done.
7038
7039 2001-06-19  Tom Tromey  <tromey@redhat.com>
7040
7041         * lex.c (java_read_char): Disallow invalid and overlong
7042         sequences.  Fixes PR java/2319.
7043
7044 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
7045
7046         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
7047
7048 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7049
7050         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
7051         arguments accordingly.
7052
7053 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7054
7055         * gcj.texi: Move contents to just after title page.
7056
7057 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
7058
7059         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
7060         builtin type.
7061         (patch_incomplete_class_ref): Build the class ref, build the class
7062         init if necessary, complete the tree.
7063         Fixes PR java/2605
7064
7065 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7066
7067         * parse.y (lookup_field_wrapper): Test `name' code.
7068         (resolve_qualified_expression_name): Test `qual_wfl' code.
7069         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
7070         handle `qual_wfl' by code.
7071         (maybe_build_primttype_type_ref): Test `wfl' code.
7072
7073 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7074
7075         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
7076         fdl.texi.
7077         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
7078         the dvi file in the java directory.
7079
7080 2001-05-25  Sam TH  <sam@uchicago.edu>
7081
7082         * gen-table.pl javaop.h jcf.h lex.h,
7083         parse.h: Fix header include guards.
7084
7085 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
7086
7087         * jv-scan.c (version): Update copyright year.
7088
7089 2001-05-21  Per Bothner  <per@bothner.com>
7090
7091         * jcf-parse.c (read_class):  If class is from .class or .zip file
7092         and it's already been read, don't push/pop parser context.
7093
7094 2001-05-18  Per Bothner  <per@bothner.com>
7095
7096         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
7097         command line so the jvgenmain-generated main program comes first.
7098
7099 2001-05-15  Tom Tromey  <tromey@redhat.com>
7100
7101         * class.c (build_utf8_ref): Don't generate identifier based on
7102         utf8const contents.
7103
7104 2001-05-12  Richard Henderson  <rth@redhat.com>
7105
7106         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
7107         * expr.c (java_lang_expand_expr): Expand it.
7108         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
7109         calling build_exception_object_ref.
7110         * parse.y (catch_clause_parameter): Likewise.
7111         (build_dot_class_method): Likewise.
7112         (try_reference_assignconv): Likewise.
7113         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
7114         * jcf-write.c (generate_bytecode_insns): Likewise.
7115
7116 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7117
7118         * parse.y (build_unresolved_array_type): Set
7119         EXPR_WFL_QUALIFICATION on the newly created wfl.
7120         Fixes PR java/2538. Fixes PR java/2535.
7121
7122 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7123
7124         * parse.y (fix_constructors): Removed unnecessary assignment to
7125         local. Moved assignment to `this$<n>', fixed comments and
7126         indentation.
7127         (build_wfl_wrap): Fixed indentation.
7128         Fixes PR java/2598, java/2579 and java/2658.
7129
7130 2001-05-03  Mo DeJong  <mdejong@redhat.com>
7131
7132         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
7133         check for byte swap.
7134
7135 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
7136
7137         * expr.c (build_class_init): Move MODIFY_EXPR
7138         outside of COND_EXPR.  Remove variable `call'.
7139
7140 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7141
7142         * decl.c: NULL_PTR -> NULL.
7143         * jcf-write.c: Likewise.
7144
7145 2001-05-01  Tom Tromey  <tromey@redhat.com>
7146
7147         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
7148         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
7149         * gcj.texi: Updated copyright text.  Include fdl.texi.
7150         (Top): Link to new node.
7151
7152 2001-05-01  Per Bothner  <per@bothner.com>
7153
7154         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
7155
7156 2001-05-01  Per Bothner  <per@bothner.com>
7157
7158         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
7159         import_list contains the name, not the TREE_PURPOSE.
7160
7161 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7162
7163         * jcf-io.c (read_zip_member): Cast to long in comparison with
7164         signed value.
7165
7166         * jvspec.c (lang_specific_driver): Initialize variables.
7167
7168         * mangle.c (find_compression_record_match): Likewise.
7169
7170         * typeck.c (build_null_signature): Provide static prototype.  Mark
7171         parameter with ATTRIBUTE_UNUSED.
7172
7173         * verify.c (verify_jvm_instructions): Initialize variable.
7174
7175 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7176
7177         * parse.y (do_resolve_class): Check for cyclic inheritance during
7178         inner class resolution.
7179
7180 2001-04-27  Per Bothner  <per@bothner.com>
7181
7182         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
7183         while iterating, since that could cause gc to lose stuff.
7184
7185 2001-04-26  Per Bothner  <per@bothner.com>
7186
7187         Fix method search wrt scope of inner classes to match JLS2.
7188         * typeck.c (build_null_signature):  New static function.
7189         (has_method):  New function.  Uses build_null_signature and lookup_do.
7190         * java-tree.h (has_method):  New declaration.
7191         * parse.y (find_applicable_accessible_methods_list):  Do not search
7192         context of inner classes here.
7193         (patch_method_invocation):  Search scope, ie. current and outer clases,
7194         for method matching simple name, to find class.
7195
7196 2001-04-26  Per Bothner  <per@bothner.com>
7197
7198         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
7199         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
7200
7201         * constants.c (find_methodref_with_class_index):  New function.
7202         (find_methodref_index):  Use find_methodref_with_class_index.
7203         * java-tree.h (find_methodref_with_class_index):  New declaration.
7204         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
7205         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
7206         If context changed from interface to class, don't use invokeinterface.
7207
7208 2001-04-25  Per Bothner  <per@bothner.com>
7209
7210         * verify.c (verify_jvm_instructions):  For field instructions,
7211         check that field index is valid.  For invoke instructions, check that
7212         method index is valid.
7213
7214 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
7215
7216         * config-lang.in (target_libs): Copy from $libgcj_saved.
7217
7218 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7219
7220         * decl.c (init_decl_processing): Add new class "protectionDomain"
7221         field.
7222         * class.c (make_class_data): Set initial value for "protectionDomain".
7223
7224 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7225
7226         * jvspec.c (lang_specific_driver): Fix memory allocation
7227         deficit, by using concat in lieu of xmalloc/sprintf.
7228
7229 2001-04-20  Per Bothner  <per@bothner.com>
7230
7231         Fixes to compile multiple .class files at once.
7232         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
7233         * java-tree.h (CLASS_PARSED_P):  New macro.
7234         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
7235         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
7236         (read_class):  Avoid some code duplication.
7237         Don't call JCF_FINISH for a .class file - might be needed later.
7238         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
7239         rather than CLASS_LOADED_P, since latter implies class laid out.
7240         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
7241         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
7242
7243 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7244
7245         * Make-lang.in (java/boehm.o): Depend on toplev.h.
7246
7247         * boehm.c: Include toplev.h.
7248
7249 2001-04-06  Tom Tromey  <tromey@redhat.com>
7250             Alexandre Petit-Bianco  <apbianco@redhat.com>
7251
7252         Fix for PR gcj/1404 and PR gcj/2332:
7253         * parse.y (build_array_from_name): If we use the type_wfl then
7254         accumulate dimensions from the original type as well.
7255         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
7256
7257 2001-04-06  Tom Tromey  <tromey@redhat.com>
7258
7259         * parse.y (analyze_clinit_body): Return true if the second operand
7260         of a METHOD_EXPR is nonzero.
7261
7262 2001-04-06  Tom Tromey  <tromey@redhat.com>
7263
7264         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
7265         directory.
7266         ($(srcdir)/java/parse.c): Likewise.
7267
7268 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
7269
7270         * gcj.texi: Use `which-gcj' instead of `which-g77.'
7271         (version-gcc): Initialized.
7272         (which-gcj): Likewise.
7273
7274 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7275
7276         * java-tree.h (struct lang_decl): New macro
7277         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
7278         * parse.y (build_instance_initializer): New function.
7279         (add_instance_initializer): Use it.
7280         (java_fix_constructors): Set `current_class' before fix pass.
7281         (fix_constructors): Just return if already fixed. Move `super()'
7282         invocation ahead. Use `build_instance_initializer.'
7283         Fixes PR java/1315.
7284
7285 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7286
7287         * parse.y (resolve_qualified_expression_name): Pass field's
7288         DECL_CONTEXT to `not_accessible_p.'
7289         (not_accessible_p): Changed parameters order in `inherits_from_p'
7290         invocation.
7291
7292 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
7293
7294         * lang-options.h: Add flag_check_references.
7295
7296 2001-04-04  Per Bothner  <per@bothner.com>
7297
7298         * java-tree.h (CONSTANT_VALUE_P):  New macro.
7299         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
7300         * parse.y (maybe_build_class_init_for_field):  New static function.
7301         (resolve_expression_name, resolve_field_access):  Use
7302         maybe_build_class_init_for_field instead of build_class_init
7303         This does not do the init if the field is compile-time-constant.
7304         (resolve_field_access):  Simplify.
7305
7306         * parse.y (fold_constant_for_init):  Merge test into switch.
7307
7308 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
7309
7310         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
7311         on gansidecl.h.
7312         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
7313
7314 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
7315
7316         * expr.c (pop_type_0): Save the result of the first
7317         lang_printable_name call in a scratch buffer, so it
7318         won't be clobbered by the second call.
7319
7320 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7321
7322         * parse-scan.y (array_type:): Rewritten.
7323         (type_declaration:): `empty_statement' replaces `SC_TK.'
7324         (class_member_declaration:): `empty statement' added.
7325         (method_body:): Simplified.
7326         (static_initializer:): Likewise.
7327         (primary_no_new_array:): Use `type_literals.'
7328         (type_literals:): New rule.
7329         (dims:): Set and update `bracket_count.'
7330         Fixes PR java/1074. Fixes PR java/2412.
7331
7332 2001-03-28  Hans Boehm  <boehm@acm.org>
7333
7334         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
7335         (get_boehm_type_descriptor): Set type on returned value to be a
7336         pointer length integer.
7337
7338 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7339
7340         * expr.c (pop_type_0): Call `concat' rather than building the
7341         string manually.
7342         (pop_type): Add format specifier in call to `error'.
7343
7344         * parse.y (patch_method_invocation): Avoid casting away
7345         const-ness.
7346
7347 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
7348
7349         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
7350
7351 2001-03-28  Richard Henderson  <rth@redhat.com>
7352
7353         IA-64 ABI Exception Handling:
7354         * Make-lang.in (except.o): Don't depend on eh-common.h.
7355         * check-init.c (check_init): Handle EXC_PTR_EXPR.
7356         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
7357         [soft_exceptioninfo_call_node]: Remove.
7358         [eh_personality_libfunc, lang_eh_runtime_type]: New.
7359         (end_java_method): No emit_handlers.
7360         * except.c (java_set_exception_lang_code): Remove.
7361         (method_init_exceptions): Don't call it.
7362         (prepare_eh_table_type): No CATCH_ALL_TYPE.
7363         (build_exception_object_ref): New.
7364         (expand_end_java_handler): Update for except.h name changes.
7365         (emit_handlers, expand_resume_after_catch): Remove.
7366         * expr.c (java_lang_expand_expr): Update for except.h name changes.
7367         (process_jvm_instruction): Use build_exception_object_ref.
7368         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
7369         (soft_exceptioninfo_call_node): Remove.
7370         (build_exception_object_ref): Declare.
7371         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
7372         soft_exceptioninfo_call_node.  Move processing ...
7373         [EXC_PTR_EXPR]: ... here.
7374         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
7375         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
7376         (source_end_java_method): No java_set_exception_lang_code or
7377         emit_handlers.
7378         (build_dot_class_method): Use build_exception_object_ref.
7379         (try_reference_assignconv): Check EXC_PTR_EXPR not
7380         soft_exceptioninfo_call_node.
7381
7382 2001-03-28  Richard Henderson  <rth@redhat.com>
7383
7384         * java-tree.h (throw_node): Define as a single member of
7385         java_global_trees instead of a separate array.
7386         (JTI_THROW_NODE): New.
7387         * decl.c (throw_node): Don't declare.
7388         (init_decl_processing): Init a scalar throw_node.
7389         Don't register it for gc.
7390         * check-init.c (check_init): Reference scalar throw_node.
7391         * expr.c (build_java_athrow): Likewise.
7392         * jcf-write.c (generate_bytecode_insns): Likewise.
7393         * parse.h (BUILD_THROW): Likewise.
7394
7395 2001-03-28  Richard Henderson  <rth@redhat.com>
7396
7397         * decl.c (end_java_method): Do not save and restore
7398         flag_non_call_exceptions.
7399         * parse.y (source_end_java_method): Likewise.
7400         * lang.c (flag_exceptions): Don't declare.
7401         (java_init_options): Set flag_non_call_exceptions.  Set
7402         flag_exceptions here ...
7403         (java_init): ... not here.
7404
7405 2001-03-27  Richard Henderson  <rth@redhat.com>
7406
7407         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
7408         exceptions_via_longjmp.
7409
7410         * lang.c (flag_new_exceptions): Don't declare it.
7411         (java_init_options): Or set it.
7412
7413 2001-03-27  Richard Henderson  <rth@redhat.com>
7414
7415         * decl.c (end_java_method): Rename asynchronous_exceptions to
7416         flag_non_call_exceptions.
7417         * parse.y (source_end_java_method): Likewise.
7418
7419 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7420
7421         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7422
7423 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7424
7425         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
7426
7427 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
7428
7429         * parse.y (find_as_inner_class): Follow current package
7430         indications not to mistakingly load an unrelated class.
7431
7432 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7433
7434         * constants.c (PUTN): Use memcpy, not bcopy.
7435
7436         * lex.c (java_read_char): Use memmove, not bcopy.
7437
7438         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7439
7440 2001-03-23  Per Bothner  <per@bothner.com>
7441
7442         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
7443         macro for better error pin-pointing.
7444         * java-tree.h:  Fix typo in comment.
7445
7446         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
7447         Don't include jsr/goto in exception range.
7448         Check if start and end of exception range are the same (also TRY_EXPR).
7449         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7450         However, do emit the following goto even if try_block is empty.
7451         Defer freeing exception_decl until after the finalizer, to make
7452         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
7453
7454         * parse.y (java_complete_lhs):  If the try-clause is empty, just
7455         return the finally-clause and vice versa.
7456
7457 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7458
7459         * gcj.texi (Input Options): documented the check for attribute
7460         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7461         * java-tree.h (flag_force_classes_archive_check): Declared extern.
7462         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7463         (jcf_parse): Check for the right classes archive if necessary.
7464         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7465         (jcf_parse_fields): Fixed indentation.
7466         * jcf-write.c (append_gcj_attribute): New function.
7467         (generate_classfile): Compute the attribute count, invoke
7468         `append_gcj_attribute'.
7469         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7470         turned into bit-fields. New bit-field `right_zip.'
7471         (JCF_ZERO): Set `right_zip' to zero.
7472         * lang-options.h (-fforce-classes-archive-check): Added flag.
7473         * lang.c (flag_force_classes_archive_check): New flag.
7474         (lang_f_options): New entry `force-classes-archive-check.'
7475         Fixes PR java/1213.
7476
7477 2001-02-07  Andrew Haley  <aph@redhat.com>
7478
7479         * gcj.texi (Configure-time Options): Add -fcheck-references.
7480         * expr.c (build_java_indirect_ref): New function.
7481         (java_check_reference): New function.
7482         (build_java_array_length_access): Use build_java_indirect_ref to
7483         check for null references.
7484         (build_java_arrayaccess): Likewise.
7485         (build_get_class): Likewise.
7486         (build_field_ref): Likewise.
7487         (invoke_build_dtable): Likewise.
7488         (build_invokeinterface): Likewise.
7489         * lang.c (lang_f_options): Add flag_check_references.
7490         * jvspec.c (jvgenmain_spec): Add flag_check_references.
7491         * java-tree.h (flag_check_references): New variable.
7492         * lang.c (flag_check_references): Likewise.
7493         * parse.y (patch_invoke): Use java_check_reference.
7494         (patch_assignment): Allow for extra nesting in
7495         _Jv_CheckArrayStore.
7496
7497 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
7498
7499         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7500         * lex.c (cxx_keywords): Likewise.
7501
7502 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7503
7504         * parse.y (qualify_ambiguous_name): Broaden `length'
7505         recognition. Help MODIFY_EXPR be resolved as expression names.
7506         Fixes PR java/2066. Fixes PR java/2400.
7507
7508 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
7509
7510         * gjavah.c (process_file): Mark interface definitions with
7511         "__attribute__ ((java_interface))".
7512
7513 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7514
7515         * class.c (layout_class): Fixed push_super_field's second
7516         argument. Fixes PR java/2333.
7517         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7518         too early to lay innerclasses out.
7519
7520 2001-03-20  Tom Tromey  <tromey@redhat.com>
7521             Alexandre Petit-Bianco <apbianco@redhat.com>
7522
7523         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7524         inside an array reference. Insertion of the array store check
7525         rewritten. Fixes PR java/2299.
7526
7527 2001-03-20  Tom Tromey  <tromey@redhat.com>
7528
7529         * lex.c (java_read_unicode): Only accept leading `u's.
7530
7531 2001-03-20  Tom Tromey  <tromey@redhat.com>
7532
7533         * jcf-parse.c (read_class): Initialize `class'.
7534
7535 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7536
7537         * jcf_parse.c (jcf_parse): Eliminate unused variable.
7538
7539 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7540
7541         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7542         (layout_class): Likewise.
7543         (layout_class_method): Likewise.
7544         (emit_register_classes): Likewise.
7545         * decl.c (builtin_function): Likewise.
7546         (give_name_to_locals): Likewise.
7547
7548 2001-03-19  Per Bothner  <per@bothner.com>
7549
7550         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
7551         before trying to load an inner class.
7552
7553         Fixes to process to command-line .class files in two passes.
7554         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
7555         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
7556         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
7557         * class.c (is_compiled_class):  Fix for renamed flag.
7558         * parse.y (maybe_create_class_interface_decl):  Likewise.
7559         * jcf-parse.c (yyparse):  Also set if compiling .class files.
7560         * jcf-parse.c (read_class);  Read current_class.
7561         (jcf_parse):  Make static.
7562         (load_inner_classes):  New function, with code moved from jcf_parse,
7563         because we need to inner classes after the command-line files are read.
7564         (yyparse):  Set finput to NULL when it doesn't need to be closed.
7565         Reduce use of main_jcf (basically only for archive) and
7566         use finput instead of main_jcf->read_state.
7567         Inline jcf_figure_file_type into yyparse.
7568         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7569         Defer load_inner_classes and parse_class_file to a second pass,
7570         after we've correctly mapped command-line .clas fiels to classes.
7571         (jcf_figure_file_type):  Removed.
7572         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
7573         (JCF_ZERO):  Also clear zipd field.
7574         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
7575
7576 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7577
7578         * jcf-parse.c (yyparse): Change ch from char * to char.
7579
7580 2001-03-19  Per Bothner  <per@bothner.com>
7581
7582         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
7583         Add constructed filelist-file at end, following -xjava.  Thus any .o
7584         and library files are not affected by the -xjava.  Also wrap
7585         explicit @FILE with -xjava and -xnone.
7586
7587 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
7588
7589         * class.c (build_static_field_ref): Call make_decl_rtl() after
7590         setting the DECL_EXTERNAL flag.
7591
7592 2001-03-17  Per Bothner  <per@bothner.com>
7593
7594         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
7595
7596         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
7597         when result is is needed (target is STACK_TARGET).
7598
7599         * parse.h (JDEP_SOLV):  Removed.
7600         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
7601
7602         * parse.y (incomplete_class_list): Removed.
7603         (obtain_incomplete_type): Don't use or set incomplete_class_list.
7604         It doesn't work if resolve_class changes the name of an array type
7605         that is on the list and then someone else looks for the modified name.
7606         Also, seems liable to break when compiling multiple source files at
7607         once.  So the simplest is to just remove incomplete_class_list -
7608         it is only a minor space win and it is not even clear it saves time.
7609
7610         * parse.y (resolve_class):  Remove unneeded promote_type.
7611
7612 2001-03-15  Per Bothner  <per@bothner.com>
7613
7614         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
7615         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
7616         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7617         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7618
7619         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
7620         * parse.y (java_expand_classes):  Likewise.
7621
7622         * parse.y (expand_start_java_method):  Was only called once and had a
7623         misleading name, so inline in caller java_complete_expand_method.
7624         (enter_a_block):  Likewise inline in enter_block and remove.
7625
7626         Remove junk from when gcc/java was created (by copying from C/C++).
7627         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
7628         (struct binding_level):  Remove fields keep, keep_if_subblocks,
7629         more_cleanups_ok, have_cleanups (which have never been used).
7630         (pushlevel, poplevel):  Remove related useless code.
7631
7632         * class.c (make_class_data):  The class_dtable_decl (i.e. the
7633         vtable for Class) should be external, except when compiling Class.
7634
7635         * jvspec.c (lang_specific_driver):  Fix -C handling.
7636         Check -save-temps to see if temp @FILE should be deleted.
7637         Follow-up to/fix for February 16 patch.
7638
7639         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
7640         (type_stack_dup):  Remove no-longer neded error check.
7641
7642 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
7643
7644         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7645         to 'for_pointer'. If this type is for a pointer (argument) mangling,
7646         don't surround the element with 'N..E' if the type name is
7647         unqualified.
7648
7649 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7650
7651         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7652         DECL_RTL_SET_P, etc.
7653         (make_method_value): Likewise.
7654         (get_dispatch_table): Likewise.
7655
7656         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7657
7658 2001-03-07  Tom Tromey  <tromey@redhat.com>
7659
7660         * config-lang.in (lang_requires): Define.
7661
7662 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
7663
7664         * typeck.c (convert): Check flag_unsafe_math_optimizations,
7665         not flag_fast_math.
7666
7667 2001-03-05  Per Bothner  <per@bothner.com>
7668
7669         Fix a problem where rest_of_decl_compilation applied to
7670         class_dtable_decl causes problems because it was done too early,
7671         before output file was opened.
7672         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
7673         * class.c (class_dtable_decl):  Add macro - element of class_roots.
7674         (make_class_data):  Define class_dtable_decl.
7675         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
7676
7677 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7678
7679         * java/class.c, java/decl.c, java/java-tree.h: Replace all
7680         uses of 'boolean' with 'bool'.
7681
7682 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7683
7684         * lang-specs.h: Add zero initializer for cpp_spec field to all
7685         array elements.
7686
7687 2001-02-16  Per Bothner  <per@bothner.com>
7688
7689         Handle compiling multiple input files at once, and @FILE syntax.
7690         * gcj.texi:  Updated documentation to match.
7691         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
7692         * jcf-parse.c (parse_source_file):  Split into ...
7693         (parse_source_file_1):  New function - and:
7694         (parse_source_file_2):  New function.
7695         (yyparse):  On -ffilelist-file, open and scan named file.
7696         On first pass over files, only do parse_source_file_1.
7697         A new second pass calls parse_source_file_2 for each file to compile.
7698         (init_jcf_parse):  Call init_src_parse.
7699         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
7700         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
7701         as multiple input file combined in one compilation.
7702         * lang-options.h:  Add -ffilelist-file
7703         * lang.c (flag_filelist_file):  New flag variable.
7704         (lang_f_options):  Handle -ffilelist-file.
7705         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7706         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
7707         gclass_list - use global fields of src_parse_roots instead.
7708         * parse.y (src_parse_roots):  New array.
7709         (incomplete_class_list, gclass_list):  New macros.
7710         (push_parser_context, java_pop_parser_context,
7711         java_parser_context_resume):  Don't fiddle with deleted fields.
7712         (various):  Use incomplete_class gclass_list and global macros
7713         instead of parse_ctxt fields - the lists are global.
7714         (init_src_parse):  New function.
7715
7716 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7717
7718         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7719
7720 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7721
7722         * parse.y (check_inner_class_access): Moved declaration of local
7723         `enclosing_decl_type' to the right location.
7724
7725 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
7726
7727         * parse.y (parser_check_super_interface): Don't call
7728         check_pkg_class_access for an inner interface.
7729         (parser_check_super): Don't call check_pkg_class_access for inner
7730         class.
7731         (do_resolve_class): Simplify enclosing type loop. Don't call
7732         check_pkg_class_access if CL and DECL are not set.
7733         (find_in_imports_on_demand): Set DECL if class_type needed to be
7734         loaded. Don't call check_pkg_class_access for an inner class.
7735         (check_inner_class_access): Rewritten to implement member access
7736         rules as per spec 6.6.1.
7737         (check_pkg_class_access): Handle the empty package correctly.
7738         (in_same_package): New function. Determine if two classes are in the
7739         same package.
7740
7741 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
7742
7743         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7744         method into array types.
7745         * parse.y (patch_method_invocation): Bypass access check on clone call
7746         to array instance.
7747
7748 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
7749
7750         * expr.c (build_instanceof): Check for arrays when trying fold to
7751         false.
7752
7753 2001-02-15  Jim Meyering  <meyering@lucent.com>
7754
7755         * Make-lang.in (java.install-common): Depend on `installdirs'.
7756         (java.install-info): Likewise.
7757
7758 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
7759
7760         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7761
7762 2001-02-14  Tom Tromey  <tromey@redhat.com>
7763             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7764
7765         Fix for PR java/1261.
7766         * typeck.c (build_java_array_type): Add public `clone' method to
7767         arrays.
7768         * parse.y (resolve_qualified_expression_name): Use current_class
7769         when checking for inaccessibility.
7770         (patch_method_invocation): Fixed error message when accessibility
7771         denied.  Added `from_super' argument.
7772
7773 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7774
7775         * parse.y (resolve_class): Don't build a fake decl. Use the one
7776         already built.
7777         * typeck.c (build_java_array_type): Build and assign decl to array
7778         type.
7779
7780 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7781
7782         * parse.y (not_accessible_p): Changed leading comment. Added extra
7783         `where' argument. Use it to enforce protected access rules.
7784         (resolve_qualified_expression_name): Added extra argument to
7785         not_accessible_p.
7786         (patch_method_invocation): Use argument `primary' to provide
7787         not_accessible_p with an extra argument.
7788         (lookup_method_invoke): Added extra argument to not_accessible_p.
7789         (search_applicable_method_list): Likewise.
7790
7791 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7792
7793         * parse.y (resolve_qualified_expression_name): Try to resolve as
7794         an inner class access only if `decl' is a TYPE_DECL.
7795
7796 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7797
7798         * decl.c (classdollar_identifier_node): Initialize.
7799         * java-tree.h (enum java_tree_index): New entry
7800         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7801         (classdollar_identifier_node): New macro.
7802         (ID_CLASSDOLLAR_P): Likewise.
7803         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7804         (build_dot_class_method_invocation): Likewise.
7805         (find_applicable_accessible_methods_list): `class$' can't be
7806         inherited.
7807
7808 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
7809
7810         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7811
7812 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7813
7814         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7815         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7816         gone.
7817
7818 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7819
7820         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7821         outside of the `__U' sequence too.
7822         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7823         sequence too.
7824
7825 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7826
7827         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7828
7829 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7830
7831         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7832         (JVGENMAIN_OBJS): Likewise.
7833         * java-tree.h (append_gpp_mangled_name): New prototype.
7834         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7835         Removed cast calling `gcc_add_root.'
7836         * jvgenmain.c (mangle_obstack): New global, initialized.
7837         (main): Use it.
7838         (do_mangle_class): Constify local `ptr.'
7839         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7840         append_gpp_mangle_name and update `count' if necessary.
7841         Use `mangle_obstack.'
7842         * mangle.c (append_unicode_mangled_name): Removed.
7843         (append_gpp_mangled_name): Likewise.
7844         (unicode_mangling_length): Likewise.
7845         (mangle_member_name): Return type set to `void.'
7846         (mangle_field_decl): Don't append `U' in escaped names.
7847         (mangle_method_decl): Likewise.
7848         (mangle_member_name): Just use `append_gpp_mangled_name.'
7849         * mangle_name.c: New file.
7850
7851 2001-02-07  Per Bothner  <per@bothner.com>
7852
7853         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
7854
7855         * check-init.c (check_init):  Don't call done_alternative after
7856         processing loop code, as a LOOP_EXPR never terminates normally.
7857
7858 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7859
7860         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7861
7862 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7863
7864         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7865         DECLs.
7866
7867 2001-02-06  Tom Tromey  <tromey@redhat.com>
7868
7869         * lex.c (java_new_lexer): Longer error message.
7870
7871 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
7872             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7873
7874         * typeck.c (build_prim_array_type): Added leading comment.
7875         (build_java_array_type): Moved locals out of
7876         block. Always create the `data' field, fixed alignment to match
7877         C++.
7878
7879 2001-02-04  Tom Tromey  <tromey@redhat.com>
7880
7881         * expr.c (java_lang_expand_expr): Don't bother recomputing
7882         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
7883         Fixes PR java/1866.
7884
7885 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7886
7887         * parse.y (process_imports): Save the original name of the import
7888         for better error report.
7889
7890 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
7891
7892         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7893         of macros used when compiling jvspec.c.
7894         * jvspec.c (lang_specific_driver): Link with the shared
7895         libgcc by default.
7896
7897 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7898
7899         * check-init.c (check_init): Call internal_error instead of fatal.
7900         * expr.c (java_lang_expand_expr): Likewise.
7901         * jcf-parse.c (get_constant): Likewise.
7902         * mangle.c (java_mangle_decl): Likewise.
7903         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7904         (operator_string): Likewise.
7905         * check-init.c (check_init): Call abort instead of fatal.
7906         * class.c (build_class_ref): Likewise.
7907         * constants.c (write_constant_pool): Likewise.
7908         * decl.c (start_java_method): Likewise.
7909         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7910         (java_stack_dup, encode_newarray_type): Likewise.
7911         (build_java_array_length_access): Likewise.
7912         (build_java_check_indexed_type, expand_java_pushc): Likewise.
7913         (build_java_soft_divmod, build_invokeinterface): Likewise.
7914         * java-tree.h (INNER_CLASS_P): Likewise.
7915         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7916         (give_name_to_class, get_class_constant): Likewise.
7917         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7918         (find_constant_index, generate_bytecode_conditional): Likewise.
7919         (generate_bytecode_insns, perform_relocations): Likewise.
7920         * lex.c (java_unget_unicode, java_lex): Likewise.
7921         * mangle.c (mangle_type, mangle_record_type): Likewise.
7922         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7923         (finish_mangling): Likewise.
7924         * parse.h (MARK_FINAL_PARMS): Likewise.
7925         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7926         (obtain_incomplete_type, java_complete_class): Likewise.
7927         (java_check_regular_methods, java_complete_expand_method): Likewise.
7928         (cut_identifier_in_qualified, check_deprecation): Likewise.
7929         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7930         (java_complete_lhs, lookup_name_in_blocks): Likewise.
7931         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7932         * typeck.c (set_local_type, parse_signature_type): Likewise.
7933         (parse_signature_string, build_java_signature): Likewise;
7934         (set_java_signature): Likewise.
7935         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7936         * class.c (add_method): Call fatal_error instead of fatal.
7937         (build_static_field_ref): Likewise.
7938         * expr.c (build_known_method_ref, expand_invoke): Likewise.
7939         * jcf-parse.c (get_constant, jcf_parse): Likewise.
7940         * lex.c (java_new_new_lexer): Likewise.
7941         * jv-scan.c (main): Likewise.
7942         (fatal_error): Renamed from fatal.
7943         * jcf-parse.c (yyparse): Call fatal_io_error instead of
7944         pfatal_with_name.
7945         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7946         (yyparse): Likewise.
7947         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7948         * lex.c (java_get_line_col): Likewise.
7949         * jcf-parse.c (load_class): Make errors non-fatal.
7950         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7951
7952 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
7953
7954         * jvgenmain.c (class_mangling_suffix): Remove unused string.
7955         (error): Remove unused function.
7956         (main): Don't use "__attribute__ alias" on generated class symbol.
7957
7958 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7959
7960         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7961         argument.
7962         * parse.y (finish_method_declaration): Code accounting for WFLed
7963         method DECL_NAMEs deleted.
7964         (check_abstract_method_definitions): Likewise.
7965         (resolve_type_during_patch): Layout resolved type.
7966         * typeck.c (lookup_do): Removed unused local.
7967
7968 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
7969
7970         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7971         * decl.c (init_decl_processing): Use integer_minus_one_node, not
7972         integer_negative_one_node.
7973         * expr.c (build_java_binop): Likewise.
7974
7975 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
7976
7977         * zextract.c (read_zip_archive): Read file_offset before writing
7978         zipd and consequently clobbering the header contents.
7979
7980 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7981
7982         * Make-lang.in: Remove all dependencies on defaults.h.
7983         * decl.c: Don't include defaults.h.
7984         * expr.c: Likewise.
7985         * parse.y: Likewise.
7986
7987 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7988
7989         * ChangeLog (2001-01-21): Fixed typo.
7990         * class.c (layout_class_method): Code accounting for WFLed
7991         method DECL_NAMEs deleted.
7992         * constant.c (find_methodref_index): Likewise.
7993         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7994         * java-tree.h (DECL_FUNCTION_WFL): New macro.
7995         (struct lang_decl): New field `wfl'.
7996         (java_get_real_method_name): Prototype deleted.
7997         * mangle.c (mangle_method_decl): Code accounting for WFLed
7998         method DECL_NAMEs deleted.
7999         * parse.h (GET_METHOD_NAME): Macro deleted.
8000         * parse.y (reset_method_name): Deleted.
8001         (method_header): Set DECL_FUNCTION_WFL.
8002         (check_abstract_method_header): Code accounting for WFLed method
8003         DECL_NAMEs deleted.
8004         (java_get_real_method_name): Deleted.
8005         (check_method_redefinition): Code accounting for WFLed method
8006         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
8007         (java_check_regular_methods): Likewise.
8008         (java_check_abstract_methods): Likewise.
8009         (java_expand_classes): Don't call `reset_method_name.'
8010         (search_applicable_method_list): Use DECL_NAMEs instead of
8011         GET_METHOD_NAME.
8012         * typeck.c (lookup_do): Code accounting for WFLed method
8013         DECL_NAMEs deleted.
8014
8015 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
8016
8017         * lex.c (java_read_char): Check for EOF from getc first.
8018
8019 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8020
8021         * class.c (layout_class): Don't lay the superclass out if it's
8022         already being laid out.
8023         * jcf-parse.c (handle_innerclass_attribute): New function.
8024         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
8025         handle_innerclasses_attribute.
8026         (jcf_parse): Don't load an innerclasses if it's already being
8027         laid out.
8028         * jcf-write.c (append_innerclass_attribute_entry): Static
8029         `anonymous_name' and its initialization deleted. `ocii' and `ini'
8030         to be zero for anonymous classes.
8031
8032 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8033
8034         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
8035         necessary.
8036         * jcf-parse.c (set_source_filename): Use
8037         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
8038
8039 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8040
8041         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
8042         gets a unique asm name.
8043
8044 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8045
8046         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
8047         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8048         if necessary.
8049         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
8050         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
8051         * parse.y (lookup_package_type_and_set_next): Deleted.
8052         (resolve_package): Removed unnecessary code.
8053         (find_applicable_accessible_methods_list): `finit$' can't be
8054         inherited.
8055         * verify.c (pop_argument_types): Added missing prototype.
8056
8057 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
8058
8059         * config-lang.in: Disable java by default.
8060
8061 2001-01-23  Tom Tromey  <tromey@redhat.com>
8062
8063         * gcj.texi (Copying): New node.
8064         Added copyright information.
8065
8066 2001-01-21  Per Bothner  <per@bothner.com>
8067
8068         Various fixes to allow compiling a compressed .jar/.zip archive.
8069         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
8070         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
8071         (struct ZipDirectory):  New field zipf points to owning ZipFile.
8072         * jcf.h (struct ZipDirectory):  Add forward declaration.
8073         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
8074         Remove seen_in_zip and zip_offset fields.
8075         (JCF_SEEN_IN_ZIP):  New macro.
8076         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
8077         * jcf-io.c:  Change all ZipFileCache to ZipFile.
8078         (read_zip_member):  New function.
8079         (open_in_zip):  Call read_zip_member.
8080         * jcf-parse.c (find_in_current_zip):  Remove function.
8081         (read_class):  Merge in find_in_current_zip functionality.
8082         Call read_zip_member if needed.
8083         (parse_zip_file_entries):  Use read_zip_member.
8084         (process_zip_dir):  Update for removed and added JCF fields.
8085         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
8086
8087 2001-01-21  Per Bothner  <per@bothner.com>
8088
8089         Minor optimization of static ggc roots.
8090         * jcf-parse.c (parse_roots):  New static field.
8091         (current_field, current_method, current_file_list):  Replace by macros
8092         naming fields of parse_roots.
8093         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
8094         * class.c (class_roots):  New static field.
8095         (registered_class, fields_ident, info_ident, class_list):
8096         New macros naming fields of parse_roots.
8097         (build_static_field_ref):  Don't register roots here.
8098         (layout_class):  Static field list replaced by macro class_list.
8099         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
8100         Initialize fields_ident and info_ident here.
8101
8102 2001-01-21  Per Bothner  <per@bothner.com>
8103
8104         * jcf-parse.c (ggc_mark_jcf):  New function.
8105         (init_jcf_parse):  Register current_jcf as ggc root.
8106
8107 2001-01-21  Per Bothner  <per@bothner.com>
8108
8109         * lang.c (put_decl_node):  Print method's name.
8110
8111 2001-01-21  Per Bothner  <per@bothner.com>
8112
8113         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
8114         (verify_jvm_instructions):  Use it, for better error messages on loads.
8115
8116 2001-01-21  Per Bothner  <per@bothner.com>
8117
8118         * verify.c (merge_type_state):  Still may have to merge even if
8119         LABEL_VERIFIED (label).
8120
8121 2001-01-21  Per Bothner  <per@bothner.com>
8122
8123         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
8124         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
8125
8126 2001-01-19  Per Bothner  <per@bothner.com>
8127
8128         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
8129         if expeting an interface type.  Refines Tom's change of 2000-09-12.
8130
8131 2001-01-18  Per Bothner  <per@bothner.com>
8132
8133         * gcj.texi (Input Options): Mention .java files.
8134
8135 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8136
8137         * lang-options.h (-Wunsupported-jdk11): Removed.
8138         * lang.c (flag_not_overriding): Deleted.
8139         (flag_static_local_jdk1_1): Likewise.
8140         (lang_W_options): Removed "unsupported-jdk11" entry.
8141         * parse.y (java_check_methods): Removed dead code.
8142
8143 2001-01-17  Tom Tromey  <tromey@redhat.com>
8144
8145         Changes suggested by Per Bothner:
8146         * gcj.texi (Input Options): Don't mention input files.
8147         (Code Generation): Updated --main information.
8148         (Invoking jcf-dump): Mention that --javap is incomplete.
8149         From Alexandre Petit-Bianco:
8150         (Warnings): Don't mention -Wunsupported-jdk11.
8151         My stuff:
8152         (Compatibility): Mention JDK 1.2-ness of libraries.
8153         (Resources): Mention resources used when writing gcj.
8154
8155 2001-01-17  Tom Tromey  <tromey@redhat.com>
8156
8157         * gcj.texi: New file.
8158         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
8159         (java.info): Depend on gcj.info.
8160         (java/gcj.dvi): New target.
8161         (java.dvi): Depend on gcj.dvi.
8162         (java.install-info): Wrote.
8163
8164 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
8165
8166         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
8167         having called make_decl_rtl.
8168
8169 2001-01-14  Per Bothner  <per@bothner.com>
8170
8171         Various patches to emit better messages on verification errors.
8172         * expr.c (push_type_0):  Return error indication on stack overflow,
8173         instead of callinfg fatal.
8174         (push_type):  Now just call push_type_0 (nd fatal on overflow).
8175         (pop_type_0):  Return detailed error message (in a char** argument).
8176         (pop_type):  If pop_type_0 fails, print error message.
8177         (pop_argument_types):  Moved to verify.c.
8178         * verify.c (pop_argument_types):  Moved from expr.c.
8179         Return a (possible) error message, rather than void.
8180         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
8181         (verify_jvm_instruction):  Use new macros, improving error messages.
8182         For case OPCODE_astore use object_ptr_type_node.
8183         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
8184         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
8185
8186         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
8187         constant, return body without wrapper.  (Improves constant folding.)
8188         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
8189
8190 2001-01-13  Per Bothner  <per@bothner.com>
8191
8192         * expr.c (expand_java_field_op):  Assigning to a final field outside
8193         an initializer does not violate JVM spec, so should be warning, not
8194         error.  (Sun's verifier does not complain - though MicroSoft's does.)
8195
8196 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
8197
8198         * gjavah.c (version), jcf-dump.c (version): Update copyright year
8199         to 2001.
8200
8201 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
8202
8203         * parse.y (resolve_expression_name): Permit instance variables from
8204         enclosing context in super constructor call.
8205         (resolve_qualified_expression_name): Permit enclosing class's qualified
8206         "this" in super constructor call.
8207
8208 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8209
8210         * class.c (build_utf8_ref): Remove last argument in call to
8211         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8212         (build_class_ref): Likewise.
8213         (build_static_field_ref): Likewise.
8214         (get_dispatch_table): Likewise.
8215         (layout_class_method): Likewise.
8216         (emit_register_classes): Likewise.
8217         * constants.c (build_constant_data_ref): Likewise.
8218         * decl.c (builtin_function): Likewise.
8219         (create_primitive_vtable): Likewise.
8220         * expr.c (build_known_method_def): Likewise.
8221         (build_jni_stub): Likewise.
8222         (java_lang_expand_expr): Likewise.
8223
8224 2001-01-10  Tom Tromey  <tromey@redhat.com>
8225
8226         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
8227
8228 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8229
8230         * java-tree.h (lang_printable_name_wls): New prototype.
8231         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
8232         rather than `current_class' to print type name. Don't prepend type
8233         names when printing constructor names.
8234         (lang_printable_name_wls): New function.
8235         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
8236         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
8237         * parse.y (patch_method_invocation): Message tuned for constructors.
8238         (not_accessible_p): Grant `private' access from within
8239         enclosing contexts.
8240
8241 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8242
8243         All files with updated copyright when applicable.
8244         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
8245         * class.c (mangle_class_field): Function removed.
8246         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
8247         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
8248         (build_class_ref): Call `java_mangle_class_field' instead of
8249         `mangle_class_field.'
8250         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
8251         (layout_class): Call `java_mangle_decl' instead of
8252         `mangle_static_field.'
8253         (cxx_keywords): Initialized static array moved to `lex.c.'
8254         (layout_class_method): Changed leading comment. Simplified to
8255         call `java_mangle_decl.' Local `ptr' moved in for loop body.
8256         * decl.c (lang_mark_tree): Mark field `package_list.'
8257         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
8258         (struct lang_type): New field `package_list.'
8259         (unicode_mangling_length): Prototype removed.
8260         (append_gpp_mangled_name, append_gpp_mangled_classtype,
8261         emit_unicode_mangled_name): Likewise.
8262         (cxx_keyword_p): New prototype.
8263         (java_mangle_decl, java_mangle_class_field,
8264         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
8265         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
8266         `build_expr_wfl.'
8267         * jvgenmain.c (main_method_prefix): Global variable removed.
8268         (main_method_suffix): Likewise.
8269         (do_mangle_classname): New function.
8270         (main): Call it. Format changed to accommodate new mangling scheme.
8271         * lex.c: (utf8_cmp): Conditionally prototyped.
8272         (cxx_keywords): Moved from class.c, conditionally defined.
8273         (utf8_cmp, cxx_keyword_p): Likewise.
8274         * mangle.c (obstack.h, ggc.h): Included.
8275         (mangle_field_decl): New function.
8276         (mangle_method_decl, mangle_type, mangle_pointer_type,
8277         mangle_array_type, mangle_record_type,
8278         find_compression_pointer_match, find_compression_array_match,
8279         find_compression_record_match,
8280         find_compression_array_template_match, set_type_package_list,
8281         entry_match_pointer_p, emit_compression_string, init_mangling,
8282         finish_mangling, compression_table_add, mangle_member_name): Likewise.
8283         (mangle_obstack): New global.
8284         (MANGLE_RAW_STRING): New macro.
8285         (unicode_mangling_length): Turned static.
8286         (append_unicode_mangled_name): Renamed from
8287         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
8288         replaces `obstack', removed from the parameter list.
8289         (append_gpp_mangled_name): Turned static. `mangle_obstack'
8290         replaces parameter `obstack', removed from the parameter list. Call
8291         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
8292         (append_gpp_mangled_classtype): Removed.
8293         (compression_table, compression_next): New static variables.
8294         * parse.y (temporary_obstack): Extern declaration removed.
8295
8296 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8297
8298         * parse.y (patch_binop): Compute missing type in error situations.
8299
8300 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8301
8302         * class.c (make_class_data): Push initial value for "arrayclass".
8303         * decl.c (init_decl_processing): Add new class field "arrayclass".
8304
8305 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8306
8307         From patha@softlab.ericsson.se:
8308         * parse.y (switch_label): Use build, not build1, to construct
8309         DEFAULT_EXPR.
8310
8311 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8312
8313         * lang.c (lang_decode_option): Change -MA to -MP.
8314         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
8315         Update to new prototype; do quote targets.
8316         (jcf_dependency_write): Update.
8317
8318 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
8319
8320         Shorten primitive array allocation path:
8321         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
8322         to create new primitive arrays.
8323         * expr.c (build_newarray): If generating native code, call
8324         soft_newarray_node with a reference to the primitive TYPE identifier
8325         instead of type_value.
8326
8327 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
8328
8329         Fix for PRs gcj/312 and gcj/253:
8330         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
8331         dest if they arn't already.
8332         * class.c (layout_class): Call maybe_layout_super_class on
8333         superinterfaces also, but only if compiling from bytecode.
8334
8335         Fix for PR gcj/373:
8336         * parse.y (create_class): Set ACC_STATIC if class is declared in an
8337         interface.
8338
8339 2000-12-15  Tom Tromey  <tromey@redhat.com>
8340
8341         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
8342         set.
8343
8344 2000-12-14  Andrew Haley  <aph@redhat.com>
8345
8346         * boehm.c (mark_reference_fields): Change test to correctly detect
8347         bitmap overflow.
8348
8349 2000-12-15  Andreas Jaeger  <aj@suse.de>
8350
8351         * config-lang.in (lang_dirs): Added.
8352
8353 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8354
8355         * parse.y (end_artificial_method_body): Fixed undefined behavior.
8356         Credits go to rth for finding it.
8357
8358 2000-12-13  Mike Stump  <mrs@wrs.com>
8359
8360         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
8361
8362 2000-11-07  Tom Tromey  <tromey@cygnus.com>
8363
8364         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
8365         * lex.c (java_ignorable_control_p): Removed.
8366         (java_letter_or_digit_p): Removed.
8367         (java_start_char_p): New function.
8368         (java_read_char): Return `int', not `unicode_t'.  Changed
8369         callers.
8370         (java_read_unicode): Likewise.
8371         (java_read_unicode_collapsing_terminators): Likewise.
8372         (java_get_unicode): Likewise.
8373         (java_new_lexer): Initialize hit_eof.
8374         (java_parse_end_comment): Take `int' argument.
8375         (java_parse_doc_section): Likewise.
8376         (java_parse_escape_sequence): Don't allow backlash-newline.
8377         Return `int'.
8378         * lex.h (JAVA_DIGIT_P): Removed.
8379         (_JAVA_LETTER_OR_DIGIT_P): Removed.
8380         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
8381         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
8382         (JAVA_PART_CHAR_P): New macro.
8383         (UEOF): Now -1.
8384         (JAVA_CHAR_ERROR): Now -2.
8385         (java_lexer): New field `hit_eof'.
8386         * chartables.h: New file.
8387         * gen-table.pl: new file.
8388
8389 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8390             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8391
8392         * parse.y (java_complete_lhs): Only allow compound assignment of
8393         reference type if type is String.
8394
8395 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8396
8397         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
8398         jcf-path.c: Likewise.
8399
8400 2000-12-09  Anthony Green  <green@redhat.com>
8401
8402         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
8403         filestart and filename_length as int values.
8404
8405 2000-12-07  Mo DeJong  <mdejong@redhat.com>
8406
8407         * jcf-io.c (find_class): Correct the logic that tests to see if a
8408         .java file is newer than its .class file. The compiler was
8409         incorrectly printing a warning when file mod times were equal.
8410
8411 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
8412
8413         * jvgenmain.c: Use ISPRINT not isascii.
8414
8415 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8416
8417         * parse.y (end_artificial_method_body): Fixed typo.
8418
8419 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8420
8421         * parse.y (patch_method_invocation): Pick the correct enclosing
8422         context when creating inner class instances.
8423         Fixes gcj/332.
8424
8425 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
8426
8427         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8428         Update copyright year to 2000.
8429
8430 2000-11-23  Anthony Green  <green@redhat.com>
8431
8432         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8433         Move current_file_list out of yyparse and make it static.
8434
8435         * expr.c: Declare quick_stack and tree_list_free_list as static
8436         (init_expr_processing): Register quick_stack and
8437         tree_list_free_list roots.
8438
8439 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8440
8441         * parse.y (build_outer_field_access): New local `decl_ctx', use
8442         it. Check for field's context and current class immediate outer
8443         context inheritance.
8444         (outer_field_access_p): Consider fields inherited from the last
8445         enclosing context.
8446         (build_access_to_thisn): Stop at the last enclosing context if
8447         necessary.
8448         Fixes gcj/367.
8449
8450 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
8451
8452         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8453
8454 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
8455
8456         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8457         scratch buffer.
8458
8459 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8460
8461         * jv-scan.c (help): Document --complexity.
8462         (options): Added --complexity.
8463         (flag_complexity): New global.
8464         (main): Call `report'.
8465         * parse-scan.y (complexity): New global.
8466         (if_then_statement, if_then_else_statement,
8467         if_then_else_statement_nsi, switch_block_statement_group,
8468         while_expression, do_statement, for_begin, continue_statement,
8469         throw_statement, catch_clause, finally, method_invocation,
8470         conditional_and_expression, conditional_or_expression,
8471         conditional_expression): Update complexity.
8472         (reset_report): Reset complexity.
8473         (report): New function.
8474
8475 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8476
8477         * lex.c (yylex): Added STRICT_TK case.
8478         * parse.y (STRICT_TK): Added.
8479         * parse-scan.y (STRICT_TK): Added.
8480         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8481         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
8482         file.
8483         * keyword.h: Rebuilt.
8484         * keyword.gperf (strictfp): Added.
8485
8486 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8487
8488         * lex.c (yylex): Recognize floating point constants with leading
8489         0.
8490
8491 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8492
8493         * java-tree.h (cyclic_inheritance_report): Constify.
8494         * parse.y (cyclic_inheritance_report): Likewise.
8495
8496 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
8497
8498         * parse.y (goal): Remove call to ggc_add_string_root.
8499
8500 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
8501
8502         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8503         Create string in scratch buffer, then pass to build_string.
8504
8505 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8506
8507         * parse.y (issue_warning_error_from_context): Add
8508         ATTRIBUTE_PRINTF.
8509
8510 2000-11-11  Anthony Green  <green@redhat.com>
8511
8512         * jcf-parse.c (process_zip_dir): Add finput parameter.
8513         (jcf_figure_file_type): Call process_zip_dir with appropriate
8514         argument.
8515
8516 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8517
8518         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8519         * jcf-parse.c (jcf_figure_file_type): Likewise.
8520
8521 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8522
8523         * parse.y (create_new_parser_context): Use memset () instead of
8524         bzero ().
8525
8526 2000-11-08  Tom Tromey  <tromey@cygnus.com>
8527
8528         * gjavah.c (process_file): Only include gcj/cni.h when generating
8529         CNI stubs.
8530
8531 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8532
8533         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8534         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8535         instead of bzero ().
8536
8537 2000-11-05  Tom Tromey  <tromey@cygnus.com>
8538
8539         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8540         * lex.c (IS_ZERO): New define.
8541         (java_perform_atof): Error on floating point underflow.
8542
8543 2000-11-04  Tom Tromey  <tromey@cygnus.com>
8544
8545         * lex.c (java_parse_escape_sequence): Only read two octal
8546         characters if the first one is greater than 3.  Don't allow
8547         "octal" numbers to include the digits 8 or 9.
8548
8549 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
8550
8551         * Make-lang.in (java.distdir): Remove.
8552
8553 2000-11-03  Tom Tromey  <tromey@cygnus.com>
8554
8555         * Make-lang.in (java.dvi): New target.
8556         Partial fix for PR other/567.
8557
8558         * lang-options.h: Mention -Wout-of-date.
8559         * jcf-dump.c (flag_newer): New global.
8560         * gjavah.c (flag_newer): New global.
8561         * jcf-io.c (find_class): Only warn when flag_newer set.
8562         * lang.c (flag_newer): New global.
8563         (struct string_option): New declaration.
8564         (lang_W_options): New global.
8565         (process_option_with_no): New function.
8566         (lang_decode_option): Use it.
8567
8568         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8569         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8570         `$'.
8571
8572         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8573         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8574         * lex.c (java_read_unicode): Removed `term_context' argument.
8575         Recognize any number of `u' in `\u'.
8576         (java_read_unicode_collapsing_terminators): New function.
8577         (java_get_unicode): Use it.
8578         (java_lineterminator): Removed.
8579         (yylex): Produce error if character literal is newline or single
8580         quote.  Return if eof found in middle of `//' comment.  EOF in
8581         `//' comment is only an error if pedantic.
8582         (java_ignorable_control_p): New function.
8583         (java_parse_end_comment): Return if eof found in middle of
8584         comment.
8585         Include flags.h.
8586         * jv-scan.c (pedantic): New global.
8587
8588 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8589
8590         * parse.y (outer_field_access_p): Inherited fields aren't
8591         consider outer fields.
8592         (maybe_build_thisn_access_method): Use
8593         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8594         (resolve_expression_name): Trigger an error if a static field
8595         is being accessed as an outer field.
8596
8597 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8598
8599         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8600         Fixes gcj/365.
8601
8602 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
8603
8604         * Make-lang.in: Move all build rules here from Makefile.in,
8605         adapt to new context.  Wrap all rules that change the current
8606         directory in parentheses.  Expunge all references to $(P).
8607         When one command depends on another and they're run all at
8608         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
8609         all object-file generation rules.  Delete obsolete variables.
8610
8611         * Makefile.in: Delete.
8612         * config-lang.in: Delete outputs= line.
8613
8614 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8615
8616         * parse.y (patch_method_invocation): NULLify this_arg when already
8617         inserted.
8618         (maybe_use_access_method): Handle call to methods unrelated to the
8619         current class. Fixed comment.
8620         Fixes gcj/361.
8621
8622 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8623
8624        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8625        scope.
8626
8627 2000-10-24  Tom Tromey  <tromey@cygnus.com>
8628
8629         * lex.c (java_new_lexer): Initialize new fields.  Work around
8630         broken iconv() implementations.
8631         (java_read_char): Swap bytes if required.  Use fallback decoder if
8632         required.
8633         (byteswap_init, need_byteswap): New globals.
8634         (java_destroy_lexer): Only close iconv handle if it is in use.
8635         * lex.h (java_lexer): New fields read_anything, byte_swap,
8636         use_fallback.
8637         Made out_buffer unsigned.
8638
8639 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8640
8641         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8642         where an enclosing context can be set on the jdep.
8643         (do_resolve_class): Fixed identation.
8644
8645 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8646
8647         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8648
8649         * jcf-reader.c (peek_attribute, skip_attribute): Only define
8650         when requested.
8651
8652         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8653
8654         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8655
8656 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8657
8658         * jcf-write.c (OP1): Update `last_bc'.
8659         (struct jcf_block): Fixed indentation and typo in comments.  New
8660         field `last_bc'.
8661         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8662         follows `monitorenter'.
8663         * parse.y (patch_synchronized_statement): New local `tmp'. Call
8664         `patch_string'.
8665         Fixes gcj/232.
8666
8667 2000-10-16  Tom Tromey  <tromey@cygnus.com>
8668
8669         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8670         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8671         * lang-options.h: Added -MA, -MT, -MF..
8672         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8673         (DEPEND_TARGET_SET): New macro.
8674         (DEPEND_FILE_ALREADY_SET): Likewise.
8675         (init_parse): Handle new flags.
8676         * jcf.h (jcf_dependency_print_dummies): Declare.
8677         * Make-lang.in (s-java): Added mkdeps.o.
8678         * Makefile.in (BACKEND): Added mkdeps.o.
8679         (../gcjh$(exeext)): Added mkdeps.o.
8680         (../jcf-dump$(exeext)): Added mkdeps.o.
8681         * jcf-depend.c: Include mkdeps.h.
8682         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8683         add_entry): Removed.
8684         (jcf_dependency_reset): Rewrote.
8685         (dependencies): New global.
8686         (jcf_dependency_set_target): Rewrote.
8687         (jcf_dependency_add_target): Likewise.
8688         (jcf_dependency_add_file): Likewise.
8689         (munge): Removed.
8690         (print_ents): Removed.
8691         (jcf_dependency_write): Rewrote.
8692         (print_dummies): New global.
8693         (jcf_dependency_print_dummies): New function
8694         (jcf_dependency_write): Call deps_dummy_targets if required.
8695
8696 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8697
8698         * gjavah.c (add_class_decl): Removed unused variables `tname',
8699         `tlen' and `name_index'.
8700         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8701         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8702         in `wfl_operator' with value.
8703         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8704         (jcf_figure_file_type): Fixed identation.
8705         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8706         * parse.y (analyze_clinit_body): New function.
8707         (static_initializer:): Reset `current_static_block'.
8708         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8709         `wfl_operator' with new value.
8710         (lookup_cl): Use EXPR_WFL_FILENAME.
8711         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8712         analyze_clinit_body.
8713         (build_outer_field_access): Access to this$<n> built from
8714         current_class, not its outer context.
8715         (build_access_to_thisn): Fixed leading comment. Tidied things up.
8716         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8717         (patch_method_invocation): Use `is_static_flag' when already
8718         initialized.
8719         (patch_newarray): Removed assignment in ternary operator.
8720
8721 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8722
8723         * except.c (free_eh_ranges): Don't free `whole_range'.
8724
8725 2000-10-15  Anthony Green  <green@redhat.com>
8726
8727         * decl.c (init_decl_processing): Call init_class_processing before
8728         anything else.
8729
8730 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8731
8732         * check-init.c (check_init): Fixed leading comment. Use
8733         LOCAL_FINAL_P.
8734         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8735         (give_name_to_locals): Likewise.
8736         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8737         fields in lang_decl_var.
8738         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8739         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8740         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8741         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8742         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8743         (LOCAL_FINAL): Rewritten.
8744         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8745         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8746         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8747         `init_final' fields.
8748         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8749         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8750         (TYPE_HAS_FINAL_VARIABLE): New macro.
8751         (struct lang_type): Added `afv' field.
8752         * parse.y (check_static_final_variable_assignment_flag): New function.
8753         (reset_static_final_variable_assignment_flag): Likewise.
8754         (check_final_variable_local_assignment_flag): Likewise.
8755         (reset_final_variable_local_assignment_flag): Likewise.
8756         (check_final_variable_indirect_assignment): Likewise.
8757         (check_final_variable_global_assignment_flag): Likewise.
8758         (add_inner_class_fields): Use LOCAL_FINAL_P.
8759         (register_fields): Handle local finals and final variables.
8760         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8761         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8762         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8763         on local finals.
8764         (java_complete_expand_methods): Loop to set
8765         TYPE_HAS_FINAL_VARIABLE. Call
8766         `reset_final_variable_local_assignment_flag' and
8767         `check_final_variable_local_assignment_flag' accordingly before
8768         and after constructor expansion. Call
8769         `reset_static_final_variable_assignment_flag'
8770         before expanding <clinit> and after call
8771         `check_static_final_variable_assignment_flag' if the
8772         current_class isn't an interface. After all methods have been
8773         expanded, call `check_final_variable_global_assignment_flag' and
8774         `check_static_final_variable_assignment_flag' if the current class
8775         is an interface.
8776         (maybe_yank_clinit): Fixed typo in comment.
8777         (build_outer_field_access_methods): Removed old sanity check. Use
8778         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8779         Don't create access methods for finals.
8780         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8781         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8782         existing DECL_INIT has been processed.
8783         (java_complete_lhs): Likewise.
8784         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8785         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8786         logic.
8787         (patch_assignment): Use LOCAL_FINAL_P.
8788         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8789         DECL_INITIAL is nullified.
8790         Fixes gcj/163.
8791
8792 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8793
8794         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8795
8796         * Makefile.in (parse.c, parse-scan.c): Likewise.
8797
8798 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
8799
8800         * class.c (temporary_obstack): Remove.
8801         (make_class): Don't mess with obstascks.
8802         (push_class): Likewise.
8803         (set_super_info): Likewise.
8804         (add_method_1): Likewise.
8805         (add_method): Likewise.
8806         (add_field): Likewise.
8807         (build_utf8_ref): Likewise.
8808         (build_class_ref): Likewise.
8809         (build_static_field_ref): Likewise.
8810         (finish_class): Likewise.
8811         (push_super_field): Likewise.
8812         (layout_class): Likewise.
8813         (layout_class_methods): Likewise.
8814         (init_class_processing): Likewise.
8815         * constants.c (get_tag_node): Likewise.
8816         (build_constant_data_ref): Likewise.
8817         * decl.c (ggc_p): Remove.
8818         (copy_lang_decl): Use ggc_alloc.
8819         (complete_start_java_method): Don't mess with obstacks.
8820         (start_java_method): Likewise.
8821         (end_java_method): Likewise.
8822         * except.c (link_handler): Use xmalloc.
8823         (free_eh_ranges): New function.
8824         (method_init_exceptions): Use it.
8825         (add_handler): Use xmalloc.
8826         (expand_start_java_handler): Don't mess with obstacks.
8827         (prepare_eh_table_type): Likewise.
8828         (expand_end_java_handler): Likewise.
8829         * expr.c (push_value): Likewise.
8830         (create_label_decl): Likewise.
8831         (build_jni_stub): Likewise.
8832         (java_lang_expand_expr): Likewise.
8833         (note_instructions): Use xrealloc.
8834         (java_push_constant_from_pool): Don't mess with obstacks.
8835         (process_jvm_instruction): Likewise.
8836         * java-tree.h (cyclic_inheritance_report): Remove duplicate
8837         declaration.
8838         * jcf-parse.c (get_constant): Don't mess with obstacks.
8839         (read_class): Likewise.
8840         (jcf_parse): Likewise.
8841         * lex.c (expression_obstack): Remove.
8842         (java_lex): Don't use obstack_free.
8843         * parse.h (exit_java_complete_class): Don't mess with obstacks.
8844         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8845         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8846         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8847         * parse.y (gaol): Add more GC roots.
8848         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8849         (lookup_field_wrapper): Likewise.
8850         (obtain_incomplete_type): Don't mess with obstacks.
8851         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8852         macros.
8853         (craft_constructor): Don't mess with obstacks.
8854         (safe_layout_class): Likewise.
8855         (java_complete_class): Likewise.
8856         (source_end_java_method): Likewise.
8857         (build_outer_field_access_methods): Likewise.
8858         (build_outer_method_access_method): Likewise.
8859         (maybe_build_thisn_access_method): Likewise.
8860         (build_dot_class_method_invocation): Likewise.
8861         (java_complete_tree): Likewise.
8862         (java_complete_lhs): Likewise.
8863         (do_merge_string_cste): Likewise.
8864         (patch_string_cst): Likewise.
8865         (array_constructor_check_entry): Likewise.
8866         * typeck.c (build_java_array_type): Likewise.
8867         (parse_signature_string): Likewise.
8868         (build_java_signature): Likewise.
8869
8870 2000-10-12  Tom Tromey  <tromey@cygnus.com>
8871
8872         Fix for PR gcj/356:
8873         * gjavah.c (add_class_decl): Don't special-case inner classes.
8874         (add_namelet): Likewise.
8875
8876 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
8877
8878         * java-tree.h: Constify current_encoding.
8879         * lang.c: Constify current_encoding.
8880
8881 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
8882
8883         * jvgenmain.c (class_mangling_suffix): Omit `.'.
8884         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8885
8886 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8887
8888         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8889         patch. Fixes gcj/340.
8890
8891 2000-10-10  Tom Tromey  <tromey@cygnus.com>
8892
8893         * lex.c (java_new_lexer): Initialize out_first and out_last
8894         fields.
8895         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8896
8897 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8898
8899         * parse.y (pop_current_osb): New function.
8900         (array_type:): Use `dims:', changed actions
8901         accordingly. Suggested by Anthony Green.
8902         (array_creation_expression:): Used pop_current_osb.
8903         (cast_expression:): Likewise.
8904         (search_applicable_method_list): Fixed indentation.
8905
8906 2000-10-08  Anthony Green  <green@redhat.com>
8907
8908         * parse.y (array_type_literal): Remove production.
8909         (type_literals): Refer to array_type, not array_type_literal.
8910
8911 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8912
8913         Patch contributed by Corey Minyard.
8914         * decl.c (check_local_named_variable): New function.
8915         (tree check_local_unnamed_variable): Likewise.
8916         (find_local_variable): Splitted. Call check_local_{un}named_variable.
8917
8918 2000-10-07  Anthony Green  <green@redhat.com>
8919
8920         * class.c (layout_class): Handle case where superclass can't be
8921         layed out yet.
8922
8923 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8924
8925         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8926         gperf.
8927
8928 2000-10-05  Tom Tromey  <tromey@cygnus.com>
8929
8930         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8931         * jvgenmain.c (class_mangling_prefix): Removed.
8932         (class_mangling_suffix): New global.
8933         (main): Use it.
8934         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8935         `$'.
8936         (print_method_info): Handle overrides for static and final
8937         methods.
8938         (process_file): Generate declaration for class object field.
8939         * class.c (cxx_keywords): New array.
8940         (utf8_cmp): New function.
8941         (cxx_keyword_p): New function.
8942         (layout_class_method): Mangle C++ keywords by appending `$'.
8943         (mangle_field): New function.
8944         (mangle_class_field): Use mangle_field.  Mangle class name as
8945         `class$'.
8946         (mangle_static_field): Use mangle_field.
8947
8948 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8949
8950         * decl.c (find_local_variable): Removed uncessary type check and
8951         fixed range check typo. From Corey Minyard.
8952
8953 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8954
8955         * decl.c (give_name_to_locals): New local `code_offset'. Call
8956         `maybe_adjust_start_pc'.
8957         * expr.c (note_instructions): New function.
8958         (expand_byte_code): Don't collect insn starts here.
8959         (peek_opcode_at_pc): New function.
8960         (maybe_adjust_start_pc): Likewise.
8961         * java-tree.h (maybe_adjust_start_pc): Declare.
8962         (note_instructions): Likewise.
8963         * jcf-parse.c (parse_class_file): Call `note_instructions'.
8964
8965 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8966
8967         * parse.y (field_access:): Fixed indentation.
8968         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8969
8970 2000-09-07  Tom Tromey  <tromey@cygnus.com>
8971
8972         Fix for PR gcj/307:
8973         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8974         JPRIMITIVE_TYPE_P, for arithmetic operators.
8975         (patch_method_invocation): Indentation fix.
8976         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
8977         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8978         (do_unary_numeric_promotion): Cleaned up code.
8979         (valid_cast_to_p): Handle boolean correctly.
8980
8981 2000-09-27  Tom Tromey  <tromey@cygnus.com>
8982
8983         * lex.c (java_read_unicode): Reset bs_count when finished with
8984         `\u' sequence.
8985
8986 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
8987
8988         Convert to GC.
8989         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8990         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8991         (typeck.o): Depend on ggc.h.
8992         * class.c (add_method_1): Use GC functions for allocation.
8993         (init_class_processing): Register roots.
8994         * decl.c (ggc_p): Set to 1.
8995         (pending_local_decls): Make it static.
8996         (push_jvm_slot): Use GC functions for allocation.
8997         (init_decl_processing): Register roots.
8998         (give_name_to_locals): Use GC functions for allocation.
8999         (lang_mark_tree): New function.
9000         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
9001         functions for allocation.
9002         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
9003         * lex.c (java_lex): Use build_string, rather than replicating it
9004         inline.
9005         * parse.y (goal): Add more roots.
9006         (mark_parser_ctxt): New function.
9007         * typeck.c: Include ggc.h.
9008
9009 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9010
9011         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
9012         contains something else than MODIFY_EXPR.
9013
9014 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
9015
9016         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
9017         * Makefile.in (parse.o): Depend on ggc.h.
9018         (class.o): Likewise.
9019         (constants.o): Likewise.
9020         (decl.o): Likewise.
9021         (expr.o): Likewise.
9022         (jcf-parse.o): Likewise.
9023         (jcf-write.o): Likewise.
9024         (mangle.o): Likewise.
9025         * class.c: Include ggc.h.
9026         (build_static_field_ref): Register GC roots.
9027         (layout_class): Likewise.
9028         (init_class_processing): Likewise.
9029         * constants.c: Include ggc.h.
9030         (current_constant_pool_data_ref): Remove.
9031         (tag_nodes): Move it to ...
9032         (get_tag_node): ... here.  Register GC roots.
9033         * decl.c: Include ggc.h.  Remove many global tree definitions.
9034         (throw_node): Define.
9035         (java_global_trees): Likewise.
9036         (predef_filenames): Make the size a constant.
9037         (init_decl_processing): Adjust accordingly.
9038         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
9039         * expr.c: Include ggc.h.
9040         (init_expr_processing): Register GC roots.
9041         (build_invokeinterface): Likewise.
9042         * java-tree.h: Replace extern tree declarations with macros.
9043         (java_global_trees): New variable.
9044         (java_tree_index): New enumeration.
9045         (init_jcf_parse): Declare.
9046         * jcf-parse.c: Include ggc.h.
9047         (current_class): Remove declaration.
9048         (main_class): Likewise.
9049         (all_class_list): Likewise.
9050         (predefined_filename_p): Adjust for constant size of
9051         predef_filenames.
9052         (init_jcf_parse): New function.
9053         * jcf-write.c: Include ggc.h.
9054         (generate_classfile): Register GC roots.
9055         (append_synthetic_attribute): Likewise.
9056         (append_innerclass_attribute_entry): Likewise.
9057         * lang.c: Include ggc.h.
9058         (lang_print_error): Register GC roots.
9059         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
9060         with macros.
9061         * parse.y: Include ggc.h.
9062         (wfl_operator): Remove.
9063         (goal): Register GC roots.
9064         (java_pop_parser_context): Adjust for new field names.
9065         (java_parser_context_save_global): Likewse.
9066         (java_parser_context_restore_global): Likewise.
9067         (java_parser_context_suspend): Likewise.
9068         (java_parser_context_resume): Likewise.
9069         (verify_constructor_circularity): Register GC roots.
9070         (lookup_cl): Likewise.
9071         (java_reorder_fields): Likewise.
9072         (build_current_this): Likewise.
9073         (class_in_current_package): Likewise.
9074         (argument_types_convertible): Likewise.
9075         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
9076
9077 2000-09-14  Tom Tromey  <tromey@cygnus.com>
9078
9079         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
9080
9081 2000-09-13  Tom Tromey  <tromey@cygnus.com>
9082
9083         * jcf-parse.c: Include <locale.h>.
9084         * jv-scan.c: Include <locale.h>.
9085
9086 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9087
9088         * expr.c (pop_type_0): Return `Object' if trying to merge two
9089         interface types.
9090         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
9091         interface types; `Object' is always a valid supertype.
9092
9093 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9094
9095         Fix for PR gcj/33:
9096         * jv-scan.c (help): Document --encoding.
9097         (options): Added `encoding' entry.
9098         (OPT_ENCODING): New define.
9099         (main): Handle --encoding.
9100         Include <langinfo.h> if nl_langinfo exists.
9101         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
9102         --encoding.
9103         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
9104         (parse_source_file): Correctly call java_init_lex.  Added `finput'
9105         argument.  Use nl_langinfo to determine default encoding.
9106         * java-tree.h (current_encoding): Declare.
9107         * parse.y (java_parser_context_restore_global): Don't restore
9108         `finput'.
9109         (java_parser_context_save_global): Don't set `finput' field.
9110         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
9111         if required.
9112         * lang.c (current_encoding): New global.
9113         (lang_decode_option): Recognize `-fencoding='.
9114         (finish_parse): Don't close finput.
9115         * parse.h (struct parser_ctxt): Removed `finput' and
9116         `unget_utf8_value' fields.  Added `lexer' field.
9117         (java_init_lex): Fixed declaration.
9118         * lex.c (java_new_lexer): New function.
9119         (java_destroy_lexer): Likewise.
9120         (java_read_char): Added `lex' argument.  Handle iconv case.
9121         (java_read_unicode): Added `lex' argument.  Count backslashes in
9122         lexer structure.
9123         (java_init_lex): Added `finput' and `encoding' arguments.  Set
9124         `lexer' field in ctxp.
9125         (BAD_UTF8_VALUE): Removed.
9126         (java_lex): Handle seeing UEOF in the middle of a string literal.
9127         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
9128         (java_lexer): New structure.
9129         (UNGETC): Removed.
9130         (GETC): Removed.
9131         (DEFAULT_ENCODING): New define.
9132         (java_destroy_lexer): Declare.
9133
9134 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9135
9136         Fix for PR gcj/343:
9137         * lex.c (java_init_lex): Initialize java_io_serializable.
9138         * parse.y (java_io_serializable): New global.
9139         (valid_ref_assignconv_cast_p): An array can be cast to
9140         serializable.
9141
9142 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9143
9144         * decl.c, expr.c: Include defaults.h if not already included.
9145         Don't define the *_TYPE_SIZE macros.
9146
9147 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
9148
9149         * typeck.c (build_java_array_type): Correct first parameter
9150         in ADJUST_FIELD_ALIGN invocation.
9151
9152 2000-09-06  Tom Tromey  <tromey@cygnus.com>
9153
9154         * lang-specs.h: Also recognize `-femit-class-files'.
9155
9156 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9157
9158         * verify.c (merge_types): Load the types to merge if necessary.
9159
9160 2000-09-02  Anthony Green  <green@redhat.com>
9161
9162         * jcf-io.c: Include zlib.h.
9163         (open_in_zip): Read compressed class file archives.
9164         * zipfile.h (ZipDirectory): Add uncompressed_size and
9165         compression_method fields.
9166         * zextract.c (read_zip_archive): Collect file compression info.
9167
9168 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
9169
9170         * parse.y (do_resolve_class): Also explore superclasses of
9171         intermediate enclosing contexts when searching for inner classes.
9172
9173 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9174
9175         * parse.y (variable_declarator_id:): Better error message.
9176         (expression_statement:): Use YYNOT_TWICE.
9177         (cast_expression:): Likewise.
9178         (assignment:): Likewise.
9179
9180 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9181
9182         * parse.y (do_merge_string_cste): New locals. Create new
9183         STRING_CSTs each time, use memcpy. Fixes gcj/311.
9184
9185 2000-08-07  Hans Boehm  <boehm@acm.org>
9186
9187         * boehm.c (mark_reference_fields): Set marking bits for all words in
9188         a multiple-word record.
9189         (get_boehm_type_descriptor): Use the procedure marking descriptor for
9190         java.lang.Class.
9191
9192 2000-08-31  Mike Stump  <mrs@wrs.com>
9193
9194         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
9195         jcf-dump$(exeext)): Make parallel safe.
9196
9197 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9198
9199         * jcf-parse.c (set_source_filename): Constify a char *.
9200         * jcf-write.c (append_innerclasses_attribute,
9201         make_class_file_name): Constify a char *.  Don't recycle a
9202         variable for an unrelated purpose.
9203         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
9204         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
9205
9206 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9207
9208         * expr.c (can_widen_reference_to): Fixed indentation.
9209         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
9210         * parse.y: `finit$' replaces `$finit$' in comments.
9211         (try_builtin_assignconv): Fixed leading comment.
9212
9213 2000-08-25  Greg McGary  <greg@mcgary.org>
9214
9215         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
9216
9217 2000-08-24  Greg McGary  <greg@mcgary.org>
9218
9219         * lang.c (lang_decode_option): Use ARRAY_SIZE.
9220         * parse.y (BINOP_LOOKUP): Likewise.
9221
9222 2000-08-22  Andrew Haley  <aph@cygnus.com>
9223
9224         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
9225         sign extending. Fixes gcj/321.
9226         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
9227         combining to make a jlong. Fixes gcj/321.
9228
9229 2000-08-21  Nix  <nix@esperi.demon.co.uk>
9230
9231         * lang-specs.h: Do not process -o or run the assembler if
9232         -fsyntax-only.
9233
9234 2000-08-16  Andrew Haley  <aph@cygnus.com>
9235
9236         * typeck.c (build_java_array_type): Rewrite code to do array
9237         alignment.  Take into account back-end macros when aligning array
9238         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
9239         user to set alignment. Fixes gcj/252 and 160.
9240
9241 2000-08-09  Tom Tromey  <tromey@cygnus.com>
9242
9243         * parse.y (check_abstract_method_definitions): Now return `int'.
9244         Check implemented interfaces.  Fixes PR gcj/305.
9245
9246         * parse.y (patch_switch_statement): Disallow `long' in switch
9247         expressions.  Fixes PR gcj/310.
9248
9249 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9250
9251         * decl.c (finit_leg_identifier_node): New global.
9252         (init_decl_processing): Use `finit$' to initialize
9253         finit_identifier_node. Use `$finit$' to initialize
9254         finit_leg_identifier_node.
9255         * expr.c (expand_java_field_op): Use ID_FINIT_P.
9256         * java-tree.h (finit_identifier_node): Changed attached comment.
9257         (finit_leg_identifier_node): New declaration.
9258         (ID_FINIT_P): Take finit_identifier_node and
9259         finit_leg_identifier_node into account. This is a backward
9260         compatibility hack.
9261
9262 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9263
9264         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
9265         Jan 6 2000 patch.
9266         (generate_bytecode_insns): Check `nargs' before emitting it.
9267         * verify.c (merge_type_state): Fixed typo.
9268         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
9269         generate_bytecode_{conditional,insns}.
9270
9271 2000-08-13  Anthony Green  <green@redhat.com>
9272
9273         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
9274         for -pg builds).
9275
9276 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9277
9278         * class.c (maybe_layout_super_class): Fixed indentation.
9279         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
9280         (java_check_methods): New function declaration.
9281         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
9282         instead of `str_ptr'.
9283         * jcf-write.c (generate_bytecode_insns): Emit number the of args
9284         of a `invokeinterface' at the right time.
9285         * parse.h (WFL_STRIP_BRACKET): New macro.
9286         (SET_TYPE_FOR_RESOLUTION): Use it.
9287         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
9288         (check_class_interface_creation): Don't check for cross package
9289         innerclass name clashes.
9290         (method_header): Behave properly if MDECL is `error_mark_node'.
9291         (method_declarator): Return `error_mark_node' if bogus current
9292         class.
9293         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
9294         (resolve_and_layout): New local `decl_type', set and used. Call
9295         java_check_methods.
9296         (java_check_methods): New method.
9297         (java_layout_classes): Use it.
9298         (resolve_qualified_expression_name): No EH check necessary in
9299         access$<n>.
9300         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
9301         `case' statement.
9302         (patch_assignment): Set DECL_INITIAL on integral final local.
9303
9304 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9305
9306         * java-tree.h (flag_extraneous_semicolon): New extern.
9307         * lang-options.h: (-Wextraneous-semicolon): New option.
9308         * lang.c (flag_redundant): Fixed typo in leading comment.
9309         (flag_extraneous_semicolon): New global.
9310         (lang_decode_option): Set `flag_extraneous_semicolon' when
9311         -Wall. Decode `-Wextraneous-semicolon'.
9312         * parse.y (type_declaration:): Removed `SC_TK' hack, added
9313         `empty_statement' rule.
9314         (class_body_declaration): Likewise.
9315         (method_body:): Accept `;' as a method body.
9316         (static_initializer:): Removed `SC_TK' hack.
9317         (constructor_block_end:): Likewise.
9318         (empty_statement:): Report deprecated empty declaration. Fixes
9319         gcj/295
9320
9321 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9322
9323         * parse.y (build_dot_class_method_invocation): Changed parameter
9324         name to `type'. Build signature from `type' and convert it to a
9325         STRING_CST if it's an array.
9326         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
9327         to use `ref_type' directly.
9328
9329 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
9330
9331         * lang-options.h: Added a comma after the last element to avoid
9332         syntax errors when other languages define additional options.
9333
9334 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
9335
9336         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
9337         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
9338         (jc1): Link with $(BACKEND).
9339         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
9340
9341 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
9342
9343         * jvspec.c: Adjust type of second argument to
9344         lang_specific_driver, and update code as necessary.
9345
9346         * class.c (build_dtable_decl): Initialize dummy.
9347
9348 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9349
9350         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
9351         method bodies not to rule out discarding `<clinit>'; don't use
9352         <clinit> to initialize static fields with constant initializers.
9353
9354 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9355
9356         * gjavah.c (print_method_info): Added `synth' parameter. Skip
9357         synthetic methods.
9358         (method_synthetic): New global.
9359         (HANDLE_METHOD): Recognize synthetic method and tell
9360         `print_method_info' about it.
9361         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
9362         processing a synthetic method.
9363         * jcf-reader.c (skip_attribute): New function.
9364         ( skip_attribute): Likewise.
9365
9366 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9367
9368         * parse.y (build_outer_field_access): Fixed comments.
9369         (fix_constructors): Emit the initialization of this$<n> before
9370         calling $finit$.
9371         (resolve_qualified_expression_name): Build an access to `decl' if
9372         necessary.
9373
9374 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9375
9376         * parse-scan.y (curent_class): Non longer const.
9377         (inner_qualifier, inner_qualifier_length): Deleted.
9378         (current_class_length): New global.
9379         (bracket_count): Fixed typo in leading comment.
9380         (anonymous_count): New global.
9381         (class_instance_creation_expression:): Handle anonymous classes.
9382         (anonymous_class_creation:): New rule.
9383         (push_class_context): Rewritten.
9384         (pop_class_context): Likewise.
9385         (INNER_QUALIFIER): Macro deleted.
9386         (report_class_declaration): call `push_class_context' when
9387         entering the function. `fprintf' format modified not to use
9388         INNER_QUALIFIER.
9389         (report_class_declaration): Assign `package_name' and
9390         `current_class' to NULL separately.
9391
9392 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9393
9394         * expr.c (build_invokeinterface): Call layout_class_methods on
9395         target interface.
9396
9397 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9398             Anthony Green  <green@cygnus.com>
9399             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9400
9401         * class.c (make_class_data): Create vtable for abstract classes.
9402         (get_dispatch_table): Changed to cope with abstract classes.
9403
9404 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9405
9406         * parse.y (patch_method_invocation): Don't reverse the argument
9407         list when dealing with anonymous class constructors. Fixed typo in
9408         comment.
9409
9410 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9411
9412         * parse.y (build_alias_initializer_parameter_list): Reverse
9413         crafted list when building aliases for anonymous class
9414         constructors.
9415
9416 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9417
9418         * parse.y (jdep_resolve_class): Don't bother checking potential
9419         innerclass access if `decl' is NULL.
9420         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
9421         WFL.
9422
9423 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9424
9425         * parse.c: Remove (again.)
9426
9427 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9428
9429         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9430         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9431         outside the `if' statement, alias to innerclass removed, `decl'
9432         used to mark the class complete.
9433
9434 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9435
9436         * parse.y (simple_name:): Fixed typo in error message.
9437
9438 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9439
9440         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9441         or its first operand can be error marks.
9442
9443 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9444
9445         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9446         * parse.y (method_header): Likewise.
9447
9448 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9449
9450         * parse.y (process_imports): Consider that one might be trying to
9451         import an innerclass. Fixes gcj/254
9452
9453 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9454
9455         * parse.y (find_as_inner_class): Handle the case where the
9456         enclosing context of an innerclass has been loaded as bytecode.
9457
9458 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9459
9460         * parse.y (simple_name:): Reject `$' in type names.
9461         (resolve_type_during_patch): Use `type' as a second
9462         argument to resolve_no_layout. Fixes gcj/257.
9463
9464 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
9465
9466         * parse.y (find_most_specific_methods_list): Select the only
9467         non-abstract method even if max has been set.
9468         Fixes gcj/285, gcj/298.
9469
9470 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
9471
9472         * lang-specs.h: Added %(jc1) to java compiler options.
9473
9474 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
9475
9476         * .cvsignore: New file.
9477
9478 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9479
9480         * parse.y (not_accessible_p): Access granted to innerclasses
9481         (indirectly) extending the reference type. Fixes gcj/249.
9482
9483 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9484
9485         * parse.y (patch_method_invocation): Fixed comment.
9486         (maybe_use_access_method): Build this$<n>s to the context of the
9487         target method, or a type that extends it. Fixes gcj/242.
9488
9489 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
9490
9491         * parse.c: Remove.
9492
9493 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9494
9495         * parse.y (fold_constant_for_init): Avoid bullish conversion.
9496
9497 2000-07-13  Tom Tromey  <tromey@cygnus.com>
9498
9499         * lang-specs.h: Added %{I*}.
9500
9501 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
9502
9503         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
9504
9505 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
9506
9507         * parse-scan.c: Remove.
9508
9509 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9510
9511         * class.c (set_super_info): Handled protected inner classes.
9512         (common_enclosing_context_p): Bail early if arguments aren't both
9513         inner classes.
9514         (get_access_flags_from_decl): Handle private and protected inner
9515         classes.
9516         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9517         (CLASS_PROTECTED): Likewise.
9518         (struct lang_type): New bitfield `poic'.
9519         * parse.y (jdep_resolve_class): Call check_inner_class_access on
9520         inner classes only.
9521         (check_inner_class_access): Renamed arguments, added
9522         comments. Handles protected inner classes (fixes gcj/225)
9523         (not_accessible_p): Fixed comments. Avoid handling inner classes.
9524
9525 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9526
9527         * parse.y (resolve_qualified_expression_name): Verify qualified
9528         access to `this'. Fixes gcj/239.
9529
9530 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9531
9532         * jcf-write.c (generate_classfile): Don't install ConstantValue
9533         for null pointers.
9534
9535 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9536
9537         * parse.y (resolve_qualified_expression_name): Handle inner class
9538         access. Fixes gcj/256.
9539
9540 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9541
9542         * jcf-write.c (generate_classfile): Properly install the
9543         ConstantValue attribute and the initial value constant pool index
9544         on string constants.
9545         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9546         class files.
9547
9548 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9549
9550         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9551         construct.
9552         * parse.y (find_as_inner_class): Fixed typo.
9553         (do_resolve_class): Explore enclosing contexts when searching for
9554         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
9555         (check_inner_class_access): Check `decl' which can be null in case
9556         of previous errors.
9557
9558 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9559
9560         * java-tree.h (java_debug_context): Declared `extern'.
9561         (safe_layout_class): Likewise.
9562         * parse.y (resolve_field_access): Field must be `static' in order
9563         to be replaced by its initial value. Added comments.
9564         (find_applicable_accessible_methods_list): Fixed typo.
9565         (find_most_specific_methods_list): Methods found in innerclasses
9566         take over methods founds in the enclosing contexts.
9567         (java_complete_tree): Loosen restrictions on the type of DECLs
9568         that can be replaced by their initialization values.
9569         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9570
9571 2000-07-05  Tom Tromey  <tromey@cygnus.com>
9572
9573         * Make-lang.in (PARSE_DIR): New macro.
9574         (PARSE_RELDIR): Likewise.
9575         (PARSE_C): Likewise.
9576         (PARSE_SCAN_C): Likewise.
9577         ($(PARSE_C)): New target.
9578         ($(PARSE_SCAN_C)): Likewise.
9579         (SET_BISON): New macro.
9580         (BISONFLAGS): Likewise.
9581         (JAVABISONFLAGS): Likewise.
9582
9583 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
9584
9585         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9586         argument on the first pass for CNI as well as JNI.
9587         (print_method_info): Set up method name on the first pass only.
9588
9589 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9590
9591         * parse.y (parser_qualified_classname): Removed parameter
9592         `is_static'.
9593         (create_interface): Removed first passed parameter to
9594         parser_qualified_classname.
9595         (create_class): Likewise. Don't install alias on static
9596         innerclasses. Fixes gcj/275.
9597
9598 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9599
9600         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9601         debugable statement with empty_stmt_node. Fixes gcj/272
9602
9603 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9604
9605         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9606         gcj/271.
9607
9608 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9609
9610         * jcf-write.c (push_long_const): Appropriately cast short negative
9611         constant to jword.
9612
9613 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9614
9615         * parse.y (verify_constructor_super): Use loop variable
9616         `m_arg_type' initialized with `mdecl_arg_type'.
9617
9618 2000-06-29  Tom Tromey  <tromey@cygnus.com>
9619
9620         * parse.y (resolve_field_access): Handle case where `type_found'
9621         is NULL.
9622
9623 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9624
9625         * expr.c (lookup_field): The same field can be found through two
9626         different interface. Don't declare it ambiguous in that case.
9627
9628 2000-06-27  Tom Tromey  <tromey@cygnus.com>
9629
9630         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
9631         follows \r, then unget it at a lower level.
9632
9633 2000-06-26  Tom Tromey  <tromey@cygnus.com>
9634
9635         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9636         java_complete_tree.
9637
9638 2000-06-25  Tom Tromey  <tromey@cygnus.com>
9639
9640         * parse.y (for_statement): Wrap expression in a WFL if it is a
9641         constant.  For PR gcj/268.
9642
9643 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9644
9645         * parse.y (do_resolve_class): Minor optimiztion in the package
9646         list search. Removed unnecessary test and return statement.
9647         (valid_ref_assignconv_cast_p): Order of arguments to
9648         enclosing_context_p fixed.
9649
9650 2000-06-24  Tom Tromey  <tromey@cygnus.com>
9651
9652         * expr.c (lookup_field): Print error and return error_mark_node if
9653         field reference is ambiguous.
9654
9655         * parse.y (check_abstract_method_definitions): Also check if
9656         `other_method' is abstract.
9657
9658 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9659
9660         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9661         classes.
9662         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9663         (struct lang_type): New field `pic'.
9664         (CLASS_PRIVATE): New macro.
9665         * parse.y (check_inner_class_access): New function.
9666         (jdep_resolve_class): Call it.
9667
9668 2000-06-23  Tom Tromey  <tromey@cygnus.com>
9669
9670         * parse.y (patch_incomplete_class_ref): Initialize the returned
9671         class.  For PR gcj/260.
9672
9673 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9674
9675         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9676
9677 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9678
9679         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9680         Java specific checks.
9681         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9682         screened by DECL_P.
9683         * java-tree.def (CASE_EXPR): Marked 'e'.
9684         (DEFAULT_EXPR): Likewise.
9685         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9686         screened by DECL_P.
9687         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9688         Java specific checks.
9689         (generate_bytecode_insns): Test try_block for BLOCK before using
9690         BLOCK_EXPR_BODY.
9691         * parse.y (build_wfl_wrap): Added `location' argument. Set
9692         EXPR_WFL_LINECOL accordingly.
9693         (dim_expr:): Wrap constants with WFLs.
9694         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9695         (resolve_package): Check for `stmt' not being a BLOCK before
9696         building a debuggable statement with it.
9697         (make_qualified_primary): Added extra parameter to build_wfl_wrap
9698         invocation.
9699         (resolve_field_access): Make sure `decl' is a DECL before treating
9700         it as such.
9701         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9702         IDENTIFIER_NODE before treating it as such.
9703         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9704         treating it as such.
9705         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9706         to be applied only on non array types.
9707
9708 2000-06-16  Per Bothner  <per@bothner.com>
9709
9710         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
9711         define in terms of DECL_RESULT, as that fails when --enable-checking.
9712
9713 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9714
9715         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
9716         types the same in comparison.
9717         (CHECK_OP): Add static prototype.
9718
9719 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
9720
9721         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9722         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9723         * parse.c: Rebuilt.
9724
9725 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9726
9727         * decl.c (create_primitive_vtable): Prototype.
9728
9729         * jcf-write.c (generate_bytecode_insns): Initialize variable
9730         `saved_context'.
9731
9732         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9733
9734 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9735
9736         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9737         to track searched classes, and do not search the same class more than
9738         once. Call find_applicable_accessible_methods_list on immediate
9739         superclass, instead of search_applicable_method_list on all ancestors.
9740         Fix for PR gcj/238.
9741
9742 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9743
9744         * parse.y (register_fields): Permit static fields in inner classes
9745         if they are final. Fix for PR gcj/255.
9746
9747 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9748
9749         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9750         * parse.y (find_in_imports): Returned type changed to void,
9751         leading comment fixed.
9752         (register_package): New function.
9753         (qualify_and_find): Likewise.
9754         (package_declaration:): Use `register_package'.
9755         (single_type_import_declaration:): Removed local variable
9756         `node'. Added missing `;' for consistency.
9757         (type_import_on_demand_declaration:): Use `chainon' to link new
9758         entries.
9759         (lookup_field_wrapper): Lookup local variables defined in outer
9760         contexts first.
9761         (java_complete_class): Don't reverse the list of imported on demand.
9762         (do_resolve_class): Reorganized. Removed local variable
9763         `original_name'. Call `qualify_and_find' with the current package
9764         name, invoke `find_in_imports_on_demand' right after. Call
9765         `qualify_and_find' with the packages we've seen so far. Fixed
9766         operations numbering in comments.
9767         (java_expand_class): Don't reverse `package_list'.
9768         (find_most_specific_methods_list): New local variables `abstract'
9769         and `candidates'. Use them to pick the right method.
9770
9771 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
9772
9773         * parse.y (check_modifiers_consistency): Don't subtract out
9774         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9775
9776 2000-06-04  Philipp Thomas  <pthomas@suse.de>
9777
9778         * Makefile.in (INTLLIBS): New.
9779         (LIBS): Add above.
9780         (DEPLIBS): Ditto.
9781
9782 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9783
9784         * class.c (get_dispatch_table): Build the vtable dummy entry list
9785         element with a null purpose. Fixed leading comment.
9786         (build_dtable_decl): Build an accurate dtable type when appropriate
9787         and use it.
9788
9789 2000-06-02  Richard Henderson  <rth@cygnus.com>
9790
9791         * lang.c (lang_get_alias_set): New.
9792
9793 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9794
9795         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9796         before using it as the accessed field.
9797
9798 2000-05-31  Tom Tromey  <tromey@cygnus.com>
9799
9800         * java-tree.h (boolean_array_vtable, byte_array_vtable,
9801         char_array_vtable, short_array_vtable, int_array_vtable,
9802         long_array_vtable, float_array_vtable, double_array_vtable):
9803         Declare.
9804         * expr.c (get_primitive_array_vtable): New function.
9805         (create_primitive_vtable): New function.
9806         (java_lang_expand_expr): Enable code to statically generate
9807         arrays.
9808         * decl.c (init_decl_processing): Create primitive vtables.
9809         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9810         short_array_vtable, int_array_vtable, long_array_vtable,
9811         float_array_vtable, double_array_vtable): Define.
9812
9813 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
9814
9815         * java/parse.y (find_applicable_accessible_methods_list):
9816         Don't add an uninitialized value to the list.
9817
9818 2000-05-25  Tom Tromey  <tromey@cygnus.com>
9819
9820         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9821         when trying to see if field's class should be initialized.  Always
9822         initialize field's declaring class, not qualified class.
9823         For PR gcj/162.
9824
9825         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9826         `wfl_operator', to maybe_build_primttype_type_ref.
9827         Fixes PR gcj/235.
9828
9829 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
9830
9831        * parse.y (patch_method_invocation): Don't try to lookup methods
9832        in primitive types.
9833
9834 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9835
9836         * parse.y (resolve_field_access): Call the appropriate <clinit>
9837         before accessing the length of a static array. Craft a decl for
9838         the field while its time. Fixes PR gcj/129.
9839
9840 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9841
9842         * parse.y (resolve_package): Correctly set `*next' (was off by
9843         one.)
9844         (resolve_qualified_expression_name): Fixed comment.
9845
9846 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9847
9848         * jcf-parse.c (jcf_parse_source): Reset current_class and
9849         current_function_decl to NULL before parsing a new file.
9850
9851 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9852
9853         * parse.y (block_end:): If the collected block doesn't feature a
9854         statement, insert an empty statement.
9855
9856 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9857
9858         * parse.y (maybe_yank_clinit): New function.
9859         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9860         end of the list of methods belonging to a class.
9861         (java_complete_expand_method): Check whether <clinit> is really
9862         necessary and expand it accordingly.
9863
9864 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9865
9866         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9867         processed by the method's switch statement.
9868
9869 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9870
9871         * java-tree.h: Added init state enum.
9872         * decl.c (emit_init_test_initialization): Initialize class
9873         initialization check variable by looking at class' state.
9874
9875 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9876
9877         * java-tree.h (build_instanceof): Declare.
9878         (build_get_class): Declare.
9879         * parse.y (patch_binop): Use build_instanceof.
9880         * expr.c (build_instanceof): New function.  If class is final,
9881         don't make a function call.
9882         (expand_java_INSTANCEOF): Use it.
9883         (build_get_class): New function.
9884
9885 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
9886
9887         * jcf-write.c (generate_classfile): Scan the source_file for
9888         slashes with the right pointer variable.
9889
9890 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
9891
9892         * lang.c (lang_decode_option): Update -Wunused flags by calling
9893         set_Wunused.
9894         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9895
9896 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9897
9898         * check_init.c (check_init): Constify local char *.
9899         * class.c (push_class): Constify local char *.
9900         * java_tree.h: Update prototypes.
9901         * jcf-io.c (open_class): Constify filename parameter and
9902         return value.
9903         (find_class): Remove redundant string copy.  Cast return from
9904         open_class.
9905         * jcf-parse.c (read_class, parse_class_file, yyparse):
9906         Constify local char *.
9907         * jcf-write.c (generate_bytecode_insns, generate_classfile):
9908         Constify local char *.
9909         * jcf.h (JCF): Constify filename and classname.
9910         (JCF_FINISH): Cast args to FREE to char * when appropriate.
9911         * lang.c (init_parse): Constify parameter and return value.
9912         * lex.c (java_get_line_col): Constify filename parameter.
9913         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
9914         * parse.y (java_parser_context_suspend,
9915         issue_warning_error_from_context, safe_layout_class): Constify
9916         local char *.
9917         * parse.c: Regenerate.
9918
9919 2000-05-08  Tom Tromey  <tromey@cygnus.com>
9920
9921         * expr.c (build_jni_stub): Cache the result of
9922         _Jv_LookupJNIMethod.
9923
9924 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9925
9926         * decl.c (predef_filenames_size): Now 7.
9927         (predef_filenames): New seventh entry.
9928
9929 2000-05-04  Tom Tromey  <tromey@cygnus.com>
9930
9931         * boehm.c (mark_reference_fields): Don't mark RawData fields.
9932         Keep track of when we've seen a reference field after a
9933         non-reference field.
9934         (get_boehm_type_descriptor): Handle case where we see
9935         non-reference fields but no trailing reference field.
9936         * decl.c (rawdata_ptr_type_node): Define.
9937         (init_decl_processing): Initialize rawdata_ptr_type_node.
9938         * java-tree.h (rawdata_ptr_type_node): Declare.
9939
9940 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9941
9942         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9943         specifiers in calls to fprintf.
9944
9945 2000-05-03  Andrew Haley  <aph@cygnus.com>
9946
9947         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9948
9949         * javaop.h (WORD_TO_INT): New function.
9950         (IMMEDIATE_s4): Use WORD_TO_INT.
9951         * jcf.h (JPOOL_INT): Ditto.
9952
9953         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9954         separator.
9955
9956 2000-04-19  Tom Tromey  <tromey@cygnus.com>
9957
9958         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9959         on native function.
9960         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9961         JNI methods.
9962         * expr.c (build_jni_stub): New function.
9963         * lang-specs.h: -fjni and -femit-class-file are incompatible.
9964         * parse.c: Rebuilt.
9965         * parse.y (java_complete_expand_methods): Expand a native method
9966         and call build_jni_stub if -fjni given.
9967         * lang-options.h: Document -fjni.
9968         * lang.c (flag_jni): New global.
9969         (lang_f_options): Added `jni' entry.
9970         * java-tree.h (soft_lookupjnimethod_node,
9971         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9972         Declare.
9973         (flag_jni): Declare.
9974         (build_jni_stub): Declare.
9975         (struct lang_decl): Added `native' flag.
9976         (METHOD_NATIVE): Redefined to use `native' field of lang specific
9977         structure.
9978         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9979         soft_jnipopsystemframe_node): New globals.
9980         (init_decl_processing): Set them.  _Jv_InitClass only takes one
9981         argument.
9982
9983         * java-tree.def: Put into `C' mode.
9984
9985 2000-04-27  Tom Tromey  <tromey@cygnus.com>
9986
9987         Fix for PR gcj/2:
9988         * expr.c (expand_invoke): Generate check to see if object pointer
9989         is null in nonvirtual invocation case.
9990         * java-tree.h (soft_nullpointer_node): Declare.
9991         * decl.c (soft_nullpointer_node): New global.
9992         (init_decl_processing): Initialize soft_nullpointer_node.
9993         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9994         or `private' methods.
9995         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9996
9997 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9998
9999         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10000         from <clinit>
10001
10002 2000-04-26  Tom Tromey  <tromey@cygnus.com>
10003
10004         * zextract.c (find_zip_file_start): New function.
10005         (read_zip_archive): Use it.
10006
10007 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10008
10009         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
10010
10011 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10012
10013         * class.c (common_enclosing_context_p): New function.
10014         * java-tree.h (common_enclosing_context_p): Added prototype.
10015         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
10016         classes sharing an outer context with the current instance.
10017         * parse.y (build_access_to_thisn): Fixed leading comment.
10018         (verify_constructor_super): New local `supper_inner'. Skip
10019         enclosing context argument in the case of inner class constructors.
10020         (patch_method_invocation): Insert proper context as second
10021         parameter to pure inner class constructor super invocations.
10022
10023 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10024
10025         * parse.y (end_class_declaration): Reset the interface number
10026         counter.
10027
10028 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10029
10030         * parse.y (source_start_java_method): Deleted unnecessary code.
10031         (patch_method_invocation): Fixed comment.
10032
10033 2000-04-24  Robert Lipe <robertlipe@usa.net>
10034
10035         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
10036
10037 2000-04-23  Tom Tromey  <tromey@cygnus.com>
10038
10039         * boehm.c (mark_reference_fields): Use int_byte_position.
10040
10041 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10042
10043         * boehm.c (mark_reference_fields): Only call byte_position on
10044         non-static fields.
10045
10046 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10047
10048         * boehm.c (mark_reference_fields): Added `last_view_index'
10049         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
10050
10051 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
10052
10053         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
10054         * parse.y (check_class_interface_creation): Fixed comments. Select
10055         permitted modifiers for (inner) interfaces. Changed error message
10056         to report rejected modifiers used with local classes.
10057
10058 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10059
10060         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
10061         of directly inherited type considered in scope.
10062         * parse.y (do_resolve_class): Search inherited classes for inner
10063         classes.
10064
10065 2000-04-20  Tom Tromey  <tromey@cygnus.com>
10066
10067         * parse.y (not_accessible_p): Use member's class, not current
10068         class, when doing inheritance check for protected reference.
10069         Fixes PR gcj/124.
10070
10071 2000-04-20  Jason Schroeder  <shrode@subnature.com>
10072
10073         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
10074
10075 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10076
10077         * parse.y (lookup_field_wrapper): Search for final local aliases.
10078         (resolve_expression_name): Let lookup_field_wrapper search for
10079         final local aliases. Force the value of `name' if one is found.
10080         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
10081         an expression name. Fixed comments.
10082
10083 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10084
10085         * parse.y (yyerror): `msg' can be null, don't use it in that case.
10086
10087 2000-04-19  Tom Tromey  <tromey@cygnus.com>
10088
10089         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
10090
10091 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10092
10093         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
10094
10095 2000-04-18  Tom Tromey  <tromey@cygnus.com>
10096
10097         PR gcj/211:
10098         * gjavah.c (utf8_cmp): Changed return value.
10099         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
10100         result.
10101         (cxx_keywords): New global.
10102         (get_field_name): Handle new result of cxx_keyword_subst.
10103         (print_method_info): Likewise.
10104
10105 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
10106
10107         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
10108         with a newline, for CNI.
10109         (print_stub_or_jni): Print a space or newline before method name for
10110         CNI as well as JNI.
10111         (print_cxx_classname): Don't write leading "::" in CNI stub method.
10112         (process_file): Include gcj/cni.h if generating CNI stubs.
10113
10114 2000-04-16  Tom Tromey  <tromey@cygnus.com>
10115
10116         * gjavah.c (decompile_method): Use print_field_name.
10117         Fixes PR gcj/205.
10118
10119 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10120
10121         * parse.y (java_expand_classes): Reverse the package list once.
10122         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
10123         reduction.
10124         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
10125         the `==' and `!=' operators.
10126
10127 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10128
10129         * jcf-write.c (generate_bytecode_insns): At invocation time,
10130         always relate an interface method to the type of its selector.
10131
10132 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10133
10134         Fix for PR gcj/2:
10135         * expr.c (expand_invoke): Generate check to see if object pointer
10136         is null in nonvirtual invocation case.
10137         * java-tree.h (soft_nullpointer_node): Declare.
10138         * decl.c (soft_nullpointer_node): New global.
10139         (init_decl_processing): Initialize soft_nullpointer_node.
10140         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10141         or `private' methods.
10142         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10143
10144 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10145
10146         Fix for PR gcj/140:
10147         * parse.y (check_final_assignment): Recognize assignments to the
10148         `length' field of an array when generating class files.
10149
10150 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10151
10152         * class.c (decl_hash): Prototype removed.
10153         (decl_compare): Likewise.
10154
10155 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10156
10157         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
10158         * parse.y (check_modifiers_consistency): Check for final/volatile
10159         clash.  Fixes PR gcj/164.
10160
10161 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10162
10163         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
10164         made global.
10165         (java_hash_compare_tree_node): Renamed from `decl_compare, made
10166         global.
10167         (add_method_1): Use `java_hash_hash_tree_node' and
10168         `java_hash_compare_tree_node'.
10169         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
10170         (java_hash_compare_tree_node): Likewise.
10171         * parse.y (find_applicable_accessible_methods_list): Create,
10172         delete and use a hash table to remember already searched interfaces.
10173
10174 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
10175
10176         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
10177         with latest entry.
10178
10179 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10180
10181         * boehm.c (mark_reference_fields, set_bit): Prototype.
10182         (set_bit): Un-ANSI-fy definition.
10183
10184         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
10185         Prototype.
10186
10187         * decl.c (emit_init_test_initialization): Likewise.
10188
10189         * gjavah.c (jni_print_char): Likewise.
10190
10191         * parse.y (create_new_parser_context): Likewise.
10192
10193 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10194
10195         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
10196         patch missing hunk. Fixed indentation.
10197
10198 2000-03-30  Tom Tromey  <tromey@cygnus.com>
10199
10200         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
10201         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
10202
10203 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10204
10205         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10206         when negative *before* using it as an array index.
10207         * ChangeLog: Fixed typo.
10208
10209 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10210
10211         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10212         to 0 when it reaches -1.
10213
10214 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10215
10216         * jcf-parse.c (get_constant): Properly cast `num' during the
10217         invocation of `add_double'.
10218         * jcf-write.c (push_long_const): Properly cast `lo' before
10219         comparing it to short bounds.
10220         * parse-scan.y (interface_declaration:): Rule re-arrange so that
10221         `interface_body:' is reduced after the current interface is
10222         pushed.
10223
10224 2000-03-26  Tom Tromey  <tromey@cygnus.com>
10225
10226         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
10227         Java-specific `-f' option.
10228
10229 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10230
10231         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
10232         Adjust order of making types.
10233         Make bitsize_*_node values.
10234
10235 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10236
10237         * class.c (make_field_value): Use byte_position.
10238         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
10239         (java_array_data_offset): Likewise.
10240         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
10241         bzero call.
10242
10243 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10244
10245         * parse.y (check_abstract_method_definitions): New local
10246         `end_type_reached'. Make sure we also consider `end_type'.
10247         (java_check_abstract_method_definitions): Make sure we eventually
10248         consider `java.lang.Object'.
10249         (maybe_use_access_method): Don't use access method if not in the
10250         context of a pure inner class or if the method's context is right.
10251         (find_applicable_accessible_methods_list): New static flag
10252         `object_done'. Don't search abstract classes as interfaces. Fixed
10253         indentation. Fixed the `java.lang.Object' only search. Search
10254         class interface(s) first, then fully search enclosing contexts.
10255         (find_most_specific_methods_list): Pick the closest candidate when
10256         they're all abstract.
10257
10258 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10259
10260         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10261         properly initialize `finished_label'. Don't emit gotos for empty
10262         try statements.
10263
10264 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10265
10266         * except.c (emit_handlers): Clear catch_clauses_last.
10267
10268 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10269
10270         * parse.y (check_method_types_complete): New function.
10271         (create_class): Reset anonymous class counter only when seeing an
10272         non inner classe.
10273         (java_complete_class): JDEP_METHOD: Don't recompute signature
10274         if incomplete.
10275
10276 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10277
10278         * class.c (build_static_ref): Fixed indentation in comment.
10279         * java-tree.def (TRY_EXPR): Fixed typo in name.
10280         (CLASS_LITERAL): Likewise.
10281         * java-tree.h: (TYPE_DOT_CLASS): New macro.
10282         (struct lang_type): New field `dot_class'.
10283         * jcf-write.c (generate_bytecode_insns): Fixed error message.
10284         (generate_classfile): Method `class$' is synthetic.
10285         * parse.y (build_do_class_method): New function.
10286         (build_dot_class_method_invocation): Likewise.
10287         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
10288         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
10289         (qualify_ambiguous_name): Likewise.
10290         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
10291         (build_try_statement): Fixed leading comment.
10292
10293 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10294
10295         * class.c (make_field_value): Properly handle sizes.
10296         (get_dispatch_vector): Use tree_low_cst and host_integerp.
10297         (layout_class_method): Count using trees.
10298         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
10299         * expr.c (java_array_data_offset): Use int_bit_position.
10300         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
10301         (build_invokevirtual): Use tree_low_cst and do computations with trees.
10302
10303 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10304
10305         * lang.c (flag_hash_synchronization): New global.
10306         (lang_f_options): Added `hash-synchronization'.
10307         * lang-options.h: Mention -fhash-synchronization.
10308         * java-tree.h (flag_hash_synchronization): Declare.
10309         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
10310         hash table synchronization is disabled.
10311         * decl.c (init_decl_processing): Only push `sync_info' value when
10312         hash table synchronization is disabled.
10313         * class.c (make_class_data): Only push `sync_info' field when hash
10314         table synchronization is disabled.  Removed dead code.
10315
10316 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10317
10318         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
10319
10320 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10321
10322         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
10323         classes.
10324         * parse.y (patch_method_invocation): Handle anonymous classes
10325         creation in static context.
10326
10327 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10328
10329         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
10330         * parse.y (resolve_qualified_expression_name): Use it.
10331         (patch_method_invocation): Likewise.
10332
10333 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10334
10335         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
10336         depending on the type of dependency which dictates what the
10337         current class is.
10338         (unresolved_type_p): Resolved types limited to the current class.
10339
10340 2000-03-15  Tom Tromey  <tromey@cygnus.com>
10341
10342         * decl.c (init_decl_processing): Set type of `sync_info' to be
10343         pointer to Object.
10344
10345         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
10346         Correctly compute bit number for current slot.  Zero `high' and
10347         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
10348         mark_reference_fields.
10349         (mark_reference_fields): New function.
10350
10351 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10352
10353         * parse.y (register_incomplete_type): Fixed initialization of
10354         JDEP_ENCLOSING.
10355
10356 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10357
10358         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
10359         static globals.
10360         (push_class_context, pop_class_context): New function.
10361         (class_body:): Call pop_class_context.
10362         (interface_body:): Likewise.
10363         (INNER_QUALIFIER): New macro.
10364         (report_class_declaration): Changed output format and use
10365         INNER_QUALIFIER. Call push_class_context.
10366
10367 2000-02-14  Andrew Haley  <aph@cygnus.com>
10368
10369         * check-init.c (check_init): Add new cases for unary and binary
10370         tree nodes.
10371
10372 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10373
10374         * parse.y (resolve_package): Set `next' once a type name has been
10375         progressively discovered.
10376         (resolve_qualified_expression_name): Propagate resolution only if
10377         there are remaining qualifiers. Take into account `q' might have
10378         been cleared after re-qualification.
10379         * parse.y (patch_method_invocation): New local `resolved'.
10380         Section dealing with qualified expression rewritten to use
10381         resolve_field_access.
10382
10383 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10384
10385         * parse.h (PUSH_CPC): Fixed indentation.
10386         (DEBUG_CPC): New macro.
10387         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
10388         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
10389         * parse.y (class_body_declaration:): Use
10390         SET_CPC_INSTANCE_INITIALIZER_STMT.
10391         (method_declaration:): Check for null current_function_decl.
10392         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
10393         (java_parser_context_pop_initialized_field): Better handling of
10394         empty lists.
10395         (maybe_make_nested_class_name): Mark nested class name as
10396         qualified when necessary.
10397         (end_class_declaration): Don't call java_parse_context_resume when
10398         one or more error occurred.
10399         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
10400         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
10401         SET_CPC_INITIALIZER_STMT.
10402         (method_header): Check for inner classes declaring static methods.
10403         (resolve_qualified_expression_name): Handle situation where `this'
10404         is implied.
10405
10406 2000-03-13  Hans Boehm <boehm@acm.org>
10407
10408         * typeck.c (build_prim_array_type): Correctly set the high word too.
10409
10410 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10411
10412         * parse.y (java_complete_expand_methods): Leave <clinit> out of
10413         ordinary methods.
10414         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
10415         list of methods for interfaces.
10416
10417 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10418
10419         * parse.y (qualify_ambiguous_name): Properly handle expressions
10420         using `null'.
10421
10422 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10423
10424         * parse.y (check_final_assignment): Extended to process
10425         COMPOUND_EXPR.
10426         (patch_assignment): Have check_final_assignment called only once.
10427
10428 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10429
10430         * java-tree.h (IS_INIT_CHECKED): New flag.
10431         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10432         * parse.y (patch_string): Call force_evaluation_order on the
10433         completed string concatenation tree.
10434         * expr.c (force_evaluation_order): Call force_evaluation_order on
10435         function's arguments too.
10436
10437 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10438
10439         * decl.c (emit_init_test_initialization): Mark KEY as unused.
10440         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10441         (build_anewarray): Likewise.
10442         * parse.y (patch_newarray): Likewise.
10443         * parse.c: Regenerated.
10444
10445 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
10446
10447         * decl.c (init_decl_processing): Added new class fields `depth',
10448         `ancestors', and `idt' to class_type_node. Use
10449         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10450         * class.c (make_class_data): Push initial values for new fields.
10451         * java-tree.h: Updated prototype for `build_invokeinterface'.
10452         * expr.c (build_invokeinterface): Changed parameters to accept
10453         `method' tree. Calculate index of `method' in its declaring
10454         interface. Build call to _Jv_LookupInterfaceMethodIdx.
10455         (expand_invoke): Call `build_invokeinterface' with new parameters.
10456         * parse.y (patch_invoke): Call `build_invokeinterface' with new
10457         parameters.
10458
10459 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
10460
10461         * typeck.c (lookup_do): Search superinterfaces first
10462         when looking up an interface method. From Godmar Back
10463         <gback@cs.utah.edu>
10464
10465 2000-03-06  Tom Tromey  <tromey@cygnus.com>
10466
10467         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10468
10469 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10470
10471         * java-tree.h (lookup_argument_method2): Declared.
10472         (safe_layout_class): Prototype moved from parse.h.
10473         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10474         * parse.y (java_check_regular_methods): Local `super_class' gone.
10475         Call lookup_argument_method2 instead of lookup_argument_method.
10476         Perform modifier match for methods found declared in implemented
10477         interfaces. Fixed indentation problem. Overriding/hiding error
10478         report to take place only for methods found in classes.
10479         * typeck.c (lookup_argument_method): Changed leading
10480         comment. Re-written by calling lookup_do.
10481         (lookup_argument_method2): New function.
10482         (lookup_java_method): Re-written by calling lookup_do.
10483         (lookup_do): New function.
10484
10485 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10486
10487         * check-init.c (check_init): Removed dead code. Handle (blank)
10488         final variables.
10489         * parse.y (declare_local_variables): New local `final_p', set it
10490         and use it to initialize LOCAL_FINAL.
10491         (check_final_assignment): Only check FIELD_DECLs.
10492
10493 2000-02-17  Tom Tromey  <tromey@cygnus.com>
10494
10495         * Makefile.in (JAVA_OBJS): Added boehm.o.
10496         (boehm.o): New target.
10497         * Make-lang.in (JAVA_SRCS): Added boehm.c.
10498         * java-tree.h (flag_use_boehm_gc): Declare.
10499         (get_boehm_type_descriptor): Declare.
10500         * lang.c (lang_f_options): Added `use-boehm-gc'.
10501         (flag_use_boehm_gc): New global.
10502         * lang-options.h: Added -fuse-boehm-gc.
10503         * boehm.c: New file.
10504         * class.c (get_dispatch_table): If class uses a Boehm type
10505         descriptor, put it in the vtable.
10506         (make_class_data): Removed dead code.
10507
10508 2000-03-03  Per Bothner  <per@bothner.com>
10509
10510         * decl.c (init_decl_processing):  Initialize sizetype properly.
10511
10512 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10513
10514         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10515         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10516         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10517         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10518         (jcf_parse): New local `current'. Load innerclasses seen in outer
10519         context being processed.
10520         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10521         * jcf-write.c (append_innerclasses_attribute): New function.
10522         (append_innerclasses_attribute_entry): Likewise.
10523         (get_access_flags): Handle static classes. Set anonymous and local
10524         classes to be private.
10525         (generate_classfile): Attribute count adjusted. Call
10526         append_innerclasses_attribute.
10527         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10528         PURE_INNER_CLASS_TYPE_P.
10529         * parse.y (parser_qualified_classname): New parameter `is_static',
10530         produce non qualified name accordingly.
10531         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10532         (create_interface): Added argument to parser_qualified_classname.
10533         (create_class): Added argument to parser_qualified_classname. Setup
10534         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10535         (add_inner_class_fields): Fixed indentation.
10536         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10537         (method_declarator): Fixed typo in comment.
10538         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10539         (build_current_thisn): Likewise.
10540         (patch_method_invocation): Likewise.
10541
10542 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10543
10544         * decl.c (current_function_decl): Move to toplev.c.
10545
10546 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10547
10548         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10549         (DECL_BIT_INDEX): Use underlying representation.
10550         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10551
10552 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10553
10554         * expr.c (build_java_ret): Pass proper type to size_binop.
10555
10556 2000-02-25  Anthony Green  <green@cygnus.com>
10557
10558         * expr.c (build_class_init): Mark the decl to be ignored by
10559         check_init.
10560         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
10561         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
10562         * class.c (init_test_hash_newfunc): New function.
10563         (decl_hash): New function.
10564         (decl_compare): New function.
10565         * decl.c (emit_init_test_initialization): New function.
10566         (complete_start_java_method): Traverse the init test hashtable,
10567         calling emit_init_test_initialization.
10568         (always_initialize_class_p): Define.
10569         * expr.c (build_class_init): Use initialization tests when
10570         emitting class initialization code.
10571         (always_initialize_class_p): Declare.
10572         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10573         1.
10574         * java-tree.h: Include hash.h.
10575         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10576         (struct lang_decl): Add init_test_table field.
10577         (init_test_hash_entry): Define.
10578
10579 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10580
10581         * gjavah.c (main): Avoid using `argi' to report unimplemented
10582         options.
10583
10584 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10585
10586         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10587         initialize locals to avoid warnings. Local `exception_type' moved
10588         into if statement.
10589
10590 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10591
10592         * parse.y (resolve_expression_name): Use `orig' as a second
10593         argument to resolve_field_access.
10594         (resolve_field_access): Removed unnecessary code when dealing with
10595         static fields.
10596
10597 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10598
10599         * class.c (push_super_field): Don't push the field twice.
10600         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10601         * parse.h (java_reorder_fields): Prototyped.
10602         * parse.y (java_reorder_fields): New function.
10603         (java_layout_class): Simplified not to worry about re-ordering.
10604
10605 2000-02-23  Tom Tromey  <tromey@cygnus.com>
10606
10607         * gjavah.c (print_name): In JNI case, correctly quote string.
10608         (print_method_info): Don't handle overrides in JNI mode.
10609
10610 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10611
10612         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10613         value type set to `boolean_type_node'.
10614
10615 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
10616
10617         * jcf-dump.c (main): Test for correct condition after
10618         output file creation.
10619
10620 2000-02-19  Anthony Green  <green@cygnus.com>
10621
10622         * jcf-depend.c (add_entry): Fix test for first list entry.
10623
10624 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10625
10626         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10627         * constants.c (build_constants_constructor): Likewise.
10628
10629 2000-02-19  Anthony Green  <green@cygnus.com>
10630
10631         * jcf-depend.c (add_entry): Add entries to the end of the list.
10632
10633 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
10634
10635         * decl.c (INT_TYPE_SIZE): Define if necessary.
10636         (expand_java_return): Handle the case of a native integer smaller
10637         than a JVM integer.
10638
10639 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10640
10641         * gjavah.c (help): Use GCCBUGURL.
10642         * jv-scan.c (help): Likewise.
10643         * jcf-dump.c (help): Likewise.
10644
10645 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10646
10647         * jcf-write.c (generate_bytecode_insns): Don't generate empty
10648         `finally' clauses.
10649
10650 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10651
10652         * jcf-parse.c (load_class): Call `fatal' if no file containing
10653         the target class are found.
10654
10655 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
10656
10657         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10658         lex.c, lex.h, and PARSE_H to...
10659         (parse.o, parse-scan.o): ...here, respectively.
10660
10661         * lex.c: Split out code that may trigger SIGFPE from yylex()
10662         to its own function.
10663         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10664
10665 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10666
10667         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10668
10669 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10670
10671         * parse.y (outer_field_access_p): Stop in time when outer contexts
10672         are exhausted.
10673         (resolve_qualified_expression_name): Properly qualify *everything*
10674         after a package.type to be resoled as expression names.
10675         (find_applicable_accessible_methods_list): Save/restore `class' to
10676         isolate it from a possible outer context search.
10677
10678 2000-02-15  Tom Tromey  <tromey@cygnus.com>
10679
10680         * gjavah.c (jni_print_char): New function.
10681         (print_full_cxx_name): Use it.
10682         (decode_signature_piece): Likewise.
10683         (print_cxx_classname): Likewise.
10684
10685 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10686
10687         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10688         version.o.
10689         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10690
10691         * gjavah.c: Include version.h.
10692
10693         * jcf-dump.c: Likewise.
10694
10695         * jv-scan.c: Likewise.
10696
10697 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10698
10699         * parse.y (outer_field_access_fix): First parameter now a tree
10700         node. Check for assignment to final. First argument to
10701         build_outer_field_access_fix modified to accommodate prototype.
10702         (build_outer_field_access): Don't check for assignment to final
10703         here.
10704         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10705         possibly returned by outer_field_access_fix. Changed
10706         outer_field_access_fix's first argument.
10707         (check_final_assignment): $finit$'s context is OK.
10708         (patch_unaryop): Use node instead of its line/column value when
10709         calling outer_field_access_fix.
10710
10711 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10712
10713         * parse.y (interface_declaration:): No longer tagged
10714         <node>. Re-installed default action.
10715         (class_member_declaration:): Handle inner interfaces.
10716         (interface_member_declaration): Handle inner interfaces and
10717         classes.
10718         (create_interface): Push error if one seen. Suspend parsing
10719         context when processing an inner interface.
10720         (register_fields): Inner class static field limitations not to
10721         apply to inner interfaces.
10722
10723 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10724
10725         * jcf-parse.c (load_class): Update `java_error_count' when a
10726         class' file can't be found.
10727         (parse.y): Avoid (byte)code generation when errors seen.
10728
10729 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10730
10731         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10732         decodes a valid node.
10733         (patch_binop): Handle TRUNC_DIV_EXPR.
10734
10735 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10736
10737         * parse.y (resolve_package): New local `acc'. Try to progressively
10738         build and guess a package and type name.
10739
10740 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10741
10742         * parse.y (find_applicable_accessible_methods_list): Load and
10743         layout the search class if necessary.
10744         (java_complete_tree): Keep to original type of the folded initial
10745         value.
10746
10747 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10748
10749         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10750         Generate error message if circularity is detected. New static
10751         local `list'.
10752         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
10753         * jcf-write.c (generate_bytecode_insns): Very simply handle
10754         SAVE_EXPR.
10755         * parse.y (java_check_circular_reference): Use
10756         `cyclic_inheritance_report' during report, if necessary.
10757         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10758         walking NEW_ARRAY_INIT twice.
10759
10760 2000-02-09  Tom Tromey  <tromey@cygnus.com>
10761
10762         * parse.y (check_class_interface_creation): Allow inner classes to
10763         be `private' or `protected', check modifiers' consistency. Prevent
10764         block local classes from bearing any modifiers.
10765
10766 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10767
10768         * except.c (check_start_handlers): Re-add prototype lost in last
10769         patch.
10770         (maybe_start_try): Remove excess argument to `check_start_handlers'.
10771
10772 2000-02-09  Andrew Haley  <aph@cygnus.com>
10773
10774         * decl.c (clear_binding_level): Remove excess initializer.
10775         (maybe_poplevels): Remove unused variable.
10776         (force_poplevels): Ditto.
10777         (struct binding_level): Add comment.
10778
10779 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10780
10781         * jcf-write.c (generate_classfile): Don't consider
10782         pre-initialization with reference value (use <clinit> instead.)
10783         * parse.y (java_fix_constructors): No generated constructor for
10784         interfaces.
10785         (build_outer_field_access): Removed debug message.
10786         (outer_field_expanded_access_p): Adapted to bytecode generation.
10787         (build_outer_field_access_method): Use fix_method_argument_names.
10788         (build_outer_method_access_method): Fixed indentation. Added
10789         comment. Handle access method generation for static and also void
10790         methods.
10791         (build_access_to_thisn): Inserted debug message.
10792         (maybe_build_thisn_access_method): Use fix_method_argument_names.
10793         (resolve_qualified_expression_name): Fixed comment.
10794         (not_accessible_p): Adapted to bytecode generation. Added comment.
10795         (patch_method_invocation): Added comment.
10796         (maybe_use_access_method): Fixed leading comment. Handle static
10797         methods.
10798         (java_complete_lhs): Don't shortcut handling of initialized upon
10799         declaration String type static fields when generating bytecode.
10800         (patch_unaryop): Handle outer field access when generating
10801         bytecode.
10802
10803 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10804
10805         * java-tree.h (FIELD_THISN): New macro.
10806         * jcf-write.c (append_synthetic_attribute): New function.
10807         (generate_classfile): Set "Synthetic" attribute on this$<n>,
10808         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10809         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10810         this$<n> fields.
10811         (build_outer_field_access): Turned on access functions usage and
10812         generation when compiling to bytecode.
10813         (maybe_use_access_method): Likewise.
10814
10815 2000-01-25  Andrew Haley  <aph@cygnus.com>
10816
10817         * java-except.h (struct eh_range): Add `expanded' field.
10818         (maybe_start_try): Add end_pc arg.
10819         (maybe_end_try): Ditto.
10820         * java-tree.h (force_poplevels): new function.
10821         * expr.c (expand_byte_code): Don't call maybe_start_try or
10822         maybe_end_try.
10823         * except.c (add_handler): Reset expanded.
10824         (expand_start_java_handler): Set expanded.
10825         (check_start_handlers): Don't expand a start handler that's
10826         already been expanded.
10827         (maybe_start_try): Add end_pc arg.  Only expand a handler which
10828         ends after end_pc.
10829         (expand_end_java_handler): call force_poplevels.
10830         (force_poplevels): new function.
10831         * decl.c (binding_level): Add start_pc of binding level.
10832         (maybe_pushlevels): Call maybe_start_try when pushing binding
10833         levels.
10834         (maybe_poplevels): Call maybe_end_try when popping binding levels.
10835         (LARGEST_PC): Define.
10836         (clear_binding_level): Use LARGEST_PC.
10837
10838         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10839         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10840         (binding_depth, is_class_level, current_pc): new variables.
10841         (struct binding_level): ditto.
10842         (indent): new function.
10843         (push_jvm_slot): add debugging info.
10844         (maybe_pushlevels): ditto.
10845         (maybe_poplevels): ditto.
10846         (pushlevel): ditto.
10847         (poplevel): ditto.
10848         (start_java_method): ditto.
10849         (give_name_to_locals): comment only.
10850         * except.c (binding_depth, is_class_level, current_pc):
10851         new variables.
10852         (expand_start_java_handler): add debugging info.
10853         (expand_end_java_handler): ditto.
10854
10855 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10856
10857         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10858         (print_name_for_stub_or_jni, process_file): Constify a char*.
10859
10860 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10861
10862         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10863
10864 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10865
10866         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10867         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10868         defined to be 1.
10869
10870 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10871
10872         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10873         * java-tree.h (TYPE_II_STMT_LIST): New macro.
10874         (struct lang_type): New field `ii_block'.
10875         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10876         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10877         * parse.h (struct parser_ctxt): New field `instance_initializers'.
10878         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10879         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10880         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10881         macros.
10882         * parse.y (add_instance_initializer): New function.
10883         (in_instance_initializer): New static global.
10884         (class_body_declaration:): Link instance initializer block.
10885         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10886         (array_creation_expression:): Remove unused local.
10887         (java_parser_context_push_initialized_field): Fixed leading
10888         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10889         CPC_INSTANCE_INITIALIZER_LIST.
10890         (java_parser_context_pop_initialized_field): Likewise.
10891         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10892         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10893         CPC_INITIALIZER_STMT.
10894         (fix_constructors): New local `class_type'. Use it. Call
10895         add_instance_initializer.
10896         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10897         (patch_return): Forbid return in instance initializers.
10898         (patch_throw_statement): Enforce exception handling in the context
10899         of instance initializers.
10900
10901 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10902
10903         * Make-lang.in (java.mostlyclean): Remove executables in
10904         `mostlyclean'.
10905
10906 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10907
10908         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10909         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10910         (java_float_finite): Convert to use union Word from javaop.h.
10911         (java_double_finite): Convert to use union DWord from javaop.h.
10912
10913 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10914
10915         * gjavah.c (options): Added `jni' entry.
10916         (help): Document -jni.
10917         (flag_jni): New global.
10918         (process_file): Handle JNI output.  Don't print text from
10919         -prepend, -add, etc, when generating stubs.  Only remove `.class'
10920         suffix if it actually exists.
10921         (main): Create a `.c' file when run with `--jni --stubs'.  Create
10922         correct output file name with `--jni'.
10923         (print_include): Mangle header name differently in JNI case.
10924         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10925         method list.
10926         (print_method_info): Handle JNI case.  Put signature info into
10927         method name.  Handle case when STREAM is NULL.
10928         (print_name_for_stub_or_jni): New function.
10929         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
10930         (print_cxx_classname): Handle JNI.
10931         (print_full_cxx_name): Likewise.
10932         (decode_signature_piece): Likewise.
10933         (overloaded_jni_method_exists_p): New function.
10934         (struct method_name): Added `signature' and `sig_length' fields.
10935         (HANDLE_END_FIELD): Do nothing in JNI mode.
10936
10937 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10938
10939         * jv-scan.c: Include version.c, <getopt.h>.
10940         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10941         (options): New array.
10942         (usage): New function.
10943         (version): New function.
10944         (main): Use getopt_long to parse command line.
10945         * jcf-dump.c: Include version.c, <getopt.h>.
10946         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10947         OPT_JAVAP): New macros.
10948         (options): New array.
10949         (usage): Return `void'.  Changed message.
10950         (help): New function.
10951         (version): New function.
10952         (main): Use getopt_long_only to parse command line.
10953         * gjavah.c: Include <getopt.h>.
10954         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10955         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10956         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10957         (options): New array.
10958         (java_no_argument): Removed.
10959         (help): Updated with missing options.
10960         (main): Use getopt_long_only to parse command line.
10961         (usage): Changed message.
10962
10963 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10964
10965         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10966         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10967         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10968         * parse.y (array_creation_expression:): Handle anonymous arrays.
10969         (build_array_from_name): Don't set `ret_name' if null.
10970         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10971         (qualify_ambiguous_name): Likewise.
10972         (java_complete_expand_class): Likewise.
10973
10974 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10975
10976         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10977         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10978         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10979         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10980         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10981         AIPL_FUNCTION_COMPLETED_INVOCATION.
10982         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10983         AIPL_FUNCTION_INVOCATION_READY.
10984         (AIPL_FUNCTION_DECLARATION): New enum entry.
10985         * parse.y (reorder_static_initialized): New function.
10986         (java_parser_context_pop_initialized_field): Use it.
10987         (add_inner_class_fields): Use
10988         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10989         augmented. Install marker after last alias initializer, if any.
10990         (generate_finit): Fixed typo. Don't try to retain only the used
10991         fields.
10992         (method_header): Compute and set DECL_FUNCTION_NAP.
10993         (method_declarator): Fixed comment. Insert alias initializer in
10994         parameter list.
10995         (build_alias_initializer_parameter_list): Fixed leading
10996         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10997         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10998         (java_complete_expand_class): Code to retain only used aliases
10999         removed.
11000         (java_complete_expand_methods): New local `first_decl'. Generate
11001         $finit$ first, then expand the constructors, regular methods and
11002         <clinit>.
11003         (java_complete_expand_method): Don't report error on missing
11004         return statement if previously detected bogus.
11005         (fix_constructors): Don't patch constructor parameters list.
11006         (patch_method_invocation): Use new AIPL enum values. Reverse
11007         alias initializer list for anonymous classes.
11008
11009 2000-01-30  Anthony Green  <green@redhat.com>
11010
11011         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
11012         determine how many stack slots to pop.
11013
11014 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11015
11016         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
11017         error handling/recovery.
11018         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
11019
11020 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11021
11022         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
11023         FIELD_LOCAL_ALIAS_USED): New macros.
11024         (DECL_FUNCTION_NAP): New macro.
11025         (struct lang_decl): New field `nap'.
11026         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
11027         (struct lang_type): New fields `finit_stmt_list' and
11028         `clinit_stmt_list'.
11029         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
11030         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
11031         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
11032         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
11033         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
11034         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
11035         (BUILD_THROW): Macro line separator re-indented.
11036         * parse.y (end_class_declaration): New function.
11037         (maybe_generate_pre_expand_clinit): New name for
11038         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
11039         pre-expand static fields.
11040         (maybe_generate_clinit): Function deleted.
11041         (check_for_static_method_reference): Prototype's parameter list
11042         indented.
11043         (generate_finit): New name for maybe_generate_finit. Changed
11044         leading comment. Function rewritten to use
11045         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
11046         (build_alias_initializer_parameter_list): New function.
11047         (java_parser_context_pop_initialized_field): Likewise.
11048         (add_inner_class_fields): Likewise.
11049         (type_declaration:): Call end_class_declaration.
11050         (class_member_declaration:): Likewise.
11051         (formal_parameter_list:): Fixed typos.
11052         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
11053         element. Improved error handling.
11054         (block_statement:): Call end_class_declaration.
11055         (anonymous_class_creation:): Likewise.
11056         (create_anonymous_class): Fixed comments.
11057         (create_class): Call add_inner_class_fields.
11058         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
11059         (method_header): Use MARK_FINAL_PARMS.
11060         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
11061         (method_declarator): Propagate final argument flag.
11062         (craft_constructor): New local `artificial'. Call
11063         build_alias_initializer_parameter_list. Use
11064         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
11065         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
11066         necessary.
11067         (complete_expand_class): Get rid of unused outer context local
11068         alias fields.
11069         (java_complete_expand_methods): Fixed leading
11070         comment. Generate/pre-expand <clinit> first. Changed method
11071         expansion order to regular, $finit$, constructors, <clinit>.
11072         (java_complete_expand_method): Set current_function_decl.
11073         (fix_constructors): Fix constructor parameter list to account for
11074         outer context local alias initializers.
11075         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11076         (resolve_expression_name): Lookup outer context local aliases. New
11077         local `access', use it.
11078         (patch_method_invocation): Patch inner class ctor invocation with
11079         outer context local aliases initialization values. $finit$
11080         invocation patching now includes things generated with
11081         build_alias_initializer_parameter_list.
11082         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11083         (build_super_invocation): Likewise.
11084         (patch_assignment): Changed comment.
11085
11086 2000-01-27  Andrew Haley  <aph@cygnus.com>
11087
11088         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
11089         (emit_if): Ditto.
11090         (emit_jsr): Ditto.
11091
11092 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11093
11094         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
11095         concatenation.
11096         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
11097
11098         * parse.y (register_fields): Don't pass a format specifier to
11099         OBSOLETE_MODIFIER_WARNING.
11100         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
11101         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
11102         specifier.
11103         (check_modifiers): Change function into a macro.
11104         (check_class_interface_creation): Pass a literal format string.
11105
11106 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11107
11108         * buffer.h: PROTO -> PARAMS.
11109         * check-init.c: Likewise.
11110         * class.c: Likewise.
11111         * constants.c: Likewise.
11112         * convert.h: Likewise.
11113         * decl.c: Likewise.
11114         * except.c: Likewise.
11115         * expr.c: Likewise.
11116         * gjavah.c: Likewise.
11117         * java-except.h: Likewise.
11118         * java-tree.h: Likewise.
11119         * jcf-depend.c: Likewise.
11120         * jcf-dump.c: Likewise.
11121         * jcf-parse.c: Likewise.
11122         * jcf-path.c: Likewise.
11123         * jcf-reader.c: Likewise.
11124         * jcf-write.c: Likewise.
11125         * jcf.h: Likewise.
11126         * jv-scan.c: Likewise.
11127         * jvgenmain.c: Likewise.
11128         * jvspec.c: Likewise.
11129         * lang.c: Likewise.
11130         * lex.c: Likewise.
11131         * lex.h: Likewise.
11132         * parse-scan.y: Likewise.
11133         * parse.h: Likewise.
11134         * parse.y: Likewise.
11135         * typeck.c: Likewise.
11136         * verify.c: Likewise.
11137         * xref.c: Likewise.
11138         * xref.h: Likewise.
11139         * zextract.c: Likewise.
11140         * zipfile.h: Likewise.
11141
11142 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11143
11144         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11145         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
11146         * constants.c (build_constant_data_ref): Check for cached
11147         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
11148         in TYPE_CPOOL_DATE_REF.
11149         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
11150         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
11151         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
11152         (LOCAL_FINAL): New macro.
11153         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
11154         constant pool -- don't try to reuse.
11155         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
11156         TYPE_LANG_SPECIFIC.
11157         (find_in_current_zip): Use TYPE_JCF.
11158         * parse.h (java_check_final): Prototype removed.
11159         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
11160         (maybe_create_class_interface_decl,
11161         check_class_interface_creation): Likewise.
11162         (java_expand_finals): Function removed.
11163         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
11164         (block_statement:): Fixed comment.
11165         (anonymous_class_creation:): Likewise.
11166         (check_class_interface_creation): Reversed Jan 12, 2000 extra
11167         argument patch.
11168         (check_class_interface_creation): Loosened error report on (inner)
11169         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
11170         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
11171         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
11172         argument patch.
11173         (create_interface): Likewise.
11174         (anonymous_class_counter): New static global.
11175         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
11176         patch. Fixed comments.
11177         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
11178         anonymous_class_counter when declaring a toplevel class.
11179         (craft_constructor): Fixed constructor name when handling
11180         anonymous classes. Anonymous class constructors to feature hidden
11181         this$<n> parameter.
11182         (java_fix_constructors): Added comment.
11183         (java_check_final): Function removed.
11184         (java_complete_expand_methods): Fixed comment. Don't generate
11185         class data, save its outgoing constant pool instead.
11186         (verify_constructor_super): Skip anonymous class constructor
11187         hidden this$<n> parameter.
11188         (java_expand_classes): New local `saved_ctxp'. Removed call to
11189         java_expand_finals and java_check_final. Expand anonymous class
11190         constructors. Generate class data.
11191         (build_super_invocation): Skip anonymous class hidden this$<n>
11192         parameter.
11193         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
11194         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11195         (set_java_signature): Likewise.
11196
11197 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11198
11199         * gjavah.c: Delete ACC_VISIBILITY define.
11200         * jcf.h: Add ACC_VISIBILITY define.
11201         * parse.y: final: rule tagged <value>.
11202         (java_check_regular_methods): Use ACC_VISIBILITY define for
11203         default package access check.
11204         (local_variable_declaration_statement): Use final: rule.
11205
11206 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11207
11208         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
11209         (final:): New rule.
11210
11211 2000-01-17  Tom Tromey  <tromey@cygnus.com>
11212
11213         * gjavah.c (print_field_info): Allow non-static final fields.
11214
11215 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11216
11217         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
11218         * parse.y (patch_anonymous_class): New function.
11219         (create_anonymous_class): Register incomplete type when the
11220         class/interface to extends/implement isn't known yet.
11221         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
11222         (verify_constructor_super): Tuned error message.
11223
11224 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11225
11226         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
11227         (ANONYMOUS_CLASS_P): New macro.
11228         (TYPE_SIGNATURE, TYPE_JCF): New macros.
11229         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
11230         * parse.y (create_class): Added leading argument.
11231         (maybe_create_class_interface_decl,
11232         check_class_interface_creation): Likewise.
11233         (craft_constructor): New function.
11234         (verify_constructor_super): Added argument in prototype.
11235         (class_declaration:): Inserted leading argument.
11236         (for_begin:): Use FOR_LOOP_P.
11237         (anonymous_class_creation): Create WFL of the anonymous class to
11238         instantiate. Call build_new_invocation. Added comments.
11239         (check_class_interface_creation): Handle parameter `anonymous' in
11240         verbose mode class creation announce.
11241         (link_nested_class_to_enclosing): Exclude anonymous classes.
11242         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
11243         anonymous class, even though they appear to have an enclosing
11244         context.
11245         (create_interface): Pass extra argument to
11246         check_class_interface_creation.
11247         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
11248         (create_class): Call check_class_interface_creation and
11249         maybe_create_class_interface_decl with extra new argument. Don't
11250         add private this$<n> to anonymous classes.
11251         (method_declarator): Insert hidden this$<n> to anonymous class
11252         constructors.
11253         (java_fix_constructors): Deleted code creating default
11254         constructor. Call craft_constructor instead.
11255         (java_check_regular_methods): Set `saw_constructor' to 1 for
11256         anonymous classes.
11257         (fix_constructors): Pass extra argument to verify_constructor_super.
11258         (verify_constructor_super): New local `sdecl', use it. Search for
11259         matching constructor (possibly featuring arguments) in super
11260         class.
11261         (lookup_method_invoke): Craft constructor according to arguments
11262         list when dealing with anonymous class constructors.
11263         (build_super_invocation): Pass arguments to anonymous class super
11264         constructors.
11265         (search_loop): Use FOR_LOOP_P.
11266         (labeled_block_contains_loop_p): Likewise.
11267
11268 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11269
11270         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
11271         (enclosing_context_p): New function.
11272         (get_access_flags_from_decl): Handle CLASS_STATIC.
11273         (maybe_layout_super_class): Extra first argument passed to
11274         do_resolve_class.
11275         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
11276         ID_INIT_P.
11277         * decl.c (access0_identifier_node): New global.
11278         (init_decl_processing): access0_identifier_node initialized.
11279         (pushdecl): Set DECL_CONTEXT only on non type decls.
11280         * expr.c (lookup_field): Lookup inner class fields in enclosing
11281         contexts.
11282         (expand_invoke): Use ID_INIT_P.
11283         (expand_java_field_op): Use DECL_CLINIT_P.
11284         * java-tree.def (CLASS_LITERAL): New tree code.
11285         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
11286         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
11287         (struct lang_decl): New field `inner_access'.
11288         (enclosing_context_p): Prototyped.
11289         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
11290         ID_CLINIT_P): New macros.
11291         (CLASS_STATIC): New macro.
11292         (CLASS_ACCESS0_GENERATED_P): New macro.
11293         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
11294         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
11295         INNER_CLASS_P): New macros.
11296         (DECL_INNER_CLASS_LIST): New macro.
11297         * jcf-parse.c (yyparse): Avoid the use of ANSI string
11298         concatenation.
11299         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11300         the shift value to int. Fixed typo in comment.
11301         * lex.c (inst_id, wpv_id): Initialize.
11302         * mangle.c (unicode_mangling_length): Take `$' into account.
11303         * parse.h (DRECOVER, RECOVER): Terminate properly.
11304         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
11305         (typedef struct _jdep): New field `enclosing'.
11306         (JDEP_ENCLOSING): New macro.
11307         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
11308         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
11309         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
11310         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
11311         GET_ENCLOSING_CPC_CONTEXT): New macros.
11312         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
11313         (do_resolve_class): Added extra argument in prototype.
11314         * parse.y (resolve_class): Added extra argument in prototype.
11315         (maybe_create_class_interface_decl): Likewise.
11316         (maybe_use_access_method, build_wfl_wrap): New functions.
11317         (java_complete_expand_classes, java_complete_expand_class):
11318         Likewise.
11319         (java_parser_context_push_initialized_field,
11320         java_parser_context_suspend, java_parser_context_resume):
11321         Likewise.
11322         (maybe_make_nested_class_name, make_nested_class_name,
11323         set_nested_class_simple_name_value,
11324         link_nested_class_to_enclosing, find_as_inner_class,
11325         find_as_inner_class_do, check_inner_class_redefinition,
11326         build_thisn_assign, build_current_thisn, build_access_to_thisn,
11327         maybe_build_thisn_access_method, build_outer_field_access,
11328         build_outer_field_access_methods, build_outer_field_access_expr,
11329         build_outer_method_access_method, build_new_access_id,
11330         build_outer_field_access_method, outer_field_access_p,
11331         outer_field_expanded_access_p, outer_field_access_fix,
11332         build_incomplete_class_ref, patch_incomplete_class_ref,
11333         create_anonymous_class): Likewise.
11334         (inst_id, wpv_id): New static global variables.
11335         (synchronized:): New rule, tagged <node>.
11336         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
11337         rules.
11338         (anonymous_class_creation:): New rule, tagged <node>.
11339         (NEW_TK): Tagged <node>.
11340         (type_literals, array_type_literal): New rules, tagged <node>.
11341         (class_declaration:): Removed action when reducing by class_body:
11342         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
11343         using GET_CPC in sub-rules.
11344         (class_member_declaration): Handle inner classes.
11345         (method_declaration): When reducing method_header:, reset
11346         current_function_decl when appropriate.
11347         (method_declarator:): Set the number of formal parameter to 0 for
11348         method declared without arguments.
11349         (constructor_declarator:): Likewise.
11350         (static_initializer:): List of elements kept in a list.
11351         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
11352         use of the keyword `static' for type declarations.
11353         (block_statement:): Handle inner class declarations.
11354         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
11355         type qualified `this'.
11356         (class_instance_creation_expression): Use anonymous_class_creation:
11357         to handle inner class instances creation. Handle qualified `new'.
11358         (something_dot_new): Added appropriate actions.
11359         (create_new_parser_context): New function.
11360         (java_push_parser_context, java_parser_context_save_global,
11361         java_parser_context_suspend): Use create_new_parser_context.
11362         (check_modifiers): Changed leading comment.
11363         (check_class_interface_creation): Handle interclasses.
11364         (add_superinterfaces): Fixed comment.
11365         (create_interface): Build qualified name from the raw_name instead
11366         of its matching WFL. Push the initialized fields list. raw_name added
11367         as an extra argument to maybe_create_class_interface_decl.
11368         (create_class): Build qualified name from the raw_name instead of
11369         its matching WFL. Removed assignment to current_parsed_class_un.
11370         Call PUSH_ERROR before returning an error. Suspend the current
11371         parser context when processing an inner class. Push the
11372         initialized fields list. raw_name added as an extra argument to
11373         maybe_create_class_interface_decl. Add the private this$<n>
11374         field.
11375         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
11376         (register_fields): Get the class type from GET_CPC and handle
11377         previous errors.  Added code to handle the creation of static
11378         fields in inner classes. Initialized fields initialization
11379         statements kept in a list of lists.
11380         (maybe_generate_finit): Initialized fields initialization
11381         statements kept in a list of lists. Use GET_CPC.
11382         (maybe_generate_clinit): Likewise.
11383         (method_header): Use GET_CPC and GET_CPC_UN.
11384         (parser_qualified_classname): Handle inner classes.
11385         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
11386         (java_fix_constructors): Hide pointer to enclosing context
11387         instance in constructor list when dealing with inner classes.
11388         (jdep_resolve_class): Call resolve_class with extra first argument
11389         JDEP_ENCLOSING.
11390         (resolve_class): Add enclosing context as a first extra argument
11391         to do_resolve_class.
11392         (do_resolve_class): Call find_as_inner_class. Handle WFLs
11393         properly.
11394         (resolve_no_layout): Extra argument added to resolve_class
11395         invocation.
11396         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
11397         (java_get_real_method_name): Use GET_CPC_UN.
11398         (check_abstract_method_definitions): Use DECL_CLINIT_P.
11399         (java_check_abstract_methods): Handle static method declared in
11400         inner classes by an error.
11401         (java_check_regular_methods): Use DECL_CLINIT_P.
11402         (source_start_java_method): Also set DECL_MAX_LOCALS.
11403         (create_artificial_method): Call java_parser_context_save_global
11404         and java_parser_context_restore_global instead of saving/restoring
11405         the context by hand.
11406         (expand_start_java_method): Improved verbose mode message.
11407         (java_complete_expand_methods): Fixed leading comment. Use
11408         DECL_CLINIT_P.
11409         (fix_constructors): Added assignment to this$<n> if necessary.
11410         (java_expand_classes): Call java_complete_expand_classes instead
11411         of java_complete_expand_methods.
11412         (make_qualified_primary): Simplified.
11413         (merge_qualified_name): Optimized for missing left or right parts.
11414         (resolve_expression_name): Handle access to outer class fields from
11415         interclasses.
11416         (resolve_qualified_expression_name): New macro
11417         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
11418         classes. Report error on non appropriate qualification of
11419         `new'. Handle qualified `this'.
11420         (not_accessible_p): Allow access to outer class private fields from
11421         inner classes.
11422         (patch_method_invocation): Handle method invocations through
11423         access methods and inner class constructor invocations.
11424         (find_applicable_accessible_methods_list): Search enclosing
11425         contexts of an inner class.
11426         (search_applicable_methods_list): Fixed typo.
11427         (argument_types_convertible): Handle inner class constructors'
11428         hidden outer context reference argument.
11429         (qualify_ambiguous_name): Handle qualified `this'.
11430         (java_complete_lhs): Handle use of field accessed through
11431         artificial access methods in various cases of assignments. Handle
11432         CLASS_LITERAL node.
11433         (check_final_assignment): Use DECL_CLINIT_P.
11434         (valid_ref_assignconv_cast_p): Handle the destination being an
11435         enclosing context of the source.
11436         (patch_unaryop): Handle use of field accessed through artificial
11437         access methods.
11438         (patch_return): Use DECL_CLINIT_P.
11439         (patch_throw_statement): Use DECL_CLINIT_P.
11440         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11441         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11442         ID_INIT_P.
11443
11444 2000-01-16  Anthony Green  <green@cygnus.com>
11445
11446         * parse.y (build_string_concatenation): Only use
11447         StringBuffer(String) shortcut if String arg is constant.
11448
11449 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11450
11451         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11452         the shift value to int. Fixed typo in comment.
11453
11454 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
11455
11456         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11457         * jcf-write.c: Likewise.
11458         * parse.y: Likewise.
11459         * parse.c: Regenerate.
11460
11461 2000-01-09  Anthony Green  <green@cygnus.com>
11462
11463         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11464         bytecodes in the correct order.
11465
11466 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11467
11468         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11469
11470 2000-01-06  Anthony Green  <green@cygnus.com>
11471
11472         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11473         before building constant array decl.
11474
11475 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11476
11477         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11478         method invocation and typo in conditional expression.
11479         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11480         the appropriate NOTE_POP.
11481         * parse.y (patch_binop): Shift value mask to feature the right
11482         type.
11483
11484 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11485
11486         * class.c (assume_compiled, assume_compiled_node): Add static
11487         prototype.
11488         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11489
11490         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11491
11492         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11493
11494         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11495         to `__modifier' to avoid stringifying it.
11496
11497         * parse.y (verify_constructor_circularity): Don't call a variadic
11498         function with a non-literal format string.
11499         (java_check_abstract_methods): Move unreachable code inside
11500         `continue' statement.
11501         (lookup_method_invoke): Call xstrdup, not strdup.
11502
11503         * expr.c (expand_java_field_op): Avoid the use of ANSI string
11504         concatenation.
11505
11506         * jcf-parse.c (yyparse): Likewise.
11507
11508         * jv-scan.c (main): Likewise.
11509
11510 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11511
11512         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11513         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11514         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11515         concatenation.
11516
11517         * parse.y (synchronized, variable_redefinition_error,
11518         check_class_interface_creation, create_interface, create_class,
11519         method_header, finish_method_declaration,
11520         check_modifiers_consistency, method_declarator,
11521         complete_class_report_errors, check_abstract_method_definitions,
11522         java_check_regular_methods, check_throws_clauses,
11523         java_check_abstract_methods, read_import_dir,
11524         check_pkg_class_access, declare_local_variables, fix_constructors,
11525         cut_identifier_in_qualified, resolve_expression_name,
11526         resolve_qualified_expression_name, patch_method_invocation,
11527         java_complete_lhs, patch_assignment, try_builtin_assignconv,
11528         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11529         patch_exit_expr, patch_exit_expr, patch_switch_statement,
11530         patch_try_statement, patch_synchronized_statement,
11531         patch_throw_statement, check_thrown_exceptions,
11532         patch_conditional_expr): Likewise.
11533
11534 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11535
11536         * Makefile.in (LIBDEPS): Added gcc's errors.o
11537         (../jcf-dump$(exeext):): Link with gcc's errors.o
11538         (../gcjh$(exeext):): Likewise.
11539         * expr.c (expand_java_NEW): Layout the entire target type instead of
11540         laying out its methods only.
11541         (lookup_field): Layout the class after having loaded it.
11542         * java-tree.h (java_debug_context): Declared.
11543         * jcf-io.c (toplev.h): Included.
11544         (find_class): Removed assignment to jcf's outofsynch
11545         field. Force source file to be read if newer than its matching
11546         class file. Tweaked debug messages.
11547         * jcf-parse.c (jcf_out_of_synch): Deleted.
11548         (read_class): Call to jcf_out_of_synch removed.
11549         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11550         (jcf_out_of_synch): Prototype deleted.
11551         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11552         `deprecated' and `class_err': integer turned into bit-fields.
11553         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
11554         * parse.y (package_list): New global.
11555         (package_declaration:): Record newly parsed package name.
11556         (extra_ctxp_pushed_p): Static global deleted.
11557         (java_parser_context_save_global): Create buffer context for the
11558         purpose of saving globals, if necessary.
11559         (java_parser_context_restore_global): Pop context pushed for the
11560         purpose of saving globals, if necessary.
11561         (java_debug_context_do): New prototype and function.
11562         (java_debug_context): Likewise.
11563         (do_resolve_class): Use already parsed package names to qualify
11564         and lookup class candidate.
11565         (java_pre_expand_clinit): Removed unnecessary local variable.
11566
11567 1999-12-17  Tom Tromey  <tromey@cygnus.com>
11568
11569         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
11570         fixes PR gcj/119.
11571         (process_file): Use `\n\' at end of each line in string.
11572
11573 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11574
11575         * expr.c (expand_invoke): Layout the loaded class before
11576         attempting to use it.
11577         (expand_java_field_op): Allow final field assignments to take
11578         place in $finit$.
11579         * typeck.c (convert): Return error_mark_node if expr is null.
11580
11581 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11582
11583         * class.c (class_depth): Return -1 if the class doesn't load
11584         properly.
11585         * expr.c (can_widen_reference_to): Check for errors during depth
11586         computation and return 0 accordingly.
11587         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11588         create default constructors and add an other error check.
11589         * parse.h (java_fix_constructors): Prototyped.
11590         * parse.y (java_pre_expand_clinit): Likewise.
11591         (build_super_invocation): Re-prototyped to feature one argument.
11592         (java_check_circular_reference): Directly use `current'.
11593         (java_fix_constructors): New function.
11594         (java_check_regular_methods): Don't create default constructors
11595         here, but abort if none were found.
11596         (java_complete_expand_methods): Pre-process <clinit> calling
11597         java_pre_expand_clinit.
11598         (java_pre_expand_clinit): New function.
11599         (fix_constructors): build_super_invocation invoked with the
11600         current method declaration as an argument.
11601         (build_super_invocation): Use the context of the processed method
11602         decl argument instead of current_class.
11603         * typeck.c (lookup_java_method): Take WFLs in method names into
11604         account.
11605
11606 1999-12-14  Per Bothner  <per@bothner.com>
11607
11608         * class.c (make_class_data): flag_keep_inline_functions to keep
11609         private methods in the method array.
11610
11611 1999-12-15  Anthony Green  <green@cygnus.com>
11612
11613         * check-init.c (check_init): Take into account both types of
11614         `throw's when checking for uninitialized variables.
11615
11616 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11617
11618         * parse.y (java_complete_lhs): Force conversion of array
11619         dimensions to int_type_node, that's what runtime's ABI expects.
11620
11621 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11622
11623         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11624         operand of a WFL, until the Java front-end gets fixed with regard
11625         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11626
11627 1999-12-10  Andrew Haley  <aph@cygnus.com>
11628
11629         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11630         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11631         expr.c (build_java_athrow): Add support for sjlj-exceptions.
11632         java-tree.h: Ditto.
11633         jcf-write.c: Ditto.
11634
11635 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11636
11637         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11638         before calling expand_eh_region_start and expand_start_all_catch.
11639         * except.c (expand_start_java_handler): Switch to permanent
11640         obstack before calling expand_eh_region_start.
11641         (expand_end_java_handler): Switch to permanent obstack before
11642         calling expand_start_all_catch.
11643
11644 1999-12-5  Anthony Green  <green@cygnus.com>
11645
11646         * decl.c (init_decl_processing): Mark throw_node as a noreturn
11647         function with side effects.
11648         (init_decl_processing): Mark all memory allocating DECLs with
11649         DECL_IS_MALLOC.
11650
11651 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11652
11653         * except.c (expand_end_java_handler): Call
11654         expand_resume_after_catch and end_catch_handler.
11655
11656 1999-11-30  Anthony Green  <green@cygnus.com>
11657
11658         * verify.c (verify_jvm_instructions): Create new return label
11659         chain if non existent (don't rely on the verified state of the jsr
11660         target.)
11661
11662 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11663
11664         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11665         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11666
11667         * parse.y (patch_assignment): Removed bogus final class test on
11668         lhs when checking on whether to emit an ArrayStoreException runtime
11669         check.
11670         * expr.c (expand_java_arraystore): Likewise.
11671
11672 1999-11-28 Anthony Green <green@cygnus.com>
11673
11674         * decl.c (find_local_variable): Reuse single slot decls when
11675           appropriate.
11676
11677 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11678
11679         * jcf-parse.c (saw_java_source): Global variable removed.
11680         (read_class): Don't use `saw_java_source'. Added extra braces.
11681         (yyparse): Code setting `saw_java_source' removed.
11682
11683 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
11684
11685         * except.c (emit_handlers): Zero catch_clauses after emitting them.
11686
11687 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11688
11689         * verify.c (merge_type_state): Non verified subroutines being
11690         considered more than once to trigger passive type merge.
11691
11692 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11693
11694         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11695         in case of error. Error message tuned.
11696
11697 1999-11-21  Anthony Green  <green@cygnus.com>
11698
11699         * constants.c (find_methodref_index): Unwrap method names before
11700         inserting them in the constant pool.
11701
11702         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11703
11704         * class.c (assume_compiled_node): New typedef.
11705         (assume_compiled_tree): New static data.
11706         (find_assume_compiled_node): New function.
11707         (add_assume_compiled): New function.
11708         (assume_compiled): New function.
11709         * class.c (make_class_data): Use assume_compiled.
11710         (is_compiled_class): Use assume_compiled.
11711
11712         * java-tree.h (add_assume_compiled): Declare.
11713
11714         * lang.c (lang_decode_option): Parse new options.
11715
11716 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11717
11718         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11719         int_type_node: that's what `_Jv_AllocObject' expects.
11720
11721 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11722
11723         * parse.y (lookup_method_invoke): Use lang_printable_name to
11724         reliably build the type name during error report. Fixes PR gcj/97.
11725
11726 1999-11-09  Tom Tromey  <tromey@cygnus.com>
11727
11728         * jcf-path.c: Include <sys/stat.h>.
11729         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
11730         (DIR_UP): New macro.
11731
11732 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11733
11734         * parse.y (source_end_java_method): Resume permanent allocation,
11735         reversing Apr 27 1998 patch.
11736         (patch_string_cst): Pop obstacks after having pushed the permanent
11737         ones.
11738
11739 1999-11-05  Tom Tromey  <tromey@cygnus.com>
11740
11741         * class.c (finish_class): Emit inlined methods if any native
11742         methods exist in the class.  Fixes PR gcj/85.
11743
11744 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11745
11746         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11747         (qualify_ambiguous_name): Likewise.
11748
11749 1999-11-03  Godmar Back <gback@cs.utah.edu>
11750
11751         * typeck.c: (lookup_java_method):  search all inherited
11752         interfaces when looking up interface method.
11753
11754 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11755
11756         * parse.y (method_header:): Issue error message for rule `type
11757         error'.
11758         (synchronized:): Error report when not using synchronized.
11759
11760 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11761
11762         * parse.y (resolve_qualified_expression_name): Prevent `this' from
11763         being used before the superclass constructor has been called.
11764         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11765         instead of `CALL_THIS_CONSTRUCTOR_P'.
11766
11767 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
11768
11769         * check-init.c: Fix typo in comment.
11770
11771 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11772
11773         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11774         and final method.
11775
11776 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11777
11778         * parse.y (expression_statement:): Call function to report
11779         improper invocation of a constructor.
11780         (parse_ctor_invocation_error): New function.
11781
11782 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
11783
11784         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11785         remember_end_note.
11786
11787 1999-10-21  Tom Tromey  <tromey@cygnus.com>
11788
11789         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11790         in generated `main'.
11791
11792 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11793
11794         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11795         (qualify_ambiguous_name): Likewise.
11796
11797 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11798
11799         * parse.y (java_complete_tree): fold_constant_for_init to work on
11800         permanent_obstack.
11801         (java_complete_lhs): Likewise.
11802         (array_constructor_check_entry): Complete an initializer element
11803         on permanent_obstack.
11804
11805 1999-10-19  Tom Tromey  <tromey@cygnus.com>
11806
11807         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11808         From Mike Moreton <mike@pillim.demon.co.uk>.
11809
11810 1999-10-15  Greg McGary  <gkm@gnu.org>
11811
11812         * java-tree.h (flag_bounds_check): Remove extern decl.
11813         * lang.c (flag_bounds_check): Remove global variable.
11814         (lang_f_options): Remove "bounds-check" entry.
11815         (lang_init_options): Default flag_bounds_check to "on".
11816
11817 1999-10-14  Tom Tromey  <tromey@cygnus.com>
11818
11819         * jvgenmain.c (usage): New function.
11820         (main): Use it.  Also, handle `-D' options.
11821         * jvspec.c (lang_specific_driver): Recognize -D.
11822         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11823
11824         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11825
11826 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11827
11828         * jcf-dump.c (print_constant, disassemble_method): Don't call a
11829         variadic function with a non-literal format string.
11830
11831         * parse-scan.y (report_main_declaration): Likewise.
11832
11833         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11834
11835         * parse.y (read_import_dir, patch_assignment, patch_binop,
11836         patch_array_ref): Likewise.
11837
11838         * typeck.c (build_java_array_type): Likewise.
11839
11840         * verify.c (verify_jvm_instructions): Likewise.
11841
11842 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11843
11844         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11845
11846 1999-10-07  Anthony Green  <green@cygnus.com>
11847
11848         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11849         where CHECK_PUT may fail for valid reasons.
11850
11851         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11852         UNSAFE_PUTN): New macros.
11853
11854 1999-10-04  Tom Tromey  <tromey@cygnus.com>
11855
11856         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11857         well.  Fixes Java PR gcj/59.
11858         * parse-scan.y (yyerror): Report errors.
11859
11860 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
11861
11862         * decl.c (insert_block): Remove unconditional `abort'.
11863
11864 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
11865
11866         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
11867         FUNCTION_CODE now of type int.  All callers changed.
11868         Set the builtin's DECL_BUILT_IN_CLASS.
11869
11870 1999-09-23  Tom Tromey  <tromey@cygnus.com>
11871
11872         * jvspec.c (lang_specific_driver): Don't read spec file if
11873         -fsyntax-only given.
11874
11875 1999-09-22  Tom Tromey  <tromey@cygnus.com>
11876
11877         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11878
11879         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11880         (WORDS_TO_LONG): Likewise.
11881         (WORDS_TO_DOUBLE): Likewise.
11882
11883 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11884
11885         * jcf-write.c (RELOCATION_VALUE_0): New macro.
11886         (RELOCATION_VALUE_1): Likewise.
11887         (emit_iinc, emit_reloc, push_constant1, push_constant2,
11888         push_in_const, push_long_const): Prototyped.
11889         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11890         (push_constant2): Likewise.
11891         (push_int_const): Cast find_constant1's integer arguments to `jword'.
11892         (find_constant_wide): Cast find_constant2's integer arguments to
11893         `jword'.
11894         (find_constant_index): Cast find_constant2's and find_constant2's
11895         integer arguments to `jword'.
11896         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11897         (emit_switch_reloc): Use RELOCATION_VALUE_0.
11898         (emit_if): Use RELOCATION_VALUE_1.
11899         (emit_goto): Likewise.
11900         (emit_jsr): Likewise.
11901         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11902         argument to push_long_const to HOST_WIDE_INT.
11903
11904 1999-09-15  Andreas Schwab  <schwab@suse.de>
11905
11906         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11907
11908 1999-09-20  Nick Clifton  <nickc@cygnus.com>
11909
11910         * lang.c (lang_decode_option): Extend comment.
11911
11912 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11913
11914         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11915         instead of fndecl.
11916
11917 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11918
11919         * gjavah.c (get_field_name, print_method_info, print_include,
11920         add_namelet): Use xmalloc, not malloc.
11921
11922         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
11923         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11924         NULL pointer.
11925
11926         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11927
11928         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11929
11930         * jcf-path.c (add_entry): Likewise.
11931
11932         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11933
11934         * jv-scan.c (xmalloc): Remove definition.
11935
11936         * jvgenmain.c (xmalloc): Likewise.
11937
11938         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11939
11940         * lex.c (java_store_unicode): Use xrealloc, not realloc.
11941
11942         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
11943         concat, not xmalloc/sprintf.
11944         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11945         (xstrdup): Remove definition.
11946
11947         * parse.y (duplicate_declaration_error_p,
11948         constructor_circularity_msg, verify_constructor_circularity,
11949         check_abstract_method_definitions, java_check_regular_methods,
11950         java_check_abstract_methods, patch_method_invocation,
11951         check_for_static_method_reference, patch_assignment, patch_binop,
11952         patch_cast, array_constructor_check_entry, patch_return,
11953         patch_conditional_expr): Use xstrdup, not strdup.
11954
11955         * zextract.c (ALLOC): Use xmalloc, not malloc.
11956
11957 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11958
11959         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11960
11961         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
11962         (do_spec, lang_specific_pre_link, lang_specific_driver,
11963         input_filename, input_filename_length): Don't declare.
11964         (main_class_name, jvgenmain_spec, lang_specific_driver):
11965         Constify a char*.
11966         (lang_specific_driver): All calls to the function pointer
11967         parameter now explicitly call `fatal'.
11968
11969 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11970
11971         * parse.y (find_applicable_accessible_methods_list): Search
11972         abstract classes as interfaces.
11973
11974 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11975
11976         * class.c (finish_class): We're now outside a valid method
11977         declaration. Tell the rest of gcc so.
11978
11979 1999-09-08  Bruce Korb  autogen@linuxbox.com
11980
11981         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11982
11983 1999-09-07  Tom Tromey  <tromey@cygnus.com>
11984
11985         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11986         java-array.h.
11987         (decode_signature_piece): Don't emit "::" in JArray<>.
11988         (print_namelet): Only print trailing `;' when printing a class.
11989
11990 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
11991
11992         * java-tree.h: Delete declarations for all tree nodes now moved to
11993         global_trees.
11994         * decl.c: Delete their definitions.
11995
11996 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
11997
11998         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11999         * Makefile.in (OBJS): Add ggc-callbacks.o.
12000         (OBJDEPS): Likewise.
12001
12002 1999-09-03  Tom Tromey  <tromey@cygnus.com>
12003
12004         * parse.y (strip_out_static_field_access_decl): Return operand if
12005         it satisfies JDECL_P.
12006
12007 1999-09-02  Tom Tromey  <tromey@cygnus.com>
12008
12009         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
12010         Handle nested arrays, like `[[I'.
12011
12012 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12013
12014         * class.c (finish_class): Remove unused parameter, all callers
12015         changed.
12016
12017         * expr.c (build_java_athrow): Change return type to void.
12018         (java_lang_expand_expr): Make sure each case in switch returns a
12019         value.
12020
12021         * java-tree.h (finish_class): Fix prototype to take void args.
12022
12023         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
12024         (main): Issue return from main, not exit.
12025
12026         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
12027
12028         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
12029
12030         * jv-scan.c (main): Issue return from main, not exit.
12031
12032         * parse.y (check_abstract_method_definitions,
12033         java_check_abstract_method_definitions): Add static prototypes.
12034         (java_complete_expand_methods): Fix call to `finish_class'.
12035
12036         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
12037         and `prevpc'.
12038
12039 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12040
12041         * lang.c (language_string): Constify.
12042
12043 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12044
12045         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
12046         Remove hacks for stuff which comes from libiberty.
12047
12048         * Make-lang.in: Likewise.
12049
12050 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
12051
12052         * Makefile.in (xref.o): Depend on xref.c explicitly.
12053
12054 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12055
12056         * java-tree.h (lang_printable_name): Constify a char*.
12057
12058         * lang.c (lang_printable_name): Likewise.
12059
12060 1999-08-27  Jeffrey A Law  (law@cygnus.com)
12061
12062         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
12063         comments in C code.
12064
12065 1999-08-26  Tom Tromey  <tromey@cygnus.com>
12066
12067         * gjavah.c (print_cxx_classname): Print "::" before qualified
12068         name.
12069
12070 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12071
12072         * parse.y (lookup_cl): Changed leading comment. Now does its best
12073         to set the column number.
12074         (qualify_ambiguous_name): Take WFL wrappers into account.
12075
12076 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
12077
12078         * verify.c (verify_jvm_instructions): Don't check instruction
12079         validity beyond end of method.
12080
12081 1999-08-25  Tom Tromey  <tromey@cygnus.com>
12082
12083         * jvspec.c (lang_specific_driver): Correctly handle --help again.
12084
12085 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12086
12087         * gjavah.c (print_name, print_base_classname, utf8_cmp,
12088         cxx_keyword_subst, generate_access, name_is_method_p,
12089         get_field_name, print_field_name, super_class_name, print_include,
12090         decode_signature_piece, print_class_decls, usage, help,
12091         java_no_argument, version, add_namelet, print_namelet): Add static
12092         prototype.
12093         (print_base_classname, utf8_cmp, cxx_keyword_subst,
12094         name_is_method_p): Constify a char*.
12095         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
12096         Provide a final else clause in an if-else-if.
12097         (print_field_info): Add missing final arg in function call to
12098         `print_field_name'.
12099         (print_method_info, decompile_method, decode_signature_piece,
12100         print_c_decl, print_full_cxx_name, print_stub,
12101         print_mangled_classname, super_class_name, print_include,
12102         add_namelet, add_class_decl, print_class_decls, process_file,
12103         help): Constify a char*.
12104
12105         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
12106         push_int_const, find_constant_wide, find_constant_index,
12107         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
12108         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
12109         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
12110         emit_if, emit_goto, emit_jsr, call_cleanups,
12111         make_class_file_name): Add static prototypes.
12112         (generate_bytecode_return, generate_bytecode_insns): Pass a
12113         NULL_PTR, not a NULL_TREE.
12114
12115         * jv-scan.c: Include "jcf.h".
12116         (main): Declare using DEFUN macro.
12117
12118         * jvspec.c (find_spec_file, lang_specific_pre_link,
12119         lang_specific_driver): Add prototypes.
12120         (find_spec_file): Constify a char*.
12121
12122         * keyword.gperf (hash, java_keyword): Add prototypes.
12123
12124         * lang.c (lang_print_error): Add static prototype.
12125         (lang_init): Prefer memcpy over bcopy to avoid casts.
12126
12127         * lex.c (yylex): Add static prototype.
12128
12129         * parse-scan.y: Include "lex.c" earlier.
12130
12131         * parse.h: Remove redundant declaration for `yylex'.
12132
12133         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
12134         labeled_block_contains_loop_p): Add static prototypes.
12135         (not_accessible_p): Make static to match prototype.
12136
12137         * verify.c (start_pc_cmp): Don't needlessly cast away const.
12138
12139 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12140
12141         * parse.y (check_method_redefinition): Changed leading comment.
12142         (check_abstract_method_definitions): New function.
12143         (java_check_abstract_method_definitions): New function.
12144         (java_check_regular_methods): Call it.
12145         (verify_constructor_super): Fixed indentation.
12146         (lookup_method_invoke): Likewise.
12147
12148 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12149
12150         * parse.y (method_header): Return a null pointer if the current
12151         class node is null.
12152         (finish_method_declaration): Return if the current function decl
12153         is null.
12154         (source_start_java_method): Likewise.
12155         (java_method_add_stmt): Likewise.
12156
12157 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12158
12159         * class.c (emit_register_class): Removed unnecessary call to
12160         start_sequence.
12161         * parse.y (labeled_block_contains_loop_p): Removed unused local
12162         variable.
12163
12164 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12165
12166         * parse.y (java_refold): Added prototype.
12167
12168 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12169
12170         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
12171         (java_stabilize_reference): Removed unnecessary `else'.
12172         (java_complete_lhs): Set flag to remember boolean. Call
12173         java_refold. Added comments.
12174         (java_decl_equiv): New function.
12175         (binop_compound_p): Likewise.
12176         (java_refold): Likewise.
12177         (patch_unaryop): Striped static field access assigned to decl and
12178         op. Changed promotion scheme for ++/-- operators.
12179         (search_loop): New function.
12180         (labeled_block_contains_loop_p): Likewise.
12181         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
12182         comment.
12183         (patch_bc_statement): Call search_loop. Fixed comment.
12184
12185 1999-08-14  Anthony Green  <green@cygnus.com>
12186
12187         * expr.c (java_lang_expand_expr): Mark static array data as
12188         referenced.
12189
12190 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
12191
12192         * jvgenmain.c (main): NUL-terminate name_obstack.
12193
12194 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12195
12196         * check-init.c (check_bool2_init, done_alternative): Add static
12197         prototypes.
12198
12199         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
12200         (add_method, build_utf8_ref, build_class_ref,
12201         append_gpp_mangled_type, layout_class_method): Constify a char*.
12202
12203         * decl.c (push_promoted_type, make_binding_level): Add static
12204         prototypes.
12205         (push_promoted_type, pushdecl): Constify a char*.
12206
12207         * except.c (find_handler_in_range, link_handler,
12208         check_start_handlers): Add static prototypes.
12209
12210         * expr.c (process_jvm_instruction): Constify a char*.
12211
12212         * gjavah.c (main): Constify a char*.
12213
12214         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
12215         Constify a char*.
12216
12217         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
12218         static prototypes.
12219         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
12220         munge, print_ents): Constify a char*.
12221
12222         * jcf-dump.c (disassemble_method): Constify a char*.
12223         (print_constant_pool, print_exception_table): Add static prototypes.
12224         (print_constant, print_exception_table, main, disassemble_method):
12225         Constify a char*.
12226
12227         * jcf-io.c (find_classfile, find_class): Likewise.
12228
12229         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
12230         (set_source_filename, predefined_filename_p): Add static prototypes.
12231         (set_source_filename, get_constant, get_class_constant,
12232         find_in_current_zip): Constify a char*.
12233
12234         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
12235         static prototypes.
12236         (add_entry, add_path, jcf_path_classpath_arg,
12237         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12238
12239         * jcf-reader.c (get_attribute, jcf_parse_preamble,
12240         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
12241         jcf_parse_one_method, jcf_parse_methods,
12242         jcf_parse_final_attributes): Add static prototypes.
12243         (get_attribute): Constify a char*.
12244
12245         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
12246         jcf_dependency_add_target, jcf_path_classpath_arg,
12247         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12248
12249         * jv-scan.c (main): Constify a char*.
12250         (gcc_obstack_init): Add prototype arguments.
12251
12252         * jvgenmain.c (gcc_obstack_init): Likewise.
12253         (main): Constify a char*.
12254
12255         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
12256         static prototypes.
12257         (put_decl_string, lang_print_error): Constify a char*.
12258         (lang_init): Remove redundant extern prototype.
12259
12260         * mangle.c (emit_unicode_mangled_name): Constify a char*.
12261
12262         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
12263         Add static prototypes.
12264         (get_type_from_signature): Constify a char*.
12265
12266         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
12267         Add static prototypes.
12268         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
12269         (verify_jvm_instructions): Constify a char*.
12270
12271         * xref.c (xref_flag_value): Likewise.
12272
12273         * xref.h (xref_flag_value): Likewise.
12274
12275         * zextract.c (makeword, makelong): Add static prototypes.
12276         (makeword, makelong): Constify a uch*.
12277
12278 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12279
12280         * lang.c (java_dummy_print): Constify a char*.
12281         (lang_print_error): Likewise.
12282         (lang_init): Remove redundant prototype for `print_error_function'.
12283         (lang_init_source): Likewise.
12284         (lang_identify): Constify a char*.
12285
12286 1999-08-09  Tom Tromey  <tromey@cygnus.com>
12287
12288         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
12289         (WORDS_TO_LONG): Likewise.
12290         (WORDS_TO_DOUBLE): Likewise.
12291
12292 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12293
12294         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
12295
12296         * expr.c (java_stack_pop, java_array_data_offset,
12297         build_java_throw_out_of_bounds_exception, case_identity,
12298         build_java_check_indexed_type): Add static prototypes.
12299         (linenumber_table, expand_invoke, expand_java_field_op,
12300         build_primtype_type_ref, expand_byte_code): Constify a char*.
12301
12302         * java-tree.h (build_primtype_type_ref, linenumber_table):
12303         Constify a char*.
12304         (java_lang_expand_expr): Add prototype.
12305
12306         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
12307         `java_lang_expand_expr'.
12308
12309         * lex.c (java_lex_error): Constify a char*.
12310         (java_get_unicode, java_read_char, java_allocate_new_line,
12311         java_unget_unicode, java_sneak_unicode): Prototype.
12312
12313         * parse-scan.y (current_class, package_name, method_declarator,
12314         report_class_declaration, yyerror): Constify a char*.
12315
12316         * parse.h (java_report_errors): Prototype.
12317         (yyerror): Constify a char*.
12318
12319         * parse.y (classitf_redefinition_error, check_modifiers,
12320         parse_jdk1_1_error, lookup_package_type,
12321         lookup_package_type_and_set_next, get_printable_method_name,
12322         purify_type_name): Constify a char*.
12323         (build_super_invocation, maybe_generate_finit,
12324         verify_constructor_super, parser_add_interface,
12325         add_superinterfaces, jdep_resolve_class, note_possible_classname,
12326         java_complete_expand_methods, java_expand_finals,
12327         cut_identifier_in_qualified, java_stabilize_reference,
12328         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
12329         merge_string_cste): Prototype.
12330         (single_type_import_declaration, yyerror,
12331         variable_redefinition_error, build_array_from_name,
12332         build_unresolved_array_type, check_class_interface_creation,
12333         resolve_class, complete_class_report_errors,
12334         note_possible_classname, read_import_dir,
12335         find_in_imports_on_demand, resolve_package, fix_constructors,
12336         check_deprecation, lookup_method_invoke,
12337         maybe_build_primttype_type_ref, array_constructor_check_entry):
12338         Constify a char*.
12339         (java_complete_expand_methods, java_expand_finals): Make static.
12340         (convert_narrow): Remove static prototype.
12341
12342 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
12343
12344         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
12345
12346 1999-08-02  Richard Henderson  <rth@cygnus.com>
12347
12348         * decl.c: Include defaults.h instead of expr.h.
12349         * parse.y: Likewise.
12350
12351 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
12352
12353         * java/decl.c (start_java_method): Change all uses of
12354         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
12355         Ensure expr.h is included.
12356         * java/expr.c (pop_arguments): Ditto.
12357         * java/parse.y (expand_start_java_method): Ditto.
12358
12359 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12360
12361         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
12362
12363 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
12364
12365         * decl.c: Include "function.h".
12366         * except.c: Likewise.
12367         * parse.y: Likewise.
12368         * Makefile.in: Update dependencies.
12369
12370 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12371
12372         * expr.c (build_java_soft_divmod): Provide a default case in switch.
12373         (java_lang_expand_expr): Mark parameters `target', `tmode' and
12374         `modifier' with ATTRIBUTE_UNUSED.
12375
12376         * gjavah.c (process_file): Add braces around ambiguous `else'.
12377
12378         * jcf-dump.c (print_access_flags, localvar_free): Change return
12379         type to void.
12380
12381         * parse.y (java_complete_expand_method): Initialize variable
12382         `exception_copy'.
12383         (resolve_qualified_expression_name): Likewise for `field_decl'.
12384         (patch_method_invocation): Likewise for `class_to_search'.
12385         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
12386         (patch_assignment): Likewise for `lhs_type'.
12387
12388         * verify.c (verify_jvm_instructions): Remove unused variable
12389         `caller'.
12390
12391 1999-07-25  Richard Henderson  <rth@cygnus.com>
12392
12393         * decl.c (va_list_type_node): New.
12394
12395 1999-07-25  Anthony Green  <green@cygnus.com>
12396
12397         * gjavah.c (print_stub): New function.
12398         (METHOD_IS_NATIVE): New macro.
12399         (print_mangled_classname): Make static.
12400         (HANDLE_END_FIELD): Don't emit fields during stub generation.
12401         (process_file): Perform stub generation.
12402         (HANDLE_METHOD): Don't emit class decls during stub
12403         generation.
12404         (HANDLE_END_METHOD): Take into account stub generation.
12405         (print_method_info): Handle stub generation.
12406         (print_stub): New function.
12407         (print_cxx_classname): Make signature consistant with others.
12408         (help): Describe -stubs option.
12409         (main): Create stub file.
12410         (version): Use version.c.
12411         (print_full_cxx_name): New function.
12412         (print_c_decl): Use print_full_cxx_name.
12413
12414 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12415
12416         * check-init.c (check_init): Handle MAX_EXPR.
12417
12418 1999-07-15  Andrew Haley  <aph@cygnus.com>
12419
12420         * lang.c (flag_use_divide_subroutine): New variable.
12421         * typeck.c: (convert_ieee_real_to_integer): Bounds check
12422         fp-to-integer conversion.
12423         (convert): Call convert_ieee_real_to_integer when flag_fast_math
12424         is not set.
12425
12426         * expr.c (build_java_soft_divmod): New function.
12427         (build_java_binop): Call build_java_soft_divmod if
12428         flag_use_divide_subroutine is set.
12429         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12430         soft_lrem_node: new builtin functions.
12431         (init_decl_processing) Initialize the new builtins.
12432         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12433         soft_lrem_node: new builtin functions.
12434         (build_java_soft_divmod): New function.
12435         * parse.y: Call build_java_soft_divmod if
12436         flag_use_divide_subroutine is set.
12437         * parse.c: Rebuilt.
12438
12439         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12440         a --specs= arg) even if not linking.
12441         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12442         -fuse-divide-subroutine
12443
12444 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12445
12446         * parse.y (resolve_and_layout): Check methods only once.
12447         (resolve_qualified_expression_name): Verify thrown exceptions
12448         compatibility.
12449         (check_thrown_exceptions): Reject exceptions thrown in
12450         initializer. Error message tuned.
12451
12452 1999-07-14  Andrew Haley  <aph@cygnus.com>
12453
12454         * expr.c (expand_expr): Do not return the last statement in a
12455         block as the block's value.
12456
12457 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12458
12459         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12460         CALL_EXPR, to avoid order of evaluation changes.
12461
12462 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12463
12464         * parse.y (qualify_ambiguous_name): Do not use
12465         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12466
12467 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12468
12469         * check-init.c (check_init): Handle MAX_EXPR.
12470         * expr.c (force_evaluation_order): Force method call arguments to
12471         be evaluated in left-to-right order.
12472         * parse.y (qualify_ambiguous_name): Loop again to qualify
12473         NEW_ARRAY_EXPR properly.
12474
12475 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12476
12477         * parse.y (patch_invoke): Resolve unresolved invoked method
12478         returned type.
12479         (qualify_ambiguous_name): STRING_CST to qualify expression for
12480         type name resolution.
12481
12482 1999-06-24  Andrew Haley  <aph@cygnus.com>
12483
12484         * class.c (finish_class): Whenever a deferred method is
12485         output, rescan the list of methods to see if a new candidate for
12486         output can be found.
12487
12488 1999-06-28  Tom Tromey  <tromey@cygnus.com>
12489
12490         * jvspec.c (lang_specific_driver): Recognize --help.
12491
12492 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12493
12494         * parse.y (resolve_package): Fixed bogus return statement.
12495         (patch_method_invocation): Resolve method invocation beginning with
12496         a package name qualifier.
12497
12498 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12499
12500         * Make-lang.in (java.stage1): Depend on stage1-start.
12501         (java.stage2): Likewise for stage2-start.
12502         (java.stage3): Likewise for stage3-start.
12503         (java.stage4): Likewise for stage4-start.
12504
12505 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12506
12507         * parse.y (java_complete_lhs): When doing cross referencing, don't
12508         try to keep file location on a WFL expanded as a CALL_EXPR.
12509
12510 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12511
12512         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12513         compiling to class file a void method with an empty method body.
12514         As a side effect, the bytecode backend will generate the
12515         appropriate `return' instruction.
12516
12517 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12518
12519         * parse.y (lookup_package_type_and_set_next): New function prototype.
12520         (resolve_package): Search current and imported packages.
12521         (lookup_package_type_and_set_next): New function.
12522
12523 1999-06-22  Andrew Haley  <aph@cygnus.com>
12524
12525         * verify.c (verify_jvm_instructions): Check for pending blocks
12526         before invalid PC test and opcode switch, not after.
12527
12528 1999-06-21  Andrew Haley  <aph@cygnus.com>
12529
12530         * except.c (find_handler_in_range): The upper limit for exception
12531         ranges is exclusive, not inclusive: (start <= pc < end).
12532         (link_handler): find child pointer which points to outer by
12533         searching sibling list: previous code incorrectly assumed that
12534         outer->outer->first_child must point to outer.
12535         * verify.c (verify_jvm_instructions): FIXME added to code for
12536         `athrow'.
12537         (verify_jvm_instructions): Do not assume that the last block
12538         processed in a subroutine is a block which ends with a `ret'
12539         instruction.  With some control flows it is possible that the last
12540         block ends with an `athrow'.
12541
12542 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12543
12544         * parse.y (qualify_ambiguous_name): Reorganized the post
12545         evaluation of non WFL leading expression nodes.
12546
12547 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12548
12549         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12550         CONVERT_EXPR.
12551
12552 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12553
12554         * parse.y (qualify_ambiguous_name): Handle qualified expression
12555         beginning with a STRING_CST.
12556
12557 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12558
12559         * parse.y (register_fields): Set DECL_INITIAL on both
12560         pre-initialized static and public fields.
12561         (resolve_field_access): Static field access expressions to always
12562         use pointer types.
12563         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
12564         qualification. CONVERT_EXPR to be resolved as an expression name.
12565         (java_complete_lhs): Identify and access qualified final
12566         initialized field in switch statement case expression.
12567         (fold_constant_for_init): Pre-initialized field decl constant to
12568         be folded.
12569
12570 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12571
12572         * parse.y (note_possible_classname): Mark returned node with
12573         QUALIFIED_P only if the original class name contained a '/'.
12574
12575 1999-06-05  Anthony Green  <green@cygnus.com>
12576
12577         * Make-lang.in (gcjh): More parallel build fixes.
12578
12579 1999-06-03  Mike Stump  <mrs@wrs.com>
12580
12581         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12582
12583 1999-06-02  Anthony Green  <green@cygnus.com>
12584
12585         * except.c (link_handler): Chain exception handlers in order.
12586
12587 1999-06-02  Anthony Green  <green@cygnus.com>
12588
12589         * expr.c (expand_byte_code): Fill unreachable bytecode regions
12590         with nops and process as usual in order to always set correct EH
12591         ranges.  Emit detailed warnings about unreachable bytecodes.
12592
12593 1999-06-02  Anthony Green  <green@cygnus.com>
12594
12595         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12596         constant.
12597
12598 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12599
12600         * parse.y (lookup_field_wrapper): Unified returned value to NULL
12601           or the searched field decl.
12602
12603 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12604
12605         * parse.y (fold_constant_for_init): Convert numerical constant
12606         values to the type of the assigned field.
12607
12608 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12609
12610         * expr.c (lookup_field): Relaxed the test on class loading error
12611         detection.
12612         * parse.y (fold_constant_for_init): Enabeled old code.
12613
12614 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12615
12616         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12617         decide the validity of the cast of a java.lang.Cloneable reference
12618         to an array.
12619         (patch_conditional_expr): Fixed first argument passed to
12620         binary_numeric_promotion.
12621
12622 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12623
12624         * parse.y (qualify_ambiguous_name): Take into account that a
12625         CONVERT_EXPR might specify a type as a WFL.
12626
12627 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12628
12629         * parse.y (patch_assignment): Save the rhs before using it as an
12630         argument to _Jv_CheckArrayStore.
12631
12632 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12633
12634         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12635
12636 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12637
12638         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12639         floating point literal only when the exponent indicator has been
12640         parsed.
12641
12642 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12643
12644         * parse.y (formal_parameter:): Construct argument tree list
12645         element even if a yet unsupported final parameter was encountered.
12646
12647 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12648
12649         * parse.y (finish_method_declaration): Issue errors for native or
12650         abstract methods declared with a method body, as well as for non
12651         native or non abstract methods with no method body.
12652
12653 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12654
12655         * class.c (build_utf8_ref): Initialize variable `field'.
12656
12657         * decl.c (init_decl_processing): Initialize variable `field'.
12658
12659         * expr.c (build_known_method_ref): Mark parameters `method_type',
12660         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12661         (process_jvm_instruction): Likewise for parameter `length'.
12662
12663         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12664         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12665         ATTRIBUTE_UNUSED.
12666
12667         * parse.y (maybe_generate_clinit): Remove unused variable
12668         `has_non_primitive_fields'.
12669         (find_in_imports_on_demand): Initialize variables `node_to_use'
12670         and `cl'.
12671         (patch_binop): Likewise for variable `prom_type'.
12672         (patch_unaryop): Likewise for variable `prom_type'.
12673
12674         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12675
12676         * xref.c (xref_table): Add missing initializer.
12677
12678 1999-05-14  Tom Tromey  <tromey@cygnus.com>
12679
12680         * java-except.h (struct eh_range): Removed unused `next' member.
12681         * verify.c (verify_jvm_instructions): Call check_nested_ranges
12682         after adding all exception handlers.  Sort exception ranges in
12683         order of start PC.
12684         (struct pc_index): New structure.
12685         (start_pc_cmp): New function.
12686         * except.c (add_handler): Return `void'.  Don't call link_handler;
12687         instead construct an ordinary linked list and do range
12688         coalescing.
12689         (check_nested_ranges): New function.
12690         (link_handler): Changed interface to allow merging of eh_ranges.
12691         Split overlapping ranges.  Return `void'.
12692
12693 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12694
12695         * parse.y (constructor_block_end:): New rule, tagged <node>.
12696         (constructor_body:): Use `constructor_block_end' instead of
12697         `block_end'.
12698
12699 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12700
12701         * parse.y (statement_nsi:): Pop `for' statement block.
12702         (java_complete_lhs): Labeled blocks containing no statement are
12703         marked as completing normally.
12704
12705 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12706
12707         * xref.c (xref_set_current_fp): New function, defined.
12708         * xref.h (xref_set_current_fp): New function, prototyped.
12709
12710 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12711
12712         * check-init.c (check_init): Take into account that
12713         LABELED_BLOCK_STMT can be empty.
12714
12715 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12716
12717         * parse.y (java_check_regular_methods): Warning check on not
12718         overriding methods with default access in other packages does not
12719         apply to `<clinit>'.
12720         (java_complete_lhs): If block body is an empty_stmt_node, replace
12721         it by NULL_TREE. This prevents gcc from generating an irrelevant
12722         warning.
12723
12724 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12725
12726         * check-init.c (check_init): Removed code accepting to see things
12727         falling through default:, when doing xrefs.
12728         * java-tree.h (do_not_fold): New global variable, declared.
12729         * parse.y (do_not_fold): New global variable, defined.
12730         (java_complete_expand_method): Set `do_not_fold' to the value of
12731         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12732         and reinstall them after them have been purged; do not check for
12733         initializations; do not issue missing return errors.
12734         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12735         when doing xrefs.
12736         (patch_binop): Skip the fold part when doing xrefs.
12737         (build_string_concatenation): Skip the concatenation part when
12738         doing xrefs.
12739         (patch_synchronized_statement): Do not generate a try-finally when
12740         doing xrefs.
12741         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12742         and keep the location where the throw was seen.
12743         * typeck.c (convert): When `do_not_fold' is set, do not attempt
12744         any treatment on the converted node an simply return a NOP_EXPR of
12745         the targeted type.
12746         * xref.c (xref_get_data): New function, defined.
12747         * xref.h (xref_get_data): New function, declared.
12748         (XREF_GET_DATA): Use xref_get_data.
12749
12750 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12751
12752         * gjavah.c (print_include): Cast the result of `strlen' to int
12753         when comparing against a signed value.
12754         (add_namelet): Likewise.
12755
12756 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12757
12758         * expr.c (expand_invoke): Mark parameter `nargs' with
12759         ATTRIBUTE_UNUSED.
12760         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12761
12762         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12763         ATTRIBUTE_UNUSED.
12764
12765         * jcf-reader.c (get_attribute): Cast a value to long
12766         when comparing against a signed expression.  Likewise.
12767
12768         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12769         HOST_BITS_PER_CHAR.
12770
12771 1999-05-11  Andrew Haley  <aph@cygnus.com>
12772
12773         * parse.y (source_end_java_method): If the current method contains
12774         any exception handlers, force asynchronous_exceptions: this is
12775         necessary because signal handlers in libjava may throw exceptions.
12776         * decl.c (end_java_method): Ditto.
12777
12778 1999-05-11  Tom Tromey  <tromey@cygnus.com>
12779
12780         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12781         flags.
12782         * jvspec.c (THREAD_NAME): Removed.
12783         (GC_NAME): Likewise.
12784         (MATHLIB): Likewise.
12785         (WITHLIBC): Likewise.
12786         (GCLIB): Likewise.
12787         (THREADLIB): Likewise.
12788         (MATH_LIBRARY): Likewise.
12789         (lang_specific_driver): Don't add `-l' options to command line.
12790         Instead, add a single --specs option.  Recognize `-L' options and
12791         use them to search for spec file.
12792         (find_spec_file): New function.
12793         (SPEC_FILE): New define.
12794
12795 1999-05-11  Dave Brolley  <brolley@cygnus.com>
12796
12797         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12798         cpplib-enabled build.
12799
12800 1999-05-05  Per Bothner  <bothner@cygnus.com>
12801
12802         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
12803         temporarily zero it while calling rest_of_decl_compilation.
12804
12805         * java-tree.h (string_ptr_type_node):  Add declaration.
12806         * decl.c:  Define and initialize string_ptr_type_node.
12807         * parse.y (patch_string_cst):  Use string_ptr_type_node.
12808
12809         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
12810         * parse.y (for_statement):  Now unconditionally exit_block.
12811         (finish_labeled_statement):  No longer exit_block if for-loop.
12812         (patch_loop_statement):  Check harder if the loop is already labeled.
12813
12814         * parse.y (patch_initialized_static_field):  Removed function.
12815         (maybe_generate_clinit):  Removed special handling for interfaces.
12816         (java_complete_expand_methods):  Do a preliminary java_complete_tree
12817         on <clinit> to determine if it can be removed.
12818         (java_complete_expand_method):  Remove special handling for <clinit>.
12819         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
12820         optimize if we get back empty_stmt_node.
12821         For MODIFY_EXPR, re-do checking of static initializers.
12822         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
12823         For VAR_DECL, pass correct context.
12824
12825         * verify.c (verify_jvm_instructions):  Better error messages.
12826
12827 1999-05-03  Tom Tromey  <tromey@cygnus.com>
12828
12829         * parse-scan.y (interface_declaration): Call
12830         report_class_declaration for interfaces.
12831
12832 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
12833
12834         * Makefile.in: Remove -v from bison command lines.
12835
12836 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12837
12838         * check-init.c (check_init): Exclude a case of error when doing
12839         xrefs.
12840         * class.c (layout_class_method): Don't generate the error message
12841         twice when compiling from source.
12842         * lang-options.h: Added `-Wredundant-modifers' and
12843         `-Wunusupported-jdk11' flags and help text.
12844         * lang.c (lang_decode_option): Added support for
12845         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12846         flag_static_local_jdk11 and flag_redundant set accordingly.
12847         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12848         * parse.h (EXPR_WFL_ADD_COL): New macro.
12849         (DECL_END_SOURCE_LINE): Likewise.
12850         (DECL_INHERITED_SOURCE_LINE): Likewise.
12851         * parse.y (static_ref_err): New function, prototyped.
12852         (CCB_TK): Now tagged <operator>.
12853         (class_body:): Remember the location of the closing '}' of a class
12854         definition when doing xrefs.
12855         (block:): Likewise.
12856         (block_end:): Likewise.
12857         (create_class): Remember the location of the inherited class
12858         identifier when doing xrefs.
12859         (register_fields): Added test on first operand of `init' before
12860         testing it TREE_CODE.
12861         (method_header): Store the location of the class identifier in the
12862         class decl when doing xrefs.
12863         (finish_method_declaration): Don't combine first/last method line
12864         when doing xref.
12865         (java_check_regular_methods): Warning check on not overriding
12866         methods with default access on other packages move before check on
12867         static methods. Initialization of `aflags' also moved up.
12868         (resolve_expression_name): Call static_ref_err to report the error.
12869         (static_ref_err): New function, implemented.
12870         (resolve_field_access): Returned simplified static field access
12871         when doing xrefs.
12872         (resolve_qualified_expression_name): Check for illegal use of
12873         static fields in a non static context. Call static_ref_err to
12874         report error in various places.
12875         (java_complete_tree): Do not fold initialized static fields when
12876         doing xrefs.
12877         (java_complete_lhs): Likewise.
12878
12879 1999-04-29  Anthony Green  <green@cygnus.com>
12880
12881         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12882         create internal labels.
12883         (lookup_label): Ditto.
12884
12885 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12886
12887         * class.c (layout_class_method): Generate <clinit>'s rtl for
12888         interfaces.
12889         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12890         for interfaces' <clinit>.
12891         * expr.c (lookup_field): Search for fields in interfaces.
12892         (expand_invoke): Fixed indentation.
12893         (expand_java_field_op): Likewise. Use IS_CLINIT.
12894         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12895         (IS_CLINIT): New macro.
12896         * parse.y (type_declaration:): Call maybe_generate_clinit after an
12897         interface was parsed.
12898         (maybe_generate_clinit): Don't generate if the current class is an
12899         interface with only fields of primitive types.
12900         (reset_method_name): Use IS_CLINIT.
12901         (java_complete_expand_method): Expand <clinit> when it exists for
12902         interfaces. Use IS_CLINIT.
12903         (resolve_expression_name): Use DECL_CONTEXT instead of
12904         current_class to build static field references.
12905         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12906         ARRAY_REF when doing xreferencing.
12907         (check_final_assignment): Fixed typo in leading comment. Use
12908         IS_CLINIT.
12909         (patch_array_ref): Don't fully expand array references when
12910         xreferencing.
12911         (patch_return): Use IS_CLINIT.
12912         (patch_throw_statement): Likewise.
12913
12914 1999-04-22  Tom Tromey  <tromey@cygnus.com>
12915
12916         * Make-lang.in (JAVA_SRCS): Added check-init.c.
12917
12918 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12919
12920         * decl.c (predef_filenames, predef_filenames_size): New globals
12921         (init_decl_processing): predef_filenames and predef_filenames_size
12922         initialized.
12923         * java-tree.h (predef_filenames, predef_filenames_size): Declared
12924         extern.
12925         * jcf-parse.c (predefined_filename_p): New function.
12926         (yyparse): Check that files on the command line are specified only
12927         once and issue a warning otherwise.
12928         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12929         * parse.y (source_end_java_method): Nullify NOP method bodies, to
12930         avoid a gcc warning with -W -Wall turned on.
12931         (java_expand_classes): Abort if errors were encountered.
12932         (java_complete_lhs): If the cross reference flag is set, wrap
12933         field DECL node around a WFL when resolving expression name.
12934
12935 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12936
12937         * lang.c (lang_decode_option): Fixed returned value when parsing
12938         `-fxref=...' and `-Wall'.
12939         * parse.y (source_end_java_method): Do not generate code when
12940         flag_emit_xref is set.
12941         (resolve_expression_name): Do not build static field access when
12942         flag_emit_xref is set.
12943         (resolve_field_access): No special treatment on `length' when
12944         flag_emit_xref is set. Do not build qualified static field access
12945         when flag_emit_xref is set.
12946         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12947         when flag_emit_xref is set.
12948         (patch_assignment): Do not generate array store runtime check when
12949         flag_emit_xref is set.
12950         * xref.c (xref_flag_value): Fixed function declaration
12951         indentation.
12952         (xset_set_data): New function.
12953         * xref.h (xref_set_data): Added prototype for new function.
12954         (typedef struct xref_flag_table): New field data.
12955         (XREF_GET_DATA): New macro.
12956
12957 1999-04-19  Tom Tromey  <tromey@cygnus.com>
12958
12959         * xref.h (enum): Removed trailing comma.
12960
12961         * parse.y (resolve_qualified_expression_name): Added missing
12962         `break'.
12963
12964 1999-04-15  Anthony Green  <green@cygnus.com>
12965
12966         * gjavah.c: New prototypes for java_float_finite and
12967         java_double_finite.
12968
12969 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12970
12971         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12972         references.
12973
12974 1999-04-06  Jeffrey A Law  (law@cygnus.com)
12975
12976         * Makefile.in (TREE_H): Add tree-check.h.
12977         (RTL_H): Add genrtl.h.
12978
12979 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12980
12981         * parse.y (patch_assignment): Added ArrayStoreException runtime
12982         check.
12983
12984 1999-04-06  Per Bothner  <bothner@cygnus.com>
12985
12986         * expr.c (pop_type_0):  New function.
12987         (pop_type):  Use pop_type_0.
12988         * java-tree.h (pop_type_0):  New declaration.
12989         * verify.c (verify_jvm_instructions):  Check return instructions.
12990
12991         * parse.y (patch_binop):  Don't fold if non-constant and emiting
12992         class files.
12993
12994 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12995
12996         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12997
12998         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
12999         (main_jcf): Don't define.
13000         (process_file): Don't set `main_jcf'.
13001
13002         * java-tree.h (main_jcf): Don't declare.
13003
13004         * jcf-parse.c (main_jcf): Add static definition.
13005
13006         * lang.c (main_jcf): Don't define.
13007
13008 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13009
13010         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
13011
13012         * decl.c (copy_lang_decl): Likewise for `bcopy'.
13013
13014         * jcf-depend.c: Include "config.h", not <config.h>.
13015
13016         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
13017         `bcopy' to PTR.
13018
13019         * jcf-path.c: Include "config.h", not <config.h>.
13020
13021         * lex.c: Don't include various system header files.
13022         (java_init_lex): Cast the argument of `bzero' to PTR
13023
13024         * parse-scan.y (java_push_parser_context): Likewise.
13025
13026         * parse.y (java_push_parser_context): Likewise.
13027         (patch_bc_statement): Match format specifier to variable argument.
13028
13029         * xref.c: Don't include <stdio.h>.
13030
13031 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13032
13033         * parse.y (struct parser_ctxt *ctxp): Now global.
13034         (declare_local_variables): Use WFL compound value for the
13035         declaration source line value, when doing cross-referencing.
13036
13037 1999-03-31  Tom Tromey  <tromey@cygnus.com>
13038
13039         * gjavah.c (print_field_info): Allow constants of other types.
13040         (print_include): Generate include when new name is proper prefix
13041         of already printed name.
13042         (add_namelet): Likewise.
13043         (cxx_keyword_subst): New function.
13044         (print_method_info): Use it.
13045         (print_field_name): New function.
13046         (get_field_name): New function.
13047         (print_field_info): Use get_field_name and print_field_name.
13048
13049 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13050
13051         * Makefile.in (keyword.h): Generate using gperf language 'C', not
13052         'KR-C', so gperf uses the `const' keyword on strings.
13053
13054         * keyword.gperf (java_keyword): Const-ify a char*.
13055
13056 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13057
13058         * parse.y (patch_bc_statement): Fixed identation and a bogus
13059         `printf' format.
13060
13061 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13062
13063         * parse.y (patch_assignment): Allow static variables in other
13064         classes to be assigned.
13065
13066 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13067
13068         * class.c (maybe_add_interface): Remove unused variable
13069         `interface_binfo'.
13070         (make_class_data): Use = for assignment, not ==.  Likewise.
13071         (emit_register_classes): Remove unused variable `decl'.
13072
13073         * lex.c: Fix comment so as not to contain an embedded `/*'.
13074
13075         * verify.c (verify_jvm_instructions): Remove unused variable
13076         `self_type'.
13077
13078 1999-03-27  Per Bothner  <bothner@cygnus.com>
13079
13080         * parse.y (complete_loop_body):  Rename to finish_loop_body.
13081         (complete_labeled_statement):  Rename to finish_labeled_statement.
13082         (complete_for_loop):  Rename to finish_for_loop.
13083         (complete_method_declaration):  Rename to finish_method_declaration.
13084
13085         * java-tree.h (continue_identifier_node):  New global node.
13086         * decl.c:  Define and initialize continue_identifier_node.
13087         * parse.y (generate_labeled_block):  Remove - no longer needed.
13088         (build_loop_body):  Use continue_identifier_node for continue block.
13089         (finish_labeled_statement):  Also do pop_labeled_block actions.
13090         (java_complete_lhs):  POP_LOOP even if error.
13091         (build_labeled_block):  Special handling for continue_identifier_node.
13092         (patch_loop_statement):  Re-organize.
13093         (patch_bc_statement):  Re-write.
13094
13095 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13096
13097         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
13098         using a WFL compound value.
13099         * parse.y (xref.h): Include.
13100         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
13101         WFL compound value.
13102         (register_fields): Set WFL compound value to lineno if doing
13103         xrefs.
13104         (java_complete_expand_method): Call expand_xref if flag_emit_xref
13105         is set.
13106         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
13107         * xref.h (expand_xref): Prototype renamed from xref_generate.
13108
13109 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13110
13111         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
13112         (GET_CURRENT_BLOCK): New macro.
13113         * parse.y (current_static_block): New global variable.
13114         (method_body:): Define action.
13115         (complete_method_declaration): Set current_function_decl to NULL
13116         when work on the current method is done.
13117         (declare_local_variables): Use GET_CURRENT_BLOCK.
13118         (java_method_add_stmt): Likewise.
13119         (java_complete_expand_method): Disable the use of `this' when
13120         expanding <clinit>.
13121         (enter_a_block): If no current method exist, use
13122         current_static_block to link static initializer blocks.
13123         (exit_block): Rewritten to use current_static_block when no current
13124         method decl exists.
13125         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
13126         (patch_return): Forbid the use of `return' in static initializers.
13127         (patch_throw_statement): Fixed indentation. Issue specific error
13128         for uncaught thrown checked exception in static initializer
13129         blocks. Removed FIXME.
13130
13131 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
13132
13133         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
13134         Link gcj from gcc.o.
13135
13136 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13137
13138         * parse.y (find_applicable_accessible_methods_list): When dealing
13139         with interface: ensure that a given interface or java.lang.Object
13140         are searched only once.
13141
13142 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13143
13144         * gjavah.c (print_c_decl): Remove unused argument `flags'.
13145
13146         * jcf-dump.c (print_access_flags): Add braces around if-else.
13147
13148         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
13149         COMBINE_INPUTS.
13150
13151         * lex.c (build_wfl_node): Add static prototype.
13152
13153         * lex.h (build_wfl_node): Remove static prototype.
13154
13155         * parse.y: Include lex.c early enough to declare everything needed.
13156         Ensure calls to `build_wfl_node' pass the proper arguments.
13157         (create_class): Remove unused variable `super_decl'.
13158         (get_printable_method_name): Initialize variable `name'.
13159
13160 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13161
13162         * Changelog: Fixed 1999-03-22 typos.
13163         * lang.c (lang_decode_option): Fixed typo in error string in the
13164         XARG section.
13165
13166 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13167
13168         * Makefile.in (JAVA_OBJS): Added entry xref.o.
13169         (xref.o): New rule.
13170         * java-tree.h (flag_emit_xref): Declared extern.
13171         * lang.c (xref.h): Included.
13172         (flag_emit_xref): New global variable.
13173         (lang_decode_option): Added support for -fxref.
13174         * xref.c: Created.
13175         * xref.h: Likewise.
13176
13177 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
13178
13179         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
13180         linked with.
13181
13182 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13183
13184         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
13185         $(srcdir)/../system.h and $(JAVA_TREE_H).
13186         (jcf-io.o): Depend on $(JAVA_TREE_H).
13187         (mangle.o): Likewise.
13188
13189         * check-init.c (check_cond_init): Add static prototype.
13190
13191         * class.c (build_java_method_type, hashUtf8String,
13192         make_field_value, get_dispatch_vector, get_dispatch_table,
13193         append_gpp_mangled_type, mangle_static_field): Likewise.
13194         (strLengthUtf8): Hide unused definition.
13195         (hashUtf8String): Const-ify.
13196         (make_field_value): Un-ANSI-fy.
13197
13198         * constants.c: Move inclusion of jcf.h above java-tree.h.
13199         (set_constant_entry, find_class_or_string_constant,
13200         find_name_and_type_constant, get_tag_node,
13201         build_constant_data_ref): Add static prototype.
13202
13203         * decl.c (push_jvm_slot, builtin_function,
13204         lookup_name_current_level): Likewise.
13205         (builtin_function): Const-ify.
13206
13207         * except.c (expand_start_java_handler, expand_end_java_handler):
13208         Add static prototype.
13209
13210         * expr.c (flush_quick_stack, push_value, pop_value,
13211         java_stack_swap, java_stack_dup, build_java_athrow,
13212         build_java_jsr, build_java_ret, expand_java_multianewarray,
13213         expand_java_arraystore, expand_java_arrayload,
13214         expand_java_array_length, build_java_monitor, expand_java_pushc,
13215         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
13216         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
13217         expand_compare, expand_test, expand_cond, expand_java_goto,
13218         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
13219         expand_java_field_op, java_push_constant_from_pool): Likewise.
13220
13221         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
13222         (build_java_arraynull_check): Mark parameters `node' and `type'
13223         with ATTRIBUTE_UNUSED.
13224         (note_label): Likewise for parameter `current_pc'.
13225         (expand_java_call, expand_java_ret): Hide unused definition.
13226
13227         * java-tree.h (make_class, build_constants_constructor,
13228         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
13229         init_outgoing_cpool, register_class, emit_register_classes,
13230         java_layout_seen_class_methods): Prototype.
13231         (unicode_mangling_length): Const-ify.
13232         (append_gpp_mangled_name, append_gpp_mangled_classtype,
13233         emit_unicode_mangled_name, format_int, format_uint,
13234         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
13235         jcf_print_utf8_replace, open_class): Prototype.
13236
13237         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
13238         <stdio.h>.  Include tree.h/java-tree.h.
13239         (utf8_equal_string usage, process_class): Add static prototype.
13240         (open_class): Don't prototype this here.
13241         (utf8_equal_string): Match arguments to format specifiers.
13242         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
13243         TABLE_SWITCH, disassemble_method): Likewise.
13244
13245         * jcf-io.c: Include tree.h/java-tree.h.
13246         (open_class, find_classfile, jcf_print_utf8,
13247         jcf_print_utf8_replace): Const-ify.
13248
13249         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
13250         parse_class_file): Add static prototype.
13251         (find_in_current_zip): Match definition to existing static
13252         prototype.
13253
13254         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
13255         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
13256         finish_jcf_block, define_jcf_label, get_jcf_label_here,
13257         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
13258         write_chunks, adjust_typed_op, generate_bytecode_conditional,
13259         generate_bytecode_return, perform_relocations, init_jcf_state,
13260         init_jcf_method, release_jcf_state, generate_classfile):
13261         Add static prototype.
13262         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
13263         (make_class_file_name): Const-ify.
13264
13265         * jcf.h (find_classfile): Const-ify.
13266
13267         * jv-scan.c (reset_report): Remove prototype.
13268
13269         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
13270         (error): Rewrite to allow varargs.
13271
13272         * lang.c (lang_f_options): Const-ify.
13273
13274         * lex.c (java_parse_escape_sequence): Add static prototype.
13275         (java_allocate_new_line): Match definition to existing static
13276         prototype.
13277
13278         * mangle.c Include tree.h/java-tree.h.
13279         (unicode_mangling_length, emit_unicode_mangled_name,
13280         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
13281
13282         * parse.h (jdep_code): Remove trailing comma in enumeration.
13283         (java_get_line_col): Move prototype outside of !JC1_LITE test.
13284         (reset_report): Add prototype.
13285
13286         * verify.c (push_pending_label, merge_types): Add static
13287         prototypes.
13288
13289         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
13290
13291 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13292
13293         * parse.y (find_applicable_accessible_methods_list): Extend the
13294         search to superinterfaces when relevant.
13295         (search_applicable_methods_list): New function.
13296
13297 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13298
13299         * class.c (unmangle_classname): Implemented stricter testing
13300         before setting the QUALIFIED_P flag on an identifier.
13301
13302 1999-03-16  Per Bothner  <bothner@cygnus.com>
13303
13304         * parse.y (java_complete_lhs):  Call force_evaluation_order
13305         after patch_newarray.
13306         (patch_binop):  Don't call fold if there are side effects.
13307
13308 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13309
13310         * parse.y (java_stabilize_reference): Use save_expr instead of
13311         building a SAVE_EXPR node.
13312         (java_complete_lhs): Patch the resulting string of the `+='
13313         operator (if necessary) and complete the RHS after having built
13314         the cast.
13315
13316 1999-03-15  Per Bothner  <bothner@cygnus.com>
13317
13318         * class.c (make_class):  Don't set CLASS_P here (because
13319         this function is also called by build_java_array_type).
13320         (push_class):  Set CLASS_P here instead.
13321         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
13322
13323         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
13324         context.  If the context is class, perfer "super" over "synchronized".
13325         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
13326
13327         * parse.y (create_class):  Don't call parser_check_super here;
13328         it is not robust.  Always wait until later.
13329
13330         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
13331         match what JDK 1.2 does), but don't set ACC_PUBLIC.
13332
13333 1999-03-13  Per Bothner  <bothner@cygnus.com>
13334
13335         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
13336         * lex.h (UNGETC):  Change misleading macro.
13337
13338 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339
13340         * parse.y (java_stabilize_reference): Return NODE when patching a
13341         COMPOUND_EXPR.
13342         (java_complete_lhs): Put parenthesis around truth values.
13343
13344 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13345
13346         * class.c (layout_class_method): Don't make rtl for interface
13347         methods.
13348         * parse.h (GET_TYPE_NAME): New macro.
13349         * parse.y (if_then_statement:): Fixed indentation.
13350         (if_then_else_statement:): Likewise.
13351         (for_statement:): Fixed spacing.
13352         (try_statement:): Fixed indentation.
13353         (create_interface): Don't force interfaces to be abstract.
13354         (method_header): Abstract methods are OK in interfaces.
13355         (declare_local_variables): Fixed typo in comment.
13356         (java_complete_expand_method): Fixed indentation.
13357         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
13358         non accessible fields.
13359         (java_stabilize_reference): New function.
13360         (java_complete_lhs): Fixed indentation. Use
13361         java_stabilize_reference in compound assignment. Insert the
13362         cast. If not processing `+' fix string constants before processing
13363         binop.
13364
13365 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13366
13367         * constants.c (find_class_or_string_constant): Cast variable `j'
13368         to a `jword' when comparing against one.
13369
13370         * expr.c (java_lang_expand_expr): Remove unused variables
13371         `has_finally_p' and `op0'.
13372
13373         * gjavah.c (print_field_info): Cast a value to jint when comparing
13374         against one.  Likewise for a jlong.
13375         (add_namelet): Likewise cast a `sizeof' to an int when comparing
13376         against a signed quantity.
13377
13378         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
13379         (print_signature): Don't needlessly dereference variable `str'
13380
13381         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
13382         `max_locals' with ATTRIBUTE_UNUSED.
13383         (jcf_parse_class): Likewise for variable `index'.
13384
13385         * parse.h (reverse_jdep_list): Remove static prototype.
13386
13387         * parse.y (build_jump_to_finally): Remove prototype and definition.
13388         (reverse_jdep_list): Add static prototype.
13389
13390         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
13391         `assignment' and `expr_decl'.
13392
13393         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
13394
13395 1999-03-12  Andrew Haley  <aph@cygnus.com>
13396
13397         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
13398         we'll need a directory separator and a null character.
13399
13400 1999-03-10  Per Bothner  <bothner@cygnus.com>
13401
13402         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
13403
13404   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13405
13406         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
13407         interfaces.
13408
13409 1999-03-05  Per Bothner  <bothner@cygnus.com>
13410
13411         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
13412
13413         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
13414
13415         * class.c (layout_class_method):  A static method in a base class
13416         is never overridden, so treat it like it doesn't exist.
13417         However, do complain about private non-static method overriding
13418         public static method.
13419
13420         * parse.y:  Don't set unused INITIALIZED_P flag.
13421         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
13422
13423         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
13424         (build_array_from_name):  Re-order &index[string] to &string[index].
13425
13426         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
13427         error_mark (it might catch more errors, but it is more likely to lose).
13428
13429 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13430
13431         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13432         (parse-scan.o): Depend on toplev.h.
13433
13434         * class.c (make_method_value): Add prototype.  Make it static.
13435         Remove unused second argument, caller changed.
13436
13437         * expr.c (java_lang_expand_expr): Remove unused variable
13438         `return_label'.
13439
13440         * java-tree.h: Don't prototype find_in_current_zip.
13441         Add prototypes for verify_constant_pool, start_java_method,
13442         end_java_method, give_name_to_locals, expand_byte_code,
13443         open_in_zip, set_constant_value, find_constant1, find_constant2,
13444         find_utf8_constant, find_string_constant, find_class_constant,
13445         find_fieldref_index, find_methodref_index, write_constant_pool,
13446         count_constant_pool_bytes and encode_newarray_type.
13447
13448         * jcf-dump.c: Remove unused variable `LONG_temp'.
13449
13450         * jcf-parse.c: Include parse.h.
13451         (jcf_parse_source): Remove unused parameter, all callers changed.
13452         (jcf_figure_file_type): Add static prototype.
13453         (find_in_current_zip): Likewise.  Also remove unused parameter,
13454         all callers changed.
13455         (read_class): Initialize variable `saved_pos'.
13456
13457         * jcf-reader.c (jcf_parse_preamble): Mark variables
13458         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13459
13460         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13461         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13462         (java_parse_doc_section): Initialize variable `seen_star'.
13463         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13464         (java_lex_error): Mark parameters `msg' and `forward' with
13465         ATTRIBUTE_UNUSED.
13466         (java_get_line_col): Mark parameters `filename' and `line' with
13467         ATTRIBUTE_UNUSED.
13468
13469         * parse-scan.y: Include toplev.h.
13470         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13471
13472         * parse.h: use `struct JCF', not plain `JCF'.
13473         (java_parser_context_save_global, java_expand_classes
13474         java_parser_context_restore_global, java_parse): Add prototypes.
13475
13476         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13477         `node'.
13478
13479 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
13480
13481         *  check-init.c (check_init):  COPYN takes word count, not bit count.
13482
13483 1999-02-26  Per Bothner  <bothner@cygnus.com>
13484
13485         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
13486         explicit build_decl.  (Avoids crash in reload when optimizing.)
13487
13488 1999-02-25  Per Bothner  <bothner@cygnus.com>
13489
13490         * decl.c (complete_start_java_method):  Handle synchronized method
13491         even when compiling from bytecode.
13492
13493 1999-02-26  Tom Tromey  <tromey@cygnus.com>
13494
13495         * gjavah.c (add_class_decl): Only generate `#include' if outer
13496         class is not the name of the class we are processing.  Correctly
13497         append `.h' in #include.
13498         (process_file): Clean up newlines around generated `#include's.
13499         (decode_signature_piece): Correctly handle inner classes.
13500         (struct include): New structure.
13501         (all_includes): New global.
13502         (print_include): New function.
13503         (add_class_decl): Use it.
13504         (process_file): Likewise.
13505         (add_class_decl): Generate include for java-array.h if array
13506         seen.
13507         (process_file): Don't generate java-array.h include.
13508
13509         * gjavah.c (add_namelet): Check for standard package names here.
13510         (add_class_decl): Don't check for standard package names here.
13511
13512 1999-02-25  Tom Tromey  <tromey@cygnus.com>
13513
13514         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13515         When reading a zip file, only use strncmp if both strings are
13516         bigger than the buffer length.  Initialize `k' when looping
13517         through zip file.
13518
13519 1999-02-24  Tom Tromey  <tromey@cygnus.com>
13520
13521         * gjavah.c (struct namelet): New structure.
13522         (add_namelet): New function.
13523         (print_namelet): New function.
13524         (print_class_decls): Use add_namelet and print_namelet to generate
13525         namespaces and not classes.
13526         (method_printed): New global.
13527         (HANDLE_END_METHOD): Examine method_printed.
13528         (print_method_info): Set method_printed when required.  Print
13529         error if function to be ignored is marked virtual.  Handle $finit$
13530         method.
13531         (METHOD_IS_FINAL): New macro.
13532         (print_field_info): Use it.
13533         (HANDLE_METHOD): Clear method_printed.
13534         (method_pass): New global.
13535         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13536         (process_file): Do two passes over both fields and methods.
13537         (HANDLE_METHOD): Examine method_pass.
13538         (root): New global.
13539         (add_class_decl): New function.
13540         (print_class_decls): Don't scan over entire constant pool.
13541
13542 1999-02-23  Tom Tromey  <tromey@cygnus.com>
13543
13544         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13545         disable linking in that case.
13546
13547 1999-02-20  Tom Tromey  <tromey@cygnus.com>
13548
13549         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13550         not 0x1f.
13551
13552 1999-02-21  Per Bothner  <bothner@cygnus.com>
13553
13554         * decl.c (build_result_decl), java-tree.h:  New method.
13555         (complete_start_java_method):  Handle synchronized methods.
13556         Don't build DECL_RESULT here.  (Ordering dependency problem.)
13557         (start_java_method):  Call build_result_decl here instead  ...
13558         * parse.y (java_complete_expand_method):  ... and here.
13559         (expand_start_java_method): Don't call complete_start_java_method here.
13560         (java_complete_expand_method):  Call it here instead.
13561         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
13562         * java-tree.h:  ... here.
13563
13564         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
13565         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
13566         for ARRAY_REF - it doesn't work when array bounds are checked.
13567         (patch_array_ref):  Handle it here instead.
13568
13569         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
13570
13571 1999-02-19  Per Bothner  <bothner@cygnus.com>
13572
13573         Force left-to-right evaluation of binary operations etc.
13574         * expr.c (force_evaluation_order), java-tree.h:  New function.
13575         * parse.y (java_complete_lhs):  Pass binary operations, procedure
13576         calls, and ARRAY_REFs to force_evaluation_order.
13577         (various):  Set TREE_SIDE_EFFECTS more carefully.
13578
13579         Tolerate random (non-UTF8) encoding in comments without complaining.
13580         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
13581         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
13582
13583         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
13584         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
13585
13586         * parse.y (java_complete_lhs):  Ignore an empty statement in a
13587         COMPOUND_EXPR.  Don't complain about empty statement after return.
13588
13589 1999-02-19  Per Bothner  <bothner@cygnus.com>
13590
13591         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
13592         in TREE_LIST - just chain the POINTER_TYPEs together.
13593         (resolve_class):  If type already resolved, return decl.
13594         After resolving, update TREE_TYPE(class_type), and name (if array).
13595         * parse.h (do_resolve_class), parse.y:  Make non-static.
13596         * class.c (maybe_layout_super_class):  Take this_class argument.
13597         Do do_resolve_class if necessary.
13598         (layout_class, layout_class_methods): Adjust calls appropriately.
13599         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13600         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
13601         * typeck.c (build_java_array_type):  Don't call layout_class.
13602
13603 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13604
13605         * parse.y (check_pkg_class_access): Allow private class access
13606         within the same package.
13607         (strip_out_static_field_access_decl): New function.
13608         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13609         operator argument before testing its nature.
13610
13611 1999-02-03  Per Bothner  <bothner@cygnus.com>
13612
13613         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
13614         (TRY_EXPR):  Simplify - it no longer has a finally clause.
13615         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
13616         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13617         * expr.c (java_lang_expand_expr):  Likewise.
13618         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
13619         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
13620         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
13621         (build_try_statement):  Remove finally parameter and handling.
13622         (build_try_finally_statement):  New function.
13623         (patch_try_statement):   No longer need to support finally clause.
13624         (try_statement):  Update grammar action rules.
13625         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
13626         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13627
13628 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
13629
13630         * jcf-parse.c (get_constant): Add braces around computation of 'd'
13631         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
13632
13633 1999-02-17  Andrew Haley  <aph@cygnus.com>
13634
13635         * class.c (build_utf8_ref): Back out broken patch which was
13636         intended to to output signatures using '.' as a separator.
13637
13638         * class.c (make_class_data): Output signatures using '.' as a
13639         separator, rather than '/'.
13640         (mangled_classname): Likewise.
13641         (make_field_value): Likewise.
13642         (make_method_value): Likewise.
13643         * constants.c (alloc_class_constant): Likewise.
13644         * expr.c (build_invokeinterface): Likewise.
13645
13646 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13647
13648         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13649         of an ancient workaround.
13650
13651 1999-02-10  Jeffrey A Law  (law@cygnus.com)
13652
13653         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
13654         here anymore.
13655
13656 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13657
13658         * lex.c (yylex): Encode \0 as UTF8.
13659
13660 1999-02-10  Tom Tromey  <tromey@cygnus.com>
13661
13662         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13663         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13664         (libgcj_zip): Renamed.
13665         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13666         LIBJAVA_ZIP_FILE.
13667         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13668
13669         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13670         (GC_NAME): Renamed -lgc to -lgcjgc.
13671
13672 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13673
13674         * lex.c (java_lang_cloneable): Initialize.
13675         * parse.y (java_lang_cloneable): New static variable.
13676         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13677         doing one more qualification round.
13678         (valid_ref_assignconv_cast_p): Reject null source or
13679         destination. Allow an array to be cast into java.lang.Cloneable.
13680         (patch_cast): Swapped two first arguments to first call to
13681         valid_ref_assignconv_cast_p.
13682
13683 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13684
13685         * parse.h: DECL_P renamed JDECL_P.
13686         * parse.y: DECL_P replaced by JDECL_P.
13687         (build_array_from_name): Always use pointer's type.
13688         (patch_bc_statement): Extra code to search continue target in a
13689         for loop. Fixed comments. Continue target is current loop when
13690         unlabeled.
13691
13692 1999-02-05  Andrew Haley  <aph@cygnus.com>
13693
13694         * class.c (make_class_data): The superclass of an interface should
13695         be null, not class Object.
13696
13697         * lex.c (java_lex): Sign extend hex literals.
13698
13699 1999-02-04  Andrew Haley  <aph@cygnus.com>
13700
13701         * class.c (build_utf8_ref): Output signatures using '.' as a
13702         separator, rather than '/'.
13703         (make_class_data): Likewise.
13704
13705 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
13706
13707         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13708         mkstemp.o.  Get them from libiberty now.
13709
13710 1999-02-02  Jeffrey A Law  (law@cygnus.com)
13711
13712         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13713
13714 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13715
13716         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13717         from libiberty.h
13718
13719 1999-02-02  Per Bothner  <bothner@cygnus.com>
13720
13721         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13722         * jcf-write.c (generate_bytecode_return):  New function.
13723         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
13724
13725         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
13726         generate special [fd]const_[01] instructions.
13727
13728         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
13729
13730         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
13731         handling OPCODE_lookupswitch or OPCODE_tableswitch.
13732
13733 1999-02-01  Per Bothner  <bothner@cygnus.com>
13734
13735         * parse.y (patch_method_invocation):  Handle calling static methods,
13736         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13737
13738         * parse.y (java_complete_lhs):  Don't complain about unreachable
13739         exit condition in a do-while statement.
13740
13741 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13742
13743         * lex.c (java_read_char): Fixed utf8 decoding.
13744         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13745         range.
13746         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13747         comments. Local variable `all_primitive' is gone. Broadened
13748         acceptance of `0' to floating point targets. `long' can now be
13749         widened to `double' or `float'.
13750         (valid_method_invocation_conversion_p): Added leading
13751         comment. Fixed tabulation.
13752         (build_string_concatenation): Optimize out left or right empty
13753         string constants.
13754
13755 1999-01-28  Per Bothner  <bothner@cygnus.com>
13756
13757         * jcf-write.c (localvar_alloc):  Only emit entry for
13758         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13759         (generate_bytecode_insns):  Only call put_linenumber if
13760         debug_info_level > DINFO_LEVEL_NONE.
13761         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
13762         is specified, add -g1 (for compatibility wih javac).
13763
13764 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
13765
13766         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13767         gjavah.o, check-init.o, jv-scan.o
13768
13769 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13770
13771         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13772
13773         * gjavah.c: Include config.h and system.h.
13774
13775         * javaop.h (inline): Don't define, its handled by system.h.
13776         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13777         from `inline' to `static inline'.
13778
13779         * jcf.h (inline): Don't define, its handled by system.h.
13780
13781         * lex.c (inline): Likewise.
13782
13783 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
13784
13785         * lang-specs.h: Map -Qn to -fno-ident.
13786
13787 1999-01-29  Richard Henderson  <rth@cygnus.com>
13788
13789         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13790
13791 1999-01-29  Tom Tromey  <tromey@cygnus.com>
13792
13793         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13794         then cast it to Object before calling `append' method.
13795
13796 1999-01-28  Per Bothner  <bothner@cygnus.com>
13797
13798         * check-init.c (check_bool2_init, check_bool_init, check_init):
13799         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13800         * jcf-write.c (generate_bytecode_insns):  Likewise.
13801
13802 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13803
13804         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13805         * parse.y (patch_cast): Allow a boolean to be cast into a
13806         boolean.
13807
13808 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13809
13810         * parse.y: (class_declaration:): Fixed indentation.
13811         (class_member_declaration:): Extra `;' after field declaration now
13812         accepted.
13813         (interface_declaration:): Removed debug messages in error reports.
13814         (patch_binop): Nodes created and returned inherit the orignal
13815         node's COMPOUND_ASSIGN_P flag value.
13816         (patch_cast): Fix cast from char to floating point.
13817
13818 1999-01-25  Andrew Haley  <aph@cygnus.com>
13819
13820         * except.c, java-except.h (expand_resume_after_catch): new
13821         function.
13822         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13823         to branch back to main flow of control after a catch block.
13824
13825 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13826
13827         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13828         $(srcdir)/../system.h.
13829         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13830         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13831         (jcf-write.o): Likewise.
13832         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13833         (mangle.o): Depend on $(srcdir)/../toplev.h.
13834         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13835         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13836
13837         * class.c: Include output.h and parse.h.
13838         (mangled_classname): Add the `const' keyword to a char*.
13839         (find_named_method): Hide unused function definition.
13840         (build_utf8_ref): Change type of variable `c' to unsigned char.
13841         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13842         (build_class_ref): Add the `const' keyword to a char*.
13843         (layout_class_method): Remove unused variable `buf'.
13844
13845         * decl.c (find_local_variable): Remove unused variable `rtl'.
13846         (pushdecl): Likewise for variables `different_binding_level' and
13847         `oldglobal'.
13848         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13849         (maybe_build_cleanup): Likewise for parameter `decl'.
13850
13851         * except.c (expand_start_java_handler): Mark parameter `range'
13852         with ATTRIBUTE_UNUSED.
13853
13854         * expr.c: Include except.h.
13855         (pop_type): Remove unused variable `i'.
13856         (pop_value): Likewise for variables `n_words' and `i'.
13857         (expand_java_arrayload): Likewise for variable `convert'.
13858         (java_lang_expand_expr): Likewise for variables `op0', `type',
13859         `mode', `unsignedp', `node' and `elements'.
13860         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13861         `eh_ranges'.
13862         (process_jvm_instruction): Add a `const' qualifier to a char*.
13863
13864         * gjavah.c (output_directory): Add the `const' keyword to a char*.
13865         (temp_directory): Likewise.
13866         (print_c_decl): Likewise.
13867         (print_method_info): Likewise.
13868         (decode_signature_piece): Likewise.
13869         (print_mangled_classname): Likewise.
13870
13871         * java-except.h: Provide prototypes for maybe_start_try,
13872         maybe_end_try and add_handler.
13873
13874         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13875         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
13876         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13877         init_expr_processing, push_super_field, init_class_processing,
13878         can_widen_reference_to, class_depth, verify_jvm_instructions,
13879         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13880         set_local_type, merge_type_state, push_type, load_type_state,
13881         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13882         emit_unicode_mangled_name): Add prototypes.
13883
13884         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13885         (print_signature_type): Use ISDIGIT, not isdigit.
13886         (print_signature): Remove unused variable `j'.
13887
13888         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13889         int when comparing against one.
13890
13891         * jcf-parse.c: Include toplev.h.
13892
13893         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
13894         (localvar_free): Remove unused variable `i'.
13895         (generate_bytecode_conditional): Likewise for variable `kind'.
13896
13897         * jv-scan.c: Include config.h and system.h.  Remove redundant
13898         OS header and gansidecl.h includes.
13899         (warning): Add the `const' keyword to a char*.  Also add
13900         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
13901         __STDC__, when determining whether to use ANSI-isms.
13902         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
13903         (xmalloc): Don't redundantly prototype here.
13904         (main): Remove unused parameter `envp'.  Also fix the arguments
13905         passed to function `fatal' to match the format specifier.
13906
13907         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13908
13909         * mangle.c: Include toplev.h.
13910         (emit_unicode_mangled_name): Declare parameter `len'.
13911
13912         * parse.y (parse_warning_context): Add the `const' keyword to a
13913         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
13914         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13915         (issue_warning_error_from_context): Add the `const' keyword to
13916         a char*.
13917         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
13918         not `__STDC__' for whether to use ANSI-isms.
13919
13920         * typeck.c (incomplete_type_error): Mark parameters `value' and
13921         `type' with ATTRIBUTE_UNUSED.
13922         (parse_signature_type): Use ISDIGIT, not isdigit.
13923
13924         * verify.c (check_pending_block): Add the `const' keyword to a char*.
13925         (verify_jvm_instructions): Likewise.  Remove unused variables
13926         `field_name' and `default_val'.
13927
13928         * zextract.c: Include config.h and system.h.  Remove redundant
13929         OS header includes.
13930
13931         * zipfile.h: Prototype `read_zip_archive'.
13932
13933 1999-01-21  Andrew Haley  <aph@cygnus.com>
13934
13935         * typeck.c (convert): Allow conversions to void type: some
13936         optimizations in gcc do this.
13937
13938 1999-01-21  Andrew Haley  <aph@cygnus.com>
13939
13940         * typeck.c (convert_ieee_real_to_integer): New function.
13941         (convert): When not using fast-math and using hardware fp, convert
13942         an IEEE NaN to zero.
13943
13944 1999-01-18  Andrew Haley  <aph@cygnus.com>
13945
13946         * parse.y (patch_binop): Do a type conversion from signed to
13947         unsigned and then back to signed when a ">>>" is found.
13948
13949 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13950
13951         * java-tree.h: (check_for_initialization): Added prototype.
13952         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13953         * parse.y (do_resolve_class): Removed unused locals.
13954         (read_import_dir): Likewise.
13955         (resolve_qualified_expression_name): Array creation
13956         expressions are valid primary expressions.
13957         (qualify_ambiguous_name): Likewise.
13958         (patch_synchronized_statement): Removed unused local.
13959
13960 1999-01-17  Jeffrey A Law  (law@cygnus.com)
13961
13962         * Makefile.in (zextract.o): Add dependencies.
13963
13964         * Makefile.in: Do not put ^Ls at the start of a line.
13965
13966 1999-01-15  Per Bothner  <bothner@cygnus.com>
13967
13968         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
13969         sub-type the result of the call that gets the exception value.
13970
13971         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
13972         don't call finish_class.
13973
13974         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
13975         clear found before continuing.
13976
13977         * verify.c (verify_jvm_instructions):  On an array load, allow
13978         and handle top of stack to be TYPE_NULL.
13979
13980         * gjavah.c (generate_access):  Translate Java package private or
13981         protected access to C++ public, but with a comment.
13982
13983 1999-01-13  Andrew Haley  <aph@cygnus.com>
13984
13985         * expr.c (generate_name): Name prefix changed to avoid clashes
13986         with assembler temp labels.
13987
13988         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13989         MODIFY_EXPR.  Without this, code for the assignment may not be
13990         generated at all and the synchronized statement will read an
13991         uninitialized variable.
13992
13993 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13994
13995         * class.c (maybe_layout_super_class): Fixed returned value.
13996         * lex.c: Added 1999 to the copyright.
13997         (java_init_lex): Initialize java_lang_imported.
13998         * lex.h: Added 1999 to the copyright.
13999         * parse.h: Added 1999 to the copyright.
14000         (REGISTER_IMPORT): Fixed typo in trailing macro.
14001         (CURRENT_OSB): New macro.
14002         (struct parser_ctxt): New fields osb_depth, osb_limit.
14003         * parse.y (java_lang_id): New global variable.
14004         (type_import_on_demand_declaration): Don't import java.lang.* twice.
14005         (array_creation_expression:): Use CURRENT_OSB.
14006         (dims:): Uses a stack to keep track of array dimensions.
14007         (cast_expression:): Use CURRENT_OSB.
14008         (find_expr_with_wfl): Return NULL if node found doesn't meet the
14009         conditions.
14010         (register_fields): Fixed typos in comment.
14011         (check_method_redefinition): Fixed comment indentation.
14012         (java_check_regular_methods): Set saved found wfl to NULL after
14013         having reinstalled it in the previously found DECL_NAME.
14014
14015 1999-01-10  Richard Henderson  <rth@cygnus.com>
14016
14017         * gjavah.c (java_float_finite): Use a union to do type punning.
14018         (java_double_finite): Likewise.
14019
14020 1999-01-09  Per Bothner  <bothner@cygnus.com>
14021
14022         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
14023         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
14024         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
14025         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
14026         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
14027         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
14028
14029 1999-01-08  Per Bothner  <bothner@cygnus.com>
14030
14031         * check-init.c (check_init):  If compiling to native, we don't
14032         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
14033
14034 1999-01-08  Tom Tromey  <tromey@cygnus.com>
14035
14036         * parse-scan.y (variable_declarator_id): Set or increment
14037         bracket_count.
14038         (bracket_count): New global.
14039         (formal_parameter): Handle case where bracket pairs trail variable
14040         declarator id.
14041
14042 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
14043
14044         * jcf-parse.c (yyparse): variable len changed from a char to an
14045         int to prevent overflow.
14046
14047 1999-01-06  Per Bothner  <bothner@cygnus.com>
14048
14049         * java-tree.h:  Declare read_class.
14050         * jcf-parse.c (read_class):  New function.
14051         (load_class):  Now just call read_class.
14052
14053         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
14054         * jcf-parse.c (parse_source_file):  Declare save_error_count,
14055         which is needed by java_parse_abort_on_error macro,
14056         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
14057
14058         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
14059         constructor, if initializing a static field.
14060         (patch_new_array_init):  Set TREE_CONSTANT if it is.
14061         * expr.c (java_lang_expand_expr):  For a static array constructor
14062         of primitive elements, allocate the array itself statically.
14063         Disabled until we can set the vtable field statically.
14064
14065         * check-init.c:  New file.  Checks for definite assignment.
14066         * Makefile.in (JAVA_OBJS):  Add check-init.o.
14067         * parse.y (java_complete_expand_method): Call check_for_initialization.
14068         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
14069
14070 1999-01-06  Graham <grahams@rcp.co.uk>
14071
14072         * parse.y : include system.h instead of including
14073         standard headers directly with the exception of <dirent.h>.
14074
14075 1999-01-06  Per Bothner  <bothner@cygnus.com>
14076
14077         * lex.h:  Moved static function declarations to lex.c,
14078         to shut up some -Wall warnings.
14079         * lex.c:  Static function declarations moved here.
14080         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
14081
14082 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14083
14084         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
14085
14086 1998-12-22  Per Bothner  <bothner@cygnus.com>
14087
14088         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
14089         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
14090
14091         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
14092         (localvar_alloc):  Change return type to void,
14093         (emit_unop):  Remove unused variable size.
14094
14095         * jcf-write.c (struct jcf_block):  Add new union.
14096         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
14097         (call_cleanups):  New functions.
14098         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
14099         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
14100         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
14101         * lang.c (lang_init):  Call using_eh_for_cleanups.
14102         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
14103         completing operands to patch_synchronized_statement.
14104         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
14105         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
14106         WITH_CLEANUP_EXPR instead of TRY_EXPR.
14107
14108 1998-12-20  John F. Carr  <jfc@mit.edu>
14109
14110         * Make-lang.in: Comment out control-Ls; they upset some makes.
14111
14112 1998-12-18  Tom Tromey  <tromey@cygnus.com>
14113
14114         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
14115         consistently.
14116
14117 1998-12-17  Tom Tromey  <tromey@cygnus.com>
14118
14119         * parse.y (DIR_SEPARATOR): New define.
14120         (check_class_interface_creation): Use it.
14121
14122         * parse-scan.y (report_main_declaration): Recognize
14123         `java.lang.String' in argument to main.
14124
14125 1998-12-16  Per Bothner  <bothner@cygnus.com>
14126
14127         * parse.y (create_interface):  Remove bogus test.
14128
14129 1998-12-16  Per Bothner  <bothner@cygnus.com>
14130
14131         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
14132         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
14133
14134 1998-12-16  Tom Tromey  <tromey@cygnus.com>
14135
14136         * parse-scan.y (qualified_name): Use correct sprintf format.
14137
14138 1998-12-15  Tom Tromey  <tromey@cygnus.com>
14139
14140         * gjavah.c (print_field_info): Changed how most negative number is
14141         printed.
14142
14143 1998-12-14  Per Bothner  <bothner@cygnus.com>
14144
14145         * parse.y (fold_constant_for_init):  New function.
14146         (resolve_expression_name):  Don't replace static final
14147         constant-initialized fields by its value.
14148         (java_complete_lhs):  New.  Same as java_complete_tree, except does
14149         not replace static final constant-initialized fields by their values.
14150         (register_fields):  If there is an initializer, set DECL_INITIAL and
14151         MODIFY_EXPR_FROM_INITIALIZATION_P.
14152         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
14153         Only call patch_initialized_static_field if
14154         MODIFY_EXPR_FROM_INITIALIZATION_P.
14155         (patch_initialized_static_field):  If not valid constant, clear
14156         DECL_INITIAL.
14157
14158         * parse.y (lookup_field_wrapper):  Fix thinko.
14159
14160         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
14161         set and restore global lineno.
14162
14163 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14164
14165         * gjavah.c (print_field_info): If value to print is the smallest
14166         value of its size, then print as hex to avoid later warnings from
14167         C++ compiler.
14168
14169 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14170
14171         * gjavah.c (decompile_method): Decompile `return null'.
14172         (process_file): Generate `#pragma interface'.
14173         (method_declared): New global.
14174         (print_method_info): Set it.
14175         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
14176         (print_method_info): Handle abstract methods.
14177
14178 1998-12-13  Per Bothner  <bothner@cygnus.com>
14179
14180         * parse.y (patch_method_invocation):  If class_decl is null
14181         (e.g. an array type), use original type.
14182
14183         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
14184         errors about uncaught exception from clone (of array, specifically).
14185
14186 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14187
14188         * gjavah.c (decompile_method): Handle all types of `return'
14189         opcode.  Decompile `return this' and `return'.
14190         (method_access): New global.
14191         (print_method_info): Set it.
14192         (decompile_method): Don't decompile a synchronized method.
14193
14194 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14195
14196         * jcf-reader.c (jcf_parse_one_method): Recognize
14197         HANDLE_END_METHOD.
14198         * gjavah.c (HANDLE_END_METHOD): New macro.
14199         (HANDLE_CODE_ATTRIBUTE): New macro.
14200         (decompile_method): New function.
14201         (print_method_info): Don't print `;\n' at end of function decl.
14202         Include java-opcodes.h.
14203         (decompiled): New global.
14204
14205 1998-12-12  Per Bothner  <bothner@cygnus.com>
14206
14207         * class.c (build_class_ref):  Handle PRIMTYPE.class if
14208         flag_emit_class_files.
14209         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
14210         if flag_emit_class_files.
14211         * parse.y (java_complete_tree):  Pre-liminary support for
14212         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
14213
14214         * parse.y (patch_synchronized_statement):   Don't call monitorexit
14215         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
14216
14217         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
14218
14219         * zipfile.h (opendir_in_zip):  New declaration.
14220         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
14221         (opendir_in_zip):  New function, using code from open_in_zip.
14222         (open_in_zip):  Call opendir_in_zip.
14223         (find_class):  Remove no-longer-used do_class_file parameter,
14224         but add source_ok parameter.  Change logic so if we find a .java file,
14225         we don't look for .class in later classpath emtries.
14226         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
14227         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
14228         * gjavah.c: Update call to find_class.
14229         * jcf-dump.c:  Likewise.
14230
14231         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
14232         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
14233         nothing if body is empty_stmt_node.
14234         Various little fixes so SP gets correctly adjusted.
14235         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
14236         For CALL_EXPR, test if static first.
14237         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
14238         such as the ones we create for Object and Class.
14239         Set and restore current_function_decl.
14240         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
14241         (note_possible_classname):  New function.
14242         (read_import_entry):  Removed.  Merged with read_import_dir.
14243         (read_import_dir):  Don't call find_class - that only gives us
14244         the first classpath entry having the needed package.
14245         Use the struct buffer data structure from buffer.h.
14246         (read_import_dir, find_in_imports_on_demand):  The remembered
14247         class names now use '.' (not '/') as package separator.
14248
14249         * parse.y (java_complete_expand_methods):  Call write_classfile
14250         here, and not in java_expand_classes (which only gets first class).
14251
14252 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14253
14254         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
14255         (register_fields):  If a static fields has an initializer, just
14256         chain it on ctxp->static_initialized, and handle later.
14257         (java_complete_expand_methods):  Force <clinit> first.
14258         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
14259         - it's already been completed.
14260         (patch_initialized_static_field):  New function.
14261         (java_complete_field):  Call it.
14262
14263 1998-12-12  Per Bothner  <bothner@cygnus.com>
14264
14265         * expr.c (encode_newarray_type, build_new_array):  New functions.
14266         * java-tree.h:  Declare build_new_array.
14267         * jcf-write.c (patch_newarray):  Use build_new_array.
14268
14269         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
14270         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
14271
14272         * parse.y (patch_new_array_init):  Re-organize.
14273         Now is passed the actual array (pointer) type of the value.
14274         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
14275         (patch_array_constructor):  Removed - merged into patch_new_array_init.
14276         (java_complete_tree):  Update patch_new_array_init.
14277
14278         * jcf-write.c (find_constant_index):  New function.
14279         (generate_bytecode_insns):  Use find_constant_index.
14280         (generate_classfile):  Use find_constant_index for ConstantValue.
14281
14282 1998-12-11  Tom Tromey  <tromey@cygnus.com>
14283
14284         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
14285         * decl.c (init_decl_processing): Renamed dtable -> vtable.
14286         * class.c (make_class_data): Renamed dtable -> vtable, and
14287         dtable_method_count -> vtable_method_count.
14288
14289 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14290
14291         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
14292         global variables, initialized.
14293         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
14294         Declared new global variables.
14295         * lex.c (java_lex): Return long_zero_node, float_zero_node,
14296         double_zero_node, integer_zero_node upon direct matching.
14297         * parse.y (purify_type_name): Added function prototype.
14298         (duplicate_declaration_error_p): Consider new_type as potentially
14299         being a incomplete type. Use purify_type_name on type string.
14300         (method_header): saved_type: unused variable removed. Don't figure
14301         return type if method name is invalid.
14302         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
14303         processed by patch_unaryop.
14304         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
14305         increment/decrement node into its original type after binary
14306         numeric promotion on its operands.
14307
14308 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14309
14310         * parse.y (array_initializer:): Array init operand is NULL_TREE
14311         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
14312         now an error. Fixed indentation problems.
14313         (patch_string): Handle error_mark_node as an argument.
14314         (patch_new_array_init): Fixed indentation problems.
14315         (array_constructor_check_entry): Removed check on null wfl_value.
14316         Return an error if wfl_value's walk returns an error.
14317
14318 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14319
14320         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
14321         * lex.c (java_lex): Remember column position before advancing one
14322         token. Retain location information on OCB_TK.
14323         * lex.h (typedef struct java_lc): Added new field.
14324         * parse.h (GET_SKIP_TYPE): New macro.
14325         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
14326         * parse.y (build_new_array_init, patch_new_array_init,
14327         patch_array_constructor, maybe_build_array_element_wfl,
14328         array_constructor_check_entry): New function prototypes.
14329         (switch_block:): Tagged <node>.
14330         (OCB_TK): Tagged <operator>.
14331         (array_initializer:): Installed actions.
14332         (variable_initializer): Build location information on element if
14333         necessary.
14334         (switch_statement:): Fixed indentation typo.
14335         (switch_block:): Redefined default action.
14336         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
14337         (patch_assignment): Removed duplicate code.
14338         (maybe_build_array_element_wfl, build_new_array_init,
14339         patch_new_array_init, patch_array_constructor,
14340         array_constructor_check_entry): New functions.
14341
14342 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14343
14344         * parse.y (array_initializer): Tagged <node>.
14345         (variable_initializer:): Use default rule.
14346         (array_initializer:): Defined actions.
14347         (variable_initializers:): Likewise.
14348         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
14349         non-static field accesses.
14350         (patch_invoke): Fixed indentation typo.
14351         (java_complete_tree): Likewise.
14352         (build_labeled_block): Changed leading comment. Generate an error
14353         in case of duplicate loop labels.
14354         (patch_conditional_expr): Patch results of string concatenation
14355         operations.
14356
14357 1998-12-06  Per Bothner  <bothner@cygnus.com>
14358
14359         * constants.c (find_methodref_index):  When the class is an interface,
14360         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
14361
14362         * decl.c (finit_identifier_node):  Use "$finit$", rather than
14363         "<finit>" (which Sun's verifier rejects).
14364         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
14365         (generate_field_initialization_code):  Removed.
14366         (fix_constructors)  Don't add call to $finit$ here (wrong order).
14367         (patch_method_invocation):  Add $finit$ call here.
14368
14369         * java-tree.h (CALL_USING_SUPER):  New macro.
14370         * parse.y (patch_invoke):  Remove im local variable.
14371         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
14372         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
14373         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
14374
14375         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
14376
14377         * parse.y (java_complete_tree):  Don't complain about unreachable
14378         statement if it is empty_stmt_node.
14379
14380         * jcf-write.c (find_constant_wide):  New function.
14381         (push_long_const):  Use find_constant_wide.
14382
14383         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
14384         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
14385         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
14386         Emit invokeinterface when calling an interface method.
14387         Emit invokespecial also when calling super or private methods.
14388
14389         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
14390
14391 1998-12-06  Per Bothner  <bothner@cygnus.com>
14392
14393         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
14394
14395 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14396
14397         * java-tree.h (java_layout_seen_class_methods): New function
14398         prototype.
14399         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
14400         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
14401         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
14402         * parse.y (method_declarator:): Defined action.
14403         (issue_warning_error_from_context): input_filename saved, set to
14404         the appropriate value and restored after java_error is called.
14405         (build_unresolved_array_type): Fixed comment.
14406         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
14407         (method_header): Deal with return type the same way type are
14408         handled for fields and method's parameters and local variables
14409         types are handled.
14410         (check_method_redefinition): Removed extra CR.
14411         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
14412         (java_layout_seen_class_methods): New function.
14413         (java_layout_classes): Call java_layout_seen_class_methods.
14414
14415 1998-12-03  Per Bothner  <bothner@cygnus.com>
14416
14417         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
14418
14419 1998-12-03  Per Bothner  <bothner@cygnus.com>
14420
14421         * jcf-dump.c (main):  Fix error message.
14422         * jcf-path.c (add_entry):  Style fix.
14423
14424 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14425
14426         * class.c (layout_class_method): Call build_java_argument_signature
14427         on constructors too.
14428         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14429         (patch_method_invocation): Define a primary when resolving an
14430         expression name. Augmented comment on code checking illegal `this'
14431         usage. Loosened it test by accepting NEW_CLASS_EXPR.
14432
14433 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14434
14435         * class.c (layout_class_method): Don't report error on non-static
14436         overriding static if the method is private.
14437         * java-tree.h (finish_class): Prototype added.
14438         * lex.c (java_get_line_col): Handle col argument -2 value.
14439         * parse.h: All static method declarations moved to parse.y.
14440         * parse.y: Now contains all static method declarations previously
14441         found in parse.h.
14442         (find_expr_with_wfl, missing_return_error,
14443         unreachable_stmt_error): New functions.
14444         (java_get_real_method_name): Identify constructors bearing class
14445         names in source code compiled classes only.
14446         (java_complete_expand_methods): Call missing_return_error.
14447         (invocation_mode): Private methods invoked as static methods.
14448         (java_complete_tree): Call unreachable_stmt_error.
14449
14450 1998-12-01  Tom Tromey  <tromey@cygnus.com>
14451
14452         * Makefile.in (+target): Removed.
14453         (+xmake_file): Likewise.
14454         (+tmake_file): Likewise.
14455         (.NOEXPORT): Removed duplicate.
14456
14457 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14458
14459         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14460
14461         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
14462
14463         * jvgenmain.c: Remove the xmalloc prototype, we get it from
14464         libiberty.h.  Provide an xmalloc definition.
14465
14466         * jvspec.c: Remove the xmalloc prototype.
14467
14468         * parse-scan.y: Include config.h and system.h.  Don't include
14469         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
14470         Provide an xstrdup definition.
14471
14472 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
14473
14474         * jcf-path.c (add_entry): Recognize ".jar" too.
14475         * lang-specs.h: Likewise.
14476
14477 1998-11-26  Per Bothner  <bothner@cygnus.com>
14478
14479         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
14480         soft_monitorenter_node, soft_monitorexit_node, throw_node.
14481
14482         * jcf-write.c (generate_bytecode_insns):
14483         Handle pre/post-increment/decrement of long.
14484
14485         * jcf-write.c (generate_bytecode_insns):
14486         Handle missing exception handler (finally for synchronized).
14487
14488 1998-11-25  Per Bothner  <bothner@cygnus.com>
14489
14490         * java-tree.h (end_params_node):  Declare global.
14491         * decl.c (end_params_node):  New global.
14492         (init_decl_processing, start_java_method):  Use end_params_node for
14493         end of list of parameter types.  Follows correct gcc conventions.
14494         * expr.c (pop_argument_types, pop_arguments):  Likewise.
14495         * lang.c (put_decl_node):  Likewise.
14496         * typeck.c (various places):  Likewise.
14497         * class.y (various places):  Likewise.
14498         * parse.y (various places):  Likewise.
14499
14500         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
14501         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
14502
14503         * class.c:  Add #include flags.h, remove no-longer needed declaration.
14504
14505         * class.c (layout_class_method):  Remove commented-out code, re-format.
14506         Don't add vtable entry (or index) for private methods.
14507         * expr.c (expand_invoke):  A private method is implicitly final.
14508         * class.c (make_class_data):  If inlining or optimizing,
14509         skip private methods.
14510
14511         * class.c (finish_class):  New function.  Calls existing methods,
14512         but alls emits deferred inline functions.
14513         * jcf-parse.c (parse_class_file):  Call finish_class.
14514         * parse.y (java_complete_expand_methods):  Likewise.
14515
14516         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
14517
14518         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
14519
14520 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
14521
14522         * jcf-write.c (generate_bytecode_conditional): Fix typo.
14523
14524 1998-11-24  Per Bothner  <bothner@cygnus.com>
14525
14526         * (generate_classfile): Always write class access flag with
14527         ACC_SUPER set.
14528
14529 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14530
14531         * class.c (maybe_layout_super_class): New function.
14532         (layout_class): Reorganized. Loop on class methods dispatched into
14533         a new function. Call maybe_layout_super_class.
14534         (layout_class_methods, layout_class_method): New functions.
14535         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14536         class.
14537         (expand_invoke): Likewise.
14538         * java-tree.h (all_class_list): New global variable declared.
14539         (layout_class_methods, layout_class_method): New function
14540         prototypes.
14541         (LAYOUT_SEEN_CLASS_METHODS): New macro.
14542         * jcf-parse.c (all_class_list): New global variable.
14543         (load_class): Extended what class_or_name can be. Use parser
14544         context mechanism to save globals before calling jcf_parse.
14545         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14546         is set on the file name.
14547         (jcf_parse): Layout class methods when Object is loaded, otherwise
14548         record class in all_class_list for delayed method layout.
14549         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14550         * lang.c (put_decl_node): Decode <init> into the decl context
14551         class name.
14552         * lex.c (java_allocate_new_line): Use xmalloc.
14553         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
14554         pointers, not TREE_LIST elements.
14555         (struct parser_ctxt): Fixed comment indentations, added comments
14556         and reordered some fields.
14557         (java_check_methods): Function prototype removed.
14558         * parse.y (java_push_parser_context): Use xmalloc.
14559         (java_parser_context_restore_global): Pop extra pushed ctxp only
14560         when there's nothing next.
14561         (maybe_create_class_interface_decl): Fixed comment, add new
14562         created class decl to all_class_list.
14563         (method_header): Use GET_REAL_TYPE on argument's types.
14564         (method_declarator): Use GET_REAL_TYPE, change type to the real
14565         type in TREE_LIST dependency node. Build argument list with the
14566         real type.
14567         (create_jdep_list): Use xmalloc. Removed allocation error message.
14568         (obtain_incomplete_type): Fixed leading comment. Broadened
14569         incoming argument meaning.
14570         (register_incomplete_type): Use xmalloc. Removed allocation error
14571         message.
14572         (safe_layout_class): Fixed leading comment.
14573         (jdep_resolve_class): Reversed if statement condition and switch
14574         if and else bodies.
14575         (resolve_and_layout): Fixed leading comment. Broadened incoming
14576         argument meaning.
14577         (complete_class_report_errors): New local variable name, for
14578         clarity. purify_type_name used for all error cases.
14579         (java_get_real_method_name): Stricter check on constructors.
14580         (java_check_regular_methods): Reverse methods list only if not
14581         already laid out. Layout artificial constructor.
14582         (java_check_methods): Deleted.
14583         (source_start_java_method): Obtain incomplete type for patchable
14584         method arguments.
14585         (java_layout_classes): Fixed leading comment. Use
14586         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14587         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14588         before returning. Fixed comments.
14589         (java_expand_classes): Check for errors up front.
14590         (patch_method_invocation): Class to search is resolved and laid
14591         out.
14592
14593 1998-11-24  Per Bothner  <bothner@cygnus.com>
14594
14595         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
14596
14597         * javaop.h (int8):  Removed - not used.
14598         (jbyte):  Redefine portably with correct signedness.
14599
14600         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
14601
14602         * jcf-write.c (generate_bytecode_insns):  Fix typo
14603         OPCODE_getstatic to OPCODE_getfield.
14604
14605         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
14606         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
14607         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14608
14609 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14610
14611         * jcf-parse.c (jcf_parse_source): Function returned type is
14612         void. Added prototype.
14613         (jcf_parse): Function returned type is void.
14614         (yyparse): Remove call to fclose on the last parsed file.
14615
14616         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14617
14618 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14619
14620         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14621         (layout_class): Cope with methods featuring WFL in decl names.
14622         * decl.c (unqualified_object_id_node): New global variable,
14623         initialized.
14624         (build_decl_no_layout): Removed.
14625         * expr.c (build_primtype_type_ref): Handle Double.
14626         (java_lang_expand_expr): Fixed indentations.
14627         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14628         (flag_wall, flag_redundant, flag_not_overriding,
14629         flag_static_local_jdk1_1, unqualified_object_id_node): Global
14630         variable declarations.
14631         (build_decl_no_layout): Removed prototype.
14632         (java_get_real_method_name): Added prototype.
14633         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14634         (java_parse_abort_on_error): Macro now just returns.
14635         * jcf-parse.c (jcf_parse_source): Check fclose returned
14636         value. Call emit_register_classes if java_report_errors returns
14637         zero.
14638         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14639         flag_static_local_jdk1_1): New integer flags.
14640         (lang_decode_option): New flags set here.
14641         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14642         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14643         the flag_redundant variable.
14644         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14645         when parsing java.lang.Object class.
14646         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14647         NULL_TREE to build.
14648         (resolve_qualified_expression_name): Fixed indentation.
14649         (patch_array_ref): Changed prototype.
14650         (not_initialized_as_it_should_p): Prototype removed.
14651         (java_report_errors): Added function prototype.
14652         * parse.y (formal_parameter:): Changed error message for not yet
14653         supported final parameters.
14654         (class_type_list:): Set both PURPOSE and VALUE of created
14655         TREE_LIST to be class_type.
14656         (primary_no_new_array:): Handle class literals on primitive types.
14657         (parse_warning_context): Reinstalled correct force_error and
14658         do_warning flags setups.
14659         (java_report_errors): Changed prototype. Return java_error_count
14660         value.
14661         (variable_redefinition_error): Consider treating variable type as
14662         a fake pointer.
14663         (create_interface): Warn about redundant abstract modifier if
14664         flag_redundant is set. Changed error message.
14665         (lookup_field_wrapper): Save/restore globals before/after looking
14666         up field.
14667         (duplicate_declaration_error_p): Consider treating declaration
14668         type as a fake pointer.
14669         (register_fields): Extract real type from dependency node. Check
14670         for duplicate field declaration after type adjustment. Use
14671         DECL_INITIAL to store static final initialized values.
14672         (method_header): Extract real function type from dependency node.
14673         (check_abstract_method_header): Use GET_METHOD_NAME.
14674         (obtain_incomplete_type): Layout fake pointer type.
14675         (safe_layout_class): Don't try to check for methods before layout.
14676         (java_complete_class): Don't check for correct throws clause
14677         elements inheritance here.
14678         (resolve_and_layout): Broadened name parameter meaning.
14679         (reset_method_name): Use GET_METHOD_NAME.
14680         (java_get_real_method_name): New function.
14681         (java_check_regular_methods): Don't check methods in
14682         java.lang.Object.  Verify lineage of throws clause elements. Use
14683         flag_no_overriding in warning report.
14684         (check_throws_clauses): Don't check if class was from
14685         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14686         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14687         (declare_local_variables): Use flag_static_local_jdk1_1 to report
14688         warning on unsupported final local variables. Use build_decl
14689         instead of build_decl_no_layout. Get real local variable type from
14690         dependency node.
14691         (source_start_java_method): Get real parameter type from
14692         dependency node. Call build_decl instead of build_decl_no_layout.
14693         (java_layout_classes): Reverse tree and layout type and class as
14694         required. Mark class as loaded when done.
14695         (resolve_field_access): Fixed indentation. Restricted condition
14696         leading to static field access code generation. Set field_type
14697         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14698         (resolve_qualified_expression_name): Initialize type_found to
14699         null. Handle static field resolved during qualification. Fixed
14700         layout on non primitive field decl types.
14701         (not_accessible_p): Fixed typo in comment.
14702         (patch_method_invocation): Resolve and layout class to search from
14703         type.
14704         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14705         layout non primitive type, if necessary. Make method node only to
14706         report errors.
14707         (find_applicable_accessible_methods_list): Consider WFL'ed method
14708         decl names. Fixed indentation.
14709         (argument_types_convertible): Resolve and layout target type if
14710         necessary.
14711         (java_complete_tree): Fixed indentation problems. Rewrote
14712         CALL_EXPR thrown exceptions check. Re-installed further processing
14713         of the assignment in certain cases.
14714         (patch_assignment): Call maybe_build_primttype_type_ref to perform
14715         inlining on class literals.
14716         (valid_builtin_assignconv_identity_widening_p): Cope with constant
14717         0 literal.
14718         (valid_method_invocation_conversion_p): Likewise.
14719         (patch_string): Temporary disable forbidden use of `this' in
14720         explicit constructor invocations when doing string concatenation
14721         within their scope.
14722         (patch_unaryop): Added comment. Reinstalled code to disable
14723         further check on assignment operation with cast expression RHS.
14724         (patch_switch_statement): Fixed indentation.
14725         (build_try_statement): Call build_decl instead of
14726         build_decl_no_layout.
14727         (patch_synchronized_statement): Likewise.
14728         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14729         IS_UNCHECKED_EXPRESSION_P.
14730         (check_thrown_exceptions_do): Changed leading comment. Resolve and
14731         layout argument exception type.
14732         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14733         of IS_UNCHECKED_EXPRESSION_P.
14734
14735 1998-11-18  Anthony Green  <green@cygnus.com>
14736
14737         * jcf-parse.c (yyparse): Open class file in binary mode.
14738
14739 1998-11-15  Per Bothner  <bothner@cygnus.com>
14740
14741         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
14742
14743         * jcf-write.c (perform_relocations):  Move check out one loop.
14744
14745 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
14746
14747         * Make-lang.in: Fix reference to srcdir.
14748         * jv-scan.c: Add missing xmalloc prototype.
14749         * jvgenmain.c: Ditto.
14750
14751 1998-11-15  Per Bothner  <bothner@cygnus.com>
14752
14753         * decl.c (error_mark_node), java-tree.h:  New global.
14754         * parse.y:  Use empty_stmt_node instead of size_zero_node.
14755         (build_if_else_statement):  If missing else, use empty_stmt_node.
14756
14757         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
14758         (java_complete_expand_method):  Complain if return is missing.
14759         (java_check_regular_methods):  Comment out incorrect error check.
14760         (not_accessible_p):  Fix incorrect handling of protected methods.
14761         (patch_method_invocation):  Pass correct context to not_accessible_p.
14762         (find_applicable_accessible_methods_list):  Likewise.
14763         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
14764         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
14765         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
14766         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
14767
14768         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
14769         (push_int_const):  Remove reundant NOTE_PUSH.
14770         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
14771         (- case SWITCH_EXPR):  Fix code generation bug.
14772         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
14773         (generate_classfile):  More robust for abstract methods.
14774
14775 1998-11-15  Anthony Green  <green@cygnus.com>
14776
14777         * Makefile.in: jv-scan and jvgenmain all require libiberty.
14778         * Make-lang.in: Ditto.
14779
14780         * jv-scan.c: Remove xmalloc and xstrdup definitions.
14781         * jvgenmain: Ditto.
14782
14783 1998-11-15  Per Bothner  <bothner@cygnus.com>
14784
14785         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
14786
14787         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
14788
14789 1998-11-14  Per Bothner  <bothner@cygnus.com>
14790
14791         Allow uses of interface types to verify.  This is not really
14792         type-safe, but it matches what Sun does, and is OK as long as
14793         there are appropriate run-time checks.
14794         * verify.c (merge_types):  If merging two interface types,
14795         just set the result to java.lang.Object.
14796         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
14797
14798 1998-11-13  Tom Tromey  <tromey@cygnus.com>
14799
14800         * gjavah.c (main): Handle --output-class-directory argument.
14801         * jvspec.c (lang_specific_driver): Translate `-d' into
14802         -foutput-class-dir.
14803         * jcf.h (jcf_write_base_directory): Declare.
14804         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14805         * lang-options.h: Mention -foutput-class-dir.
14806         * jcf-write.c (jcf_write_base_directory): New global.
14807         (make_class_file_name): Put generated .class file into `-d'
14808         directory, or into source directory if -d not given.  Function now
14809         static.
14810         (write_classfile): Free class file name.  Handle case where class
14811         file name is NULL.
14812         (DIR_SEPARATOR): New macro.
14813         Include <sys/stat.h>
14814
14815         * Makefile.in (prefix): New macro.
14816
14817 1998-11-12  Per Bothner  <bothner@cygnus.com>
14818
14819         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
14820         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
14821         here (done in patch_invoke instead).
14822         (case_identity):  Moved here from parse.y.
14823
14824         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
14825         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
14826         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
14827         so they can be efficiently scanned without recursion.
14828         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14829         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
14830         in BLOCK iteratively, rather than recursively.
14831
14832         * parse.y (do_unary_numeric_promotion):  New function.
14833         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
14834
14835         * parse.y (patch_newarray):  Various fixes.
14836
14837         Re-do handling of switch statements (for proper block scoping).
14838         * parse.y:  Add just a single block for the enture switch block,
14839         but don't create any "case blocks".
14840         (group_of_labels):  Rmeoved unneeded non-terminal.
14841         CASE_EXPR and DEFAULT_EXPR are added to current block.
14842         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
14843         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14844         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
14845         * parse.y (wfl_operator, print_int_node): Make non-static.
14846         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
14847         as part of recursive scan of block.
14848         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
14849         (patch_switch_statement):  Most tests move dinto java_complete_tree.
14850
14851         * parse.y:  Make various production be non-typed (void).
14852         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
14853         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
14854         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
14855
14856         * jcf-write.c (struct jcf_handler):  New type.
14857         (struct jcf_switch_state):  New type.
14858         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
14859         (alloc_handler, emit_unop, emit_reloc):  New functions.
14860         (adjust_typed_op):  Add extra parameter ("max type" offset).
14861         (emit_switch_reloc, emit_case-reloc):  New function.
14862         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
14863         (generate_bytecode_insns):  Support REAL_CST, switch statements,
14864         exception handling, method calls, object/array creation, and more.
14865
14866         * class.c:  Remove some unused variables.
14867         * constants.c (find_string_constant):  New function.
14868         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
14869         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
14870         if flag_emit_class_files.
14871
14872 1998-11-12  Tom Tromey  <tromey@cygnus.com>
14873
14874         * jcf-io.c (find_class): Added explanatory comment.
14875
14876         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
14877         trailing slash to `.zip' entries.
14878
14879         * jvspec.c (lang_specific_driver): Correctly handle case where
14880         GC_NAME not defined.
14881
14882 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14883
14884         * jvspec.c (GC_NAME): New define.
14885         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
14886         if required.
14887         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14888
14889 1998-11-11  Per Bothner  <bothner@cygnus.com>
14890
14891         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
14892
14893 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14894
14895         * jcf-dump.c (main): Correctly recognize `--'-style long options.
14896
14897 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14898
14899         * class.c (is_compiled_class): Call safe_layout_class for class
14900         compiled from source.
14901         * conver.h (convert_to_integer, convert_to_real,
14902         convert_to_pointer): Added prototypes.
14903         * decl.c (init_decl_processing): Non longer push the decls of
14904         `methodtable', `constants', `Class', `Field', `dispatchTable'
14905         `jexception' and `Method'.
14906         * expr.c (build_invokeinterface): New function.
14907         (expand_invoke): static variable CLASS_IDENT now in
14908         build_invokeinterface. Use build_invokeinterface.
14909         (expand_java_field_op): Moved code to inline
14910         java.lang.PRIMTYPE.TYPE into a function.
14911         (build_primtype_type_ref): New function.
14912         * java-tree.def (INSTANCEOF_EXPR): New tree code.
14913         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14914         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14915         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14916         (DECL_LOCAL_STATIC_VALUE): New macro.
14917         (build_invokeinterface, build_primtype_type_ref): New function
14918         prototypes.
14919         (java_parse_abort_on_error): Macro rewritten.
14920         * jcf-parse.c (current_method): Add comment to declaration.
14921         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14922         Function prototypes fixed.
14923         (jcf_parse_source): push/pop parser context. save/restore global.
14924         (parse_source_file): Fixed leading comment. Now take a
14925         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14926         classes and pop the parser context anymore.
14927         (yyparse): Push parser context, save globals, parse the source
14928         file, restore globals and pop the parser context when processing a
14929         source file.
14930         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14931         * lex.c (java_parse_doc_section): New function.
14932         (java_lex): Call java_parse_doc_section when appropriate. Build an
14933         operator around INSTANCEOF_TK.
14934         * lex.h (java_lineterminator, java_sprint_unicode,
14935         java_unicode_2_utf8, java_lex_error, java_store_unicode):
14936         Prototypes rewritten.
14937         (java_parse_escape_sequence, java_letter_or_digit_p,
14938         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14939         java_read_unicode, java_store_unicode, java_read_char,
14940         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14941         Added function prototypes.
14942         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14943         define.
14944         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14945         New macros
14946         (struct parser_ctxt): New fields: deprecated,
14947         current_parsed_class_un, gclass_list.
14948         (fix_method_argument_names, issue_warning_error_from_context,
14949         resolve_package, lookup_package_type): New function prototypes.
14950         (resolve_expression_name): Fixed function prototype.
14951         (find_applicable_accessible_methods_list): Fixed indentation, added
14952         extra argument in prototype.
14953         (check_final_assignment, build_null_of_type, check_deprecation,
14954         check_method_redefinition, reset_method_name,
14955         java_check_regular_methods, java_check_abstract_methods,
14956         maybe_build_primttype_type_ref): New function prototype.
14957         * parse.y (conver.h): Include.
14958         (INSTANCEOF_TK): Tagged <operator>.
14959         (single_type_import_declaration): Use REGISTER_IMPORT macro.
14960         (relational_expression:): Build binop for instanceof.
14961         (java_push_parser_context): Remember ctxp->gclass_list across
14962         contexts.
14963         (java_pop_parser_context): Simply return if no context
14964         exists. Remember gclass_list across contexts.
14965         (issue_warning_error_from_context): New function.
14966         (parse_error_context): Don't setup ctxp->elc here. Call
14967         issue_warning_error_from_context instead.
14968         (parse_warning_context): Likewise.
14969         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14970         setup. Link new class/interface to ctxp->gclass_list.
14971         (add_superinterfaces): Register interface as incomplete if not
14972         loaded.
14973         (create_class): Remember class unqualified name in
14974         ctxp->current_parsed_class_un. Check class deprecation.
14975         (register_fields): Check field deprecation. Remember static final
14976         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14977         processing INIT.
14978         (method_header): New local variable ORIG_ARG. Use unqualified
14979         current class name for check on constructor errors. Promote return
14980         type if of record type. Argument list fix moved in
14981         fix_method_argument_names, called here. Check method deprecation.
14982         (fix_method_argument_names): New function.
14983         (method_declarator): Promote record typed arguments.
14984         (safe_layout_class): Check class methods before layout.
14985         (java_complete_class): Compute field layout when patched.
14986         (do_resolve_class): Try to load class after having it renamed
14987         after the package name.
14988         (get_printable_method_name): Use DECL_CONTEXT.
14989         (reset_method_name): New function.
14990         (check_method_redefinition): Use reset_method_name.
14991         (java_check_regular_methods): New local variable
14992         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14993         names for error report. Check for compile-time error when method
14994         found has default (package) access.
14995         (java_check_abstract_methods): Now takes an interface DECL node as
14996         an argument. Also reinstall real name on unchecked
14997         overriding/hiding methods for error report.
14998         (java_check_methods): Fixed leading comment. Get classes to verify
14999         from ctxp->gclass_list. Use CHECK_METHODS macro and set
15000         CLASS_METHOD_CHECKED_P on class verification.
15001         (lookup_java_method2): Get real method name if necessary.
15002         (find_in_imports): Don't check package class access here.
15003         (resolve_package, lookup_package_type): New functions.
15004         (java_layout_classes): Fixed leading comment. Take classes to be
15005         laid out from ctxp->gclass_list.
15006         (java_complete_expand_methods): Don't expand native and abstract
15007         methods.
15008         (java_expand_classes): New function.
15009         (resolve_expression_name): Use additional argument ORIG.  Retrieve
15010         values of static final field of primitive types.
15011         (resolve_field_access): Handles static final field of promotive
15012         type.
15013         (resolve_qualified_expression_name): Handle STRING_CST as
15014         primaries and package name resolution. Check deprecation on found
15015         decls. Set where_found and type_found on non static field resolved
15016         during qualification. Layout non primitive field decl types.
15017         (check_deprecation): New function.
15018         (maybe_access_field): Simplified.
15019         (patch_method_invocation_stmt): Local variable CLASS_TYPE
15020         removed. Reverse method's argument when primary is a type. Don't
15021         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
15022         instead. Include abstract class in the list of class searchable
15023         for constructors. Use DECL_CONTEXT of found method for access
15024         checks. Check method deprecation.
15025         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
15026         converting arguments. Handle INVOKE_INTERFACE.
15027         (lookup_method_invoke): Search constructor using existing
15028         infrastructure (don't rely on lookup_java_constructor anymore).
15029         (find_applicable_accessible_methods_list): Extra argument flag
15030         LC. Now include constructor in the search.
15031         (qualify_ambiguous_name): Conditional expression are primaries.
15032         (not_initialized_as_it_should_p): static final are always
15033         initialized.
15034         (java_complete_tree): Pass extra NULL argument to
15035         resolve_expression_name. Stricter test to carry on patching
15036         assignments. New case for INSTANCEOF_EXPR.
15037         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
15038         (check_final_assignment, maybe_build_primttype_type_ref): New
15039         functions.
15040         (patch_assignment): Detect resolved static finals and carry normal
15041         assignment error check on them. Inline PRIMTYPE.TYPE read access.
15042         (try_builtin_assignconv): Access constant 0 on all primitive
15043         types.
15044         (valid_builtin_assignconv_identity_widening_p): Accept identical
15045         types. Accept all promoted type on int type.
15046         (valid_ref_assignconv_cast_p): Accept a null pointer to be
15047         assigned to a reference.
15048         (valid_method_invocation_conversion_p): Accept to check null
15049         pointers.
15050         (build_binop): Merge declaration and initialization of local
15051         variable BINOP.
15052         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
15053         numeric types. Improved validity test for qualify operators on
15054         references.
15055         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
15056         and PREINCREMENT_EXPR. Also detect resolved static finals of a
15057         primitive type and issue the appropriate error message.
15058         (resolve_type_during_patch): Mark class loaded when resolved.
15059         (patch_cast): Allow null to be cased to reference types.
15060         (build_null_of_type): New function.
15061         (patch_array_ref): Handle array on references correctly.
15062         (patch_return): Removed unused local variable MODIFY. Force
15063         boolean to be returned as integers. Allows null to be returned by
15064         a function returning a reference.
15065         * typeck.c (convert_to_integer, convert_to_real,
15066         convert_to_pointer): Prototypes moved to convert.h
15067         (lookup_argument_method): Use method real name, if necessary.
15068
15069 1998-10-30  Tom Tromey  <tromey@cygnus.com>
15070
15071         * class.c (build_class_ref): Changed name of primitive classes to
15072         start with `_Jv_'.
15073
15074         * class.c (make_class_data): Renamed fields: nmethods to
15075         method_count, method_count to dtable_method_count.  Always set
15076         `state' field to 0.
15077         * decl.c (init_decl_processing): Likewise.
15078
15079 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15080
15081         * class.c (layout_class): Don't mangle <finit>, produce
15082         __finit<class> instead. Don't verify artificial methods.
15083         * decl.c (finit_identifier_node): New declared global.
15084         (init_decl_processing): finit_identifier_node initialized.
15085         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
15086         * java-tree.h (finit_identifier_node): Declared as extern.
15087         (struct lang_decl): New field called_constructor.
15088         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
15089         (CLASS_HAS_FINIT_P): New macro.
15090         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
15091         explicit constructor invocation.
15092         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
15093         CALL_SUPER_CONSTRUCTOR_P): New macros.
15094         (write_classfile): Added prototype.
15095         * jcf-parse.c (jcf_parse_source): Parse and remember for
15096         generation if the file was seen on the command line.
15097         (parse_source_file): Don't write the class file here.
15098         (yyparse): Loop on files rewritten. Set current_jcf.
15099         (parse_zip_file_entries): Parse class file only if it was found.
15100         * lang.c (init_parse): Don't open command line provided filename
15101         here.
15102         (lang_parse): Don't set main_jcf anymore.
15103         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
15104         (JCONSTRUCTOR_CHECK): New macro.
15105         (JBSC_TYPE_P): New macro.
15106         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
15107         (COMPLETE_CHECK_OP_2): New macro.
15108         (struct parse_ctxt): New field explicit_constructor_p.
15109         (check_class_interface_creation): Fixed prototype indentation.
15110         (patch_method_invocation_stmt): Prototype reflects added argument.
15111         (patch_invoke): Likewise.
15112         (complete_method_declaration, build_super_invocation,
15113         verify_constructor_circularity,
15114         build_this_super_qualified_invocation, get_printable_method_name,
15115         patch_conditional_expr, maybe_generate_finit, fix_constructors,
15116         verify_constructor_super, create_artificial_method,
15117         start_artificial_method_body, end_artificial_method_body,
15118         generate_field_initialization_code): New function prototypes.
15119         * parse.y: Fixed leading comment
15120         (constructor_header:, constructor_body:, block_end:): Rules tagged
15121         <node>.
15122         (type_declaration:): Call maybe_generate_finit.
15123         (method_declaration:): Action for method_body: placed in new
15124         function complete_method_declaration, called here.
15125         (constructor_declaration:): Defined actions. Removed leading
15126         FIXME.
15127         (constructor_header:): New rule with action.
15128         (constructor_body:): Rule rewritten using block_begin: and
15129         block_end:. Defined actions.
15130         (constructor_declarator:, explicit_constructor_invocation:):
15131         Defined actions.
15132         (block:): Use new rules block_begin: block_end:.
15133         (block_begin:, block_end:): New rules and actions.
15134         (block_statements:): Fixed error message for explicit
15135         constructors.
15136         (method_invocation:): Call build_this_super_qualified_invocation
15137         if primary is `this' or `super' was seen.
15138         (conditional_expression:): Action defined.
15139         (extra_ctxp_pushed_p): New static global flag.
15140         (java_parser_context_save_global): Create parser context if
15141         necessary. Use extra_ctxp_pushed_p to remember it.
15142         (java_parser_context_restore_global): Pop extra parser context if
15143         one exists.
15144         (build_array_from_name): Array on primitive types are marked
15145         loaded.
15146         (register_fields): Restore new name in field initializer
15147         expression if type was altered. Non static fields initialized upon
15148         declaration marked initialized.
15149         (maybe_generate_finit): New function.
15150         (maybe_generate_clinit): Use create_artificial_method,
15151         start_artificial_method_body, end_artificial_method_body. Generate
15152         debug info for enclosed initialization statements.
15153         (method_header): Fixed leading comment. Check constructor
15154         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
15155         accordingly.
15156         (complete_method_declaration, constructor_circularity_msg,
15157         verify_constructor_circularity): New functions.
15158         (get_printable_method_name): New function.
15159         (check_method_redefinition): Don't rename <finit> methods. Fix
15160         declared constructor names. Error message for
15161         constructors modified.
15162         (java_check_regular_methods): Local variable seen_constructor
15163         renamed saw_constructor. Skip verification on constructors. Create
15164         default constructor with create_artificial_method.
15165         (java_check_methods): Removed unnecessary empty line.
15166         (create_artificial_method, start_artificial_method_body,
15167         end_artificial_method_body): New functions.
15168         (java_layout_classes): Changed leading comment. Reverse fields
15169         list if necessary. Always layout java.lang.Object if being
15170         defined.
15171         (java_complete_expand_methods): Verify constructor circularity.
15172         (java_complete_expand_method): Call fix_constructor on
15173         constructors.  Local variable no_ac_found removed. Restore
15174         bindings if method body expansion failed.
15175         (fix_constructors, verify_constructor_super,
15176         generate_field_initialization_code): New function.
15177         (java_expand_classes): Fixed leading comment. Write class file
15178         here.
15179         (resolve_expression_name): Check for illegal instance variable
15180         usage within the argument scope of an explicit constructor
15181         invocation.
15182         (resolve_qualified_expression_name): Pass extra from_super flag
15183         when invoking patch_method_invocation_stmt. New case for
15184         conditional expression when used as a primary. Check for error
15185         when acquiring super.
15186         (patch_method_invocation_stmt): Added extra argument super. New
15187         local variable is_static_flag. Set class_to_search according to
15188         the nature of the constructor invocation. Don't add `this'
15189         argument when expanding NEW_CLASS_EXPR. Check for illegal method
15190         invocation within the argument scope of explicit constructor
15191         invocation. Set is_static according to is_static_flag. Provide
15192         extra `super' argument to patch_invoke invocation.
15193         (patch_invoke): New argument from_super. Loop on arguments
15194         indentation fixed. Pass from_super to invocation_mode. New switch
15195         case INVOKE_SUPER. Fixed error message in switch default case.
15196         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
15197         value.
15198         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
15199         (lookup_method_invoke): Fixed prototypes in candidates list. Error
15200         message takes constructors into account.
15201         (find_applicable_accessible_methods_list): Fixed indentation.
15202         (qualify_ambiguous_name): Take explicit constructor invocation
15203         into account. Deal with a conditional expression as a primary to
15204         a method call.
15205         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
15206         case. Added extra argument to patch_method_invocation_stmt.
15207         Register calls made to explicit constructor `this'. Don't call
15208         save_expr in ARRAY_REF case when emitting class files. Check for
15209         illegal use of this when expanding explicit constructor invocation
15210         arguments.
15211         (complete_function_arguments): Set and reset parser context
15212         explicit_constructor_p field value when appropriate.
15213         (build_super_invocation, build_this_super_qualified_invocation):
15214         New functions.
15215         (patch_assignment): Fixed typo.
15216         (patch_unaryop): Check on final fields occurs only when a decl
15217         exits.
15218         (patch_return): Take constructors into account.
15219         (patch_conditional_expr): New function.
15220         * typeck.c (build_java_signature): Removed unnecessary empty line.
15221
15222 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15223
15224         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
15225
15226 1998-10-28  Tom Tromey  <tromey@cygnus.com>
15227
15228         * decl.c (init_decl_processing): Renamed fields.
15229         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
15230         interface_len, msize fields.
15231
15232         * class.c (make_class_data): Removed subclass_head and
15233         subclass_next fields.
15234         * decl.c (init_decl_processing): Removed subclass_head and
15235         subclass_next fields.
15236
15237 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15238
15239         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
15240         * mangle.c (emit_unicode_mangled_name): Similarly.
15241
15242 1998-10-26  Nick Clifton  <nickc@cygnus.com>
15243
15244         * jcf-parse.c (get_constant): Place braces around code to compute
15245         'd' when REAL_ARITHMETIC is not defined.
15246
15247 1998-10-25  H.J. Lu  (hjl@gnu.org)
15248
15249         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
15250         dependency.
15251
15252 1998-10-23  Tom Tromey  <tromey@cygnus.com>
15253
15254         * lang-specs.h: `.zip' files are input to jc1.
15255
15256 1998-10-22  Per Bothner  <bothner@cygnus.com>
15257
15258         * jvspecs.c:  Add (but don't enable) support for combining multiple
15259         .class and .java input filenames to a single jc1 invocation.
15260         Add support for -C flag (copile to .class files).
15261         Translate -classpath and -CLASSPATH arguments.
15262         * lang-specs.h:  Don't set %2 spec.
15263
15264 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15265
15266         * jcf-path.c (add_entry): Don't add trailing separator if entry is
15267         a .zip file.
15268         (add_path): Don't add trailing separator to non-empty path
15269         elements.
15270
15271         * lang.c (lang_decode_option): Check for -fclasspath and
15272         -fCLASSPATH before examining other `-f' options.
15273
15274         * java-tree.h (finalize_identifier_node): Don't declare.
15275         * class.c (make_class_data): Don't push "final" field.
15276         * decl.c (init_decl_processing): Don't push "final" field.
15277         (finalize_identifier_node): Removed.
15278         (init_decl_processing): Don't set finalize_identifier_node.
15279
15280         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
15281
15282 1998-10-11  Anthony Green  <green@cygnus.com>
15283
15284         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
15285         (JV_SCAN_SOURCES): New macro.
15286         (JCF_DUMP_SOURCES): Likewise.
15287         (jcf-dump$(exeext)): New target.
15288         (jv-scan$(exeext)): New target.
15289
15290 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15291
15292         * Makefile.in (LEX): Removed.
15293         (LEXFLAGS): Likewise.
15294         (SET_BISON): New macro.
15295         (BISON): Removed.
15296         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
15297         spurious diffs in parse.c.
15298         ($(PARSE_SCAN_C)): Likewise.
15299         (PARSE_DIR): New macro.
15300         (PARSE_C): Use it.
15301         (PARSE_SCAN_C): Likewise.
15302         (PARSE_RELDIR): New macro.
15303
15304         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
15305
15306         * jcf-io.c (find_class): Use saw_java_source to determine when to
15307         look for `.java' file.
15308         * jcf-parse.c (saw_java_source): New global.
15309         (yyparse): Set it if `.java' file seen.
15310
15311         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
15312         (GCJH_SOURCES): Likewise.
15313         * Makefile.in (datadir): New macro.
15314         (libjava_zip): Likewise.
15315         (JAVA_OBJS): Added jcf-path.o.
15316         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15317         (../gcjh$(exeext)): Likewise.
15318         (jcf-path.o): New target.
15319         * java-tree.h (fix_classpath): Removed decl.
15320         * jcf-parse.c (fix_classpath): Removed.
15321         (load_class): Don't call fix_classpath.
15322         * parse.y (read_import_dir): Don't call fix_classpath.
15323         * lex.h: Don't mention classpath.
15324         * lex.c (java_init_lex): Don't initialize classpath.
15325         * jcf-io.c (classpath): Removed global.
15326         (find_class): Use jcf_path iteration functions.  Correctly search
15327         class path for .java file.
15328         (open_in_zip): New argument `is_system'.
15329         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
15330         classpath-related options.
15331         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
15332         and -I.
15333         (lang_init): Call jcf_path_init.
15334         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
15335         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
15336         Correctly put braces around second string in each entry.
15337         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
15338         classpath-related options.
15339         (help): Updated for new options.
15340         * jcf.h: Declare functions from jcf-path.c.  Don't mention
15341         `classpath' global.
15342         * jcf-path.c: New file.
15343
15344         * jcf-depend.c: Include jcf.h.
15345
15346         * jcf-write.c (localvar_alloc): Returns `void'.
15347         (localvar_free): Removed unused variable.
15348
15349         * lang.c (OBJECT_SUFFIX): Define if not already defined.
15350         (init_parse): Use OBJECT_SUFFIX, not ".o".
15351
15352 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15353
15354         * class.c (emit_register_classes): Renamed from
15355         emit_register_class.
15356         * java-tree.h (emit_register_classes): Prototype renamed from
15357         emit_register_class.
15358         * jcf-parse.c (yyparse): Call emit_register_classes once before
15359         returning.
15360         * parse.y (java_expand_classes): No longer register classes.
15361
15362 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15363
15364         * class.c (is_compiled_class): New local variable
15365         seen_in_zip. Identify classes found in currently compiled source
15366         file(s).
15367         * decl.c (complete_start_java_method): Fixed typo.
15368         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
15369         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
15370         (CLASS_P): Moved around.
15371         (java_parse_abort_on_error): Macro moved from jcf-parse.c
15372         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
15373         java-parse.h
15374         (jcf_parse_source): Changed leading comment. Removed unnecessary
15375         fclose and CLASS_FROM_SOURCE_P marking.
15376         (parse_source_file): New local variables remember_for_generation
15377         and filename. Mark parsed file name identifier node. Removed block
15378         executed when parse_only was null. Set remember_for_generation.
15379         Use it as an argument to java_pop_parser_context.
15380         (yyparse): New local variables several_files, list, next node and
15381         current_file_list. Split ampersand separated file names into
15382         current_file_list. Iterate through the list and parse accordingly.
15383         * parse.h (java_pop_parser_context): New function prototype.
15384         * parse.y (ctxp_for_generation): New static global variable.
15385         (java_pop_parser_context): New argument generate. Link popped ctxp
15386         to ctxp_for_generation list accordingly.
15387         (java_complete_expand_methods): Fixed indentation.
15388         (java_expand_classes): New function.
15389
15390 1998-10-17  Per Bothner  <bothner@cygnus.com>
15391
15392         * Makefile.in:  Link with libiberty.a instead of memmove.o.
15393
15394 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15395
15396         * lex.c (setjmp.h): No longer included.
15397         * lex.h (setjmp.h): Included.
15398         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
15399         (duplicate_declaration_error_p): Renamed from
15400         duplicate_declaration_error.
15401         (build_array_from_name): New function prototype.
15402         * parse.y (setjmp.h): No longer included.
15403         (variable_declarator_id): Define action.
15404         (build_array_from_name): New function.
15405         (duplicate_declaration_error_p): Renamed from
15406         duplicate_declaration_error.  Fixed leading comment.
15407         (register_fields): Main `for' loop reorganized. Uses
15408         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
15409         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
15410         build_array_from_name.
15411         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
15412         types.
15413         (read_import_dir): Don't try to skip `.' and `..'.
15414         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
15415         build_array_from_name. Main `for' loop reorganized.
15416         (resolve_qualified_expression_name): When building access to a
15417         field, use the type where the field was found, not its own type.
15418         (maybe_access_field): Use field DECL_CONTEXT if the type where the
15419         field was found is null.
15420         (qualify_ambiguous_name): Sweep through all successive array
15421         dimensions.
15422
15423 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15424
15425         * java-tree.h (pop_labeled_block, lang_printable_name,
15426         maybe_add_interface, set_super_info, get_access_flags_from_decl,
15427         interface_of_p, inherits_from_p, fix_classpath,
15428         complete_start_java_method, emit_handlers, init_outgoing_cpool,
15429         make_class_data, register_class, alloc_name_constant): New
15430         function prototypes.
15431         * lang.c (lang_decode_option): Set argc argument unused. Fixed
15432         indentation. Added cast to remove warning.
15433         (lang_printable_name): Set v argument unused.
15434         (lang_print_error): Added argument to lang_printable_name call.
15435         (java_dummy_print, print_lang_decl, print_lang_type,
15436         print_lang_identifier, lang_print_xnode): All argument marked
15437         unused.
15438         * lex.c (java_unget_unicode): Removed unnecessary argument.
15439         (java_allocate_new_line): Unused local variable is gone.
15440         (java_read_char): Added parenthesis in expressions to remove
15441         warnings.  Added final return statement.
15442         (java_read_unicode): Added parenthesis in expression to remove
15443         warning.
15444         (java_parse_end_comment): Fixed java_unget_unicode invocation.
15445         (java_parse_escape_sequence): Likewise.
15446         (java_lex): Unused local variables are gone. Fixed
15447         java_unget_unicode invocation.
15448         * lex.h (set_float_handler): Prototype added when JC1_LITE not
15449         defined.
15450         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15451         lang_printable_name invocation in macro.
15452         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15453         Likewise.
15454         (duplicate_declaration_error): Suppressed unused argument in
15455         prototype.
15456         (identical_subpath_p): Function declaration is gone.
15457         (patch_invoke): Suppressed unused argument in prototype.
15458         (patch_cast, build_labeled_block, check_thrown_exceptions):
15459         Likewise.
15460         * parse.y (setjmp.h): Included
15461         (toplev.h): Likewise.
15462         (field_declaration:): Suppressed unused local
15463         (label_decl:): Fixed build_labeled_block invocation.
15464         (java_pop_parser_context): Put extra parenthesis around assignment
15465         in if.
15466         (yyerror): Suppressed unused local variables.
15467         (variable_redefinition_error): Fixed lang_printable_name
15468         invocation.
15469         (create_interface): Suppressed unused local variables.
15470         (create_class): Likewise.
15471         (duplicate_declaration_error): Suppressed unused argument. Fixed
15472         lang_printable_name invocation.
15473         (register_fields): Suppressed unused local variable. Fixed
15474         duplicate_declaration_error invocation.
15475         (method_header): Suppressed unused local variable.
15476         (method_declarator, parser_check_super): Likewise.
15477         (java_complete_class): Suppressed unused local variable. Fixed
15478         fatal error message.
15479         (complete_class_report_errors): Added default: in switch.
15480         (java_check_regular_methods): Fixed lang_printable_name
15481         invocations.
15482         (check_throws_clauses): Likewise.
15483         (java_check_abstract_methods): Suppressed unused local
15484         variable. Fixed lang_printable_name invocation.
15485         (read_import_entry): Added supplemental return statement.
15486         (read_import_dir): Suppressed unused local variables.
15487         (check_pkg_class_access, declare_local_variables): Likewise.
15488         (source_start_java_method): Suppressed unused extern variable
15489         declarations
15490         (expand_start_java_method): Suppressed unused extern and local
15491         variable declarations.
15492         (java_complete_expand_methods): Likewise.
15493         (java_complete_expand_method): Suppressed unused local variables.
15494         (make_qualified_name): Likewise.
15495         (resolve_qualified_expression_name): Added default: in
15496         switch. Fixed lang_printable_name invocation.
15497         (class_instance_creation_expression): Added parenthesis around
15498         expressions.
15499         (patch_method_invocation_stmt): Fixed lang_printable_name and
15500         patch_invoke invocations.
15501         (check_for_static_method_reference): Fixed lang_printable_name
15502         invocation.
15503         (patch_invoke): Suppressed unused arguments and local variables.
15504         (lookup_method_invoke): Suppressed unused local variables.
15505         (qualify_ambiguous_name): Added default: in switch.
15506         (identical_subpath_p): Function removed.
15507         (patch_assignment): Suppressed unused local variables. Suppressed
15508         unnecessary if statement. Fixed lang_printable_name invocations.
15509         (try_builtin_assignconv): Fixed lang_printable_name invocations.
15510         (valid_ref_assignconv_cast_p): Parenthesis around
15511         expression. Suppressed unused local variables.
15512         (build_binop): Suppressed unused local variables. fixed
15513         lang_printable_name invocations.
15514         (string_constant_concatenation): Suppressed unused local
15515         variables.
15516         (patch_unaryop): Fixed lang_printable_name invocation.
15517         (patch_cast): Suppressed unnecessary argument. Fixed
15518         lang_printable_name invocation.
15519         (patch_array_ref): Fixed lang_printable_name invocation.
15520         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15521         (build_labeled_block): Suppressed unused argument.
15522         (generate_labeled_block): Fixed build_labeled_block invocation.
15523         (build_loop_body): Suppressed unused local variables.
15524         (patch_loop_statement): Likewise.
15525         (patch_exit): Fixed lang_printable_name invocation.
15526         (patch_switch_statement): Likewise.
15527         (case_identity): First argument marked unused.
15528         (patch_try_statement): Fixed lang_printable_name invocations.
15529         (patch_synchronized_statement, patch_throw_statement): Likewise.
15530         (check_thrown_exceptions): Fixed check_thrown_exceptions and
15531         lang_printable_name invocations.
15532         (check_thrown_exceptions_do): Suppressed unused argument.
15533
15534 1998-10-14  Tom Tromey  <tromey@cygnus.com>
15535
15536         * jcf-write.c (write_classfile): Add output class file as target.
15537         * lang-options.h: Added -MD, -MMD, -M, and -MM.
15538         * jcf.h: Added declarations for dependency-tracking functions.
15539         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15540         * lang.c (lang_decode_option): Recognize -MD and -MMD.
15541         (finish_parse): Call jcf_dependency_write.
15542         (dependency_tracking): New global.
15543         (DEPEND_SET_FILE): New define.
15544         (DEPEND_ENABLE): New define.
15545         (init_parse): Enable dependency tracking if required.
15546         Include "flags.h".
15547         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15548         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15549         (../gcjh$(exeext)): Likewise.
15550         (jcf-depend.o): New target.
15551         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15552         (GCJH_SOURCES): Likewise.
15553         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
15554         dep_name argument.
15555         (find_classfile): Added dep_name argument.
15556         (find_class): Compute name of dependency.
15557         (open_in_zip): Call jcf_dependency_add_file.
15558         * gjavah.c (output_file): No longer global.
15559         (usage): Don't mention "gjavah".
15560         (help): Likewise.
15561         (java_no_argument): Likewise.
15562         (version): Likewise.
15563         (main): Recognize and handle -M family of options.
15564         (print_mangled_classname): Return is void.
15565         (process_file): Handle case where output is suppressed.
15566         (HANDLE_END_FIELD): Likewise.
15567         (HANDLE_METHOD): Likewise.
15568         * jcf-depend.c: New file.
15569
15570 1998-10-13  Jeffrey A Law  (law@cygnus.com)
15571
15572         * java-tree.def: Add missing newline at EOF.
15573
15574 1998-10-13  Tom Tromey  <tromey@cygnus.com>
15575
15576         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15577         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
15578         function.
15579         Include <config.h> and "system.h".
15580         (disassemble_method): Undefine RET to avoid clash with
15581         config/i386/i386.h.
15582
15583 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15584
15585         * decl.c (runtime_exception_type_node, error_exception_type_node):
15586         New global variables.
15587         (init_decl_processing): Initialized.
15588         * expr.c (java_lang_expand_expr): Set caught exception type to
15589         null if catch handler argument doesn't exit.
15590         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15591         tree codes.
15592         * java-tree.h (runtime_exception_type_node,
15593         error_exception_type_node): Global variables declared.
15594         (DECL_FUNCTION_THROWS): New macro.
15595         (DECL_FUNCTION_BODY): Modified comment.
15596         (DECL_SPECIFIC_COUNT): Likewise.
15597         (struct lang_decl): New field throws_list.
15598         (IS_UNCHECKED_EXPRESSION_P): New macro.
15599         * lex.c (java_lex): Generate location information for THROW_TK.
15600         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15601         EXCEPTIONS_P): New macros.
15602         (enum jdep_code): New value JDEP_EXCEPTION.
15603         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15604         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15605         PATCH_METHOD_RETURN_ERROR): New macros.
15606         (patch_method_invocation_stmt): Added new argument to prototype.
15607         (patch_synchronized_statement, patch_throw_statement,
15608         check_thrown_exceptions, check_thrown_exceptions_do,
15609         purge_unchecked_exceptions, check_throws_clauses): New function
15610         prototypes.
15611         * parse.y Fixed typo in keyword section.
15612         (throw:): Rule tagged <node>.
15613         (THROW_TK): Keyword tagged <operator>.
15614         (method_header:): Last argument to call to method_header passed
15615         from throws: rule.
15616         (throws:, class_type_list:, throw_statement:,
15617         synchronized_statement:, synchronized:): Defined actions.
15618         (method_header): New local variable current. Register exceptions
15619         from throws clause.
15620         (java_complete_tree): Complete and verify exceptions from throws
15621         clause.
15622         (complete_class_report_errors): Error message on exceptions not
15623         found
15624         (java_check_regular_methods): Fixed typo. Shortcut on private
15625         overriding methods. Changed error message on method
15626         redefinition. Check for throws clause compatibility.
15627         (check_throws_clauses): New function.
15628         (java_check_abstract_methods): Use DECL_NAME for wfl or current
15629         method. Changed error message on method redefinition.
15630         (currently_caught_type_list): New static variable.
15631         (java_complete_expand_methods): Purge unchecked exceptions from
15632         throws clause list. Call PUSH_EXCEPTIONS before walk and
15633         POP_EXCEPTIONS after.
15634         (resolve_qualified_expression_name): Pass new argument as NULL to
15635         patch_method_invocation_stmt.
15636         (patch_method_invocation_stmt): New argument ref_decl. Invoke
15637         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15638         argument list when appropriate. Use new argument if non null to
15639         store selected method decl.
15640         (patch_invoke): Convert if necessary args of builtin types before
15641         forming CALL_EXPR. Argument list no longer reversed here.
15642         (invocation_mode): Treat final methods as static methods.
15643         (java_complete_tree): New cases for THROW_EXPR: and
15644         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15645         function call.
15646         (complete_function_arguments): No more RECORD_TYPE
15647         conversion. Function parameter nodes no longer saved.
15648         (valid_ref_assignconv_cast_p): Avoid handling null type.
15649         (patch_binop): Fixed null constant reference handling.
15650         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15651         BUILD_THROW macros.
15652         (patch_try_statement): Fixed comments. Record caught types in
15653         list, push the list, expand try block and pop the list.
15654         (patch_synchronized_statement, patch_throw_statement,
15655         check_thrown_exceptions, check_thrown_exceptions_do,
15656         purge_unchecked_exceptions): New functions.
15657         * typeck.c (lookup_argument_method): Allow WFL in place of method
15658         DECL_NAME during method definition check
15659
15660 1998-10-09  Tom Tromey  <tromey@cygnus.com>
15661
15662         * gjavah.c (decode_signature_piece): New function.
15663         (print_c_decl): Use it.  Added `name_override' argument.
15664         (print_method_info): Use name_override argument to print_c_decl.
15665         (seen_fields): Removed.
15666         (print_field_info): Don't update seen_fields.
15667         (struct method_name): New structure.
15668         (method_name_list): New global.
15669         (print_method_info): Add new method to list of methods.
15670         (name_is_method_p): New function.
15671         (print_field_info): If field name has same name as method, then
15672         change field name.
15673         (process_file): Parse methods before fields.
15674         (field_pass): New global.
15675         (HANDLE_END_FIELD): Take field_pass into account.
15676
15677 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15678
15679         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15680         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15681
15682 1998-10-03  Anthony Green  <green@cygnus.com>
15683
15684         * jvspec.c: Fix bug in jvgenmain_spec patch.
15685
15686 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15687
15688         * Makefile.in (lang.o:): Install dependency on java-tree.def.
15689         * decl.c (soft_exceptioninfo_call_node): New global variable.
15690         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15691         takes extra integer argument. soft_exceptioninfo_call_node
15692         initialized.
15693         * except.c (java_set_exception_lang_code): New function
15694         (method_init_exceptions): Called here.
15695         (prepare_eh_table_type): New function.
15696         (expand_end_java_handler): Called here.
15697         * expr.c (build_java_throw_out_of_bounds_exception): Now features
15698         one argument. Modified generation of call to
15699         soft_badarrayindex_node to use new argument.
15700         (build_java_arrayaccess): Pass faulty index value to
15701         build_java_throw_out_of_bounds_exception.
15702         (generate_name): New function.
15703         (java_lang_expand_expr): New local variables node, current,
15704         has_finally_p. Expand TRY_EXPR node.
15705         (process_jvm_instruction): Replace top of the stack with thrown
15706         object reference when entering exception handler.
15707         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15708         specific tree codes.
15709         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15710         global.
15711         (DECL_SPECIFIC_COUNT): New macro.
15712         (prepare_eh_table_type, java_set_exception_lang_code,
15713         generate_name): New function declarations.
15714         (match_java_method): Declaration deleted.
15715         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15716         macros.
15717         * lex.c (TRY_TK, CATCH_TK): Generate location information.
15718         * parse.h (redefinition_error, refine_accessible_methods_list,
15719         can_cast_to_p): Function declaration removed.
15720         (classitf_redefinition_error, variable_redefinition_error,
15721         parse_jdk1_1_error, find_applicable_accessible_methods_list,
15722         find_most_specific_methods_list, argument_types_convertible,
15723         enter_a_block, valid_builtin_assignconv_identity_widening_p,
15724         valid_cast_to_p, valid_method_invocation_conversion_p,
15725         try_reference_assignconv, add_stmt_to_compound,
15726         build_jump_to_finally, build_tree_list, patch_try_statement,
15727         java_get_catch_block): New function declarations.
15728         * parse.y (string_buffer_type): Global variable deleted.
15729         (group_of_labels, catches, catch_clause, catch_clause_parameter,
15730         finally): Rules tagged <node>.
15731         (TRY_TK, CATCH_TK): Token tagged <operator>.
15732         (class_body_declaration:, class_member_declaration:,
15733         formal_parameter:, explicit_constructor_invocation:,
15734         interface_member_declaration:, constant_declaration:,
15735         primary_no_new_array:, class_instance_creation_expression:,
15736         array_creation_expression:): Issue error on unsuported JDK1.1
15737         features.
15738         (try_statement:, catches:, finally:): Define actions.
15739         (catch_clause_parameter): New rule.
15740         (catch_clause:): Use new rule catch_clause_parameter.
15741         (parse_jdk1_1_error): New function.
15742         (redefinition_error): Renamed classitf_redefinition_error.
15743         (variable_redefinition_error): New function.
15744         (check_class_interface_creation): Call
15745         classitf_redefinition_error.
15746         (java_complete_tree): Added error message on JDEP_TYPE: case.
15747         (complete_class_report_errors): Fixed indentation.
15748         (declare_local_variables): Call variable_redefinition_error.
15749         (source_end_java_method): Call java_set_exception_lang_code and
15750         emit_handlers where appropriate.
15751         (java_method_add_stmt): Call add_stmt_to_block.
15752         (add_stmt_to_block): New function.
15753         (lookup_method_invoke): Fixed outside comment. new local variable
15754         candicates.  Call find_applicable_accessible_methods_list and
15755         find_most_specific_methods_list when searching for a
15756         method. Modified error report to list possible candidates when
15757         applicable.
15758         (find_applicable_accessible_methods_list,
15759         find_most_specific_methods_list, argument_types_convertible): New
15760         function.
15761         (refine_accessible_methods_list): Function deleted.
15762         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15763         expr (if applicable) before calling patch_array_ref.
15764         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15765         (enter_block): Fixed comment.
15766         (enter_a_block): New function.
15767         (patch_assignment): Reorganized. Call try_reference_assignconv for
15768         references. Call valid_cast_to_p instead of can_cast_to_p.
15769         (try_reference_assignconv,
15770         valid_builtin_assignconv_identity_widening_p): New functions.
15771         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15772         (valid_cast_to_p, valid_method_invocation_conversion_p): New
15773         functions.
15774         (build_string_concatenation): Don't resolve StringBuffer.
15775         (patch_cast): Fixed inverted arguments.
15776         (patch_array_ref): Code to save array expr deleted. Call
15777         valid_cast_to_p instead of can_cast_to_p.
15778         (generate_labeled_block): Call generate_name.
15779         (build_jump_to_finally, build_try_statement, java_get_catch_block,
15780         patch_try_statement): New functions.
15781         * typeck.c (match_java_method): Function deleted.
15782
15783 1998-10-02  Anthony Green  <green@cygnus.com>
15784
15785         * jvspec.c: jvgenmain_spec uses different temporary file names.
15786
15787 1998-10-02  Anthony Green  <green@cygnus.com>
15788
15789         * jvspec.c (lang_specific_driver): Fail if user specifies
15790         --main= when not linking.
15791
15792 1998-09-28  Tom Tromey  <tromey@cygnus.com>
15793
15794         * class.c (make_class_data): Push value for `thread' field.
15795         * decl.c (init_decl_processing): Added `thread' field to class.
15796
15797         * class.c (add_field): Always make static fields externally
15798         visible.
15799
15800 1998-09-26  Anthony Green  <green@cygnus.com>
15801
15802         * expr.c (build_java_athrow,
15803         build_java_throw_out_of_bounds_exception, expand_invoke,
15804         build_newarray, expand_java_multianewarray, build_java_monitor):
15805         Update comments to reflect _Jv_* function names.
15806
15807 1998-09-25  Per Bothner  <bothner@cygnus.com>
15808
15809         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
15810         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
15811         * parse.y (expand_start_java_method):  Likewise.
15812
15813 1998-09-24  Per Bothner  <bothner@cygnus.com>
15814
15815         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
15816
15817         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15818         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
15819         * expr.c:  Remove no-longer-needed calls to promote_type.
15820         * decl.c (give_name_to_locals):  Liekwise.
15821         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
15822         * parse.y:  Add/remove promote_type calls as appropriate.
15823         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
15824         (parse_signature_string):  Likewise.
15825         (build_java_array_type):  Fix for now signature convenions.
15826
15827         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
15828
15829 1998-09-23  Tom Tromey  <tromey@cygnus.com>
15830
15831         * class.c (init_class_processing): libjava function renamed to
15832         _Jv_RegisterClass.
15833
15834 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15835
15836         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15837         * java-tree.def: Fixed DEFTREECODE third argument.
15838         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15839         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15840         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15841         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15842         JAVA_THIS_EXPR): Now replaced by tree code definitions.
15843         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15844         * lang.c (java_tree_code_type, java_tree_code_length,
15845         java_tree_code_name): New arrays.
15846         (lang_init): Append Java tree node definitions to Gcc ones.
15847         * lex.c (expression_obstack): Declared as extern when JC1_LITE
15848         defined.
15849         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15850         wfl_to_string.
15851         (java_lex): Allow declaration of empty string constants. Retain
15852         location information on CASE_TK and DEFAULT_TK.
15853         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15854         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15855         Modified to be more robust.
15856         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15857         (build_new_invocation, try_builtin_assignconv,
15858         patch_switch_statement, string_constant_concatenation,
15859         build_string_concatenation, patch_string_cst, patch_string,
15860         java_expand_switch): New function declarations.
15861         * parse.y: Rules related to switch and EH tagged <node>.
15862         (label_id): Set to NULL_TREE
15863         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15864         tree nodes.
15865         (this_or_super:): Fixed indentation.
15866         (statement:, statement_nsi:, statement_without_trailing_substatement:,
15867         statement_expression:): Removed call to RULE on all sub-rules.
15868         (switch_expression:, switch_labels:): New rules.
15869         (switch_statement:, switch_block:, switch_block_statement_groups:,
15870         switch_block_statement_group:, switch_labels:, switch_label:):
15871         Defined actions.
15872         (throw_statement:, synchronized_statement:, try_statement:):
15873         Defined temporary actions.
15874         (class_instance_creation_expression:): Call
15875         build_new_invocation. Fixed indentation.
15876         (field_access): Fixed indentation.
15877         (method_invocation): Likewise.
15878         (make_qualified_primary): Use THIS_EXPR.
15879         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15880         resolving from SUPER, set *type_found.
15881         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15882         (java_complete_tree): Removed unused local variable `location'. Case
15883         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15884         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15885         on MODIFY_EXPR: and all binary operator tree code cases. Removed
15886         STRING_CST: case. default: checks for patchable strings.
15887         (complete_function_arguments): Transform string constant or
15888         crafted StringBuffer if necessary.
15889         (build_method_invocation): Fixed comments.
15890         (build_new_invocation): New function.
15891         (patch_assignment): Call try_builtin_assignconv to figure a valid
15892         assignment conversion between builtin types.
15893         (try_builtin_assignconv): New function.
15894         (build_binop): Use URSHIFT_EXPR directly to call build.
15895         (operator_string): Use UNARY_PLUS_EXPR.
15896         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15897         operator.
15898         (do_merge_string_cste, merge_string_cste,
15899         string_constant_concatenation, build_string_concatenation,
15900         patch_string, patch_string_cst): New function.
15901         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15902         (patch_unaryop): Likewise. New test of valid ++/-- operands.
15903         (build_newarray_node): Use NEW_ARRAY_EXPR.
15904         (build_this): Use THIS_EXPR.
15905         (build_return): Enable debug information on return statement.
15906         (build_if_else_statement): Likewise.
15907         (complete_labeled_statement): Fixed related comment.
15908         (build_loop_body): Fixed comment.
15909         (build_bc_statement): Enable debug information on break/continue
15910         statements.
15911         (patch_bc_statement): Fixed typos. Handle SWITCH statement
15912         context.
15913         (patch_switch_statement, case_identity, java_expand_switch): New
15914         functions.
15915
15916 1998-09-21  Per Bothner  <bothner@cygnus.com>
15917
15918         * buffer.h (BUFFER_INIT):  New macro.
15919         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
15920         Pass (struct jcf_partial *state) to most functions.
15921         (jcf_block, jcf_relocation):  New types.
15922         Support labels, branches, conditionals, loops.
15923
15924 1998-09-21  Tom Tromey  <tromey@cygnus.com>
15925
15926         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15927
15928 1998-09-21  Per Bothner  <bothner@cygnus.com>
15929
15930         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
15931         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
15932         not integer_type_node (INT_TYPE_SIZ bits).
15933
15934         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
15935
15936         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
15937         * jcf-dump.c (print_exception_table):  New function.
15938         (disassemble_method):  Better handling of wide instructions.
15939         Make more robust for bad input.
15940
15941 1998-09-30  Jeffrey A Law  (law@cygnus.com)
15942
15943         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15944         FreeBSD.
15945
15946 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15947
15948         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15949
15950 1998-09-17  Tom Tromey  <tromey@cygnus.com>
15951
15952         * Makefile.in ($(PARSE_H)): Removed target.
15953
15954 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15955
15956         * Makefile.in (JAVA_OBJS): Add memmove.o
15957         (memmove.o): New target & rules.
15958
15959 1998-09-15  Tom Tromey  <tromey@cygnus.com>
15960
15961         * expr.c (expand_invoke): Don't generate a call to the class init
15962         code.
15963
15964 1998-09-14  Jeffrey A Law  (law@cygnus.com)
15965
15966         * Makefile.in: Add many missing dependencies.
15967         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15968         as appropriate.
15969         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15970         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15971
15972 1998-09-11  Per Bothner  <bothner@cygnus.com>
15973
15974         * decl.c (complete_start_java_method):  If method is static (and
15975         not private) call _Jv_InitClass.
15976         * expr.c (expand_invoke):  Don't call build_class_init.
15977
15978         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
15979
15980 1998-09-10  Jeffrey A Law  (law@cygnus.com)
15981
15982         * Make-lang.in (GCJ): Define before using.
15983
15984 1998-09-09  Jeffrey A Law  (law@cygnus.com)
15985
15986         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15987         losing due to namespace pollution in GNU getopt.h
15988
15989 1998-09-09  Tom Tromey  <tromey@cygnus.com>
15990
15991         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15992         (java.all.cross): Likewise.
15993         (java.rest.encap): Likewise.
15994
15995 1998-09-08  Jeffrey A Law  (law@cygnus.com)
15996
15997         * gjavah.c (print_class_decls): Fix thinko in arglist
15998         * jcv-io.c (find_classfile): Similarly.
15999
16000 1998-09-07  Jeffrey A Law  (law@cygnus.com)
16001
16002         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
16003
16004 1998-09-05  Tom Tromey  <tromey@cygnus.com>
16005
16006         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
16007         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
16008         * Makefile.in (PARSE_C): New macro.
16009         (PARSE_H): Likewise.
16010         (PARSE_SCAN_C): Likewise.
16011         ($(PARSE_C)): Target renamed from parse.c.
16012         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
16013         (clean): Remove parse-scan.c as well.
16014         (parse.o): Depend on $(PARSE_C).
16015
16016 1998-09-05  Anthony Green  <green@cygnus.com>
16017
16018         * README, license.terms: Removed.
16019
16020         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
16021         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
16022         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
16023         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
16024         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
16025         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
16026         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
16027         and Java trademark attribution.
16028
16029 1998-09-04  Tom Tromey  <tromey@cygnus.com>
16030
16031         * Makefile.in: Use gcjh, not gjavah.
16032         * config-lang.in (stagestuff): Use gcjh, not gjavah.
16033         * Make-lang.in: Changed gjavah to gcjh everywhere.
16034
16035 1998-09-03  Per Bothner  <bothner@cygnus.com>
16036
16037         * gjavah.c:  Support new -prepend -add -append flags.
16038         (print_method_info):  Method is not virtual if class is final.
16039
16040 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16041
16042         * jv-scan.c: Fixed copyright assignment.
16043         * keyword.gperf: Likewise.
16044         * keyword.h: Likewise.
16045         * lex.c: Fixed copyright assignment.
16046         (java_lex): Push unicode back when parsing '<'.
16047         * lex.h: Fixed copyright assignment.
16048         * parse-scan.y: Likewise.
16049         * parse.h: Fixed copyright assignment.
16050         (build_debugable_stmt, complete_for_loop): New function prototypes.
16051         * parse.y: Fixed copyright assignment.
16052         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
16053         size_zero_node when completing a loop with no exit condition.
16054         (for_statement_nsi:): Define action.
16055         (for_init:, for_update:): Return size_zero_node when empty.
16056         (declare_local_variables): Call build_debugable_stmt.
16057         (build_debugable_stmt): New function.
16058         (build_loop_body): Build debugable statement around loop
16059         condition part.
16060         (complete_loop_body): Take into account the debugable statement
16061         around the EXIT_EXPR.
16062         (complete_loop_body): New function.
16063         (patch_exit_expr): Fixed condition inversion.
16064
16065 1998-09-02  Tom Tromey  <tromey@cygnus.com>
16066
16067         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
16068         name of thread define.
16069         * jvspec.c (THREAD_NAME): New macro.
16070         (GCLIB): Likewise.
16071         (THREADLIB): Likewise.
16072         (lang_specific_driver): Recognize attempt to link with thread
16073         library or gc library.  Recognize -ljava on command line so it
16074         isn't linked against more than once.
16075
16076 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16077
16078         * parse-scan.y (report_main_declaration): Name of the class
16079         containing `main' can be a qualified name.
16080
16081 1998-08-31  Tom Tromey  <tromey@cygnus.com>
16082
16083         * config-lang.in: Changed gjavac to gjc everywhere.
16084         * Make-lang.in: Changed gjavac to gjc everywhere.
16085
16086 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16087
16088         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
16089         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
16090         and install the files.
16091         * Makefile.in (JAVA_OBJS_LITE): New variable.
16092         (compiler:): Now include jv-scan as a dependency.
16093         (../jv-scan$(exeext), parse-scan.c): New targets.
16094         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
16095         * config-lang.in (compilers): Removed gcj, gjavah from the list.
16096         * jcf-parse.c (parse_source_file): Call java_layout_classes and
16097         check for errors even if parse_only.
16098         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
16099         defined.
16100         (yylex): New function. Uses java_lex body.
16101         (java_lex): Removed commented out statement. Remove local variable
16102         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
16103         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
16104         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
16105         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
16106         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
16107         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
16108         where appropriate.
16109         (java_lex_error): Empty if JC1_LITE is defined.
16110         (java_get_line_col): Return 0 if JC1_LITE is defined.
16111         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
16112         SET_MODIFIER_CTX): Moved into the section containing the macros
16113         conditionally defined by JC1_LITE.
16114         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
16115         argument if JC1_LITE is defined.
16116         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
16117         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
16118         is defined.
16119         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
16120         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
16121         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
16122         to different values according to JC1_LITE.
16123         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
16124         declared if JC1_LITE set.
16125         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
16126         defined if JC1_LITE not set.
16127         (struct parser_ctx): Reorganized and skip the jc1 front end part
16128         if JC1_LITE set.
16129         (java_layout_classes): New function definition.
16130         (java_push_parser_context, java_init_lex, yyparse, yylex,
16131         yyerror): Prototype always declared. All other static function
16132         prototypes declared only if JC1_LITE is not set.
16133         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
16134         declared in parse.h.
16135         (java_layout_classes): New function.
16136         (java_complete_expand_methods): No longer layout the class here.
16137         * parse-scan.y: New file.
16138         * jv-scan.c: New file.
16139
16140 1998-08-25  Tom Tromey  <tromey@cygnus.com>
16141
16142         * gjavah.c (main): Handle -friend option.
16143         (friend_specs): New global.
16144         (generate_access): Handle friend_specs.
16145         (process_file): Likewise.
16146         (MAX_FRIENDS): New macro.
16147         (friend_count): New global.
16148         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
16149         Changed all callers.
16150
16151 1998-08-24  Per Bothner  <bothner@cygnus.com>
16152
16153         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
16154         (main):  Handle processing all the entries of a named .zip archive.
16155         * jcf-io.c (jcf_trim_old_input):  New function.
16156         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
16157
16158 1998-08-24  Per Bothner  <bothner@cygnus.com>
16159
16160         * lang.c (flag_assume_compiled):  Make default be on.
16161
16162 1998-08-21  Per Bothner  <bothner@cygnus.com>
16163
16164         * jcf-dump.c:  Add bunches of flags to control output more.
16165         (process_class):  New function;  support printing more than one class.
16166         (main): Support new --print-main and --javap flags.
16167         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
16168         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
16169
16170 1998-08-20  Per Bothner  <bothner@cygnus.com>
16171
16172         Change mangling of dispatch table to match C++ vtable (w/thunks).
16173         * class.c (build_dtable_decl), java-tree.h:  New function.
16174         (make_class_data):  Call it.
16175         * decl.c (init_decl_processing):  Likewise.
16176
16177 1998-08-19  Warren Levy  <warrenl@cygnus.com>
16178
16179         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
16180         soft_anewarray; adjust args passed.
16181         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
16182         match _Jv_NewObjectArray.
16183
16184 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16185
16186         * decl.c (push_labeled_block, pop_labeled_block): New functions.
16187         * expr.c (loopup_label): Call create_label_decl.
16188         (create_label_decl): New function.
16189         (java_lang_expand_expr): Call expand_start_bindings with argument
16190         set to zero.
16191         * java-tree.h Added space after PROTO in function declarations
16192         when necessary.
16193         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
16194         (create_label_decl, push_labeled_block): New function
16195         declarations.
16196         * lex.c (label_id): Initialize.
16197         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
16198         switch.
16199         * parse.h Added space after PROTO in function declarations when
16200         necessary.
16201         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
16202         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
16203         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
16204         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
16205         macros.
16206         (struct parser_ctxt): New fields current_loop,
16207         current_labeled_block.
16208         (build_if_else_statement, patch_if_else_statement,
16209         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
16210         generate_labeled_block, complete_labeled_statement,
16211         build_bc_statement, patch_bc_statement, patch_loop_statement,
16212         build_new_loop, build_loop_body, complete_loop_body): New function
16213         declarations.
16214         * parse.y (java_warning_count): New global variable.
16215         (label_id): New static variable.
16216         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
16217         (block:): Return size_zero_node when block is empty.
16218         (empty_statement:): Return size_zero_node.
16219         (statement:): Implement supplemental action when for_statement: is
16220         reduced.
16221         (label_decl:): New rule.
16222         (labeled_statement:): Rewritten using label_decl. Actions
16223         implemented.
16224         (labeled_statement_nsi:): Likewise.
16225         (if_then_statement): Actions implemented.
16226         (while_expression): New rule.
16227         (while_statement:): Rewritten using while_expression. Actions
16228         implemented.
16229         (while_statement_nsi:): Likewise.
16230         (do_statement_begin:): New rule.
16231         (do_statement:): Rewritten using do_statement_begin. Actions
16232         implemented.
16233         (for_statement:): Rewritten using for_begin. Actions implemented.
16234         (for_statement_nsi:): Likewise.
16235         (for_header:, for_begin:): New rules.
16236         (for_init:): Actions implemented.
16237         (statement_expression_list:, break_statement:,
16238         continue_statement:): Likewise.
16239         (yyerror): Count number of issued warning(s).
16240         (java_report_errors): Report error(s) and/or warning(s).
16241         (java_complete_class): Use build_java_argument_signature to
16242         recompute completed method signature.
16243         (java_check_regular_methods): New locals method_wfl and aflags.
16244         Use method_wfl instead of lookup_cl during error reports. Fixed
16245         indentation and modified some error messages. Use
16246         lang_printable_name in method instead of the DECL_NAME. New code
16247         to issue warnings on methods not overriding corresponding methods
16248         private to a different package.
16249         (java_method_add_stmt): Call add_stmt_to_compound.
16250         (add_stmt_to_compound): New function.
16251         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
16252         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
16253         (build_if_else_statement, patch_if_else_statement,
16254         build_labeled_block, generate_labeled_block,
16255         complete_labeled_statement, build_new_loop, build_loop_body,
16256         complete_loop_body, patch_loop_statement, build_bc_statement,
16257         patch_bc_statement, patch_exit_expr): New functions.
16258         * typeck.c (build_java_signature): Build argument signature before
16259         enclosing it in between parenthesis.
16260
16261 1998-08-17  Warren Levy  <warrenl@cygnus.com>
16262
16263         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
16264         (JAVA_OBJS): Added reminder comment
16265
16266 1998-08-13  Nick Clifton  <nickc@cygnus.com>
16267
16268         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
16269         be interpreted as a long long.
16270
16271 1998-08-13  Warren Levy  <warrenl@cygnus.com>
16272
16273         * decl.c (init_decl_processing): Use _Jv_InitClass, not
16274         soft_initialise_class.  Use _Jv_NewMultiArray, not
16275         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
16276         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
16277         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
16278         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
16279
16280 1998-08-12  Per Bothner  <bothner@cygnus.com>
16281
16282         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
16283         length_identifier_node):  New global tree node constants.
16284         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
16285         Replace uses by super_identifier_node etc.
16286         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
16287
16288         * parse.y (resolve_field_access):  Don't special-case ".length" if
16289         flag_emit_class_files.
16290         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
16291         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
16292         and ARRAY.length.
16293
16294 1998-08-11  Per Bothner  <bothner@cygnus.com>
16295
16296         * decl.c (init_decl_processing): Remove unused method_type_node fields.
16297         * class.c (make_method_value):  Remove init for removed fields.
16298
16299         * class.c (layout_class):  Use build_java_argument_signature.
16300         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
16301
16302         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
16303         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
16304         (build_java_signature):  Don't use push_java_argument_signature.
16305
16306         * typeck.c (lookup_argument_method):  New function.
16307         * parse.y (java_check_regular_methods):  Use lookup_argument_method
16308         instead of lookup_java_method2 followed by lookup_java_method.
16309
16310         * parse.y (check_method_redefinition):  Minor optimization.
16311
16312         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
16313         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
16314
16315 1998-08-10  Tom Tromey  <tromey@cygnus.com>
16316
16317         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
16318         c-pragma.o.
16319
16320         * gjavah.c (java_float_finite): Use K&R-style definition.
16321         (java_double_finite): Likewise.
16322         (generate_access): Now returns void.  Changed all callers.
16323         (last_access_generated): Removed.
16324         (process_file): Only make a single pass over the .class file.
16325
16326 1998-07-29  Per Bothner  <bothner@cygnus.com>
16327
16328         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
16329         for compatibility for G++ (with -fvtable-thunks).
16330         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
16331
16332         * gjavah.c (process_file):  Use public inheritance for super-class.
16333
16334 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16335
16336         * lex.c (java_init_lex): Initialize ctxp->package.
16337         * parse.h (struct parser_ctxt): package and package_len replaced
16338         by tree package, an identifier node. Field method_decl_list is
16339         gone. Fixed comments.
16340         (lookup_field_wrapper, merge_qualified_name, not_accessible,
16341         class_in_current_package): New function prototypes.
16342         * parse.y (array_type:): Set class loaded flag on primitive type
16343         arrays.
16344         (package_declaration:): Assign ctxp->package to the
16345         identifier node.
16346         (method_invocation:): Handle invocation of method qualified by
16347         `super'.
16348         (single_type_import_declaration:): Removed ambiguity check.
16349         (java_pop_parser_context): New local variable `next'. Reset and
16350         set IMPORT_CLASSFILE_NAME flags on current and previous import
16351         list.
16352         (java_accstring_lookup): Use new local macro COPY_RETURN.
16353         (lookup_field_wrapper): New function.
16354         (parser_qualified_classname): Use merge_qualified_name.
16355         (parser_check_super_interface): Broaden error message.
16356         (do_resolve_class): Check for qualified class name in the current
16357         compilation unit if appropriate.
16358         (process_imports): Check for already defined classes.
16359         (check_pkg_class_access): Got rid of call to
16360         get_access_flags_from_decl.
16361         (java_complete_expand_methods): Call safe_layout_class based on
16362         the current class size.
16363         (make_qualified_primary): Build a WFL qualification on primary if
16364         none exists.
16365         (merge_qualified_name): New function.
16366         (make_qualified_name): Use merge_qualified_name.
16367         (resolve_expression_name): Use safe_lookup_field.
16368         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
16369         (resolve_qualified_expression_name): Likewise. Check on resolved
16370         element accessibility.
16371         (not_accessible_p, class_in_current_package): New functions.
16372         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
16373         (patch_method_invocation_stmt): Merged common pieces. Check
16374         accessibility of invoked method.
16375         (check_for_static_method_reference): Add returned type in error
16376         message.
16377         (invocation_mode): Get rid of bogus check on PRIVATE methods.
16378         (refine_accessible_methods_list): Merged two conditions in test.
16379         (java_complete_class): Sanity check on stabilize_ref gone.
16380         * zextract.c (read_zip_archive): Cast lseek second argument to long.
16381
16382 1998-07-28  Per Bothner  <bothner@cygnus.com>
16383
16384         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
16385
16386 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16387
16388         * gjavah.c (F_NAN): Removed.
16389         (F_NAN_MASK): New macro.
16390         (F_POSITIVE_INFINITY): Removed.
16391         (F_NEGATIVE_INFINITY): Likewise.
16392         (java_float_finite): Rewrote.
16393         (D_NAN_MASK): Renamed.
16394         (java_double_finite): Rewrote.
16395         (D_POSITIVE_INFINITY): Removed.
16396         (D_NEGATIVE_INFINITY): Likewise.
16397
16398         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
16399         If verbose, print underlying representation of value in hex.
16400
16401 1998-07-24  Per Bothner  <bothner@cygnus.com>
16402
16403         * buffer.h, buffer.c:  New files.
16404         * Makefile.in (JAVA_OBJS):  Add buffer.o.
16405
16406         Support locals variables and writing their debug entries to .class.
16407         * jcf-write.c:  Simplify some by user new buffer type.
16408         (vode_buffer_grow):  Removed.
16409         (struct localvar_info):  New type.
16410         (localsvars, localvartable):  New buffers.
16411         (localvar_alloc, localvar_free):  New functions.
16412         (generate_bytecode_insns):  Handle local variables.
16413         (generate_classfile):  Write LocalVariableTable attribute.
16414
16415 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16416
16417         * jcf-io.c (open_in_zip): Check the zipfile magic number.
16418         * zipfile.h (ZIPMAGIC): New macro.
16419
16420 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16421
16422         * Makefile.in (gjavah.o): Updated dependencies.
16423         (jcf-dump.o): Likewise.
16424         (all.indirect): Use ../gjavah.
16425         (../gjavah$(exeext)): Likewise.
16426         (clean): Don't remove gjavah.
16427         (clean): Remove parse.c, not java/parse.c.
16428         * Make-lang.in (java): Added gjavah.
16429         (gjavah$(exeext)): New target.
16430         (GJAVAH_SOURCES): New macro.
16431         (java.all.build): Added gjavah.
16432         (java.all.cross): Likewise.
16433         (java.rest.encap): Likewise.
16434         * config-lang.in (compilers, stagestuff): Added gjavah.
16435
16436 1998-07-23  Tom Tromey  <tromey@cygnus.com>
16437
16438         * gjavah.c (java_float_finite): New function.
16439         (java_double_finite): Likewise.
16440         (F_POSITIVE_INFINITY): New macro.
16441         (F_NEGATIVE_INFINITY): Likewise.
16442         (F_NAN): Likewise.
16443         (D_POSITIVE_INFINITY): Likewise.
16444         (D_NEGATIVE_INFINITY): Likewise.
16445         (D_NAN): Likewise.
16446         (print_field_info): Use java_float_finite and java_double_finite.
16447
16448 1998-07-23  Per Bothner  <bothner@cygnus.com>
16449
16450         * parse.y (method_header):  Name "this" implicit argument.
16451
16452 1998-07-22  Per Bothner  <bothner@cygnus.com>
16453
16454         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
16455         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
16456         (put_linenumber):  New function.
16457         (generate_bytecode_insns, generate_classfile):  Write line numbers.
16458
16459 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16460
16461         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16462         (lookup_name, build_known_method_ref, build_class_init,
16463         build_invokevirtual, invoke_build_dtable, match_java_method,
16464         build_field_ref, pushdecl_force_head, build_java_binop,
16465         binary_numeric_promotion, build_decl_no_layout,
16466         build_java_arrayaccess, build_newarray, build_anewarray,
16467         build_java_array_length_access, build_java_arraynull_check): New
16468         extern function prototypes.
16469         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16470         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16471         java-tree.h.
16472         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16473         to NULL
16474         * jcf.h (jcf_out_of_synch): New extern function prototype.
16475         * parse.h: Static/global function implemented in parse.y
16476         prototyped and declarations moved at the end of the file.
16477         (DECL_P): Check that the argument isn't null.
16478         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16479         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16480         (QUAL_DECL_TYPE): New macro.
16481         (PARAMS): Macro definition removed.
16482         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16483         (return_statement:): Call build_return.
16484         (field_access:): Call make_qualified_primary in sub rule.
16485         (method_invocation:): Build method invocation and call
16486         make_qualified_primary when processing primaries.
16487         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16488         get_type_from_signature.
16489         (java_check_regular_method): Extra integer 0 argument when calling
16490         lookup_java_method2.
16491         (lookup_java_interface_method2): Extra method DECL argument when
16492         calling lookup_java_interface_method2.
16493         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16494         COMPOUND_EXPR node.
16495         (java_complete_expand_method): Layout current class iff not
16496         already done. Don't process interface's methods.
16497         (java_complete_expand_method): Use super class only if it
16498         exists. Use current class otherwise.
16499         (make_qualified_primary): New function.
16500         (resolve_expression_name): Process qualified expression or
16501         expression from primary the same way.
16502         (resolve_expression_name): Two last arguments to
16503         resolve_field_access are now NULL_TREEs.
16504         (resolve_field_access): New variable is_static. Local field must
16505         be DECLs. is_static computed on field DECLs only. Append code in
16506         where_found to the field access if necessary. Use QUAL_DECL_TYPE
16507         to initialize field_type.
16508         (resolve_qualified_expression_name): New local variable,
16509         previous_call_static and is_static. Handle primaries with function
16510         calls, casts, array references and `this'. `super' now handled as
16511         `(super_class)this'. Use is_static to clarify boolean expressions.
16512         Added code to handle case where a proper handle is required to
16513         access a field. Use QUAL_DECL_TYPE where applicable.
16514         (maybe_access_field): New function.
16515         (patch_method_invocation_stmt): New arguments primary, where,
16516         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16517         deleted. Use `where' as a type to search from if specified. Check
16518         for static method reference where forbidden. Append primary or
16519         current_this to the argument list if not calling constructor nor
16520         static methods.
16521         (check_for_static_method_reference): New function.
16522         (patch_invoke): Layout the class on which new is done if
16523         necessary.
16524         (lookup_method_invoke): Changed format to report errors on
16525         methods.
16526         (qualify_ambiguous_name): New local variable this_found. Now
16527         handle things from primaries. Method call are considered
16528         expression names.
16529         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16530         changed into NULLs.
16531         (not_initialized_as_it_should_p): Comply with the new DECL_P.
16532         (java_complete_tree): New case fo RETURN_EXPR. Process function
16533         call arguments in separate function.
16534         (complete_function_arguments): New function.
16535         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16536         anymore.
16537         (patch_assignment): Take the return function slot into account as
16538         a RHS. Distinguish assignment from a return.
16539         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16540         when checking methods in interfaces.
16541         (resolve_type_during_patch): NULL argument to unresolve_type_p
16542         instead of NULL_TREE.
16543         (patch_newarray): Fixed typo in comment.
16544         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16545         (build_return, patch_return): New functions.
16546         * typeck.c (lookup_java_constructor): Fixed typo in comment.
16547
16548 1998-07-21  Per Bothner  <bothner@cygnus.com>
16549
16550         * constants.c (find_name_and_type_constant, find_fieldref_index,
16551         find_methodref_index):  New methods.
16552         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
16553         just return given method.  Also, rename to build_known_method_ref.
16554         (expand_invoke):  Rename call to build_invoke_non_interface.
16555         * java-tree.h, parse.h:  Update prototype.
16556         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
16557         (such as expand_expr_stmt) if flag_emit_class_files.
16558         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
16559         STACK_TARGET, IGNORE_TARGET):  New macros.
16560         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
16561         (generate_bytecode_insn):  New function to generate method's bytecode.
16562         (generate_classfile):  Node generate Code attribute for a method.
16563         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
16564         push_long_const, field_op, adjust_typed_op, maybe_wide):
16565         New functions used by generate_bytecode_insn.
16566
16567         * typeck.c (signature_include_return):  Remove variable.
16568         (push_java_argument_signature, build_java_argument_signature):  New.
16569         (build_java_signature):  Use push_java_argument_signature.
16570         * parse.y:  Use build_java_argument_signature instead of fiddling
16571         with signature_include_return.
16572
16573 1998-07-17  Tom Tromey  <tromey@cygnus.com>
16574
16575         * gjavah.c (print_c_decl): Always generate JArray<>* for array
16576         types.
16577
16578         * Makefile.in (all.indirect): Added gjavah$(exeext).
16579         (gjavah$(exeext)): Added $(exeext).
16580         (clean): Likewise.
16581
16582 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16583
16584         * class.c (layout_class): Call to java_layout_parsed_class replace
16585         by safe_layout_class.
16586         * expr.c (build_java_array_length_access): Removed static storage
16587         class in the function definition.
16588         (build_java_arraynull_check): Likewise.
16589         Also fixed typos in two comments.
16590         * lex.c (java_init_lex): Initialize static global kw_length.
16591         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16592         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16593         java_lex_error.
16594         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16595         * parse.h (resolve_no_layout): New static function declaration.
16596         (get_identifier_in_static): Declaration removed.
16597         (java_layout_parsed_class): Function name declaration changed to
16598         safe_layout_class.
16599         (build_newarray_node, patch_newarray, resolve_type_during_patch,
16600         not_initialized_as_it_should_p, build_this): New static function
16601         declarations.
16602         (pushdecl_force_head, build_java_binop, int_fits_type_p,
16603         binary_numeric_promotion, stabilize_reference,
16604         build_decl_no_layout, build_java_arrayaccess): Extern function
16605         declarations moved into their own section.
16606         (build_newarray, build_anewarray, build_java_array_length_access,
16607         build_java_arraynull_check): New extern function declarations.
16608         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16609         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16610         fake tree codes.
16611         (CALL_CONSTRUCTOR_P): New macro.
16612         * parse.y (kw_length): New static global tree node.
16613         (return_statement): Tagged <node>.
16614         (RETURN_TK): Tagged <operator>.
16615         (variable_declarator_id:): Build variable declaration with an
16616         empty initialization value if a syntax error was found in the
16617         initialization part of the variable declaration.
16618         (statement_without_trailing_substatement:): return_statement: now
16619         uses the default rule.
16620         (return_statement:): Temporarily fixed to return NULL_TREE.
16621         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16622         (class_instance_creation_expression:): Class creation rules now
16623         call build_method_invocation upon reduction.
16624         (array_creation_expression:): Rules call build_newarray_node upon
16625         reduction.
16626         (dim_exprs:): Build a list of dimension expressions.
16627         (dim_expr:): Store location of the OSB_TK in the dimension
16628         expression node.
16629         (method_invocation:): Added a new error rule.
16630         (build_unresolved_array_type): WFL argument may also be an array
16631         on a primitive type. Name of the argument changed to reflect this.
16632         (method_declarator): Insert argument type at the beginning of the
16633         argument type list and later reverse the list.
16634         (unresolved_type_p): Argument 'returned' may be optionally
16635         NULL_TREE.
16636         (java_layout_class_from_source): Function renamed
16637         safe_layout_class.
16638         (resolve_and_layout): Now call resolve_no_layout and
16639         safe_layout_class.
16640         (resolve_no_layout): New function.
16641         (purify_type_name): New function.
16642         (complete_class_report_errors): Call purify_type_name during error
16643         report on a type not found.
16644         (process_imports): error_found local variable doesn't need to be
16645         initialized to zero.
16646         (declare_local_variables): New local type_wfl. Fixed typo in error
16647         message. type_wfl assigned to unresolved type and used to register
16648         incomplete type. Build a WFL around the variable initialization
16649         statement so that debug info can be generated on it.
16650         (source_start_java_method): Reverse argument list after they've
16651         been processed.
16652         (current_this): New static global variable.
16653         (java_complete_expand_methods): Set current_this when appropriate.
16654         (resolve_expression_name): Build correct static and non static
16655         field access bearing a simple name.
16656         (resolve_field_access): Resolve the length field of arrays. Handle
16657         f.m() cases.
16658         (patch_method_invocation_stmt): Set the type of the method
16659         invocation to error_mark_node. This value is later overridden by a
16660         valid type, if any. Don't handle qualified constructor invocation
16661         as qualified method invocation. Call lookup_method_invoke with its
16662         new flag. It's no longer necessary to access the selected method
16663         as the value of a tree list. Handle constructor invocation.
16664         (patch_invoke): Reverse argument list when invoking non interface
16665         methods. Insert call to new as the first argument of the
16666         constructor.
16667         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16668         defined within a final class. Return INVOKE_STATIC if the invoked
16669         method is a constructor.
16670         (lookup_method_invoke): New lc argument is a flag to indicate a
16671         constructor lookup. Now handle constructor lookup. Choose the most
16672         specific method in case several were matching the invocation
16673         requirements. Return a method decl instead of a tree list featuring
16674         one single method decl element.
16675         (refine_accessible_methods_list): New lc flag argument to
16676         indicate that a constructor is being looked up.
16677         (not_initialized_as_it_should_p): New function.
16678         (java_complete_tree): Now process fake tree codes
16679         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16680         save_expr on resolved function call arguments. Case on
16681         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16682         (patch_assignment): LHS can be a field access expression. When
16683         dealing with reference, lhs_type is the promoted type of the
16684         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16685         applicable.
16686         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16687         (patch_binop): Use not_initialized_as_it_should_p where
16688         applicable.
16689         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16690         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16691         where applicable.
16692         (resolve_type_during_patch): New function.
16693         (patch_cast): Call resolve_type_during_patch to resolve type and
16694         report error accordingly.
16695         (patch_array_ref): Use not_initialized_as_it_should_p where
16696         applicable. Array base expression is saved before being
16697         used. Promote the type of an array elements if it contains non
16698         builtin types.
16699         (build_newarray_node, patch_newarray, build_this): New functions.
16700
16701 1998-07-16  Tom Tromey  <tromey@cygnus.com>
16702
16703         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16704         increment it in `for' statement.
16705         (print_field_info): If number is inf or nan, don't print it.
16706         (print_method_info): If method name is `delete', just ignore it.
16707         (print_c_decl): Special-case jstringArray.
16708
16709         * gjavah.c (help): New function.
16710         (no_argument): New function.
16711         (usage): Changed text.
16712         (main): Rewrote argument handling.  Now handles -v, --help,
16713         --version.
16714         (version): New function.
16715         (found_error): New global.
16716         (main): Return found_error.
16717         (generate_access): Set found_error.
16718         (print_c_decl): Likewise.
16719
16720 1998-07-15  Tom Tromey  <tromey@cygnus.com>
16721
16722         * gjavah.c (print_c_decl): Don't print "," when examining field.
16723         Skip type name when looking at "[L" types.
16724         (process_file): Now static.
16725         (generate_access): Now returns int.
16726         (last_access_generated): New global.
16727         (process_file): Clear last_access_generated; make multiple passes
16728         over the class.
16729         (print_field_info): Just return if generate_access returns true.
16730         (print_method_info): Likewise.  Also, allow <init> functions to
16731         pass through.
16732         (print_c_decl): Added is_init argument.  Print constructors
16733         properly.
16734         (print_cxx_classname): Use UTF8_GET to extract characters from
16735         string.
16736         (print_base_classname): New function.
16737         (print_class_decls): New function.
16738         (process_file): Use it.
16739         (utf8_cmp): New function.
16740
16741 1998-07-13  Nick Clifton  <nickc@cygnus.com>
16742
16743         * lang-options.h: Format changed to match changes in gcc/toplev.c
16744         to implement a --help option.
16745
16746 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
16747
16748         * decl.c (init_decl_processing): Revert change to dtable_type.
16749
16750 1998-07-09  Per Bothner  <bothner@cygnus.com>
16751
16752         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16753
16754 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
16755
16756         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16757
16758         * lang.c (lang_init): Default flag_exceptions to 1, without
16759         checking to see if it's 2 first.
16760
16761 1998-07-08  Jeffrey A Law  (law@cygnus.com)
16762
16763         * constants.c: Include "system.h".
16764         * decl.c: Likewise.
16765         * lang.c (flag_new_exceptions): Get via extern now.
16766         (lang_init_options): New functions.  Turn on flag_new_exceptions.
16767
16768 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16769
16770         * lex.c (java_lex): Return 0 when we see an invalid character in
16771         the input.
16772
16773         * lex.c (java_read_char): Specify extra argument when calling
16774         java_lex_error.
16775         (java_read_unicode, java_parse_end_comment,
16776         java_parse_escape_sequence): Likewise,
16777         (java_lex): Specify extra argument when calling
16778         java_lex_error. Test that IDs are beginning with a legal character
16779         for IDs. Handle invalid characters with an error message and a
16780         call to java_lex_error.
16781         (java_lex_error): Adjust column position by new argument
16782         `forward'. Issue an error even if in the middle of reporting an
16783         other error.
16784
16785 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
16786
16787         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16788         we don't explicitly put a null pointer when we're copying it.
16789
16790 1998-07-07  Tom Tromey  <tromey@cygnus.com>
16791
16792         * gjavah.c (print_cxx_classname): New function.
16793         (super_class_name): Likewise.
16794         (print_super_fields): Removed.
16795         (in_super): Removed.
16796         (print_field_info): Never generate #defines.
16797         (print_c_decl): Changed generated types to match JNI.  No longer
16798         print class name before method name.
16799         (print_method_info): Print "static" before static methods.
16800         Print "virtual" before non-final methods.
16801         (usage): Use exit(1), not exit(-1).
16802         (main): Likewise.
16803         (print_field_info): Use %.17g to print a double.
16804         (last_access): New globals.
16805         (process_file): Initialize last_access.
16806         (usage): Now static.
16807         (ACC_VISIBILITY): New define.
16808         (generate_access): New function.
16809         (print_field_info): Call it.
16810         (print_method_info): Likewise.  Also, generate information for all
16811         methods, not just native methods.  Return void.
16812         (print_c_decl): Return void.
16813         (print_field_info): Return void.
16814
16815 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16816
16817         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16818         processing the jc1 grammar file. Prefix bison functions and
16819         variables with java_.
16820         (parse.c): Dependencies on parse.h and lex.h
16821         * expr.c (build_java_arrayaccess): Function now global.
16822         * java-tree.h: Comment reorganized to carry on previous
16823         classification effort.
16824         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16825         RESOLVE_TYPE_NAME_P): New flags on WFLs.
16826         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16827         java_parse (new prefix java_ generated by bison).
16828         (java_layout_parsed_class, java_register_parsed_class): Function
16829         call removed.
16830         (yyparse): Removed unnecessary call to init_outgoing_cpool.
16831         * lex.c (static tree wfl_op): Variable deleted.
16832         (java_init_lex): Initialize kw_super and kw_this. Initialize more
16833         ctxp fields to NULL_TREE.
16834         (java_lex): No longer create WFL for operators. Filename caching
16835         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16836         created as STRING_CST and later expanded. Removed extra argument
16837         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16838         and SUPER.
16839         (build_wfl_node): Removed code in comments.
16840         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16841         store token and location data in the current bison token.
16842         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16843         static/extern function declaration at the beginning of the file.
16844         (struct qualification): Data structure definition deleted.
16845         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16846         (qualify_ambiguous_name): Function declaration modified. Function
16847         now returns nothing.
16848         (build_array_ref, patch_array_ref, make_qualified_name,
16849         resolve_qualified_expression_name, maybe_generate_clinit,
16850         resolve_field_access): New static function declarations.
16851         (build_java_arrayaccess): New extern function declaration.
16852         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16853         (CALL_EXPR_PRIMARY): Macro deleted.
16854         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16855         (struct parser_ctxt): Field initialized_final
16856         removed. non_static_initialized, static_initialized: New fields.
16857         * parse.y (static tree kw_super, static tree kw_this): New global
16858         static.
16859         (%union): tree wfl field of operator member replaced by int
16860         location. WFLs are non longer created for operators.
16861         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16862         (qualified_name:): Now calls make_qualified_name to build the
16863         identifier.
16864         (type_declaration:): Consider generating <clinit> when class
16865         parsing completed.
16866         (variable_declarator:): Directly build an assignment node when the
16867         variable is initialized when declared.
16868         (this_or_super:): Build a WFL and set current location when THIS
16869         or SUPER are parsed.
16870         (expression_statement:): Wrap statement around a WFL.
16871         (primary_no_new_array:): Fixed typo. Changed value returned by
16872         THIS_TK because of its new type (temporary).
16873         (dim_exprs:): Temporary fix because of OSB_TK's new type.
16874         (field_access:): Build qualified name with SUPER.
16875         (method_invocation:): Fixed returned value because of SUPER's new
16876         type.
16877         (array_access:): Use OSB_TK location information.
16878         (post_increment_expression:, post_decrement_expression:,
16879         unary_expression:, pre_increment_expression:,
16880         pre_decrement_expression:, unary_expression_not_plus_minus:,
16881         cast_expression:, multiplicative_expression:,
16882         additive_expression:, shift_expression:, relational_expression:,
16883         equality_expression:, and_expression:, exclusive_or_expression:,
16884         inclusive_or_expression:, conditional_and_expression:,
16885         conditional_or_expression:, assignment:): Use new location/token
16886         information available on operators.
16887         (create_class): Set super_decl_type to NULL_TREE when processing
16888         java.lang.Object.
16889         (register_fields): Field initialization is now a MODIFY_EXPR
16890         node. Chain initialization code to the matching lists (according
16891         to the field declaration modifiers).
16892         (maybe_generate_clinit): New function.
16893         (method_header): Don't set method's DECL_NAME to a WFL when adding
16894         methods to java.lang.Object.
16895         (resolve_and_layout): Now can return NULL_TREE if the type
16896         resolution fails. Otherwise, return the class DECL instead of its
16897         TYPE.
16898         (check_method_redefinition): Don't patch method DECL_NAME if it
16899         belongs to java.lang.Object.
16900         (process_imports): Simply assign error_found to the value returned
16901         by check_pkg_class_access.
16902         (declare_local_variables): Don't use their init statements (if
16903         any) when parsing error were previously found. Reuse MODIFY_EXPR
16904         build during parsing as an init statement.
16905         (java_method_add_stmt): Now return the current method body.
16906         (java_layout_parsed_class, java_register_parsed_class): Functions
16907         removed.
16908         (java_complete_expand_methods): Initialize the constant pool on a
16909         per class basis. Layout the classes before expanding their method
16910         bodies. Don't try expand artificial constructor code if error were
16911         found. Make the classes data and register them if no error were
16912         found.
16913         (java_complete_expand_method): Retrieve an artificial constructor
16914         argument list before entering its body. Assign the top block to
16915         the artificial constructor function body and set types of declared
16916         blocks and compound statements to void. Walk method body if not an
16917         artificial constructor.
16918         (make_qualified_name, cut_identifier_in_qualified): New functions.
16919         (resolve_expression_name): Fixed comments. Save/restore the
16920         current class CLASS_LOADED_P flag value. Build non qualified
16921         static field access and handle qualified expression names.
16922         (resolve_field_access, resolve_qualified_expression_name): New
16923         functions.
16924         (patch_method_invocation_stmt): Use the new expression resolution
16925         scheme, calling resolve_field_access when the function call is
16926         resolved as an expression.
16927         (qualify_ambiguous_name): Function rewritten to work on qualified
16928         expression produced by make_qualified_name.
16929         (java_complete_tree): Promote type when function's argument are
16930         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16931         the assignment to discover further errors if RHS is a expression
16932         name that fails to evaluate. Declare LHS initialized even though
16933         the assignment failed. Don't use the location variable and removed
16934         extra argument in patch function calls. Now handle the ARRAY_REF
16935         case and build internal string representation when STRING_CSTs are
16936         walked.
16937         (build_method_invocation): Don't wrap function call around a WFL.
16938         (build_assignment): Likewise. Use the operator location
16939         information.
16940         (patch_assignment): Handle array access LHSs. Handle error
16941         provenance, resulting in a better error report.
16942         (build_binop): Use op_location from operator as binop location
16943         information.
16944         (build_unaryop, build_incdec, build_cast): Likewise.
16945         (patch_binop): Extract location information from the node. Fixed
16946         typo in error message.
16947         (patch_unary_op): Extract location information from the node.
16948         (build_array_ref, patch_array_ref): New functions.
16949
16950 1998-07-01  Tom Tromey  <tromey@cygnus.com>
16951
16952         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16953         match _Jv_IsInstanceOf.
16954         * decl.c (init_decl_processing): Use _Jv_NewArray, not
16955         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
16956
16957 1998-06-30  Tom Tromey  <tromey@cygnus.com>
16958
16959         * decl.c (init_decl_processing): Functions are now named
16960         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16961
16962 1998-06-29  Per Bothner  <bothner@cygnus.com>
16963
16964         * java-tree.h (load_class):  Add prototype.
16965         * class.c (is_compiled_class):  Add missing arg to load_class.
16966         * expr.c (expand_java_NEW):  Call load_class.
16967         * parse.y (process_import):  Removed bogus use of void return value.
16968
16969 1998-06-25  Per Bothner  <bothner@cygnus.com>
16970
16971         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
16972         Function name is "_Jv_Throw" instead of "soft_athrow".
16973         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
16974         Function name is "_Jv_AllocObject" instead of "soft_new".
16975         Takes an extra parameter (object size).
16976         * expr.c:  Update calls.
16977
16978 1998-06-24  Per Bothner  <bothner@cygnus.com>
16979
16980         * lex.c (java_get_line_col):  Handle end-of-file.
16981         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
16982
16983 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
16984
16985         * lang.c (lang_init): Make -fexceptions the default.
16986         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16987         exception handling is not turned on.
16988
16989 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
16990
16991         * lang.c (flag_new_exceptions): Make this this default.
16992         * decl.c (end_java_method): Call emit_handlers.
16993         * except.c (method_init_exceptions): Set language code and version.
16994         (expand_start_java_handler): Enable exception, and call
16995         expand_eh_region_start.
16996         (expand_end_java_handler): Enable exception, and set up catch blocks.
16997         (emit_handlers): New routine to generate the saved handlers.
16998         * java-except.h (emit_handlers): Add prototype.
16999
17000 1998-06-12  Per Bothner  <bothner@cygnus.com>
17001
17002         We used to have three different representations of the constant pool:
17003         the CPool structure, the tree_constant_pool, and the constructures
17004         used to build the Class object (which may need class and string
17005         constants) in compiled code.  None were appropriate for compiling
17006         to .class files, so I did a major overhaul.
17007
17008         First, the tree_constant_pool array was removed.  Things were
17009         modified to the CPool structure in the JCF could be used.
17010         Second, a "capacity" field was added to the CPool, and functions
17011         written to search for a matching constant, adding one if not found.
17012         The code that generated the Class object was changed to use a CPool.
17013         The actual TREE_LISTs used to build the CONSTRUCTORs used for
17014         the static Class object are now only in build_constants_constructor.
17015         Finally, I wrote code which can generate a .class file (including its
17016         constant pool) from the RECORD_TYPE of a class.  This is a big step
17017         on the way to compiling Java source into .class files.
17018
17019         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
17020         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
17021
17022         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
17023         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
17024         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
17025         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
17026         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
17027         (lang_type):  Removed constant_pool field.
17028         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
17029         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
17030         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
17031         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
17032
17033         * constants.c (current_constant_pool_tags, current_constant_pool_data,
17034         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
17035         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
17036         (set_constant_entry, find_constant1, find_constant2,
17037         find_class_constant, count_constant_pool_bytes, write_constant_pool,
17038         find_utf8_constant, find_class_or_string_constant):  New functions.
17039
17040         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
17041         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
17042         (give_name_to_class, get_class_constant):  Likewise.
17043         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
17044         (get_name_and_type_constant, get_ref_constant):  Removed.
17045         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
17046         * parse.y:  Don't save/restore tree_constant_pool.
17047         * verify.c (verify_jvm_instructions):  Update for new approach.
17048         * expr.c (expand_invoke, expand_java_field_op): Likewise.
17049
17050         * lang-options.h:  Added -femit-class-file, -femit-class-files.
17051         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
17052         (lang_f_options):  Added "emit-class-file(s)".
17053
17054         * expr.c (build_java_arrayaccess):  Generate more efficient array
17055         bounds checking, by using unsigned compare.
17056
17057         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
17058
17059 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17060
17061         * parse.h: New comment on the handling of unresolved type
17062         identifiers. JDEPs are now part of the jdep_code enum.
17063         (typedef struct jdep): Now use enum jdep_code or int, depending on
17064         availability. Both are narrowed down to an 8 bits bitfield.
17065         (CALL_EXPR_PRIMARY): Fixed comment.
17066
17067 1998-06-10  Tom Tromey  <tromey@cygnus.com>
17068
17069         * Make-lang.in (java): Added gjavac and jvgenmain.
17070         (java.start.encap): Depend on gjavac.
17071         (java.rest.encap): Depend on jvgenmain.
17072
17073         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
17074         (JAVA_CROSS_NAME): Likewise.
17075         (java.all.build): Depend on jvgenmain and gjavac.
17076         (java.all.cross): Depend on jvgenmain and gjavac-cross.
17077         (jvgenmain$(exeext)): New target.
17078         (java.install-common): Wrote.
17079         * config-lang.in (compilers, stagestuff): Added gjavac and
17080         jvgenmain.
17081
17082 1998-06-10  Dave Brolley  <brolley@cygnus.com>
17083
17084         * lang.c (lang_decode_option): New argc/argv interface.
17085
17086 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17087
17088         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
17089         * decl.c (build_decl_no_layout): New function.
17090         * expr.c (java_lang_expand_expr): Layout declarations found in
17091         blocks before they're pushed.
17092         * jcf-parse.c (load_class): Save current line when parsing class
17093         file.
17094         (parse_source_file): Register class before expanding their
17095         methods.
17096         * lang.c (put_decl_node): Produce `null' when `void *' is
17097         processed.
17098         * lex.c (static tree wfl_op): New static global, for error report
17099         on casts.
17100         (java_init_lex): wfl_operator and wfl_op initialized
17101         here. Filename caching added for wfl_op. Return wfl_op when `(' is
17102         parsed.
17103         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
17104         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
17105         build_unresolved_array_type): New static function definitions.
17106         (build_decl_no_layout): New extern function declared.
17107         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
17108         faulty modifier exists.
17109         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
17110         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
17111         (UNARY_PLUS_EXPR): New fake operator.
17112         (struct parser_ctxt): New field osb_number.
17113         * parse.y (static tree wfl_operator): New static WFL for operator
17114         bound error messages.
17115         (DECR_TK, INCR_TK): Moved.
17116         (OP_TK): Tagged <operator>.
17117         (array_type:): Now call build_unresolved_array_type.
17118         (dim_expr:): Count the number of '[' seen.
17119         (post_increment_expression, post_decrement_expression,
17120         pre_increment_expression, pre_decrement_expression,
17121         unary_expression_not_plus_minus, unary_expression:): Actions are
17122         now building the corresponding unary expressions.
17123         (cast_expression:): Actions are now building cast expressions.
17124         (build_unresolved_array_type): New function.
17125         (create_interface): Reset the number of declared interfaces.
17126         (create_class): Likewise.
17127         (method_header): Methods declared within the scope of an interface
17128         are now implicitly set public and abstract.
17129         (java_complete_class): Variable's and parameter's type are patched
17130         with a promoted type.
17131         (declare_local_variables): Resolved non builtin types are promoted
17132         before being used to build a variable decl. Removed type patch
17133         posted on variable initialization statement.
17134         (source_start_java_method): Use build_decl_no_layout to build the
17135         decl of a parameter of incomplete type.
17136         (java_register_parsed_class): Process interfaces too. Call
17137         rest_of_decl_compilation on each processed class declarations.
17138         (java_complete_expand_methods): Don't attempt to expand things in
17139         interfaces.
17140         (java_complete_tree): Process CONVERT_EXPR, even though it always
17141         has a type. Propagate error_mark_node to node's type too. Promote
17142         method's call argument type and return error_mark_node if
17143         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
17144         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
17145         handle unary operator nodes.
17146         (build_assignment): Added comment.
17147         (print_int_node): New function.
17148         (patch_assignment): New second argument. New error handling. Use
17149         print_int_node. Handle references. Use can_cast_to_p to issue
17150         different error message according to the context and check upon
17151         the initialization of the RHS.
17152         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
17153         (operator_string): Handle more operators.
17154         (patch_binop): No longer use a function static
17155         wfl_operator. Improved error message on shift distance.
17156         (build_unaryop, build_incdec, build_cast, patch_unaryop,
17157         patch_cast): New functions.
17158
17159 1998-06-05  Per Bothner  <bothner@cygnus.com>
17160
17161         * jvspec.c:  New file.
17162         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
17163
17164         * java-tree.h (identifier_subst):  Add declaration.
17165
17166 1998-06-04  Tom Tromey  <tromey@cygnus.com>
17167
17168         * jvgenmain.c (main): Generate call to JvRunMain.
17169
17170         * class.c (make_class_data): Push value for "sync_info" field.
17171         * decl.c (init_decl_processing): Push "sync_info" field.
17172
17173 1998-06-03  Per Bothner  <bothner@cygnus.com>
17174
17175         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
17176         Java (source) name, not signature.
17177         Set TYPE_ALIGN to (at least) that of element_type.
17178
17179 1998-06-02  Per Bothner  <bothner@cygnus.com>
17180
17181         * class.c:  Moved classname-mangling-rekated code to ...
17182         * mangle.c:  ... this new file.
17183         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
17184         * Makefile.in:  Update for above changes.
17185
17186 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17187
17188         * expr.c (truthvalue_conversion): Convert integer and floating
17189         point value to their truth value.
17190         * lex.c (java_lex): Handle the `null' literal.
17191         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
17192         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
17193         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
17194         New macros.
17195
17196         * parse.y: Reorganization/documentation on token declaration.
17197         (binop_lookup[]): New added new tree codes.
17198         (relational_expression): Build corresponding binary operators.
17199         (equality_expression, conditional_and_expression,
17200         conditional_or_expression): Likewise.
17201         (java_complete_class): Fix crash in debug message.
17202         (java_complete_tree): Check initialization of method call
17203         arguments. Further bogus node evaluation to detect more error
17204         during assignments. Handles more binary operators.
17205         (patch_assignment): Use DECL_P.
17206         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
17207         code.
17208         (operator_string): Handle more case. Compacted source.
17209         (patch_binop): Changed function comment. Checking for
17210         uninitialized first operand takes the compound assignment into
17211         account and uses DECL_P. Checking for uninitialized second operand
17212         delayed to routine's end. Use macros to issue type bound error
17213         messages and issue messages on both operands if their types are
17214         different. Force fixed type into node. Handle all binary
17215         operators.
17216
17217 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17218
17219         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
17220         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
17221         build operator node and return tokens.
17222         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
17223         * parse.h (java_complete_tree): Changed returned type in prototype.
17224         (build_method_invocation, build_assignment, patch_assignment,
17225         patch_binop): New static function declarations.
17226         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
17227         BUILD_EXPR_WFL): New macros.
17228         * parse.y (enum tree_code binop_lookup[]): New static for token to
17229         TREE_CODE lookup.
17230         (%union): Parser union has new sub-structure `operator'.
17231         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
17232         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
17233         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
17234         ASSIGN_ANY_TK): Tokens tagged `operator'.
17235         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
17236         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
17237         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
17238         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
17239         (assignment_operator:): Rule tagged `operator'.
17240         (expression_statement:): Re-installed default rule.
17241         (method_invocation:): Sub rules call build_method_invocation.
17242         (postfix_expression:): Don't attempt to resolve name here. Just
17243         return an ID.
17244         (multiplicative_expression:): Sub-rules build corresponding binop
17245         expression node.
17246         (additive_expression:, shift_expression:, and_expression:,
17247         exclusive_or_expression:, inclusive_or_expression:): Likewise.
17248         (assignment:): Sub rule invoke build_assignment.
17249         (assignment_operator:): Default rules on sub rules.
17250         (force_error): Added documentation on this variable.
17251         (declare_local_variables): Build initialization calling
17252         build_assignment.
17253         (expand_start_java_method): Removed unused rtx declaration. Mark
17254         arguments as already initialized.
17255         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
17256         (java_complete_expand_methods): Don't process next method if
17257         completion of the previous one triggered errors.
17258         (java_complete_expand_method): Call source_end_java_method if no
17259         error were found during completion.
17260         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
17261         locals declaratilon. Handle names found within a class. Return
17262         error_mark_node when things aren't found.
17263         (patch_method_invocation_stmt): Return error_mark_node on failures.
17264         (patch_invoke): Removed unused local. Return the correct node.
17265         (java_complete_tree): Now returns a value. The BLOCK section binds
17266         local identifiers and the type of a BLOCK is now void. Assign the
17267         result of operand completion on COMPOUND_EXPR. Assign the
17268         encapsulated node of a WFL to the result of its completion, except
17269         when the node is an identifier. Now handle MODIFY_EXPR and several
17270         binary operators. Return error_mark_node on errors.
17271         (build_method_invocation, build_assignment, patch_assignment,
17272         build_binop, operator_string, patch_binop): New functions.
17273         * typeck.c (binary_numeric_promotion): New function.
17274
17275 1998-05-21  Per Bothner  <bothner@cygnus.com>
17276
17277         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
17278         Replace most uses of ident_subst by identifier_subst.
17279
17280         * class.c (push_class_static_dummy_field):  Removed function.
17281         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
17282         instead of looking got "class" static field.  Create that decl here.
17283         (class_identifier_node):  Removed;  no longer needed.
17284         (init_class_processing):  Don't init class_identifier_node.
17285         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
17286         Do nreverse 0 times (instead of twice) for Object and Class.
17287         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
17288
17289 1998-05-20  Per Bothner  <bothner@cygnus.com>
17290
17291         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
17292         while initializing linenumber_count and linenumber_table.
17293         Do it before init_function_start (which calls emit_line_note).
17294         * expr.c (expand_byte_code):  Don't need to clear lineno here.
17295
17296 1998-05-18  Tom Tromey  <tromey@cygnus.com>
17297
17298         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
17299         then mangle number as _N_.
17300
17301         * class.c (mangle_class_field): New function.
17302         (build_class_ref): Set assembler name of class reference using
17303         mangle_class_field.
17304         (push_class_static_dummy_field): Likewise.
17305
17306 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
17307
17308         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
17309         of assigning to TREE_CODE.  The latter method exploits a feature
17310         of GCC that is not ANSI compliant.
17311
17312 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17313
17314         * decl.c (pushdecl_force_head): New function.
17315         (pushlevel): Removed conditional printf.
17316         (complete_start_java_method): Don't enter local variable scope if
17317         function is compiled from source code.
17318         * expr.c: parse.h now included
17319         (java_lang_expand_expr): New function.
17320         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
17321         printf. Terminate buffer when doing directories.
17322         * jcf-parse.c (parse_source_file): Call lang_init_source before
17323         parsing and before code generation.
17324         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
17325         use printf if the macro is defined.
17326         * lang.c (lang_init): Install lang_expand_expr hook on
17327         java_lang_expand_expr.
17328         (java_dummy_print): New function.
17329         (lang_init_source): New function.
17330         * lex.c (java_lex): Remember location of an opening brace at the
17331         second nesting level.
17332         (java_is_eol): Unget character seen after a CR if it is EOF.
17333         * parse.h: Now includes lex.h
17334         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
17335         printf if the macro is defined.
17336         (expand_start_java_method, build_expr_block, enter_block,
17337         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
17338         New static function declarations.
17339         (pushdecl_force_head): New extern function declaration.
17340         (INCOMPLETE_TYPE_P): New macro.
17341         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
17342         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
17343         BLOCK_EXPR_ORIGIN): New macros.
17344         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
17345         DECL_SOURCE_LINE_LAST): New macros.
17346         (struct parser_ctxt): Removed field current_method_decl, redundant
17347         with the field current_function_decl. Added fields
17348         first_ccb_indent1 and pending_block.
17349         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
17350         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
17351         tagged <node>
17352         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
17353         (compilation_unit:): Cosmetic on sub rule.
17354         (type_declaration:): Cosmetic on sub rules. Added an error rule.
17355         (variable_initializer:): Installed default rule on expression:.
17356         (method_declaration:): method_header: starts a new
17357         method. method_body: installs the function body, absorbs blocks
17358         emitted for temporary variable scopings, pops function's body block
17359         and merges function's last statement lineno in DECL_SOURCE_LINE.
17360         (method_body:): Installed default rules.
17361         (block:): Call enter_block when an opening brace is seen.  Absorb
17362         scoping blocks and call exit_block when a closing brace is seen.
17363         (block_statement:): Cosmetic changes.
17364         (method_invocation:): Create WFL around CALL_EXPR node.
17365         (patch_stage): Added comment around definition.
17366         (method_header): Try to use first_ccb_indent1 as the first line of
17367         the method, so BP debug info are emitted at the first opening
17368         brace of the function. If the function has no body, use the
17369         location of the function's name. Override currently defined method
17370         name with the matching WFL so we can point redefinition errors
17371         using the location where the function's name was declared.
17372         (check_abstract_method_header): Interprets DECL_NAME as an
17373         identifier or as a WFL, accordingly.
17374         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
17375         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
17376         location and name information out of it and reinstall DECL_NAME to
17377         its original identifier node value.
17378         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
17379         function's source code).
17380         (read_import_dir): Test the value returned by find_class and issue
17381         a fatal accordingly.
17382         (declare_local_variables): Push a new block for the scope of the
17383         new variable(s) if code has been already generated at that nesting
17384         level. Pinpoint redefinition errors using the variable id
17385         WFLs. Generate initialization code if necessary. If the variable
17386         type is incomplete, register a patch on its decl.
17387         (source_start_java_method): Rewritten. Define a new block for the
17388         function's parameters. Build parameter decl out of function's
17389         arguments and register them for a patch if their types are
17390         incomplete.
17391         (expand_start_java_method): Includes the part of
17392         source_start_java_method that was pushing the parameter decls and
17393         completing the method start code.
17394         (source_end_java_method): Removed call the expand_end_bindings and
17395         poplevel (already taken care of). Reinstall function's arguments
17396         and get function's last line of code before calling
17397         expand_function_end.
17398         (java_method_add_stmt): New comment before the function's
17399         code. Complement the second operand of the current COMPOUND_EXPR
17400         if necessary.
17401         (java_complete_expand_methods): Don't generate debug info on line
17402         zero when expanding a generated constructor.
17403         (java_complete_expand_method): Set start and end line numbers for
17404         a artificially generated constructor to one and manually call
17405         enter_block and exit_block when defining it. For all methods:
17406         expand function's start calling the new expand_start_java_method
17407         and invoke java_complete_tree on the effective method's body, if
17408         any.
17409         (resolve_expression_name): Now use lookup_name_in_blocks to search
17410         local variable decls and print out an error when variables are
17411         undefined.
17412         (patch_method_invocation_stmt): Inserted comment before the
17413         function's code.
17414         (lookup_method_invoke): Chain method's arguments using chainon
17415         with the current arg list as a second argument. Inserted missing
17416         IDENTIFIER_POINTER when reporting an error on methods not found.
17417         (refine_accessible_methods_list): Don't retain constructors.
17418         (patch_arguments): Function removed.
17419         (java_complete_tree): Inserted comment before the function's
17420         code. New case for BLOCKs. Moved the WFL case a bit
17421         further. Complete function's arguments.
17422         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
17423         maybe_absorb_scoping_blocks): New functions.
17424
17425 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17426
17427         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
17428         previously set.
17429         * jcf-parse.c (parse_source_file, java_error_count): New forward
17430         and extern declarations.
17431         (java_parse_abort_on_error): Macro moved.
17432         (jcf_parse_source): fatal called if fopen fails. Now calls
17433         parse_source_file.
17434         (parse_source_file): New parse_only parameter. Reflects the
17435         elimination of the second pass.
17436         (yyparse): parse_source_file called with argument set to 0.
17437         * jcf.h (JCF_ZERO): Sets java_source to zero.
17438         * lex.c (java_init_lex): pass argument is gone. Function modified
17439         to be called once during the analysis of a file.
17440         (java_unget_unicode): Fixed typo in fatal message.
17441         (java_get_line_col): Likewise.
17442         (java_lval): Likewise. String literals no longer built during
17443         second pass.
17444         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17445         account.
17446         * parse.h (MODIFIER_WFL): New macro.
17447         (parse_check_super, parser_check_super_interface): Now return int.
17448         (parser_chain_incomplete_item, not_builtin_p,
17449         complete_method_decl): Declarations removed.
17450         (build_method_invocation_stmt, build_invoke): Renamed using the
17451         `patch' instead of `build'
17452         (register-incomplete_type, obtain_incomplete_type,
17453         java_complete_tree, java_complete_expand_method,
17454         unresolved_type_p, create_jdep_list): New function declarations.
17455         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17456         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17457         (jdep): New typedef on new struct _jdep.
17458         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17459         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17460         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17461         JDEP_RESOLVED_P): New macros.
17462         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17463         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17464         JDEP_VARIABLE): New enum values and jdep kinds.
17465         (jdeplist): New typedef on struct _jdeplist.
17466         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17467         macros.
17468         (CALL_EXPR_PRIMARY): New macro.
17469         (struct parser_ctxt): Fields java_pass, current_method_decl,
17470         method_decl_list deleted. New field jdeplist.
17471         (INCOMPLETE_P): Macro deleted.
17472         * parse.y (single_type_import_declaration:): Removed pass switch.
17473         (type_import_on_demand_declaration): Likewise.
17474         (field_declaration:): Removed pass switch on all sub rules.
17475         (class_declaration:): Call the complete_class_decl removed on
17476         class_body rules.
17477         (method_declaration:): Removed second pass switch. No longer chain
17478         methods decl when method_header reduced.
17479         (method_header:): Sub rules no longer depend on pass switch.
17480         (method_declarator:): Likewise.
17481         (method_body:): Likewise.
17482         (abstract_method_declaration:): Likewise.
17483         (block_statement:): Likewise.
17484         (local_variable_declaration:): Likewise.
17485         (argument_list:): Likewise.
17486         (method_invocation:): Likewise. Call to build_method_invocation_stmt
17487         removed. Partial CLASS_EXPR tree node built instead.
17488         (postfix_expression:): Removed pass switch on all sub rules.
17489         (java_pop_parser_context): Free classd_list content.
17490         (yyerror): Call obstrack_grow0 to finalize error message.
17491         (check_class_interface_creation): Comment modified to reflect new
17492         returned value meaning. Removed second pass switch. Return 1 if an
17493         error was found, 0 otherwise. Adjust pointer on filename if a
17494         leading path separator was found.
17495         (maybe_create_class_interface_decl): Removed first pass switch
17496         when linking the class decl to the class_list. Install a new
17497         jdep_list for the class.
17498         (add_superinterfaces): List of unresolved interfaces is
17499         gone. Unresolved interfaces are directly added to the current
17500         dependencies list.
17501         (create_interface): Second pass shortcut removed.
17502         ctpx->modifier_ctx access through MODIFIER_WFL.
17503         (create_class): Second pass shortcut removed. Call to
17504         register_incomplete_type replaces the call to
17505         parser_chain_incomplete_item.
17506         (complete_class_decl): Function removed.
17507         (duplicate_declaration_error): New way of retrieving redeclared
17508         item type.
17509         (register_fields): Call to lookup_modifier_cl replaced by
17510         MODIFIER_WFL. New way of handling unresolved type, using
17511         unresolved_type_p and obtain_incomplete_type.
17512         register_incomplete_type replaces call to parser_chain_incomplete_item.
17513         (patch_stage): New static global variable.
17514         (method_header): New way of handling unresolved type, using
17515         unresolved_type_p and obtain_incomplete_type. patch_stage used to
17516         indicates that the method decl needs to be patched.
17517         (check_abstract_method_header): Call to lookup_modifier_cl
17518         replaced by MODIFIER_WFL.
17519         (method_declarator): Incomplete argument type are registered
17520         calling register_incomplete_type. Patch on the declared method is
17521         issued in that case.
17522         (unresolved_type_p): New function.
17523         (parser_check_super_interface): New comment to reflect function's
17524         modified returned type (int). Function and has a new argument
17525         this_wfl. Call to parse_error_context uses this_wfl instead of
17526         relying on lookup_cl.
17527         (parser_check_super): Comment reflects function's new returned
17528         type (int). Function returns nonzero value on error.
17529         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17530         register_incomplete_type, jdep_resolve_class): New functions to
17531         handle incomplete types in declarations.
17532         (java_complete_class): Rewritten to work with the new incomplete
17533         type handling scheme.
17534         (complete_class_report_errors): Likewise.
17535         (complete_method_decl): Removed: it jobs is now handled by
17536         java_complete_class.
17537         (do_resolve_class): Class loaded in not already loaded and not
17538         found in Java source code.
17539         (java_check_regular_methods, java_check_abstract_methods): Don't
17540         call complete_method_decl anymore.
17541         (lookup_modifier_cl, not_builtin_p): Functions deleted.
17542         (read_import_dir): Got rid of the pass number dependency.
17543         (declare_local_variables): New handling of unresolved types (patch
17544         issued).
17545         (source_start_java_method): New parameter level. Function called
17546         with level set to 1 when argument types are potentially
17547         unresolved.  Called to complete the job with level set to 2 once
17548         types are complete.
17549         (source_end_java_method): Call to permanent_allocation
17550         removed. Waiting to be replaced by a more suitable obstack
17551         management.
17552         (java_complete_expand_methods, java_complete_expand_method,
17553         java_expand_finals): New functions.
17554         (build_method_invocation_stmt): Renamed
17555         patch_method_invocation_stmt. Extracts function call expression
17556         (wfl) and arguments (args) from CALL_EXPR tree operands.
17557         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
17558         call. Patch the function and argument operand of the CALL_EXPR
17559         tree argument.
17560         (patch_argument, java_complete_tree): New functions.
17561
17562 1998-04-20  Per Bothner  <bothner@cygnus.com>
17563
17564         Recover from missing fields and methods (i.e. error instead of fatal).
17565         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
17566         * expr.c (expand_invoke):  Recover from missing method.
17567         (expand_java_field_op):  Recover from missing field.
17568         Inline references to java.lang.{Integer,Char,...}.TYPE.
17569         * typeck.c (get_type_from_signature), java-tree.h:  New function.
17570         * class.c (add_method):  Use get_type_from_signature.
17571         (build_class_ref):  Handle a class that was not found.
17572         * typeck.c (convert):  Handle conversion to pointers (for convenience).
17573         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
17574         instead of lookup_field to handle missing fields.
17575
17576         * jcf-parse.c (process_zip_dir):  Set java_source.
17577
17578 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
17579
17580         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17581
17582 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17583
17584         * jcf-parse.c (load_class): Don't change input_filename before
17585         calling jcf_parse_source (but still do it before calling
17586         jcf_parse).
17587         (jcf_parse_source): Assign input_filename after having saved the
17588         parser context.
17589         * lex.c (java_init_lex): Chain a WFL node to the import on demand
17590         list. ctxp->modifier_ctx zeroed according to its new
17591         definition. ctxp->filename initialized. Removed
17592         JAVA_MODIFIER_CTX_UNMARK.
17593         (java_unget_unicode): Update the character based column position.
17594         (java_allocate_new_line): ref_count not used anymore. Always free
17595         ctxp->p_line. Initialize c_line->char_col to 0.
17596         (java_get_unicode): Update the character based column position.
17597         (java_lex): Use ctxp->elc to store current position in source
17598         file, at the beginning of the parsed token. Set modifier_ctx entry
17599         corresponding to the parse modifier to a WFL node. Return a WFL
17600         node when an identifier is parsed.
17601         (java_lex_error): Now uses ctxp->elc to store current position in
17602         source.
17603         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17604         * lex.h (build_wfl_node): New function definitions.
17605         (struct java_line): ref_count and next fields are gone. New field
17606         char_col.
17607         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17608         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17609         (JAVA_COLUMN_DELTA): New macro.
17610         (java_lc): New typedef on new struct _java_lc.
17611         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17612         (parse_error_context, parse_warning_context): Changed prototypes.
17613         (java_get_line_col): Added as an available global function.
17614         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17615         (IC_DECL): Replaced by macro IC_TYPE
17616         (DEPEND_WFL): New macro.
17617         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17618         wrong modifier.
17619         (exit_java_complete_class): Removed a commented out statement.
17620         (struct parser_ctxt): Added comments on fields. modifier_ctx is
17621         now an array of tree nodes. Deleted fields line_list and
17622         e_line. New field elc, to replace e_line.
17623         * parse.y (array_type:): Build WFL node.
17624         (qualified_name:): Build a single WFL node out of two. Retain
17625         the location information of the first node in the resulting node.
17626         (package_declaration:): Use package name as a WFL node
17627         (single_type_import_declaration:): Use imported name as a WFL node.
17628         (type_import_on_demand_declaration:): Use root of the imported
17629         packages as a WFL node.
17630         (field_declaration:): Removed unused local variable cl.
17631         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17632         (yyerror): New static elc. Removed static error_line, error_pos.
17633         New local code_from_source. Save ctxp->elc into elc at the first
17634         pass. Call java_get_line_col to get a string of the line where
17635         the error occurred.
17636         (debug_line): Removed static function.
17637         (parse_error_context, parse_warning_context): Parameter cl is now
17638         a WFL node. Use its value to initialize ctxp->elc.
17639         (redefinition_error): Parameter cl is now a WFL node.
17640         (parse_add_interface): New parameter wfl. No longer call
17641         lookup_cl, use wfl instead.
17642         (check_class_interface_creation): Parameter cl is now a WFL node.
17643         (maybe_create_class_interface_decl): Likewise.
17644         (add_superinterfaces): New function.
17645         (create_interface): Removed local cl, node, super_decl,
17646         super_decl_type.  Function now uses id as a WFL node. Better
17647         warning/error report on obsolete or forbidden mix of
17648         modifiers. Now calls add_superinterfaces to register interfaces.
17649         (create_class): Removed local cl, node. Local variable id is used
17650         as a WFL node. Better error report on forbidden modifier
17651         mix. Uses add_superinterfaces to register interfaces.
17652         (find_field): Argument cl is now a WFL node. Now store the WFL
17653         node of a fields that needs to be checked for their
17654         initialization.
17655         (method_header): Local variable node non longer used. Local
17656         variable id replaces cl.
17657         (check_modifiers_consistency): Local variable cl is now a WFL
17658         node.
17659         (method_declarator): Local variable cl replaced by parameter id.
17660         (parser_qualified_name): Now uses parameter name as a WFL node.
17661         (parser_check_super_interface): New parameter wfl, for achieve
17662         greater accuracy during error reports.
17663         (parser_chain_incomplete_item): New parameter named location. Used,
17664         along the decl, to construct the incomplete item node.
17665         (java_complete_class): resolve_class now uses WFL node extracted
17666         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17667         where appropriate.
17668         (complete_method_decl): Unresolved function's argument types are WFL.
17669         (resolve_class): Parameter cl is now a WFL node.
17670         (resolve_and_layout): Likewise.
17671         (do_resolve_class): Likewise. Try first to use cl and then do the
17672         lookup on the decl when calling check_pkg_class_access.
17673         (complete_class_report_errors): Use IC_TYPE in place of
17674         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17675         instead of doing a lookup over the decl.
17676         (java_check_final): Use WFL info from field tree list.
17677         (lookup_cl): Rewritten and returns a statically defined WFL node.
17678         (lookup_modifier_cl): Now uses information from WFL nodes.
17679         (process_imports): Likewise.
17680         (read_import_dir): name and cl arguments replaced by a single WFL
17681         node. Function modified accordingly.
17682         (find_in_imports_on_demand): Now uses WFL node.
17683         (check_pkg_class_access): cl argument is now a WFL node.
17684         (declare_local_variables): Fixed to use WFL nodes.
17685         (resolve_expression_name): Likewise.
17686         (build_method_invocation_stmt): name_combo argument renamed
17687         wfl. Function modified to use WFL nodes.
17688         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17689         (lookup_method_invoke): cl is now a WFL node. Added missing
17690         IDENTIFIER_POINTER to class type decl name.
17691
17692 1998-04-14  Dave Brolley  <brolley@cygnus.com>
17693
17694         * lang.c (init_parse): Now returns char* containing the filename.
17695
17696 1998-04-10  Per Bothner  <bothner@cygnus.com>
17697
17698         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
17699
17700         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
17701         * class.c (make_class_data):  If flag_assume_compiled, initial class
17702         state is CSTATE_PREPARED; make superclass and interfaces direct
17703         references, rather than constant pool indexes.
17704
17705 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17706
17707         * parser.y: Include flags.h. Removed debug variable pl.
17708         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17709         (block:): Likewise.
17710         (labeled_statement_nsi:): Generate debug info when reducing
17711         expression_statement:.
17712         (check_pkg_class_access): get_access_flags_from_decl invocation
17713         fixed for new CLASS_* flags location.
17714         (source_end_java_method): Save/restore parser context when
17715         entering/leaving this routine. Restore lineno to its right value
17716         before calling expand_end_bindings.
17717         (build_method_invocation_stmt): build_invoke called with the
17718         current line information.
17719         (build_invoke): New argument cl. Wrap the function call around a
17720         wfl node.
17721         (refine_accessible_methods_list): Changed comment, removed
17722         unnecessary code.
17723         * parse.h: Fixed typo in comments.
17724         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17725         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17726         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17727         parser_ccb_indent.
17728         * lex.c (java_lex): Record the last closing curly bracket of a
17729         function.
17730         * jcf-parse.c (jcf_parse_source): Now calls
17731         java_check_methods. Clarified comment, fixed typo.
17732
17733 1998-04-09  Dave Brolley  <brolley@cygnus.com>
17734
17735         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17736         (finish_parse): Expose for non USE_CPPLIB builds.
17737
17738 1998-04-08  Jeffrey A Law  (law@cygnus.com)
17739
17740         * lang.c (lang_print_xnode): New function.
17741
17742 1998-04-03  Per Bothner  <bothner@cygnus.com>
17743
17744         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
17745         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
17746         used to build a class's dispatch table.
17747         (make_class_data):  Generate dispatch table if flag_assume_compiled.
17748         Set dtable of class object to address of class_dtable_decl.
17749
17750         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
17751         be volatile and have side effects - generates better code.
17752
17753         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
17754         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17755
17756         * expr.c (expand_invoke):  If class is final, method is
17757         effectively final, so can call it directly.
17758
17759         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
17760
17761         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
17762
17763 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17764
17765         * parse.y (build_method_invocation_stmt): Removed extra argument
17766         to build_invoke.
17767
17768 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17769
17770         * expr.c (dtable_indent): Now static global.
17771         (expand_invoke): Now call invoke_build_dtable and
17772         build_invokevirtual.
17773         (invoke_build_dtable, build_invokevirtual): New functions.
17774         * jcf-io.c (find_class): Defer issuing a warning by setting
17775         jcf->outofsynch to 1.
17776         * jcf-parse.c (jcf_out_of_synch): New function.
17777         (load_class): Test this_jcf.outofsynch flag and call
17778         jcf_out_of_synch accordingly.
17779         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17780         comment indentation.
17781         * lex.c (java_get_unicode): Fixed code indentation.
17782         (java_lex): Create string literal. Fixed typo. Removed several
17783         premature obstack_free.
17784         * parse.h: New enums for name resolution and invocation mode.
17785         (struct qualification): New data structure.
17786         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17787         (do_resolve_class, build_method_invocation_stmt,
17788         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17789         debug_line, identical_subpath_p, invocation_mode,
17790         refine_accessible_methods_list, build_invoke,
17791         lookup_method_invoke): New functions declared.
17792         (build_invokevirtual, invoke_build_dtable, match_java_method,
17793         build_field_ref, jcf_out_of_synch): New references to external
17794         functions.
17795         (struct parse_ctxt): Removed artificial_constructor field.
17796         * parse.y: (array_type:): Type defined for this rule.
17797         (class_type:): Installed default rule for interface_type:.
17798         (array_type:): Now build Java array type.
17799         (qualified_name:): Now use obstack_grow0.
17800         (method_declaration:): Skip the artificial constructor added to
17801         the list, if any.
17802         (abstract_method_declaration:): Execute the code only during pass 1.
17803         (block:): Installed default rule in block_statements:.
17804         (block_statement:): Add the statement to the method during pass 2.
17805         (statement_expression): Installed default rule for
17806         method_invocation:.
17807         (argument_list:): Added code to build the argument list.
17808         (method_invocation:): Added call to create the method invocation
17809         node.
17810         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17811         (debug_line): New function for debug.
17812         (complete_class_decl): No longer do something during pass 1.
17813         (method_header): Use BUILD_PTR_FROM_NAME.
17814         (parser_qualified_classname): Use obstack_grow0. Removed bogus
17815         obstack_free.
17816         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17817         function's main comment.
17818         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17819         classes.
17820         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17821         (resolve_class): Now works with arrays.
17822         (do_resolve_class, resolve_and_layout): New functions.
17823         (java_check_regular_methods): Reverse method list before and after
17824         having processed it. No longer set ctxp->artificial_constructor.
17825         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17826         accordingly. Fixed typo in issued error message. Now use
17827         obstack_grow0.
17828         (find_in_imports_on_demand): Now use obstack_grow0.
17829         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17830         (source_end_java_method): Call expand_expr_stmt instead of
17831         expand_expr. Calls it before calling expand_function_end.
17832         (java_method_add_stmt): Do nothing if errors were found during
17833         parsing.
17834         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17835         (build_method_invocation_stmt, build_invoke, invocation_mode,
17836         lookup_method_invoke, refine_accessible_methods_list,
17837         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17838         New functions.
17839         * typeck.c (build_java_signature): Properly end method signature
17840         if return type skipped.
17841         (match_java_method): New function.
17842
17843 1998-03-16  Per Bothner  <bothner@cygnus.com>
17844
17845         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
17846
17847 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17848
17849         * expr.c (build_invoke_non_interface): New function.
17850         (methods_ident, ncode_ident): Now static globals.
17851         (expand_invoke): Use build_invoke_non_interface.
17852         * java-tree.h (struct lang_decl): New field function_decl_body.
17853         (DECL_FUNCTION_BODY): New macro.
17854         * jcf-parse.c (jcf_parse_source): Deeper check before setting
17855         CLASS_FROM_SOURCE_P.
17856         (parse_source_file): Fixed typos. Call java_layout_parsed_class
17857         before starting pass 2. Call to java_generate_parsed_class replaced
17858         by java_register_parsed_class.
17859         * lex.c: Fixed typo in header. Some line width related formating.
17860         * lex.h: Some line width related formating.
17861         * parse.h (source_end_java_method, resolve_expression_name,
17862         complete_class_decl, maybe_create_class_interface_decl,
17863         check_class_interface_creation): New static function declarations.
17864         (java_layout_parsed_class, java_method_add_stmt): New function
17865         declarations.
17866         (struct parser_ctxt): Field mark_class_generate removed. New
17867         fields class_list and artificial_constructor.
17868         * parse.y: Fixed typo in header.
17869         (class_declaration:): Call complete_class_decl when class body
17870         parsed.
17871         (method_declaration:): Call source_end_java_method in pass 2 when
17872         the method body is defined.
17873         (postfix_expression:): Do expression name resolution on sub-rule
17874         name during pass 2.
17875         (create_class, create_interface): Merged common pieces.
17876         (check_class_interface_creation, maybe_create_class_interface_decl):
17877         New functions.
17878         (complete_class_decl): New function.
17879         (register_fields): Fixed line width related typo.
17880         (method_header): Correctly skip first argument when fixing
17881         argument line. Changed the loop.
17882         (java_check_circular_reference): Now use ctxp->class_list.
17883         (java_complete_class): Removed start/stop marking.
17884         (java_check_regular_methods): Now takes a class decl as an
17885         argument.  Add default constructor if none were encountered.
17886         (java_check_methods): Now use ctxp->class_list. Changed call to
17887         java_check_regular_methods.
17888         (source_start_java_method): Set DECL_ARG_TYPE for each function
17889         arguments.
17890         (source_end_java_method, java_method_add_stmt): New functions.
17891         (java_generate_parsed_class): No longer exists.
17892         (java_layout_parsed_class, java_register_parsed_class): New functions.
17893         (resolve_expression_name): New function.
17894
17895 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17896
17897         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17898         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17899         until pass initializations are done. Call read_import_dir with
17900         pass set to 0.
17901         * parse.h: (lookup_modifier_cl): New function declared.
17902         (INTERFACE_FIELD_MODIFIERS): New macro.
17903         (OBSOLETE_MODIFIER_WARNING): New macro.
17904         * parse.y: (register_fields): Class type and current field name in
17905         local variables. Check modifier(s) if adding field(s) to an interface.
17906         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17907         and report errors using the faulty modifier line context.
17908         (lookup_modifier_cl): New function.
17909         (read_import_dir): Detect and report default import processing
17910         failure.
17911
17912 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
17913
17914         Add a pair of -fassume-compiled/-fno-assume-compiled options.
17915         * class.c (is_compiled_class): Return 1 after making sure it
17916         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17917         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17918         * java-tree.h (flag_assume_compiled): Add decl.
17919         * lang.c (lang_f_options): Add the flag.
17920         (flag_assume_compiled): Add decl, default to 0.
17921
17922 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17923
17924         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17925         (is_compiled_class): Likewise.
17926         (layout_class): Likewise.
17927         (layout_class): Detect and lay out classes defined in source code.
17928         (interface_of_p, add_interface_do, may_add_interface): New
17929         function.
17930         (add_interface): Now use add_interface_do.
17931         (add_method_1): New function.
17932         (add_method): Now use add_method_1.
17933         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17934         (complete_start_java_method): New function.
17935         (start_java_mehod): Now call complete_start_java_method.
17936         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17937         (expand_invoke): Likewise and fixed typo.
17938         *gjava.c: (print_super_field): Use new argument to find_class
17939         DO_CLASS_FILE.
17940         (main): Likewise.
17941         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17942         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17943         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17944         IDENTIFIER_NODE.
17945         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17946         (add_method_1, push_class): New prototypes.
17947         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17948         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17949         directory where the class was found.
17950         (find_class): New argument DO_CLASS_FILE. Function find_class
17951         modified accordingly.
17952         *jcf-parse.c: (fix_class_path): New function.
17953         (load_class): Use new VERBOSE argument. load_class now finds and
17954         loads/parses .class/.java files. Save read_state of current_jcf
17955         if necessary.
17956         (java_parser_abort_on_error): New macro.
17957         (jcf_parse_source, parse_source_file): New function.
17958         (jcf_parse): Fixed typo.
17959         (yyparse): Call parse_source_file () only.
17960         (process_zip_dir): Fixed typo, fix zdir->filename_length when
17961         writing the real class name back in the zip directory entry.
17962         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17963         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17964         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17965         (find_class): Prototype fixed.
17966         *lex.c: Added 1998 time stamp.
17967         Removed all static global variables, moved into the parser
17968         context data structure.. Now include unistd.h if SEEK_SET not
17969         defined.
17970         (java_init_lex): Rewritten.
17971         (java_sneak_unicode): Modified current unicode access in current line.
17972         (java_unget_unicode): Likewise.
17973         (java_allocate_new_line): New allocation management.
17974         (java_read_char): Modified access and storage of unget_utf8_value.
17975         New way of processing current unicode.
17976         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17977         (java_get_unicode): Now use the parser context.
17978         (java_lineterminator): Likewise.
17979         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17980         of the reentrant parser implementation. Function now use the
17981         parser context data structure and java_lval. Fixed production of
17982         the float and double constant "out of range" error message. Fixed
17983         obstack use. Return integer value when hitting a modifier. Now
17984         return type for TRUE, FALSE and other predefined types. Return
17985         identifier as a TREE_LIST list containing the current line context
17986         as the TREE_VALUE sub-node.
17987         (java_unicode_2_utf8): Fixed typo in declaration.
17988         (java_lex_error): Now use the parser context data structure.
17989         *lex.h: Added 1998 time stamp.
17990         (struct java_line): New fields ref_count and next.
17991         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17992         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17993         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17994         *parse.h: Added 1998 time stamp.
17995         (java_parse_source_file): Renamed from parse_source_file.
17996         (YYERROR_NOW, YYNOT_TWICE): Fixed.
17997         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17998         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17999         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
18000         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
18001         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
18002         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
18003         (struct parser_ctxt): New data structure to keep the parser context.
18004         *parse.y: Added 1998 time stamp, got rid of static global variables.
18005         (java_error_count, ctxp): New global variables.
18006         (%union): New value field.
18007         (numeric_type, integral_type): Rules removed.
18008         (primitive_type): Rule defined to handle integral, float, double and
18009         boolean types.
18010         (qualified_name, package_declaration,
18011         single_type_import_declaration, type_import_on_demand_declaration,
18012         modifiers, class_declaration, super, interfaces,
18013         interface_type_list, class_body, field_declaration,
18014         field_declaration, variable_declarators, variable_declarator,
18015         variable_declarator_id, method_declaration, method_header,
18016         formal_parameter_list, formal_parameter, method_body, block,
18017         static, interface_declaration, extends_interfaces,
18018         abstract_method_declaration, local_variable_declarators): Rules now
18019         define actions.
18020         (force_error, do_warning): New global statics.
18021         (push_parser_context, parser_context_save_global,
18022         parser_context_restore_global, pop_parser_context): New functions.
18023         (yyerror): Now uses the global parser context. Fixed use of obstack.
18024         (parse_error, parse_error_context, parse_warning_context,
18025         java_accstring_lookup, redefinition_error, check_modifiers,
18026         parser_add_interface, create_interface, create_class, find_field,
18027         duplicate_declaration_error, register_fields, method_header,
18028         check_modifiers_consistency, check_abstract_method_header,
18029         method_declarator, parser_qualified_classname,
18030         parser_check_super_interface, parser_check_super,
18031         parser_chain_incomplete_item, java_check_circular_reference,
18032         layout_class_from_source, java_complete_class,
18033         complete_method_decl, resolve_class, complete_class_report_errors,
18034         java_check_final, check_method_redefinition,
18035         java_check_regular_methods, java_check_abstract_methods,
18036         java_check_methods, lookup_java_interface_method2,
18037         lookup_java_method2, lookup_cl, find_name_in_single_imports,
18038         process_imports, find_in_imports, read_import_entry,
18039         read_import_dir, find_in_imports_on_demand,
18040         check_pkg_class_access, not_builtin_p, declare_local_variables,
18041         source_start_java_method, java_generate_parsed_class): New
18042         functions.
18043         *typeck.c: (signature_include_return): New global variable.
18044         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
18045         to add the function returned type in the signature.
18046
18047 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
18048
18049         * jcf-io.c (open_in_zip): Use strncmp and LEN.
18050
18051 1998-01-29  Dave Brolley  <brolley@cygnus.com>
18052
18053         * Make-lang.in (java.info): Added.
18054         (java.install-info): Added
18055
18056 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
18057
18058         * Makefile.in (clean): Also remove java/parse.c.
18059
18060 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
18061
18062         Add a pair of -fbounds-check/-fno-bounds-check options.
18063         * lang.c (lang_decode_option): Add code to grok arguments.
18064         (flag_bounds_check): Add decl.
18065         (lang_f_options): New array w/ the option in it.
18066         * java-tree.h (flag_bounds_check): Add decl.
18067         * lang-options.h: New file.
18068         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
18069         of a static macro value.
18070         (JAVA_ARRAY_EXCEPTION): Delete macro.
18071
18072 1998-01-23  Per Bothner  <bothner@cygnus.com>
18073
18074         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
18075         * expr.c (build_anewarray):  Add missing promote_type.
18076
18077 1998-01-22  Per Bothner  <bothner@cygnus.com>
18078
18079         Add array types with known length to optimize bounds checking.
18080         * typeck.c (build_java_array_type):  Take length parameter.
18081         (java_array_type_length, build_prim_array_type):  New functions.
18082         * java-tree.h:  Update for new functions.
18083         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
18084         * class.c:  Use build_prim_array_type.
18085         * expr.c (can_widen_reference_to):  Handle known-length array types.
18086         (verify_jvm_instructions):  Keep track of integer push instructions
18087         followed by newarray/anewarray, so we can build known-length arrays.
18088         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
18089         (java_array_data_offset):  New function.
18090         (build_java_array_length_access):  New function.  Optimize if constant.
18091         (build_java_arrayaccess):  Constant fold bounds check.
18092         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
18093         (build_newarray, build_anewarray):  New functions.
18094         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
18095         * verify.c (merge_types):  Handle known-lengh array types.
18096
18097 1998-01-19  Per Bothner  <bothner@cygnus.com>
18098
18099         * expr.c (expand_byte_code):  Fix performace bug, which caused
18100         searching linenumber_table to be linear rather than constant.
18101
18102 1997-12-12  Per Bothner  <bothner@cygnus.com>
18103
18104         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
18105
18106         * decl.c, java-tree.h (soft_fmod_node):  New global.
18107         * decl.c (init_decl_processing):  Define __builtin_fmod.
18108         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
18109         using __builtin_fmod.
18110
18111 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18112
18113         * keyword.h: New file, output of keyword.gperf as processed by
18114         gperf.
18115         * lex.c (java_lex_init): Initialize java_error_flag.
18116         * parse.c (YYERROR_NOW): Uses java_error_flag.
18117         * parse.y: New static java_error_flag. Useless definition of
18118         buffer_error gone.
18119         * parse.y (java_error): Portable error recovery using
18120         java_error_flag (not yet completely tuned).
18121
18122 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
18123
18124         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
18125
18126 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18127
18128         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
18129         (parse.c, lex.c, keyword.h): New rules for Java source code
18130         front-end.
18131         * parse.c: Renamed into jcf-parse.c.
18132         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
18133         * keyword.gperf: New file, Java keywords.
18134         * parse.y: New file, Java language grammar.
18135         * parse.h: New file, Java language grammar definitions.
18136         * lex.c: New file, Java language lexer.
18137         * lex.h: New file, Java language lexer definitions.
18138
18139 1997-12-03  Per Bothner  <bothner@cygnus.com>
18140
18141         * decl.c (clinit_identifier_node), java-tree.h:  New global.
18142         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
18143         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
18144         * expr.c (expand_java_field_op):  Check for invalid assignment
18145         to final field.
18146
18147         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
18148
18149 1997-10-27  Per Bothner  <bothner@cygnus.com>
18150
18151         * verify.c (verify_jvm_instructions):  When processing a handler,
18152         attempt to set the current_subr to the right value.
18153         (More complicated code combines Sep 17 and Oct 22 versions.)
18154
18155 1997-10-24  Per Bothner  <bothner@cygnus.com>
18156
18157         * class.c (push_class):  Figure out (guess) name of source file.
18158         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
18159         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
18160         (parse_class_file):  Change return type from int to void.
18161         Call debug_start_source_file/debug_end_source_file.
18162
18163         * expr.c (build_java_binop):  Fix masking 2nd operand.
18164         * decl.c (init_decl_processing):  Set sizetype first.
18165
18166 1997-10-22  Per Bothner  <bothner@cygnus.com>
18167
18168         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
18169         (Revert Sep 17 change.)
18170
18171 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18172
18173         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
18174         .class extension in their name and fix thing so we don't process
18175         them parse_zip_file_entries().
18176         (parse_zip_file_entries): Cleaned unused local variables.
18177
18178 1997-10-20  Per Bothner  <bothner@cygnus.com>
18179
18180         * expr.c (can_widen_reference_to):  Allows equal array element types.
18181         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
18182         * jcf-dump.c (RET):  Get (and print) index.
18183
18184         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
18185         Promote element type to POINTER_TYPE.
18186
18187 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18188
18189         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
18190         find_in_current_zip, jcf_figure_file_type): Moved from
18191         jcf-reader.c to parse.c.
18192         * zextract.c: (read_zip_archive): takes file_comment_length possible
18193         field into account.
18194
18195 1997-10-20  Per Bothner  <bothner@cygnus.com>
18196
18197         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
18198
18199         * verify.c (merge_types):  Handle array types even better ...
18200
18201 1997-10-17  Per Bothner  <bothner@cygnus.com>
18202
18203         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
18204
18205         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
18206         * class.c (make_class_data):  Don't build fields_decl if no fields.
18207         When building fields_decl, skip if DECL_ARTIFICIAL.
18208
18209         * expr.c (java_stack_swap):  Update stack_type_map.
18210         * verify.c (merge_types):  Handle array types better.
18211
18212 1997-10-15  Per Bothner  <bothner@cygnus.com>
18213
18214         * class.c (add_field):  Don't promote short integral fields to
18215         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
18216         * expr.c (push_value):  Promote and convert short integral values.
18217
18218         * decl.c, java-tree.h (integer_two_node):  New constant node.
18219         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
18220
18221 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18222
18223         * class.c (append_gpp_mangled_type): Use function argument
18224         unpromoted type to generate mangled name.
18225
18226 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18227
18228         * constants.c (build_constant_data_ref): Now uses current_class
18229         instead of main_class.
18230         (build_constants_constructor): Now uses current_class instead of
18231         main_class.
18232         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
18233         of the global variable SeepZipFiles done here.
18234         * zextract.c (read_zip_archive): extra_field optional field taken
18235         into account while computing the position of the class file in the
18236         archive.
18237         * verify.c (verify_jvm_instructions): Use current_jcf to search
18238         the constant pool.
18239         * parse.c (load_class): First search for the class to load in the
18240         current zip file. Saves current_jcf (restored before returning
18241         from that function). Don't call JCF_FINISH in the class was found
18242         in the current ZIP file.
18243         (jcf_parse): If the class was found in the current ZIP file, save
18244         its tree_constant_pool (for later reuse).
18245         (parse_class_file): New function. Process each method defined in
18246         the current class and record the class as to be later registered.
18247         (yyparse): Rewritten. Figure the type of the current file and switch
18248         accordingly.
18249         * lang.c: New global variable current_jcf.
18250         (lang_init): Removed compiling_from_source test (done later, in
18251         yyparse). Removed call the jcf_parse ().
18252         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
18253         (typedef struct JCF): New fields seen_in_zip (to mark a class found
18254         in the current ZIP file) and zip_offset (offset to the class data in
18255         the current zip file).
18256         * jcf-reader.c: zipfile.h included.
18257         localToFile: New ZipFileCache static global variable
18258         (parse_zip_file_entries): New function. Browse the current ZIP
18259         file directory and process each class found.
18260         (process_zip_dir): New function. Register each class found in the
18261         ZIP file directory. The class aren't parsed but a valid JCF is
18262         link to each of them.
18263         (find_in_current_zip): New function. Search for a class in the
18264         current ZIP file directory. If found, prepare the class so that it
18265         can be loaded.
18266         (jcf_figure_file_type): New function. Examine the file structure
18267         to figure a class file, a ZIP file. If none of these categories are
18268         matched, a source file is assumed.
18269         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
18270         SeenZipFile: New global variable.
18271         (open_in_zip): Use zipmember's length to accelerate the search for
18272         a member. If zipmember was NULL and zip file successfully read,
18273         return 0.
18274         * java-tree.h: New global variable current_jcf declared.  Added
18275         declaration for current_constant_pool_tags, current_constant_pool_data,
18276         current_constant_pool_length, current_constant_pool_data_ref.
18277         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
18278         store the JCF of classes seen in a zip file) and tree *constant_pool
18279         (to save a loaded class constant pool). current_class declared here.
18280         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
18281         retrieve method_ref_constant.
18282         (PUSHC): java_push_constant_from_pool now uses current_jcf.
18283         (OBJECT): get_class_constant now uses current_jcf.
18284         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
18285         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
18286         (expand_invoke): Now uses current_class instead of main_class
18287         (build_class_init): Now uses current_class instead of main_class
18288         * class.c: New static global variable registered_class.
18289         (register_class): New function.
18290         (emit_register_class): Modified to use registered_class instead of
18291         main_class
18292         (is_compiled_class): Now take into account class seen in the archive.
18293
18294 1997-10-06  Per Bothner  <bothner@cygnus.com>
18295
18296         * except.h:  Renamed to: java-except.h.
18297         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
18298         * except.c:  Add semi-working (commented out) implementation.
18299
18300         * expr.c (expand_iinc):  Add needed flush_quick_stack.
18301         * parse.c (set_source_filename):  New function.
18302         (give_name_to_class):  Set input_filename from package.classname.java.
18303
18304         * jcf-io.c (find_class):  Don't look first in ".".
18305
18306 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18307
18308         * zextract.c (read_zip_archive): Now takes into account the
18309         extra_field field.
18310         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
18311
18312 1997-09-20  Per Bothner  <bothner@cygnus.com>
18313
18314         * constants.c, java-tree.h (build_internal_class_name):  New function.
18315         (alloc_class_constant):  Re-implement using build_internal_class_name.
18316         * class.c (make_class_data):  Likewise.
18317         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
18318
18319 1997-09-17  Per Bothner  <bothner@cygnus.com>
18320
18321         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
18322         to NULL before pushing an exception handler target.
18323
18324         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
18325         (java_stack_swap, java_stack_dup):  Re-write to be safe from
18326         clobbering registers.
18327         (build_class_init):  New function.
18328
18329 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18330
18331         * typeck.c (build_java_array_type): Temporary use
18332         permanent_obstack to create the array 'length' field.
18333         * expr.c (lookup_label): Temporay use permanent_obstack to create
18334         label if not found.
18335         * class.c (push_super_field): Tempory use permanent_obstack.
18336
18337 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18338
18339         * typeck.c (type_for_mode): Now handles double_type_node and
18340         float_type_node.
18341         * verify.c (verify_jvm_instructions): The instruction following
18342         the wide bytecode is checked. OPCODE_ret added to the list of
18343         wide.
18344
18345 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18346
18347         * class.c (make_class): Temporary use permanent_obstack. Set the
18348         class CLASS_P field to 1.
18349         (push_class): Temporary use permanent_obstack.
18350         (set_super_info): Temporary use permanent_obstack.
18351         (add_method): Temporary use permanent_obstack, set
18352         METHOD_TRANSIENT().
18353         (add_field): Temporary use permanent_obstack. Sets
18354         FIELD_VOLATILE() and FIELD_TRANSIENT().
18355         (build_class_ref): Temporary use permanent_obstack if the class
18356         isn't compiled.
18357         (build_static_field_ref): Temporary use permanent_obstack when
18358         creating field's rtl.
18359         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
18360         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
18361         and fields. Function finalized, as far as flag handling.
18362         (push_class_static_dummy_field): Temporary use permanent_obstack.
18363         (emit_register_class): Force generation of class registration at
18364         -O3 or deeper.
18365         * decl.c (end_java_method): Call permanent_allocation() before
18366         returning.
18367         * expr.c (can_widen_reference_to): Added comment to interface
18368         handling, fixed typo.
18369         (lookup_field): Now uses CLASS_P() to correct FIXME
18370         (expand_invoke): Verification on public && !static &&
18371         !abstract moved into soft_lookupinterfacemethod (kaffe).
18372         Use Object class dtable if objectref is an array when expanding
18373         invokeinterface.
18374         (java_push_constant_from_pool): Temporary use permanent_obstack
18375         for CONSTANT_string
18376         * parse.c (get_ref_constant): Temporary use permanent_obstack to
18377         create constant references.
18378         (get_constant): Temporary use permanent_obstack to create constant.
18379         (load_class): Temporary use permanent_obstack to load class.
18380         (jcf_parse): Temporary use permanent_obstack to perform class
18381         layout.
18382         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
18383         (build_java_signature): Temporary use permanent_obstack.
18384         * verify.c: (verify_jvm_instruction): removed unnecessary verification
18385         on ACC_SUPER flag.
18386         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
18387         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
18388         (CLASS_P): Defined
18389
18390 1997-09-11  Per Bothner  <bothner@cygnus.com>
18391
18392         * class.c (append_gpp_mangled_type):  Fix typo.
18393         (emit_register_class):  Use main_class to get class object, rather
18394         than looking for no-longer-existing static decl starting with _CL.
18395         * typeck.c (parse_signature_type):  Promote array element type
18396         if it is a RECORD_TYPE.
18397
18398 1997-09-10  Per Bothner  <bothner@cygnus.com>
18399
18400         * class.c (push_class_static_dummy_field):  New function.
18401         (mangle_static_field):  New. Do G++-style mangling of static fields.
18402         (layout_class):  Mandle static fields here, not in add_field.
18403         (build_class_ref):  The class object is now a dummy static field.
18404         * decl.c (find_local_variable):  Look for best, instead of first match.
18405         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
18406         (build_java_athrow):  Don't check here if exception is Throwable.
18407         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
18408         (TYPE_USED):  Removed.  No longer used ...
18409         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
18410         * verify.c (push_pending_label):  New function.
18411         (push_pending_block):  Renamed to check_pending_block.
18412         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
18413         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
18414         re-checking possible handlers) after a store (less wasted work).
18415         Check for null handler (finally) before calling add_handler.
18416         Various changes to (finally?) correctly handle try/finally.
18417
18418 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
18419
18420         * class.c: Include stdio.h.
18421
18422 1997-09-04  Per Bothner  <bothner@cygnus.com>
18423
18424         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
18425         to make sure class is initialized before static/special invoke.
18426
18427         * verify.c (verify_jvm_instructions):  On a store instruction,
18428         call find_local_variable to force pre-allocation of decl and rtx.
18429         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
18430
18431 1997-09-03  Per Bothner  <bothner@cygnus.com>
18432
18433         * class.c (build_class_ref):   Strip off "promoted_" if need be.
18434         (make_field_value): Call build_java_signature when needed.
18435         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
18436         * expr.c (build_java_athrow):  Don't push_value of exception.
18437         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18438         match specification of [fd]cmp[lg] for NaNs.
18439         (expand_byte_code):  Add support for exception handler ranges.
18440         * except.c:  Add skeleton for EH code-generation.
18441         * verify.c (merge_types):  Treat all promoted integral types as equal.
18442         * constants.c (build_constants_constructor):  To force creation of
18443         current_constant_pool_data_ref, call build_constant_data_ref.
18444
18445         * javaop.def (lload):  Fix typo.
18446         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
18447
18448 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
18449
18450         * parse.c: Don't include function.h.
18451
18452 1997-08-27  Per Bothner  <bothner@cygnus.com>
18453
18454         * except.[ch]:  New files.
18455         * Makefile.in (JAVA_OBJS):  Add except.o
18456         * expr.c:  Temporary warning about unimplemented exceptions.
18457         * verify.c:  Verify exception handlers.
18458
18459         * jcf-dump.c (disassemble_method):  Print exception table.
18460
18461 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18462
18463         * expr.c (verify_jvm_instructions): Started a thorough
18464         verification of invoke* bytecodes.
18465         (expand_byte_code): flush quick stack if PC is the target of a
18466         branch.  and undef RET (conflicting with config/i386/i386.h).
18467         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18468         used.
18469         (expand_invoke): Now handles invokeinterface and do more
18470         verification according to the bytecode.
18471         (lookup_field): Don't try to load the class if processing
18472         dtable_type.
18473         (can_widen_reference_to): Now handles interfaces.
18474         * decl.c (init_decl_processing): New global variable
18475         soft_lookupinterfacemethod_node, declared in java-tree.h.
18476         Call set_super_info on string_type_node.
18477         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18478         defined.
18479         * class.c (set_super_info): Fills the CLASS_* flags according to
18480         access_flags.
18481         (get_access_flags_from_decl): Handles all class flags.
18482
18483 1997-08-26  Per Bothner  <bothner@cygnus.com>
18484
18485         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
18486         * parse.c (yyparse):  Check for abstract method, and missing code.
18487         * expr.c (expand_byte_code):  Change interface.
18488         * lang.c (put_decl_node):  Print promoted types prettier.
18489         * verify.c (verify_jvm_instruction):  Change interface.
18490         Partial support for scanning exception table.
18491         For load instructions, handle promoted integral types.
18492
18493 1997-08-21  Per Bothner  <bothner@cygnus.com>
18494
18495         * verify.c:  New file, with contents moved from expr.c.
18496         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
18497         * typeck.c (is_array_type_p):  Moved here from expr.c.
18498         * java-tree.h:  Add some now-needed function declarations.
18499         * Makefile.in (JAVA_OBJS): Added verify.o.
18500
18501 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18502
18503         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18504         METHOD_ABSTRACT flag.
18505
18506         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18507         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18508         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18509
18510         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18511         variables.
18512         (start_java_method): Hook for SYNCHRONIZED methods.
18513
18514         * expr.c (build_java_jsr, build_java_ret): New functions
18515         (JSR,PRE): New macros
18516         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18517         (verify_jvm_instructions): tableswitch, lookupswitch,
18518         monitorenter, monitorexit, goto_w: verified.
18519         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18520         (build_java_monitor): New function.
18521         (MONITOR_OPERATION): Modified to call build_java_monitor()
18522         (verify_jvm_instructions): Started a thorough verification of
18523         invoke* bytecodes.
18524
18525 1997-08-19  Per Bothner  <bothner@cygnus.com>
18526
18527         Support verification of jsr/ret subroutines (used for try/finally).
18528         * decl.c (return_address_type_node):  New type node.
18529         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18530         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18531         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
18532         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18533         TYPE_USED):  New macros for special types in type_map.
18534
18535         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
18536         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
18537         BCODE_JUMP_TARGET.
18538         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
18539
18540         * expr.c (can_widen_reference_to):  New function.
18541         (pop_type):  Use it.
18542         (merge_type_state):  Support handling start of subroutine.
18543         (push_pending_block):  Return char* error message, instead of calling
18544         fatal on an error.  Also handle subroutines.
18545         (verify_jvm_instructions):  Handle errors from push_poending_block.
18546         Support jsr and ret instructions.
18547
18548 1997-08-19  Per Bothner  <bothner@cygnus.com>
18549
18550         * jcf-io.c (find_classfile):  Fix thinko.
18551         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
18552
18553 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
18554
18555         * Makefile.in (BISON): Remove.
18556
18557 1997-08-07  Per Bothner  <bothner@cygnus.com>
18558
18559         * Makefile.in:  Convert to autoconf.
18560         * config-lang.in (outputs):  Added java/Makefile.
18561
18562         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
18563         Rename cc1java to jc1.
18564
18565         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
18566         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
18567
18568         * class.c (class_depth):  Do load_class if needed.
18569
18570         Mostly better verification.
18571         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
18572         (init_decl_processing):  Change return type of soft_checkcast.
18573         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
18574         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18575         lang_print_error):  New functions.
18576         (lang_init):  Set global hook print_error_function to lang_print_error.
18577         * expr.c:  In the type_map ptr_type_node is only used for null now.
18578         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
18579         (merge_types):  Dererence pointer to record types before comparing.
18580         (decode_newarray_type, merge_types):  On error just return NULL.
18581         (build_java_binop):  Add preliminary implementation (with warning)
18582         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18583         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
18584         (expand_compare, expand_java_goto, expand_java_call):  Don't
18585         push_pending_block, since that only makes sense when verifying.
18586         (merge_type_state):  Different return codes.
18587         (push_pending_block):  A block may need to be verified more than once.
18588         (expand_byte_code):  Warn about unused code at code generation time.
18589         (verify_jvm_instruction):  Changed logic, since code may need to be
18590         re-verified if type-state has changed.  Also, better error handling.
18591         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18592         Improve newarray, anewarray, ?aload, athrow,
18593         * java-tree.h (LABEL_CHANGED):  New macro.
18594
18595 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18596
18597         * decl.c (soft_athrow_node): New global variable initialized.
18598         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18599         * typeck.c (convert): Added support for REAL_TYPE.
18600         (convert_to_char): New function.
18601         (convert): Handle CHAR_TYPE.
18602         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18603         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18604         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18605         promoted type.
18606         (verify_jvm_instructions): Added break a the end of bogus unop: label.
18607         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18608         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18609         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18610         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18611         to Use The Right Things.
18612         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18613         compatible with INT. BOOLEAN is made equivalent to BYTE.
18614         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18615         OPCODE_ifnonnull): Now supported.
18616         (build_java_athrow): New function.
18617
18618 1997-08-04  Per Bothner  <bothner@cygnus.com>
18619
18620         Rename method name <init> to match G++ (and fix mangling).
18621         * class.c (layout_class):  Replace method name of <init> by class name.
18622         (make_method_value):  Do inverse renaming of constructor from <init>.
18623         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
18624         * typeck.c (lookup_java_constructor):  New function.
18625         * expr.c (expand_invoke):  If method_name is <init>, call
18626         lookup_java_constructor to find constructor.
18627
18628         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
18629
18630 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18631
18632         * parse.c (get_class_constant): Modified to handle array "classes"
18633         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18634         wide type.
18635         (convert): Modified to handle real type.
18636         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18637         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18638         variables declared.
18639         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18640         soft_multianewarray, soft_newarray_node, soft_throw_node): New
18641         global variables initialized.
18642         (find_local_variable): Handles the case of a pointer
18643         (end_java_method): Restore the use of one more scope
18644         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18645         build_java_array_length_access, expand_java_arrayload,
18646         expand_java_arraystore, expand_java_array_length,
18647         expand_java_multianewarray, expand_java_anewarray,
18648         build_java_check_indexed_type, is_array_type_p,
18649         build_java_throw_out_of_bound_exception): New functions.
18650         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18651         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18652         OPCODE_<t>aload): Implemented code for verification.
18653         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18654         ARRAY_NEW_MULTI): Macro defined.
18655         (CONVERT): Modified to invoke convert().
18656         (case OPCODE_aload2): Fixed index typo from 2 to 1.
18657
18658 1997-07-31  Per Bothner  <bothner@cygnus.com>
18659
18660         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
18661         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
18662         (make_class_data):  Field name needs '/' as package prefix.
18663         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
18664
18665 1997-07-25  Per Bothner  <bothner@cygnus.com>
18666
18667         Implement debug information for local variables.
18668         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18669         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18670         DECL_LOCAL_SLOT_CHAIN):  New macros.
18671         (struct lang_decl_var):  New type.
18672         * parse.c (give_name_to_locals):  Move to decl.c.
18673         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
18674         (start_java_method):  Re-write parameter handling.
18675         (pending_local_decls):  New global variable.
18676         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
18677         (find_local_variable):  Accept pc so we can skips decls not in range.
18678         (struct binding_level):  Add end_pc field.
18679         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18680         (various):  Change so current pc gets passed to find_local_variable.
18681
18682         * decl.c (init_decl_processing):  Re-arrange fields in
18683         class_type_node and and method_type_node to match kaffe 0.9.1.
18684         * class.c (make_method_value, make_class_data):  Update
18685         initializations to match.
18686
18687 1997-07-16  Per Bothner  <bothner@cygnus.com>
18688
18689         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18690         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
18691         (push_super_field):  New function.
18692         (make_class_data):  Handle inheritance of class static initializer.
18693         (layout_class):  New name mangling.
18694         * constants.c (build_constant_data_ref):  Init type of data array
18695         to a one-element array.
18696         (build_constants_constructor):  Set DECL_SIZE from complete array type.
18697         * decl.c:  Rename class_type, object_type etc to class_type_node,
18698         object_type_node etc.  Make former inherit from latter.
18699         * expr.c (expand_invoke):  Add cast of function address.
18700         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
18701         * parse.c (yyparse):  Don't call layout_class here.
18702         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
18703
18704 1997-06-14  Per Bothner  <bothner@cygnus.com>
18705
18706         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
18707         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
18708         (alloc_class_constant):  New.
18709         * expr.c (expand_invoke):  Make sure method's class is initialized.
18710         * class.c (interits_from_p, emit_register_class):  New functions.
18711         * parse.c (yyparse):  Call emit_register_class.
18712
18713 1997-06-09  Per Bothner  <bothner@cygnus.com>
18714
18715         * constants.c:  New file, to handle constant pool.
18716         * Makefile.in (JAVA_OBJS):  Add constants.o.
18717         * decl.c (init_decl_processing):  Update, fix, finish various structs.
18718         (pushdecl_top_level):  New.
18719         * parse.c (layout_class):  Moved to class.c.
18720         * expr.c (java_push_constant_from_pool):  New function.
18721         * class.c (build_class_ref):  Make work fully
18722         (make_class_data):  Emit super-class, constant pool, interface vector.
18723
18724 1997-06-03  Per Bothner  <bothner@cygnus.com>
18725
18726         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
18727         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
18728         * class.c (class_depth):  New function.
18729         (lookup_named_class):  Replaced by new function lookup_class.
18730         * decl.c (object_type_node, string_type_node):  New.
18731         Remove various types that we no longer need.
18732         * expr.c (verify_jvm_instructions):  New separate verifier pass.
18733         (push_type, pop_type):  New functions for verifier.
18734         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
18735         (expand_byte_code):  Simplify, since we assume already verified.
18736         (expand_invoke):  Now mostly works.
18737         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18738         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
18739         * parse.c:  Wait to allocate class object until we know its name.
18740         (layout_class):  Calculate DECL_VINDEX for each virtual method.
18741         * typeck.c (get_array_type):  Rename to ...
18742         (build_java_array_type):  ... and provide working implementation.
18743         (build_java_signature):  New function - build Java signature of type.
18744         (set_java_signature):  New function - cache signature with type.
18745         (lookup_java_method):  New function.
18746
18747 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
18748
18749         * class.c (ident_subst):  Take extra SUFFIX parameter.
18750         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
18751         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
18752         (build_class_ref):  Actually implement.
18753         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
18754         * decl.c (builtin_function):  New.
18755         (init_decl_processing):  Update for current Kaffe.  Declare some
18756         builtin Kaffe functions.
18757         * expr.c (build_address_of):  New.
18758         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18759         Renamed (from expand_java_new etc), and added working implementations.
18760         (build_field_ref):  Now also handle static fields.
18761         (expand_invoke):  Implement invokestatic, and start implement rest.
18762         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
18763         * javaop.def:  Rename invokevirt -> invokevirtual.
18764         * lang.c (use_handles):  Removed.
18765         * parse.c:  Add support for ConstantValue attribute.
18766         Handle nested loading of a class.  (JPOOL_UTF):  New.
18767
18768 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
18769
18770         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
18771
18772 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
18773
18774         * Make-lang.in (java.install-man):  New empty rule.
18775         * typeck.c (set_local_type):  New function.
18776         * expr.c (STORE_INTERNAL):  Call find_local_variable,
18777         not find_stack_slot.  Call set_local_type.
18778
18779 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
18780
18781         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
18782         and building RECORD_TYPE CONSTRUCTORs.
18783         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18784
18785         * lang.c (use_handles):  Change the default to 0.
18786         * decl.c:  Define and build class_type, field_type, utf8const_type.
18787         * class.c (make_class_data, make_field_value,
18788         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18789         hashUtf8String, strLengthUtf8, mangled_classname:
18790         Functions to build reflective data structures.
18791         * parse.c (yyparse):  Call make_class_data.
18792
18793         * jcf-io.c (open_class, find_classfile):  New functions.
18794         * jcf-dump.c:  Support reading classfile from explicitly-named
18795         class file (without CLASSPATH searching).
18796
18797 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18798
18799         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
18800         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18801         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18802         (get_constant):  Now trivial for CONSTANT_Utf8.
18803
18804         * jcf.h:  Make NEW_CPOOL the default.
18805         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
18806
18807 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18808
18809         New directory.