OSDN Git Service

edcde22c8e1e713f4ae0a7c328ea95e027c0ce6d
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2006-05-26  Tom Tromey  <tromey@redhat.com>
2
3         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
4         * verify-glue.c (vfy_class_type): New function.
5         * verify-impl.c (check_constant): Allow 'ldc class'.
6         * verify.h (vfy_class_type): Declare.
7
8 2006-05-25  Andrew Haley  <aph@redhat.com>
9
10         PR java/27756
11         * decl.c (maybe_pushlevels): When variable ranges are non-nested
12         update all lifetimes, not just the first one.
13
14 2006-05-24  Tom Tromey  <tromey@redhat.com>
15
16         * java-tree.h: Fixed flag documentation.
17
18 2006-05-24  Tom Tromey  <tromey@redhat.com>
19
20         PR libgcj/27729:
21         * jcf.h (ACC_INVISIBLE): Changed value.
22
23 2006-05-24  Andrew Haley  <aph@redhat.com>
24
25         PR java/27754
26         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
27         COMPOUND_EXPR.
28
29 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
30
31         * lang.opt (femit-class-file): Remove VarExists.
32
33 2006-05-16  Tom Tromey  <tromey@redhat.com>
34
35         * verify-impl.c (verify_instructions_0) <op_return>: Special case
36         for Object.<init>.
37
38 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
39
40         PR driver/26885
41         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
42         $(GCC_OBJS).
43
44 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
45
46         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
47         (java/expr.o): Replace target.h with $(TARGET_H).
48         (java/parse.o): Likewise.
49
50 2006-05-10  Andrew Haley  <aph@redhat.com>
51
52         * class.c (emit_indirect_register_classes): Fix comment.
53
54 2006-05-04  Tom Tromey  <tromey@redhat.com>
55
56         * java-tree.h (uses_jv_markobj_p): Declare.
57         * class.c (uses_jv_markobj_p): Removed.
58         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
59         (get_boehm_type_descriptor): Use it.
60         (uses_jv_markobj_p): Moved from class.c.  Return bool.
61
62 2006-05-04  Tom Tromey  <tromey@redhat.com>
63
64         * java-tree.def (THIS_EXPR): Now a tcc_expression.
65
66 2006-05-04  Andrew Haley  <aph@redhat.com>
67
68         * class.c (make_field_value): Always build_address_of fdecl if
69         there is an initializer.
70
71 2006-05-03  Andrew Haley  <aph@redhat.com>
72
73         PR libgcj/27352
74         * expr.c (maybe_rewrite_invocation): New function.
75         (rewrite_arglist_getclass): Likewise.
76         (rules): New.
77         (expand_invoke): Call maybe_rewrite_invocation.
78         * parse.y (patch_invoke): Likewise.
79         * java-tree.h: (maybe_rewrite_invocation): New function.
80
81 2006-04-21  Andrew Haley  <aph@redhat.com>
82
83         * lang.c (java_init): Handle flag_indirect_classes.
84         * jvgenmain.c: Use "class$$" instead of "class$".
85         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
86         DECLs.
87         (mangle_class_field): Special case "class$$" as well as "class$".
88         * constants.c (build_ref_from_constant_pool): If
89         flag_indirect_classes, generate a ref into the heap.
90         * decl.c (constants_field_decl_node,
91         constants_data_field_decl_node): New.
92         * class.c (build_static_class_ref): New.
93         (build_classdollar_field): Factor out from build_class_ref().
94         (make_field_value): Handle static fields in heap.
95         (make_class_data): Make sure we get a static ref to class.
96         Make class initializer const if flag_indirect_classes.
97         (register_class): Build a class_ref for initialization if
98         flag_indirect_classes.
99         (emit_indirect_register_classes): New.
100
101 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
102
103         * expr.c, gjavah.c: Fix comment typos.
104
105 2006-04-03  Andrew Haley  <aph@redhat.com>
106
107         PR java/26858
108         * expr.c (build_field_ref): Don't check the field offset if
109         flag_syntax_only.
110
111 2006-03-30  Andrew Haley  <aph@redhat.com>
112
113         PR java/26858
114         * lang.c (java_attribute_table): New.
115         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
116         * expr.c (build_field_ref): Add a null pointer check for all
117         fields of offset > 4k.  Don't do so for accesses via the this
118         pointer, which we know can never be null.
119         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
120         methods nonnull.
121
122 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
123
124         * Make-lang.in: Rename docdir to gcc_docdir.
125
126 2006-03-30  Tom Tromey  <tromey@redhat.com>
127
128         PR java/26042:
129         * parse.y (java_reorder_fields): Reset superclass field's size as
130         well.
131
132 2006-03-28  Tom Tromey  <tromey@redhat.com>
133
134         PR java/26390:
135         * parse.y (find_most_specific_methods_list): Added 'class'
136         argument.
137         (lookup_method_invoke): Updated.
138
139 2006-03-15  Tom Tromey  <tromey@redhat.com>
140
141         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
142         non-static method calls.
143
144 2006-03-15  David Daney  <ddaney@avtrex.com>
145
146         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
147         declaration.
148
149 2006-03-15  David Daney  <ddaney@avtrex.com>
150
151         * lang.opt (-freduced-reflection): New option.
152         * lang.c (java_post_options): Generate an error if
153         -freduced-reflection used with -fjni or -findirect-dispatch.
154         * java-tree.h (flag_reduced_reflection): Declare new variable.
155         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
156         if bitmap overflows and flag_reduced_reflection set.
157         * class.c (uses_jv_markobj_p): New function.
158         (make_class_data): Moved generation of vtable to before
159         reflection data, generate less reflection data if
160         flag_reduced_reflection set.
161         * gcj.texi: Document -freduced-reflection.
162
163 2006-03-15  Tom Tromey  <tromey@redhat.com>
164
165         PR java/26638:
166         * class.c (get_interface_method_index): Don't put <clinit> into
167         interface table.
168
169 2006-03-15  Tom Tromey  <tromey@redhat.com>
170
171         * parse.y (analyze_clinit_body): Ignore empty statements.
172
173 2006-03-08  David Daney  <ddaney@avtrex.com>
174
175         * gcj.texi: Document -static-libgcj option.
176
177 2006-02-20  Andrew Haley  <aph@redhat.com>
178
179         * jcf-parse.c (parse_class_file): Set input_location from
180         current_class.
181
182 2006-02-15  Andrew Haley  <aph@redhat.com>
183
184         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
185         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
186         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
187
188 2006-02-09  Andrew Haley  <aph@redhat.com>
189
190         PR java/26192
191         * expr.c (expand_invoke): Allow methods in arrays to be resolved
192         in their superclass.
193
194         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
195         array types.
196         
197 2006-02-08  Tom Tromey  <tromey@redhat.com>
198
199         PR java/22578:
200         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
201         * builtins.c (convert_real): New function.
202         (java_builtins): Handle Float.intBitsToFloat,
203         Float.floatToRawIntBits, Double.longBitsToDouble,
204         Double.doubleToRawLongBits.
205
206 2006-02-07  Andrew Haley  <aph@redhat.com>
207
208         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
209         class other than the one in which we expected to find it, ignore
210         the result.
211
212         PR java/25535
213         * constants.c (build_constants_constructor): move initializer into
214         first halfword on a 64-bit big-endian machine.
215  
216 2006-02-04  Tom Tromey  <tromey@redhat.com>
217
218         PR java/25676:
219         * builtins.c (max_builtin): Skip floating point 'max'.
220         (min_builtin): Skip floating point 'min'.
221         (check_for_builtin): Never return NULL_TREE.
222
223 2006-02-04  Tom Tromey  <tromey@redhat.com>
224
225         PR java/26097:
226         * expr.c (push_type): Avoid side effect in gcc_assert.
227
228 2006-02-04  Roger Sayle  <roger@eyesopen.com>
229
230         * decl.c (java_init_decl_processing): Create char_type_node as a
231         regular INTEGER_TYPE node.
232         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
233         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
234         test for char_type_node and promoted_char_type_node as special
235         instances of INTEGER_TYPE tree codes.
236         (promote_type,build_java_signature): Likewise.
237         * jcf-write.c (adjust_typed_op): Likewise.
238         * mangle.c (mangle_type): Likewise.
239         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
240         * parse.h (JINTEGRAL_TYPE_P): Likewise.
241
242 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
243
244         * expr.c (java_stack_swap): Revert gcc_assert patch.
245
246 2006-02-03  Ben Elliston  <bje@au.ibm.com>
247
248         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
249         * typeck.c: Likewise.
250         * verify-impl.c: Likewise.
251         * class.c: Likewise.
252         * decl.c: Likewise.
253         * jcf-parse.c: Likewise.
254         * constants.c: Likewise.
255         * check-init.c: Likewise.
256         * jcf-write.c: Likewise.
257         * verify-glue.c: Likewise.
258         * mangle.c: Likewise.
259         * expr.c: Likewise.
260         * lang.c: Likewise.
261         * boehm.c: Likewise.
262
263 2006-02-01  Jan Hubicka  <jh@suse.cz>
264
265         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
266         * lang.c (java_init_options): Set no_unit_at_a_time_default.
267
268 2006-01-30  Andrew Haley  <aph@redhat.com>
269
270         PR java/21428
271         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
272
273 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
274
275         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
276         Update copyright notice dates.
277
278 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
279
280         * jvspec.c (lang_specific_spec_functions): Remove.
281
282 2006-01-06  Tom Tromey  <tromey@redhat.com>
283
284         * gcj.texi (Arrays): Added more documentation for
285         JvNewObjectArray.
286         (Primitive types): Correct information about primitive classes.
287         (Reference types): New node.
288         (Index): New node.
289
290 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
291
292         * jcf-parse.c (set_source_filename): Set the decl source location
293         even when returning early.
294
295 2005-12-15  Tom Tromey  <tromey@redhat.com>
296             Andrew Haley  <aph@redhat.com>
297
298         PR java/25429
299         * parse.y (resolve_expression_name): Don't generate accessor
300         methods for constant fields.
301
302 2005-12-13  Andrew Haley  <aph@redhat.com>
303
304         PR java/25366
305         PR java/25368
306         * class.c (maybe_layout_super_class): Update current_class before
307         calling do_resolve_class.
308
309 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
310
311         PR java/25330
312         * jcf-write.c (write_classfile): Use PID in temporary class
313         file. Save/restore errno when reporting error.
314
315 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
316
317         PR java/9861
318         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
319         to bare_function_type and including the return type
320         * builtins.c (initialize_builtins) : Change builtin mangled name
321         constants to conform to new mangling scheme
322
323 2005-12-08  Andrew Haley  <aph@redhat.com>
324
325         PR libgcj/25265
326         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
327         (soft_abstractmethod_node): New.
328         * expr.c (build_field_ref): Add in-line check for missing field.
329         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
330
331 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
332
333         * Make-lang.in (java.all.build, java.install-normal): Remove.
334
335 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
336
337         * Make-lang.in: Remove all dependencies on s-gtype, except for
338         gt-java-parse.h.
339
340 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
341
342         * class.c (build_utf8_ref, emit_register_classes): Use
343         switch_to_section and get_section.
344
345 2005-12-06  Tom Tromey  <tromey@redhat.com>
346
347         PR java/25283:
348         * parse.y (patch_new_array_init): Revert previous patch.
349         (lookup_method_invoke): Use size-less array type when creating an
350         anonymous constructor.
351
352 2005-12-05  Tom Tromey  <tromey@redhat.com>
353
354         * parse.y (patch_new_array_init): Don't set length on array.
355
356 2005-12-02  Richard Guenther  <rguenther@suse.de>
357
358         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
359         buildN instead of build.
360         * class.c (finish_class): Likewise.
361         * expr.c (java_create_object): Likewise.
362
363 2005-11-28  Tom Tromey  <tromey@redhat.com>
364
365         PR java/18278:
366         * expr.c (build_jni_stub): Unwrap the return value.
367         * java-tree.h (soft_unwrapjni_node): New define.
368         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
369         * decl.c (java_init_decl_processing): Initialize
370         soft_unwrapjni_node.
371
372 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
373
374         * gcj.texi (gij options): Add -Xss documentation.
375
376 2005-11-08  Wil Mahan  <wmahan@gmail.com>
377
378         PR java/23617
379         * zextract.c (read_zip_archive): Fix out of memory error when
380         reading jar files with zip-style comments.
381
382 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
383
384         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
385         formats.
386         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
387
388 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
389             Wil Mahan <wmahan@gmail.com>
390
391         PR java/23620
392         * class.c (make_class): Create empty binfo here.
393         (set_super_info): Only create binfo if we have superclasses.
394
395 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
396
397         PR java/24127
398         * parse.y (method_header): Make the result of the rule a NULL_TREE
399         when a parsing error occurs.
400
401 2005-09-29  Tom Tromey  <tromey@redhat.com>
402
403         PR java/24120:
404         * jcf-io.c (memoized_dirlist_hash): New function.
405         (caching_stat): Use it.
406
407 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
408
409         PR java/21418
410         * class.c (inherits_from_p): Try to lay out super class
411         if it is not already laid out.
412         (maybe_layout_super_class): Handle the case where SUPER_CLASS
413         is a NULL_TREE.
414
415 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
416
417         * builtins.c (max_builtin, min_builtin, abs_builtin,
418         java_build_function_call_expr): Use fold_buildN.
419         * class.c (layout_class_method): Likewise.
420         * expr.c (java_truthvalue_conversion, build_java_jsr,
421         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
422         build_java_binop, build_field_ref, expand_compare,
423         build_known_method_ref, build_invokevirtual,
424         process_jvm_instruction): Likewise.
425         * parse.y (patch_binop, patch_exit_expr): Likewise.
426         * typeck.c (convert_ieee_real_to_integer): Likewise.
427         (convert): Don't call fold after convert_ieee_real_to_integer.
428
429 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
430
431         PR java/23891
432         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
433         the newly created type. Set import lists here, not in create_class.
434         (jdep_resolve_class): Set current_class.
435         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
436         the current package context, not ctxp->package.
437         (cicp_cache): Removed.
438         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
439         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
440         * java-tree.h (TYPE_PACKAGE): New macro.
441         (struct lang_type): New member 'package'.
442
443 2005-09-09  Andrew Haley  <aph@redhat.com>
444
445         PR libgcj/23182 
446         * expr.c (pop_type_0): If the expected type is object or ptr
447         (i.e. void*), return the type of the object we just popped from
448         the stack.
449
450 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
451
452         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
453         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
454
455 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
456
457         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
458         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
459         typos.  Follow spelling conventions.
460
461 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
462
463         PR java/23431
464         * typeck.c (lookup_do): Look up interfaces for the original class,
465         not the base class.
466         * parse.y (java_check_regular_methods): Fix diagnostic message for
467         more restrictive overriding of a method from an interface.
468
469 2005-08-16  Tom Tromey  <tromey@redhat.com>
470
471         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
472         class' initial state.
473
474 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
475
476         PR java/22113
477         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
478         `literal_token' for large numeric input tokens.
479
480 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
481
482         PR java/19870
483         * parse.y (nested_field_access_p): Rename to nested_member_access_p
484         and expand to handle method accesses across nested classes.
485         (build_outer_method_access_method): Rename to
486         build_nested_method_access_method.  Minor adjustments to comments.
487         (resolve_expression_name): Use the newly-renamed
488         nested_member_access_p method.
489         (resolve_qualified_expression_name): Likewise.
490         (patch_method_invocation): Also consider static methods for access
491         method generation.  Minor adjustments to comments.
492         (maybe_use_access_method): Use the more general
493         nested_memeber_access_p to determine access across nested class
494         boundaries.  Allow THIS_ARG to be NULL (for static methods).
495
496 2005-08-15  Tom Tromey  <tromey@redhat.com>
497
498         PR java/23300.
499         * expr.c (build_field_ref): Don't generate otable reference when
500         DECL_FIELD_OFFSET is 0.
501         * class.c (maybe_layout_super_class): Pass outer class to
502         do_resolve_class.
503
504 2005-08-15  Tom Tromey  <tromey@redhat.com>
505
506         * java-tree.h (LABEL_IN_SUBR): Removed.
507         (LABEL_IN_SUBR): Likewise.
508         (LABEL_IS_SUBR_START): Likewise.
509         (LABEL_SUBR_START): Likewise.
510         (LABEL_SUBR_CONTEXT): Likewise.
511         (LABEL_CHANGED): Likewise.
512         (LABEL_RETURN_LABEL): Likewise.
513         (LABEL_RETURN_TYPE_STATE): Likewise.
514         (LABEL_RETURN_LABELS): Likewise.
515         (RETURN_MAP_ADJUSTED): Likewise.
516         (LABEL_PENDING_CHAIN): Likewise.
517
518 2005-08-15  Tom Tromey  <tromey@redhat.com>
519
520         * Make-lang.in (JAVA_OBJS): Removed verify.o
521         (java/verify.o): Removed.
522         * verify.c: Removed.
523         * lang.c (flag_new_verifier): Removed.
524         (java_post_options): Updated.
525         * java-tree.h (flag_new_verifier): Removed.
526         (verify_jvm_instructions): Removed.
527         * expr.c (pop_type_0): Assume flag_new_verifier is true.
528         (build_java_check_indexed_type): Likewise.
529         (expand_java_arraystore): Likewise.
530         (expand_java_arrayload): Likewise.
531         (pop_arguments): Likewise.
532         (expand_byte_code): Likewise.
533         (process_jvm_instruction): Likewise.
534
535 2005-08-10  Andrew Haley  <aph@redhat.com>
536
537         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
538         type mismatches to make legal GIMPLE.
539
540 2005-08-10  Robin Green <greenrd@greenrd.org>
541
542         PR java/23230:
543         * parse.y (maybe_use_access_method): Generalize check from
544         java.lang.Object to any superclass of current_class
545
546 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
547
548         * class.c (build_class_ref): Wrap the primary class type in a
549         NOP_EXPR.
550         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
551         primary class type from the NOP_EXPR in which it was placed.
552
553 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
554
555         * expr.c (expand_load_internal): Fix missing parens in
556         predicate.
557
558 2005-07-28  Andrew Haley  <aph@redhat.com>
559
560         * expr.c (expand_load_internal): Convert to destination type.
561
562 2005-07-22  Manfred Hollstein  <mh@suse.com>
563
564         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
565         (check_constant): Likewise.
566         (check_wide_constant): Likewise.
567
568 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
569
570         Make CONSTRUCTOR use VEC to store initializers.
571         * check-init.c (check_init): Update to cope with VEC in
572         CONSTRUCTOR_ELTS.
573         * class.c (make_field_value, make_method_value, get_dispatch_table,
574         make_class_data, emit_symbol_table, emit_catch_table,
575         emit_assertion_table): Use build_constructor_from_list instead of
576         build_constructor.
577         * constants.c (build_constants_constructor): Likewise.
578         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
579         VEC in CONSTRUCTOR_ELTS.
580         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
581         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
582         of a TREE_LIST.
583         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
584         CONSTRUCTOR_ELTS.
585         * parse.y (build_new_array_init): Use build_constructor_from_list
586         instead of build_constructor.
587         (patch_new_array_init): Update to cope with VEC in
588         CONSTRUCTOR_ELTS.
589         (array_constructor_check_entry): Likewise.
590
591 2005-07-12  Tom Tromey  <tromey@redhat.com>
592
593         * jvspec.c (lang_specific_driver): Put filelist_filename first on
594         command line.
595
596 2005-07-12  Tom Tromey  <tromey@redhat.com>
597
598         PR java/19674:
599         * parse-scan.y (interface_member_declaration): Added
600         empty_statement.
601
602 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
603         
604         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
605         (LABEL_PENDING_CHAIN): Ditto.
606         (LABEL_PC): Ditto.
607         (DECL_BIT_INDEX): Ditto.        
608
609 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
610
611         PR java/18119
612         * parse.y (inner_class_accessible): New function. Logic moved from
613         check_inner_class_access.
614         (check_inner_class_access): Use inner_class_accessible.
615         (resolve_inner_class): Simplify arguments. Create circularity hash
616         here. Keep looking for classes if we found one that was inaccessible. 
617         Return the inaccessible class only if there is no other match.
618         (do_resolve_class): Update for new resolve_inner_class arguments.
619         Don't create circularity_hash here.
620
621 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
622
623         PR java/21045
624         * parse.y (add_exception_to_throws): New function.
625         (purge_unchecked_exceptions): Removed.
626         (get_constructor_super): Renamed from verify_constructor_super. Now
627         returns the super constructor after verification.
628         (java_complete_expand_method): Don't use purge_unchecked_exceptions
629         or save/restore the exception list.
630         (check_thrown_exceptions): Add uncaught exceptions in anonymous
631         class initializers and constructors to the throws clause of the method. 
632
633 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
634
635         PR java/19674
636         * parse.y (interface_member_declaration): Allow empty statements in
637         interface declarations.
638
639 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
640
641         * Makefile.in (parse.o): Adjust dependencies.
642         * parse.y: Include tree-dump.h.
643
644 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
645
646         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
647         flag for quoting.
648
649 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
650
651         * parse.y (issue_warning_error_from_context): Call
652         pp_output_formatted_text to be able to get the buffer.
653
654 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
655
656         * parse.y (issue_warning_error_from_context): Update for the
657         renaming of pp_format_text to pp_format.
658
659 2005-06-28  Paul Brook  <paul@codesourcery.com>
660
661         * decl.c (java_init_decl_processing): Call
662         default_init_unwind_resume_libfunc.
663
664 2005-06-27  Tom Tromey  <tromey@redhat.com>
665
666         PR java/21540, PR java/13788:
667         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
668         fold_constant_for_init.
669         (patch_binop): Added 'folding' argument.  Updated all callers.
670         (patch_unaryop) <NOP_EXPR>: New case.
671         (fold_constant_for_init) <NOP_EXPR>: Likewise.
672         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
673
674 2005-06-25  Jan Hubicka  <jh@suse.cz>
675
676         * builtins.c (define_builtin): Accept new flags parameter.
677         (initialize_builtins): Mark the builtins const and nothrow accordingly.
678
679 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
680
681         * all files: Update FSF address in copyright headers.
682
683 2005-06-24  Tom Tromey  <tromey@redhat.com>
684
685         * verify-impl.c (verify_instructions_0): Correctly handle
686         situation where PC falls off end.
687
688 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
689
690         PR java/20697
691         * parse.y (find_most_specific_methods_list): Remove special case for
692         inner classes.
693
694 2005-06-15  Tom Tromey  <tromey@redhat.com>
695
696         PR libgcj/21906:
697         * class.c (make_method_value): Use soft_abstractmethod_node for
698         abstract method.
699         * java-tree.h (soft_abstractmethod_node): New define.
700         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
701         * decl.c (java_init_decl_processing): Initialize
702         soft_abstractmethod_node.
703
704 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
705
706         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
707
708 2005-06-13  Per Bothner  <per@bothner.com>
709
710         * expr.c (int highest_label_pc_this_method,
711         start_label_pc_this_method): New globals.
712         (lookup_label): Add start_label_pc_this_method to pc for label, and
713         update highest_label_pc_this_method.  This prevents conflicts between
714         labels from different methods.
715         * java-tree.h: Declare new globals.
716         * jcf-parse.c (parse_class_file): If needed bump
717         start_label_pc_this_method and reset highest_label_pc_this_method.
718
719 2005-06-13  Tom Tromey  <tromey@redhat.com>
720
721         PR java/21844:
722         * parse.y (nested_field_access_p): Handle case where outer field
723         is inherited by enclosing class.
724
725 2005-06-12  Per Bothner  <per@bothner.com>
726
727         * class.c (inherits_from_p): Do load_class if needed.
728
729 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
730
731         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
732         * java-tree.h (parse_error_context): Move...
733         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
734         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
735         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
736
737 2005-06-08  Roger Sayle  <roger@eyesopen.com>
738
739         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
740
741 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
742
743         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
744         msgid for argument name.
745         * gjavah.c (error): Likewise.
746         * java-tree.h (parse_error_context): Likewise.
747         * parse.y (parse_error_context, parse_warning_context,
748         issue_warning_error_from_context): Likewise.
749
750 2005-06-01  Tom Tromey  <tromey@redhat.com>
751
752         PR java/21722:
753         * class.c (build_static_field_ref): Don't fold constant fields if
754         current class is from a .class file and we're using indirect
755         dispatch.
756
757 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
758
759         * java/verify-glue.c: Don't include errors.h and include toplev.h.
760         * java/Make-lang.in: Updates dependencies.
761
762 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
763
764         PR java/19870.
765         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
766         NESTED_FIELD_ACCESS_IDENTIFIER_P.
767         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
768         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
769         * jcf-write.c (generate_classfile): Use
770         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
771         OUTER_FIELD_ACCESS_IDENTIFIER_P.
772         * parse.y (build_outer_field_access): Rename to
773         build_nested_field_access. Support static fields and outer-to-inner
774         class accesses.
775         (outer_field_access_p): Rename to nested_field_access_p. Support
776         static fields and generalise to outer-to-inner class and sibling
777         inner class accesses.
778         (outer_field_expanded_access_p): Rename to
779         nested_field_expanded_access_p and support static fields.
780         (outer_field_access_fix): Rename to nested_field_access_fix and
781         support static fields.
782         (build_outer_field_access_expr): Rename to
783         build_nested_field_access_expr and support static fields.
784         (build_outer_field_access_methods): Rename to
785         build_nested_field_access_methods and support static fields. For
786         static fields, generate accessors without class instance parameters.
787         (build_outer_field_access_method): Rename to
788         build_nested_field_access_method and support static fields.
789         (build_outer_method_access_method): Use
790         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
791         OUTER_FIELD_ACCESS_IDENTIFIER_P.
792         (resolve_expression_name): Consider static field accesses across
793         nested classes.
794         (resolve_qualified_expression_name): Likewise.
795         (java_complete_lhs): Use nested_field_access_fix instead of
796         outer_field_access_fix.
797         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
798         Use nested_field_expanded_access_p instead of
799         outer_field_expanded_access_p. Use nested_field_access_fix instead
800         of outer_field_access_fix.
801         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
802         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
803
804 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
805
806         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
807         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
808         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
809         MINOR_BINARYCOMPAT_ABI_VERSION): New.
810         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
811         (parse_version): Calculate version ID using new method. Use bit-flags
812         for flag_indirect_dispatch and flag_bootstrap_classes.
813
814 2005-05-25  Richard Henderson  <rth@redhat.com>
815
816         PR libgcj/21692
817         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
818         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
819         DECL_CONTEXT; avoid pushdecl_top_level.
820         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
821         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
822         (layout_class_method): Likewise.
823         * decl.c (java_mark_cni_decl_local): New.
824         (java_mark_class_local): Use it.
825         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
826         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
827         (struct lang_decl_func): Add local_cni;
828         (struct lang_decl_var): Add class_field, vtable.
829         (java_mangle_decl): Declare.
830         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
831         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
832         (mangle_obstack_1): New.
833         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
834         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
835         lhd_set_decl_assembler_name for things that don't need mangling.
836         (mangle_class_field): Rename from java_mangle_class_field, make
837         static, don't call init_mangling or finish_mangling.
838         (mangle_vtable): Similarly.
839         (mangle_local_cni_method_decl): New.
840         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
841         gcc_assert, and MANGLE_RAW_STRING.
842         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
843
844 2005-05-25  DJ Delorie  <dj@redhat.com>
845
846         * class.c (set_constant_value): Move warning control from if() to
847         warning(OPT_*).
848
849 2005-05-24  Richard Henderson  <rth@redhat.com>
850
851         * builtins.c (define_builtin): Don't call make_decl_rtl.
852         * constants.c (build_constant_data_ref): Likewise.
853         * class.c (build_utf8_ref): Likewise.
854         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
855         (get_dispatch_table, layout_class_method): Likewise.
856         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
857         by hand.
858         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
859         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
860         to determine if we need a non-zero address.
861         * decl.c (builtin_function): Don't call make_decl_rtl.
862         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
863         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
864         * resource.c (compile_resource_data): Likewise.
865         * parse.y (resolve_field_access): Re-word comment to avoid
866         building DECL_RTL.
867
868 2005-05-24  Richard Henderson  <rth@redhat.com>
869
870         * class.c (registered_class): Take it out of class_roots; turn into
871         a vec of trees.
872         (register_class): Make static.  Don't duplicate decl node.  Use
873         VEC_safe_push.
874         (emit_register_classes): Use VEC_iterate.  Use output_constant
875         instead of assemble_integer.  Don't call mark_decl_referenced
876         directly.
877         * java-tree.h (register_class): Remove decl.
878
879 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
880
881         PR java/17845
882
883         * parse.y (register_package, package_list): Remove.
884         (package_declaration): Do not call register_package.
885         (do_resolve_class): Do not use package_list.
886
887 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
888
889         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
890         unused variable.
891
892 2005-05-15  Tom Tromey  <tromey@redhat.com>
893
894         PR java/21519:
895         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
896         NOTE_PUSH.
897
898 2005-05-12  Aaron Luchko <aluchko@redhat.com>
899
900         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
901
902 2005-05-11  Tom Tromey  <tromey@redhat.com>
903
904         * gcj.texi (Code Generation): Document -fbootstrap-classes.
905         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
906         (parse_version): Use it.
907         * lang.opt (-fbootstrap-classes): New option.
908
909 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
910
911         PR java/21436
912         * class.c (maybe_layout_super_class): Look for imports in this_class.
913         * parse.h (ctxp_for_generation_last): New.
914         (do_resolve_class): Add a parameter.
915         * parse.y (ctxp_for_generation_last): New.
916         (java_pop_parser_context): Add at end of list.
917         (find_in_imports, find_in_imports_on_demand): Look in ctxp
918         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
919         the given type are NULL.
920         (do_resolve_class): Look into the imports of the new second parameter.
921         Adjust recursive calls.
922         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
923         calls to do_resolve_class.
924         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
925         (java_complete_class): Do not do that here.
926
927 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
928
929         PR java/20309
930         * Make-lang.in (java): Add gjnih.
931         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
932         (GJNIH_OBJS): New variable.
933         (gjnih$(exeext)): New target.
934         (JAVA_MANFILES): Add gjnih.1.
935         (java.uninstall): Add gjnih.1.
936         (java.mostlyclean): Add gjnih.
937         (java.maintainer-clean): Add gjnih.1.
938         (java/gjavah-jni.o): New target.
939         (.INTERMEDIATE): Add gjnih.pod.
940         (gjnih.pod): New target.
941         * config-lang.in (stagestuff): Add gjnih.
942         * gcj.texi (Top): Add gjnih node.
943         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
944         -bootclasspath options.
945         (Invoking gjnih): New node.
946         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
947         (TOOLNAME): New macro.
948         (error): Replace hard-coded gcjh with TOOLNAME.
949         (process_file): Likewise.
950         (usage): Likewise.
951         (version): Likewise.
952         (help): Likewise.  Add help output for -force, -old, -trace and -J
953         options.
954         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
955         (options): Add force, old, trace and J fields.
956         (main): Handle -force, -old, -trace and -J options.
957
958 2005-05-03  Tom Tromey  <tromey@redhat.com>
959
960         PR java/21245:
961         * gjavah.c (main): Unlink output file on error.
962
963 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
964
965         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
966         copyright.
967
968 2005-04-29  Tom Tromey  <tromey@redhat.com>
969
970         * expr.c (build_jni_stub): Updated for change to build_block.
971
972 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
973
974         * expr.c (force_evaluation_order): Declare 'saved' earlier.
975
976 2005-04-28  Andrew Haley  <aph@redhat.com>
977
978         PR java/19285
979         * java-tree.h (soft_resolvepoolentry_node): New.
980         (alloc_constant_fieldref): Declare.
981         * expr.c (expand_java_field_op): Don't call class_init for
982         accesses to static fields with indirect dispatch.
983         * builtins.c (initialize_builtins): Add "__builtin_expect".
984         * decl.c (soft_resolvepoolentry_node): New variable.
985         (java_init_decl_processing): Create a decl for
986         "_Jv_ResolvePoolEntry".
987         * class.c (build_fieldref_cache_entry): New function.
988         (build_static_field_ref): Rewrite for indirect dispatch.
989         * constants.c (find_name_and_type_constant_tree): New function.
990         (alloc_constant_fieldref): Likewise.
991         (build_constants_constructor): Handle CONSTANT_Fieldref and
992         CONSTANT_NameAndType.
993
994         PR java/21115
995         * expr.c (force_evaluation_order): Convert outgoing args smaller
996         than integer.
997
998 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
999
1000         * gcj.texi (libgcj Runtime Properties): Remove obsolete
1001         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
1002         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
1003
1004 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1005
1006         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
1007         to `unlock_stream' with `unlock_std_streams'.
1008
1009 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
1010
1011         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
1012         instead of just expr.h.
1013
1014 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1015
1016         * gjavah.c (main): Unlock the stdio streams.
1017         * jcf-dump.c (main): Likewise.
1018         * jv-scan.c (main): Likewise.
1019         * jvgenmain.c (main): Likewise.
1020
1021 2005-04-23  DJ Delorie  <dj@redhat.com>
1022
1023         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1024         parse.y: Adjust warning() callers.
1025
1026 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
1027
1028         * gcj.texi (Object fields): Change "Integer" to "Int" in example
1029         contructor.
1030
1031 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1032
1033         * gcj.texi: Fix typos and bogus example.
1034
1035 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
1036
1037         * except.c: Fix a comment typo.
1038
1039 2005-04-19  Julian Brown  <julian@codesourcery.com>
1040
1041         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
1042         indirect dispatch with PIC.
1043
1044 2005-04-18  Andrew Haley  <aph@redhat.com>
1045
1046         * java-except.h (struct eh_range.handler): Remove unused field.
1047         (handle_nested_ranges): Remove function declaration.
1048         (sanity_check_exception_range): Add function declaration.       
1049         * verify.c (verify_jvm_instructions): Remove call to
1050         handle_nested_ranges.
1051         * verify-glue.c (verify_jvm_instructions_new): Call
1052         sanity_check_exception_range.
1053         * except.c (link_handler, eh_range_freelist, link_handler,
1054         handle_nested_ranges): Remove.
1055         (add_handler): Rewrite.
1056         (sanity_check_exception_range): New function.
1057         (print_ranges): New function.
1058
1059 2005-04-13  Julian Brown  <julian@codesourcery.com>
1060
1061         * decl.c (finish_method): Give methods once-only linkage.
1062
1063 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1064
1065         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1066
1067 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1068
1069         * java-tree.h: Don't use PARAMS().
1070
1071 2005-04-07  Per Bothner  <per@bothner.com>
1072
1073         * class.c (push_class): By default, suppress debug output.
1074         (finish_class): Enable debug output for classes we're emitting.
1075
1076 2005-04-07  Andrew Haley  <aph@redhat.com>
1077
1078         * gcj.texi: Correct gcj-dbtool instructions.
1079
1080 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
1081
1082         * gcj.texi: Fix a typo.
1083         * lang.c: Fix a comment typo.
1084
1085 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
1086
1087         * gcj.texi (Invoking gij): Add descriptions of new -X options.
1088         Mention recognized-and-ignored compatibility options.
1089         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
1090         JvFree.
1091         (About CNI): Add Memory allocation section.
1092
1093 2005-04-01  Tom Tromey  <tromey@redhat.com>
1094
1095         * decl.c (java_init_decl_processing): Fix types of
1096         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
1097         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
1098         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
1099
1100 2005-03-31  Jan Hubicka  <jh@suse.cz>
1101
1102         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
1103         * class.c: Include cgraph.h
1104         (make_local_functoin_alias): Mark aslias as needed.
1105         * resource.c: Include cgraph.h
1106         (compile_resource_data): Go via cgraph interface.
1107
1108 2005-03-30  Ian Lance Taylor  <ian@airs.com>
1109
1110         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
1111
1112 2005-03-30  Tom Tromey  <tromey@redhat.com>
1113
1114         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
1115         inner_class_info_index==0 or outer_class_info_index==0.
1116
1117 2005-03-29  Tom Tromey  <tromey@redhat.com>
1118
1119         * gcj.texi (libgcj Runtime Properties): Document
1120         gnu.gcj.runtime.endorsed.dirs.
1121
1122 2005-03-24  Anthony Green  <green@redhat.com>
1123
1124         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
1125         'gcj-dbtool -p'.
1126
1127 2005-03-23  Tom Tromey  <tromey@redhat.com>
1128
1129         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
1130         (parse_version): Use it.
1131
1132 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1133
1134         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1135
1136 2005-03-18  Andrew Haley  <aph@redhat.com>
1137
1138         PR java/20522
1139         * decl.c (update_aliases): Don't update variables that are about
1140         to die.
1141         (maybe_poplevels): Add comment.
1142
1143 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
1144
1145         PR java/20502
1146         * jcf-parse.c (duplicate_class_warning): New function.
1147         (java_parse_file): Call duplicate_class_warning if 
1148         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
1149         (parse_zip_file_entries): Likewise. Also set
1150         CLASS_FROM_CURRENTLY_COMPILED_P.
1151
1152 2005-03-16  Andrew Haley  <aph@redhat.com>
1153
1154         * expr.c (expand_java_arrayload): Don't generate a
1155         NullPointerException based on the type of the node.
1156         (build_java_array_length_access): Likewise.
1157
1158 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1159
1160         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
1161
1162 2005-03-11  Tom Tromey  <tromey@redhat.com>
1163
1164         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
1165         (libgcj Runtime Properties): Document the default .db.
1166
1167 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1168
1169         PR java/20312
1170         * parse.y (checks_throws_clauses): Check exceptions list even when
1171         the base class does not come from a source file being compiled.
1172         (java_complete_lhs): Remove unused variable 'wfl'.
1173
1174 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
1175
1176         PR java/20338
1177         * decl.c (finish_method): Emit _Jv_InitClass for private static
1178         methods inside inner classes as well.
1179
1180 2005-03-08  Julian Brown  <julian@codesourcery.com>
1181         * Revert patch from 2005-03-08 for causing bootstrap failure on
1182         ppc-darwin.
1183
1184 2005-03-08  Julian Brown  <julian@codesourcery.com>
1185
1186         * decl.c (finish_method): Give methods once-only linkage.
1187
1188 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
1189
1190         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
1191
1192 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
1193
1194         * verify-glue.c (vfy_is_assignable_from): Perform static check using
1195         can_widen_reference_to if the C++ ABI is in use.
1196         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
1197         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
1198         type_isresolved, init_state, set_pc, state_get_pc,
1199         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
1200         (verify_fail): Report the current PC from the verifier context.
1201         (free_state): Remove #if 0 block to enable this function.
1202         (free_verifier_context): Call free_state on state_list iterator
1203         values before freeing them.
1204         * expr.c (pop_type_0): Pop correct type for error message when stack
1205         contains a multi-word type.
1206
1207 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
1208
1209         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
1210         for known NULL array length access.
1211
1212 2005-03-07  Tom Tromey  <tromey@redhat.com>
1213
1214         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
1215
1216 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
1217
1218         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
1219         typeck.c: Update copyright.
1220
1221 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
1222
1223         Remove xref code.
1224         * xref.c, xref.h: Remove file.
1225         * Make-lang.in (java/xref.o): Remove.
1226         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
1227         * lang.c (flag_emit_xref): Remove definition.
1228         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
1229         * typeck.c (convert): Remove use of do_not_fold.
1230         * parse.y (do_not_fold): Remove definition.
1231         (parser grammar): Remove xref code.
1232         (maybe_create_class_interface_decl, create_class): Likewise.
1233         (register_fields, method_header, finish_method_declaration): Likewise.
1234         (declare_local_variables, source_end_java_method): Likewise.
1235         (java_complete_expand_classes): Do not set do_not_fold.
1236         (java_complete_expand_method): Remove xref code.
1237         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
1238         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
1239         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
1240         (patch_synchronized_statement, patch_throw_statement): Likewise.
1241         (maybe_build_class_init_for_field): Likewise.
1242
1243 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
1244
1245         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
1246         instead of IS_NON_TYPE_CODE_CLASS.
1247
1248 2005-03-04  Andrew Haley  <aph@redhat.com>
1249
1250         PR java/18362
1251         * class.c (set_method_index): Don't set method_index if it is
1252         NULL_TREE.
1253         (layout_class_method): Don't complain about "non-static method foo
1254         overrides static method" in the case of indirect dispatch.
1255
1256 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1257
1258         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
1259         warning.
1260         * Make-lang.in: Don't elide warnings in jcf-io.c.
1261
1262 2005-03-01  Per Bothner  <per@bothner.com>
1263
1264         PR java/8608
1265         * check-init.c (wfl): Remove static.
1266         (final_assign_error, check_init): Replace calls to parse_error_context
1267         by plain error.
1268         (check_init): Save, set, and restore input_location for each exp.
1269
1270 2005-03-01  Per Bothner  <per@bothner.com>
1271
1272         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
1273         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
1274         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
1275
1276 2005-03-01  Per Bothner  <per@bothner.com>
1277
1278         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
1279
1280 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
1281
1282         PR libgcj/16923
1283         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
1284         JvVMOption.
1285
1286 2005-02-22  Tom Tromey  <tromey@redhat.com>
1287
1288         PR java/20056:
1289         * verify-impl.c (EITHER): New define.
1290         (types_compatible): Handle it.
1291         (check_field_constant): Use it.
1292
1293 2005-02-18  Tom Tromey  <tromey@redhat.com>
1294
1295         PR java/20056:
1296         * verify-impl.c (types_equal): Fixed test.
1297
1298         PR java/20056:
1299         * verify-glue.c (vfy_class_has_field): New function.
1300         * verify.h (vfy_class_has_field): Declare.
1301         * verify-impl.c (check_field_constant): Added 'putfield'
1302         argument.
1303         (verify_instructions_0): Updated.
1304         (types_equal): New function.
1305
1306 2005-02-14  Tom Tromey  <tromey@redhat.com>
1307
1308         PR java/19921:
1309         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
1310         stack effect of multianewarray.
1311
1312 2005-02-14  Andrew Haley  <aph@redhat.com>
1313
1314         PR java/19907
1315         * expr.c (expand_byte_code): Call promote_arguments().
1316         (promote_arguments): New function.
1317         * decl.c (check_local_unnamed_variable): Remove special case for
1318         new verifier.
1319         (find_local_variable): Promote all boolean types to int
1320         when searching for local variable decls.
1321
1322 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
1323
1324         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
1325         parse-scan.y: Update copyright.
1326
1327 2005-02-11  Per Bothner  <per@bothner.com>
1328
1329         PR java/15543
1330         * parse-scan.y (input_location): Remove variable.
1331         (main_input_filename): New - replaces input_filename, which isn't
1332         settable if USE_MAPPED_LOCATION.
1333         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
1334         so we don't reference input_location or wfl_operator in that case.
1335         * jv-scan.c (expand_location): Remove - no longer used.
1336         (main): Set main_input_filename rather than input_filename.
1337
1338 2005-02-09  Richard Henderson  <rth@redhat.com>
1339
1340         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
1341         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
1342
1343 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
1344
1345         * expr.c (add_type_assertion): Use the proper enumeration type,
1346         since this is what htab_find_slot() is expecting.
1347
1348 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
1349
1350         * gcj.texi: Update copyright dates.
1351
1352 2005-02-02  Tom Tromey  <tromey@redhat.com>
1353
1354         * gcj.texi (libgcj Runtime Properties): Default library_control
1355         to 'cache'.
1356
1357 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
1358
1359         PR java/15543
1360         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
1361         (modifiers) when square brackets are present in a declaration for
1362         a final paramter.
1363         * jv-scan.c (main): Set input_filename and input_line.
1364
1365 2005-02-01  Tom Tromey  <tromey@redhat.com>
1366
1367         PR java/19742:
1368         * gjavah.c (get_field_name): Don't override name for JNI header.
1369
1370 2005-02-01  Roger Sayle  <roger@eyesopen.com>
1371
1372         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
1373         of unsigned types using iushr and lushr JVM bytecodes.
1374
1375 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
1376
1377         PR java/19738
1378         * gjavah.c (jni_print_float): Do not emit floating-point
1379         initialiser for a static final field.
1380         (jni_print_double): Likewise.
1381
1382 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
1383
1384         Revert:
1385         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1386         * gjavah.c (print_field_info): Mark static data members of
1387         floating-point type with "__extension__".
1388
1389 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1390
1391         * gjavah.c (print_field_info): Mark static data members of
1392         floating-point type with "__extension__".
1393
1394 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
1395
1396         PR java/9157
1397         * parse.y (build_string_concatenation): Remove redundant if.
1398         (patch_conditional_expr): Attempt to patch_string() the condition
1399         of a ?: as well, in addition to its other operands.
1400
1401 2005-01-25  Tom Tromey  <tromey@redhat.com>
1402
1403         * Make-lang.in (java/java-tree-inline.o): Removed.
1404
1405 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
1406
1407         PR java/19070
1408         * parse.y (patch_binop): Allow comparisons against NULL only
1409         if the other operand is of a reference type.
1410
1411 2005-01-24  Tom Tromey  <tromey@redhat.com>
1412
1413         * java-tree.h (gcj_abi_version): Declare.
1414         * class.c (make_class_data): Push gcj_abi_version into "next"
1415         field.  Renamed field.
1416         * decl.c (gcj_abi_version): New global.
1417         (parse_version): New function.
1418         (java_init_decl_processing): Call it.  Renamed 'next' field.
1419         Include version.h.
1420         (GCJ_BINARYCOMPAT_ADDITION): New define.
1421
1422 2005-01-24  Roger Sayle  <roger@eyesopen.com>
1423
1424         PR java/19295
1425         * jcf-write.c (generate_bytecode_insns): Conversions between
1426         integer types of the same precision shouldn't generate widening
1427         or narrowing conversion bytecodes.
1428
1429 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
1430
1431         * java-except.h, java-tree.h: Remove unused prototypes.
1432
1433 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
1434
1435         PR java/18091:
1436         * jcf-write.c (perform_relocations): Don't call memcpy if source
1437         and destination are the same.
1438
1439 2005-01-17  Tom Tromey  <tromey@redhat.com>
1440
1441         * verify-impl.c (get_short): Sign extend.
1442         (get_int): Likewise.
1443
1444 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
1445
1446         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
1447         with TYPE_SIZE.
1448
1449 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
1450
1451         * verify.c: Revert to the version before the BC-ABI merge.
1452
1453 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
1454
1455         PR java/19277
1456         * check-init.c (check_init): Take care of references that do not
1457         have an explicit final variable declaration (e.g. array length
1458         access) for pre/post in/de-crement operators.
1459
1460 2005-01-08  Mark Wielaard  <mark@klomp.org>
1461
1462         * parse.y (process_imports): Allocate (and free) original_name only
1463         when not already defined.
1464         * jcf-parse.c (read_class): Free results of find_class() and
1465         lrealpath().
1466         (java_parse_file): Keep pointer to head of file_list and free when
1467         done. Free result of lrealpath().
1468
1469 2005-01-05  Tom Tromey  <tromey@redhat.com>
1470
1471         * gcj.texi (Standard Properties): java.ext.dirs is now used.
1472
1473 2004-12-20  Andrew Haley  <aph@redhat.com>
1474
1475         * typeck.c: Use fold_convert for ints and booleans.
1476
1477 2004-12-17  Andrew Haley  <aph@redhat.com>
1478
1479         PR java/18931
1480         * typeck.c (convert): Use a CONVERT_EXPR when converting to
1481         BOOLEAN_TYPE or CHAR_TYPE.
1482         (convert_to_boolean, convert_to_char) : Remove.
1483         * convert.h (convert_to_boolean, convert_to_char) : Remove.
1484         * expr.c (expand_load_internal): Do type conversion if type is not
1485         as required.
1486
1487 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
1488
1489         PR target/18459
1490         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
1491         Update comment.
1492
1493 2004-12-07  Andrew Haley  <aph@redhat.com>
1494
1495         PR java/18811:
1496         * jcf-parse.c (load_class): Remove sanity test for missing inner
1497         class file.
1498
1499 2004-12-06  Tom Tromey  <tromey@redhat.com>
1500
1501         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
1502         (java.uninstall): Likewise.
1503         (java.maintainer-clean): Likewise.
1504         (.INTERMEDIATE): Likewise.
1505         (java.install-man): Likewise.
1506         (gcj-dbtool.pod): New target.
1507         * gcj.texi (Code Generation): Document -findirect-dispatch.
1508         (libgcj Runtime Properties): Document
1509         gnu.gcj.precompiled.db.path.
1510         (Top): Link to "Invoking gcj-dbtool".
1511
1512 2004-12-06  Tom Tromey  <tromey@redhat.com>
1513
1514         PR java/14853:
1515         * java-tree.h (extract_field_decl): Declare.
1516         * parse.y (extract_field_decl): Renamed from
1517         strip_out_static_field_access_decl.  No longer static.
1518         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
1519
1520 2004-12-03  Tom Tromey  <tromey@redhat.com>
1521
1522         * lang.c (flag_new_verifier): Define.
1523         (java_post_options): Set flag_new_verifier if indirect dispatch
1524         is being used.
1525         * lang.opt (fnew-verifier): Removed.
1526
1527 2004-12-03  Tom Tromey  <tromey@redhat.com>
1528
1529         PR bootstrap/14614:
1530         * Make-lang.in (java.install-common): Only install transformed
1531         gcjh if gcj-cross exists.
1532
1533 2004-12-03  Andrew Haley  <aph@redhat.com>
1534
1535         PR java/18812
1536         * except.c (link_handler): Patch 'outer' field of siblings of the
1537         range we're demoting.
1538
1539 2004-12-03  Andrew Haley  <aph@redhat.com>
1540
1541         PR java/18697
1542         * class.c (layout_class_method): Don't fail to override a method
1543         simply because it has DECL_ARTIFICIAL set.
1544
1545 2004-12-02  Tom Tromey  <tromey@redhat.com>
1546
1547         PR java/16675:
1548         * parse.y (craft_constructor): Special case null_pointer_node.
1549
1550 2004-12-02  Tom Tromey  <tromey@redhat.com>
1551
1552         PR java/18741:
1553         * java-gimplify.c (java_gimplify_expr): Don't call
1554         SET_EXPR_LOCATION unless wrapped tree is an expression.
1555
1556 2004-11-27  Per Bothner  <per@bothner.com>
1557
1558         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
1559         Fix fencepost error in 'i', which got executed one too many times.
1560         Also, fold memcpy into explicit loop, as originally intended.
1561         Also, free temporary 'buf' which otherwise leaks.
1562
1563 2004-11-27  Per Bothner  <per@bothner.com>
1564
1565         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
1566         local static variables if not USE_MAPPED_LOCATION.
1567
1568 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1569
1570         * class.c, decl.c, expr.c: Fix comment typos.
1571
1572 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
1573
1574         PR java/18305
1575         * decl.c (end_java_method): Call
1576         attach_init_test_initialization_flags on all the init_decls.
1577         * parse.y (attach_init_test_initialization_flags): Move to ...
1578         * expr.c (attach_init_test_initialization_flags): here and
1579         support BIND_EXPR also.
1580         * java-tree.h (attach_init_test_initialization_flags): Prototype.
1581         * jcf-parse.c (parse_class_file): Don't disable class init
1582         optimization.
1583
1584 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1585
1586         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
1587         in diagnostics.
1588
1589 2004-11-24  Richard Henderson  <rth@redhat.com>
1590
1591         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
1592         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
1593
1594 2004-11-24  Tom Tromey  <tromey@redhat.com>
1595
1596         * verify.c (defer_merging): Don't use C++-style comment.
1597         * verify.h (java_opcode): Added java_opcode_end.
1598         * class.c (build_class_ref): Remove C++ comment and old FIXME.
1599
1600         * verify-impl.c (vfy_push_type): Removed bogus "return".
1601         (initialize_stack): Use vfy_alloc and vfy_free.
1602         (verify_instructions_0): Likewise.
1603
1604         * Merged gcj-abi-2-dev-branch to trunk.
1605
1606 2004-11-24  Andrew Haley  <aph@redhat.com>
1607
1608         * jcf-parse.c (parse_class_file): Set file_start_location.
1609
1610 2004-11-10  Tom Tromey  <tromey@redhat.com>
1611
1612         * class.c (make_field_value): Don't call build_static_field_ref.
1613         (build_static_field_ref): Don't emit direct references when using
1614         indirect dispatch.
1615
1616         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
1617         -verbose:class into man page synopsis.
1618
1619 2004-11-09  Tom Tromey  <tromey@redhat.com>
1620
1621         * expr.c (build_java_arraystore_check): Still generate check if
1622         element type is itself an array.
1623
1624 2004-11-08  Tom Tromey  <tromey@redhat.com>
1625
1626         * java-tree.h (soft_check_assignment_node): Removed.
1627         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
1628         * decl.c (java_init_decl_processing): Don't initialize
1629         soft_check_assignment_node.
1630
1631 2004-11-05  Tom Tromey  <tromey@redhat.com>
1632
1633         * class.c (layout_class_methods): Don't add Miranda methods when
1634         using indirect dispatch.
1635
1636 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
1637
1638         * class.c (make_class_data): Call emit_assertion_table to set the
1639         'assertion_table' field.
1640         (build_signature_for_libgcj): Move here from expr.c.
1641         (add_assertion_table_entry): New function. Callback for assertion
1642         hashtable traversal.
1643         (emit_assertion_table): New. Take class argument, and generate
1644         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
1645         * decl.c (init_decl_processing): Define assertion_entry_type record.
1646         Push 'assertion_table' class field instead of 'verify'.
1647         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
1648         (type_assertion_hash): Include 'assertion_code' in hash.
1649         (add_type_assertion): Rewritten. Take class and assertion_code
1650         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
1651         (can_widen_reference_to): Use new add_type_assertion() arguments.
1652         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
1653         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
1654         (verify_identifier_node): Removed.
1655         (assertion_entry_type, assertion_table_type): New.
1656         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
1657         assertion code definitions.
1658         (struct type_assertion): Add assertion_code. Rename 'source_type' and
1659         'target_type' to 'op1' and 'op2'.
1660         (add_type_assertion): Declare.
1661         (lang_printable_name_wls): Remove unused definition.
1662         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
1663         to emit runtime assertion.
1664         (vfy_note_stack_type): Clean up non-C90 declarations.
1665         (vfy_note_local_type): Likewise.
1666         * verify.h (vfy_is_assignable_from): Declare.
1667         * verify-impl.c (is_assignable_from_slow): Remove unused function.
1668         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
1669         instead of is_assignable_from_slow().
1670         (types_compatible): Reinstate ref_compatible() call.
1671
1672 2004-11-04  Tom Tromey  <tromey@redhat.com>
1673
1674         * class.c (build_static_field_ref): Reverted previous patch.
1675
1676         * class.c (build_static_field_ref): Don't emit direct references
1677         when using indirect dispatch.
1678
1679 2004-11-03  Tom Tromey  <tromey@redhat.com>
1680
1681         * expr.c (expand_java_arrayload): Set lhs_type_node.
1682         (expand_java_arraystore): Set rhs_type_node.
1683
1684 2004-11-02  Tom Tromey  <tromey@redhat.com>
1685
1686         * jcf-parse.c (compute_class_name): Use filename length from zip
1687         directory, not strlen.
1688
1689         * expr.c (expand_invoke): Mark new interface methods as abstract.
1690
1691 2004-11-01  Tom Tromey  <tromey@redhat.com>
1692
1693         * verify-impl.c (push_jump): Removed check for uninitialized
1694         objects.
1695         (push_exception_jump): Likewise.
1696         (handle_ret_insn): Likewise.
1697         (handle_jsr_insn): Likewise.
1698         (state_check_no_uninitialized_objects): Removed.
1699
1700         * decl.c (check_local_unnamed_variable): Recognize
1701         promoted-to-int parameters when using the new verifier.
1702         * expr.c (expand_java_arraystore): Explicitly request array type
1703         when using new verifier.
1704         (expand_java_arrayload): Likewise.
1705         (invoke_build_dtable): Don't pass object_type_node as
1706         expression argument to build_java_indirect_ref.
1707         (build_java_check_indexed_type): Do nothing.
1708         (build_java_arraystore_check): Handle case where array doesn't
1709         have array type.
1710         (build_java_array_length_access): Likewise.
1711         (expand_invoke): Handle case where interface overrides a method
1712         from Object.
1713         (pop_type_0): Always succeed for reference types.
1714         (process_jvm_instruction): Don't pop a value in a dead
1715         exception handler.
1716         (pop_arguments): Convert arguments to correct types.
1717
1718 2004-10-29  Andrew Haley  <aph@redhat.com>
1719
1720         * jcf-parse.c (give_name_to_class): Remove line that was
1721         incorrectly merged.
1722
1723 2004-10-29  Andrew Haley  <aph@redhat.com>
1724
1725         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1726
1727 2004-10-20  Andrew Haley  <aph@redhat.com>
1728
1729         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1730
1731 2004-10-26  Tom Tromey  <tromey@redhat.com>
1732
1733         * verify.h (vfy_notify_verified): Removed.
1734         * verify-glue.c (vfy_notify_verified): Removed.
1735
1736 2004-10-26  Tom Tromey  <tromey@redhat.com>
1737
1738         * verify-impl.c (debug_print_state): Declare `i' before code.
1739         (merge_types): Modify `t' when it is null_type.
1740
1741 2004-10-26  Tom Tromey  <tromey@redhat.com>
1742
1743         * verify-impl.c (type_print): Renamed from print.  Now static and
1744         takes an argument.
1745         (debug_print_state): Use type_print.
1746
1747 2004-10-25  Tom Tromey  <tromey@redhat.com>
1748
1749         * expr.c (build_invokeinterface): Compute correct offset for
1750         index into interface methods.
1751
1752 2004-10-20  Tom Tromey  <tromey@redhat.com>
1753
1754         * java-tree.h (verify_jvm_instructions_new): Declare.
1755
1756         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1757         command line.
1758
1759         * verify-impl.c (verify_instructions): Correctly handle wide
1760         types on the stack.
1761         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1762         (vfy_get_component_type): Strip pointer types.
1763         (vfy_find_class): Use get_type_from_signature.  Strip pointer
1764         types.
1765         Include java-except.h.
1766
1767 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
1768
1769         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1770         vfy_push_type_t, set_variable, add_new_state, merge_into,
1771         handle_jsr_insn, branch_prepass, check_class_constant,
1772         check_wide_constant, get_one_type, compute_static_types,
1773         verify_instructions_0): Clean up C99 declarations after statements.
1774
1775 2004-10-20  Tom Tromey  <tromey@redhat.com>
1776
1777         * verify-impl.c (merge_refs): Compare reference against iterator,
1778         not ref2.
1779
1780         * verify-glue.c (vfy_tag): Mask off resolved flag.
1781
1782 2004-10-19  Tom Tromey  <tromey@redhat.com>
1783
1784         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1785         (init_state_with_stack): Initialize `this_type' in state.
1786         (verify_method): Use debug_print.
1787         * verify-glue.c (vfy_is_primitive): Removed debugging print.
1788         (vfy_note_stack_depth): Reverted last patch.
1789         (vfy_note_stack_type): Note pointer to Object, not Object.
1790         (vfy_note_local_type): Likewise.
1791
1792         * verify.h (vfy_note_instruction_seen): Declare.
1793         * verify-glue.c (verify_jvm_instructions_new): Set
1794         BCODE_EXCEPTION_TARGET on target instruction.
1795         (vfy_note_instruction_seen): New function.
1796         * verify-impl.c (FLAG_INSN_SEEN): New define.
1797         (verify_instructions_0): Set flag on instruction.  Save state for
1798         PC=0 later.
1799         (verify_instructions): Call vfy_note_instruction_seen.
1800
1801         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1802         (verify_jvm_instructions_new): Call method_init_exceptions,
1803         add_handler, and handle_nested_ranges.
1804         * verify-impl.c (verify_method): Return 1 on success.
1805         (verify_instructions_0): Save the state at PC=0.
1806
1807         * verify-impl.c (init_type_from_class): Set is_resolved and
1808         ref_next on new ref_intersection.
1809         (init_type_from_string): Likewise.
1810
1811 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
1812
1813         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1814         if flag_new_verifier is set.
1815         * java-tree.h (flag_new_verifier): Declare.
1816         * lang.opt (fnew-verifier): New option.
1817         * verify-impl.c: Work around namespace pollution by undef'ing
1818         'current_class'.
1819         (struct verifier_context): Make 'bytecode' const.
1820         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1821         (types_compatible): For the BC-ABI, always consider reference types
1822         compatible.
1823         (check_class_constant): Use vfr->current_class.
1824         (check_constant): Likewise.
1825         (check_wide_constant): Likewise.
1826         (check_field_constant): Check for 'L' at start of type name.
1827         (get_one_type): Return pointer instead of type. Set type result in
1828         caller via passed type pointer.
1829         (compute_argument_types): Update to use new get_one_type arguments.
1830         (compute_return_type): Likewise.
1831         (make_verifier_context): New. Allocate and initialize 'vfr'.
1832         (free_verifier_context): New. Free 'vfr' and its contents.
1833         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
1834         and free_verifier_context.
1835
1836 2004-10-15  Tom Tromey  <tromey@redhat.com>
1837
1838         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
1839         * verify.h (vfy_fail): Fixed formatting.
1840
1841         * verify-impl.c (vfr): Fixed comment formatting.
1842         (collapse_type): New function.
1843         (verify_instructions): Notify compiler about type map.
1844         * verify.h (vfy_note_stack_depth): Updated.
1845         (vfy_note_stack_type): Likewise.
1846         (vfy_note_local_type): Likewise.
1847         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
1848         Declare.
1849         * verify-glue.c (vfy_note_stack_depth): Correctly size type
1850         state.  Added `method' argument.
1851         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
1852         argument.
1853         (vfy_note_local_type): New function.
1854         (vfy_unsuitable_type): Likewise.
1855         (vfy_return_address_type): Likewise.
1856         (vfy_null_type): Likewise.
1857
1858         * verify.h (VFY_IN_GCC): Removed.
1859         (VFY_WANT_TYPEMAP): Removed.
1860         * verify-impl.c (verify_instructions_0): Removed useless "\".
1861         (struct state) <next>: Uncomment.
1862
1863 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
1864
1865         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
1866         C-style.
1867
1868 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
1869
1870         * Make-lang.in (verify.o): Re-enabled this target.
1871         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
1872         (vfy_get_interface): Likewise.
1873         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
1874         * verify.h (verify_jvm_instructions_new): Declare.
1875         * verify-impl.c (free_state): Temporarily comment out unused
1876         function.
1877
1878 2004-10-06  Tom Tromey  <tromey@redhat.com>
1879
1880         * java-tree.h (JV_STATE_READ): New enum value.
1881
1882 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
1883
1884         * verify.h: New file.
1885
1886 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
1887
1888         * verify-impl.c, verify-glue.c, verify.h: New files.
1889         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
1890
1891 2004-09-24  Andrew Haley  <aph@redhat.com>
1892
1893         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
1894         for a slot if it's of pointer type.
1895
1896 2004-09-14  Tom Tromey  <tromey@redhat.com>
1897
1898         * class.c (make_class_data): Correctly initialize "state" field.
1899         Initialize "engine" field.
1900         * decl.c (java_init_decl_processing): Add "engine" field.
1901
1902 2004-09-10  Andrew Haley  <aph@redhat.com>
1903
1904         PR java/12760
1905         * expr.c (build_invokeinterface): Use fast method for interface
1906         dispatch.
1907         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1908         JTI_ITABLE_PTR_TYPE.
1909         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
1910         (emit_symbol_table): Add new arg, element_size.
1911         * decl.c (java_init_decl_processing): Initialize Class.itable.
1912         * class.c (GEN_TABLE): New macro.
1913         (gen_indirect_dispatch_tables): Use it.  Add itable.
1914         (make_class_data): Add new arg for emit_symbol_table().
1915         Emit itable.
1916         (add_miranda_methods): Make sure search_class has been parsed.
1917         (emit_symbol_table): Add new arg, element_size.
1918
1919 2004-09-06  Andrew Haley  <aph@redhat.com>
1920
1921         * verify.c (merge_types): Return Object for all merges of
1922         interfaces.
1923         * expr.c (add_type_assertion): Don't generate assertions when
1924         source type is array of Object.
1925
1926 2004-09-03  Andrew Haley  <aph@redhat.com>
1927
1928         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1929
1930         * lang.c (java_post_options): Force flag_verify_invocations if
1931         we're not using indirect dispatch.
1932
1933         * expr.c (pop_type_0): Move test for interfaces before call to
1934         can_widen_reference_to().
1935         (build_signature_for_libgcj): Remove generation of canonical array
1936         type.
1937         (add_type_assertion): Canonicalize both arrays.
1938         Don't assert that type X can be assigned to Object.
1939         Don't assert that type X an be assigned to type X.
1940         Don't assert that Object can be assigned to type X.
1941         (can_widen_reference_to): Warn whenever we generate an assertion.
1942         (process_jvm_instruction): Use throwable_type_node for the type of
1943         an exception class.
1944
1945 2004-09-01  Andrew Haley  <aph@redhat.com>
1946
1947         * decl.c (java_init_decl_processing): Change
1948         verify_identifier_node to "__verify".
1949         * expr.c (add_type_assertion): Use verify_identifier_node for name.
1950         * java-tree.h (verify_identifier_node): Change to "__verify".
1951
1952         * expr.c (build_signature_for_libgcj): New function.
1953         (add_type_assertion): Use it to construct signatures for
1954         source_type and target_type.
1955
1956 2004-08-27  Andrew Haley  <aph@redhat.com>
1957
1958         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1959         (verify_identifier_node): New.
1960         (TYPE_VERIFY_METHOD): New.
1961         (struct type_assertion): New type.
1962         * expr.c (type_assertion_eq): New function.
1963         (type_assertion_hash): New function.
1964         (add_type_assertion): New function.
1965         (can_widen_reference_to): Call add_type_assertion().
1966         * decl.c (java_init_decl_processing): Add verify_identifier_node.
1967         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1968         (finish_class): Output TYPE_VERIFY_METHOD (type).
1969
1970         * decl.c (end_java_method): Nullify unused fields.
1971
1972 2004-08-17  Andrew Haley  <aph@redhat.com>
1973
1974         * verify.c (defer_merging): Quieten.
1975         * jcf-parse.c (load_class): Only try to open a class file if it's
1976         java.lang.Object or if it's part of the current compilation.
1977         Check that the class we just tried to load is the class we just
1978         loaded.  Quieten.
1979         (java_parse_file): Set flag_verify_invocations off if we're
1980         compiling from .class.
1981         (parse_zip_file_entries): Abort if we try to read a dummy class.
1982         * expr.c (can_widen_reference_to): Quieten.
1983         (build_invokevirtual): Abort if we try to invokevirtual an
1984         interface.
1985         (expand_invoke): Don't build a non-interface call to an interface.
1986         (build_instanceof): Don't do premature optimization if
1987         flag_verify_invocations is not set.
1988         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1989         from superclass.
1990         (build_static_field_ref): Add correct type conversion for
1991         field_address.
1992         (add_miranda_methods): Disable generation of Miranda methods for
1993         dummy classes.
1994         (layout_class_method): Don't complain about non-static method
1995         overrides static method with dummy classes.
1996
1997 2004-08-13  Tom Tromey  <tromey@redhat.com>
1998
1999         * class.c (build_static_field_ref): Re-enable atable lookups for
2000         static fields.
2001
2002         * parse.y (strip_out_static_field_access_decl): Indentation fix.
2003
2004 2004-08-11  Tom Tromey  <tromey@redhat.com>
2005
2006         * gcj.texi (libgcj Runtime Properties): Document new properties.
2007
2008 2004-08-06  Andrew Haley  <aph@redhat.com>
2009
2010         * jcf-parse.c (load_class): Check that we really have loaded the
2011         class we're looking for.
2012
2013 2004-07-19  Andrew Haley  <aph@redhat.com>
2014
2015         * verify.c (verify_jvm_instructions): Comment change only.
2016
2017         * typeck.c (build_java_array_type): Add size field to array name.
2018
2019         * java-tree.h (LOCAL_SLOT_P): New.
2020         (update_aliases): Add PC argument.
2021         (pushdecl_function_level): New function.
2022
2023         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2024         MODIFY_EXPR, and SAVE_EXPR.
2025         (java_gimplify_modify_expr): New function.
2026
2027         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2028         (expand_iinc): Pass PC to update_aliases().
2029         (STORE_INTERNAL): Likewise.
2030         (process_jvm_instruction): Likewise.
2031
2032         * decl.c (base_decl_map): New variable.
2033         (uniq): New variable.
2034         (update_aliases): Rewrite with more thorough checking.
2035         (debug_variable_p): New function.
2036         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2037         (check_local_named_variable): Delete whole function.
2038         (initialize_local_variable): New function.
2039         (check_local_unnamed_variable): Add checks and comments.
2040         (find_local_variable): Rewrite.
2041         (java_replace_reference): New function.
2042         (function_binding_level): New variable.
2043         (pushdecl_function_level): New function.
2044         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2045         (maybe_pushlevels): Call pushdecl() on each of the new decls.
2046         (start_java_method): Reset uniq.  Create base_decl_map.  Set
2047         function_binding_level.
2048         (end_java_method): Null unused fields to save memory.
2049
2050 2004-06-29  Andrew Haley  <aph@redhat.com>
2051
2052         * except.c (expand_start_java_handler): Push a new binding level.
2053         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2054         register_exception_range() to register where we'll do it.
2055         (expand_end_java_handler): Remove old bogus code.  Replace with
2056         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2057         the top of the expression we're curently building.
2058         (maybe_end_try): Delete.
2059         * decl.c (binding_level.exception_range): New field.
2060         (clear_binding_level): Add field exception_range.  Reformat.
2061         (poplevel): Call expand_end_java_handler().
2062         (poplevel): Call java_add_stmt only if functionbody is false.
2063         (maybe_poplevels): Don't call maybe_end_try() from here.
2064         (end_java_method): Clear no longer used trees in function decl.
2065         (register_exception_range): New function.
2066         * java-tree.h (register_exception_range, struct eh_range): Declare.
2067
2068 2004-06-22  Andrew Haley  <aph@redhat.com>
2069
2070         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
2071         the otable.
2072         * check-init.c (get_variable_decl): Teach check-init about
2073         FIELD_DECLs addressed via the otable.
2074         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
2075         CLASS_PARSED_P.
2076
2077 2004-05-28  Andrew Haley  <aph@redhat.com>
2078
2079         * jcf-parse.c (load_class): Don't try to read a class that we've
2080         already read.
2081
2082         * expr.c (build_invokeinterface): Use the old-fashioned way of
2083         doing indirect dispatch: look up interfaces by name.
2084         * java-tree.h (enum java_tree_index): Add
2085         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
2086         * decl.c (java_init_decl_processing): Add
2087         soft_lookupinterfacemethodbyname_node.
2088
2089         * gjavah.c (print_method_info): Final methods have vtable entries,
2090         so gjavah needs to output them.
2091         * class.c (layout_class_method): Generate vtable entries for final
2092         methods.
2093         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
2094         dispatch, even if a method is final.
2095
2096 2004-05-25  Andrew Haley  <aph@redhat.com>
2097
2098         * class.c (build_symbol_entry): Convert the names of constructors
2099         to init_identifier_node when generating an entry for the indirect
2100         dispatch table.
2101
2102         * expr.c (build_known_method_ref): Generate indirect calls for
2103         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
2104
2105 2004-05-24  Andrew Haley  <aph@redhat.com>
2106
2107         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
2108         atable element is of the right type.
2109
2110         * class.c (build_static_field_ref): Cast pointer to correct type
2111         for field.
2112
2113 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2114
2115         * Merged with HEAD as of 20040514. Diff against
2116         gcj-abi-2-merge-20040514.
2117
2118 2004-04-16  Andrew Haley  <aph@redhat.com>
2119
2120         * verify.c (check_pending_block): Disable subroutine checks.
2121         (defer_merging): New function.
2122         (merge_types): If types are dummy, use defer_merging to combine them.
2123         (verify_jvm_instructions): If invocation is invokeinterface and
2124         target is dummy, assume target really is an interface.
2125
2126         * parse.y (patch_invoke): Break out call to java_create_object.
2127
2128         * lang.c (flag_verify_invocations): New.
2129
2130         * jcf-parse.c (load_class): If we've already failed to load a
2131         class, don't try again.
2132         (load_class): If we can't find a .class file, don't fail, but emit
2133         a warning.
2134         (parse_class_file): Don't act on dummy methods.
2135
2136         * java-tree.h (flag_verify_invocations): New.
2137         (TYPE_DUMMY): New.
2138         (lang_type.dummy_class): New field.
2139         (java_create_object): New function.
2140         (METHOD_DUMMY): New.
2141
2142         * expr.c (build_field_ref): Widen field offset.
2143         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
2144         that each of its elements is compatible with the one we're
2145         popping.
2146         (pop_type_0): Issue a warning to say that we need to generate a
2147         runtime check.
2148         (java_create_object): New function.
2149         (build_field_ref): Only generate hard refs if we're not using
2150         indirect dispatch.
2151         (expand_java_field_op): If we're using !verify_invocations and we
2152         see a missing field, generate a decl for it.
2153
2154         (expand_invoke): If a class doesn't have the method we seek and
2155         we're using !flag_verify_invocations, generate a decl for the
2156         method now.
2157
2158         (build_known_method_ref): Always use indirect dispatch via the
2159         atable for static methods.
2160
2161         (expand_java_NEW): Break out object creation into new function,
2162         java_create_object.
2163
2164         (can_widen_reference_to): Issue a warning to say that we need to
2165         generate a runtime check.
2166
2167         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
2168         (make_method_value): Also use index for interfaces.
2169         (make_class_data): Skip dummy field for inherited data.
2170         Don't build method array for dummy methods.
2171         Set size_in_byte to -1 when using inirect dispatch
2172         Don't build a hard class ref if we don't have a hard ref to our
2173         superclass, or if we're using inirect dispatch.
2174         Null out dispatch tables.
2175
2176         (layout_class_method): Don't complain about non-static method
2177         overrides static method is method is artificial.
2178
2179         (build_static_field_ref): Disable atable references to static
2180         fields for the time being.
2181
2182         (layout_class_methods): Check for CLASS_INTERFACE as
2183         well as CLASS_ABSTRACT.
2184
2185 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2186
2187         * class.c (make_class_data): Don't check flag_inline_functions.
2188         * lang.c (flag_really_inline): Remove unused flag.
2189         (java_handle_option): Don't set it here.  Remove special handling
2190         of flag_inline_functions for Java.
2191         (java_init): Don't set flag_inline_trees here.  Already done...
2192         (java_post_options): ...here.  Don't clear flag_inline_functions.
2193
2194 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2195
2196         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
2197         (java_gimplify_exit_block_expr): New function.
2198         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
2199         LABELED_BLOCK_EXPR.
2200         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
2201         (EXIT_BLOCK_EXPR): Likewise.
2202         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
2203         (LABELED_BLOCK_BODY): Likewise.
2204         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
2205         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
2206         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
2207         TREE_OPERAND.
2208         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
2209         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
2210         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
2211         second operand of EXIT_BLOCK_EXPR.
2212         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
2213         TREE_OPERAND.
2214         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
2215
2216 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2217
2218         * xref.h (xref_flag_value): Remove.
2219         (xref_set_data, xref_get_data): Likewise.
2220         (xref_set_current_fp): Likewise.
2221         (XREF_NONE): Likewise.
2222         (XREF_GET_DATA): Likewise.
2223         * xref.c (xref_flag_value): Remove.
2224         (xref_set_data, xref_get_data): Likewise.
2225         (xref_set_current_fp): Likewise.
2226
2227 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2228
2229         * gjavah.c (output_directory): Make static.
2230         (temp_directory): Likewise.
2231
2232 2004-11-15  Tom Tromey  <tromey@redhat.com>
2233
2234         * decl.c (instn_ptr_type_node): Removed.
2235         (lineNumbers_ptr_type_node): Removed.
2236         (jint_type): Removed.
2237         (jint_ptr_type): Removed.
2238
2239 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
2240
2241         PR java/15576
2242         * check-init.c (check_init): Ignore DECL_EXPR.
2243         * expr.c (always_initialize_class_p): Reenable.
2244         (build_class_init): Use a variable to store the decl.  Also use
2245         boolean_false_node instead of integer_zero_node.
2246         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
2247         to the block.
2248
2249 2004-11-08  Tom Tromey  <tromey@redhat.com>
2250
2251         PR java/16843:
2252         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
2253         generating a JNI header.
2254         (print_field_info): Handle JNI headers.
2255         (jni_print_float): Likewise.
2256         (jni_print_double): Likewise.
2257
2258 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
2259
2260         * decl.c (end_java_method): Remove duplicated code.
2261
2262 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
2263             Gerald Pfeifer  <gerald@pfeifer.com>
2264
2265         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2266         as well.
2267
2268 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
2269
2270         PR java/17265
2271         * class.c: Reinstate 2004-08-18 patch.
2272         (make_local_function_alias): Don't create an alias for extern (native)
2273         functions.
2274
2275 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
2276
2277         PR java/17265
2278         * class.c (make_local_function_alias): Revert 2004-08-18 change.
2279         (make_method_value): Likewise.
2280
2281 2004-10-21  Andrew Haley  <aph@redhat.com>
2282
2283         PR java/18091:
2284         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2285
2286 2004-10-20  Andrew Haley  <aph@redhat.com>
2287
2288         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2289         Remove duplicated code block.
2290
2291 2004-10-18  Steven Bosscher  <stevenb@suse.de>
2292
2293         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
2294         New rules to work around old Bison warnings.
2295
2296 2004-10-17  Steven Bosscher  <stevenb@suse.de>
2297
2298         * class.c (ident_subst): Always alloca buffer.
2299         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
2300         opcode after including javaop.def.
2301         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
2302         conditional expression that exits, to avoid warnings.
2303         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
2304         a user of an extension.
2305         * win32-host.c: Move check down to have non-empty file when
2306         WIN32 is not defined.
2307
2308         * Make-lang.in (java-warn): Add STRICT_WARN.
2309         (java/jcf-io.o-warn): Don't have Werror for this file.
2310         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
2311
2312 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
2313
2314         * expr.c (expr_add_location): Move declaration to before all
2315         statements.
2316         * parse.y (java_expand_classes): Ditto.
2317         * lex.c (java_peek_unicode): Ditto.
2318
2319 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
2320
2321         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
2322         if possible, else convert `foo' to 'foo'.
2323         * class.c: Likewise.
2324         * decl.c: Likewise.
2325         * expr.c: Likewise.
2326         * jcf-io.c: Likewise.
2327         * jcf-parse.c: Likewise.
2328         * lang.c: Likewise.
2329         * lex.c: Likewise.
2330         * parse.h: Likewise.
2331
2332 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
2333
2334         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
2335         rename parameter 'msg' to 'msgid' in function declaration.
2336         (issue_warning_error_from_context): Likewise.
2337         (yyerror): Rename parameter 'msg' to 'msgid'.
2338         (all over): Use new quoting style for diagnostics.
2339
2340 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2341
2342         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
2343         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
2344         Update copyright.
2345
2346 2004-10-14  Matt Austern  <austern@apple.com>
2347
2348         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
2349         pointer_set_t* now.
2350
2351 2004-10-13  Tom Tromey  <tromey@redhat.com>
2352
2353         PR java/15578:
2354         * lang.opt (--extdirs): Document.
2355         * jvspec.c (lang_specific_driver): Recognize -encoding and
2356         -extdirs.
2357
2358 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
2359
2360         * parse.y (issue_warning_error_from_context): Use va_list *
2361         instead of va_list parameter.
2362         (parse_error_context): Update call.
2363         (parse_warning_context): Likewise.
2364
2365 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
2366
2367         * parse.y, parse-scan.y: Add list of diagnostic messages to
2368         insulate translation template from version of yacc/bison used
2369         to compile the grammar.
2370
2371 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
2372
2373         Prepare for %q, %< and %> in diagnostic message strings.
2374         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
2375         Name second parameter 'msgid'.
2376         * parse.y: Additionally include pretty-print.h and diagnostic.h.
2377         (issue_warning_error_from_context): Use pretty-printer functions
2378         instead of vsprintf for constructing formatted messages. Rename
2379         parameter 'msg' to 'msgid'.
2380         (parse_error_context): Rename parameter 'msg' to 'msgid'.
2381         (parse_warning_context): Likewise.
2382
2383 2004-10-05  Andrew Haley  <aph@redhat.com>
2384
2385         PR java/17779
2386         * jcf-parse.c (parse_zip_file_entries): If a class has a
2387         superclass and a TYPE_SIZE of zero, lay it out.
2388
2389 2004-09-30  Andrew Haley  <aph@redhat.com>
2390
2391         PR java/17733
2392         * jcf-parse.c (compute_class_name): Rewrite.
2393
2394 2004-10-01  Jan Hubicka  <jh@suse.cz>
2395
2396         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
2397
2398 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
2399
2400         * lex.c: Fix a comment typo.
2401
2402 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
2403
2404         * java-tree.h: Fix a comment typo.
2405
2406 2004-09-30  Per Bothner  <per@bothner.com>
2407
2408         Simplify lexer.  Implement --enable-mapped-location support.
2409         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
2410         (parse_source_file_1): Pass filename as extra parameter, so we can call
2411         linemap_add and set input_location here, rather than in both callers.
2412         (read_class): Pass copied filename to parse_source_file_1.
2413         Don't initialize wfl_operator - only needed for source compilation.
2414         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
2415         * lex.h:  Remove a bunch of debugging macros.
2416         * lex.h (struct_java_line, struct java_error):  Remove types.
2417         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
2418         (struct java_lc_s):  Remove prev_col field.
2419         (struct java_lexer):  New fields next_unicode, next_columns, and
2420         avail_unicode.  New position field, and maybe token_start field.
2421         Don't need hit_eof field - use next_unicode == -1 instead.
2422         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
2423         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
2424         * parse.h:  Various changes for USE_MAPPED_LOCATION.
2425         (EXPR_WFL_EMIT_LINE_NOTE): XXX
2426         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
2427         (struct parser_ctxt):  New file_start_location field.
2428         Remove p_line, c_line fields since we no longer save lines.
2429         Remove elc, lineno, and current_jcf fields - no longer used.
2430         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
2431         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
2432         source_location and is probably not needed anymore anyway.
2433         Use new expr_add_Location function.
2434         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
2435         (java_pop_parser_context):  Minor cleanup.
2436         (java_parser_context_save_global, java_parser_context_restore_global,
2437         java_pop_parser_context):  Save/restore input_location as a unit.
2438         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
2439         a source_location instead of a wfl context node.
2440         (check_class_interface_creation):  input_filename is not addressable.
2441         (create_artificial_method):  Calling java_parser_context_save_global
2442         and java_parser_context_restore_global is overkill.  Instead,
2443         temporarily set input_location from class decl.
2444         (java_layout_seen_class_methods): Set input_location from method decl.
2445         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
2446         (finish_loop_body):  Likewise.
2447         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
2448         (java_sprint_unicode):  Take a character, not index in line.
2449         (java_sneak_uncode):  Replaced by java_peek_unicode.
2450         (java_unget_unicode):  No longer used.
2451         (java_allocate_new_line. java_store_unicode):  Removed, since we
2452         no longer remember "lines".
2453         (java_new_lexer):  Update for new data structures.
2454         (java_read_char):  Move unget_value checking to java_read_unicode.
2455         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
2456         efficient functions that are used directly when lexing.
2457         (java_read_unicode_collapsing_terminators):  No longer needed.
2458         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
2459         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
2460         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
2461         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
2462         combine switch branches, and test for common token kinds earlier.
2463         (java_lex_error):  Rewrite.
2464         * jv-scan.c (expand_location): New function, copied from tree.c.
2465         (main): Set ctxp->filename instead of setting input_filename directly.
2466
2467 2004-09-30  Per Bothner  <per@bothner.com>
2468
2469         More cleanup for --enable-mapped-location.
2470         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
2471         input_location here.  Instead do it in give_name_to_class.
2472         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
2473         * expr.c (expand_byte_code): Call linemap_line_start.
2474         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
2475         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
2476         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
2477         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
2478         to USE_MAPPED_LOCATION case.
2479
2480         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
2481         * jcf-parse.c (java_parse_file): Don't set input_filename.
2482         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
2483         Create a list of TRANSLATION_UNIT_DECL.
2484         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
2485         reason is so we can set a DECL_SOURCE_LOCATION for each file.
2486         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
2487         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
2488         (file_start_location):  New static.
2489         (set_source_filename):  Avoid extra access to input_filename macro.
2490         Concatenate new name with class's package prefix.
2491         (set_source_filename, give_name_to_class): Update.
2492         (give_name_to_class):  Set class's "line 0" input_location here.
2493         (parse_class_file):  Set input_location as a unit.
2494
2495         * jcf-parse.c (load_class): Sanity test if missing inner class file.
2496
2497 2004-09-29  Per Bothner  <per@bothner.com>
2498
2499         * java-tree.h:  Redefine some macros and add some declaration
2500         to handle the USE_MAPPED_LOCATION case.
2501         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
2502         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
2503         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
2504         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
2505
2506         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
2507         * decl.c (finish_method, java_add_stmt): Likewise.
2508         * java-gimplify.c (java-gimplify.c):  Likewise.
2509         * jcf-write.c (generate_bytecode_insns):  Likewise.
2510         * lang.c (java_post_options): Likewise - call linemap_add.
2511
2512 2004-09-29  Andrew Haley  <aph@redhat.com>
2513
2514         PR java/17007
2515         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
2516         result of TRUNC_MOD_EXPR.
2517         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
2518         * decl.c (java_init_decl_processing): Mark
2519         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
2520
2521 2004-09-28  Tom Tromey  <tromey@redhat.com>
2522
2523         PR java/15710:
2524         * class.c (add_miranda_methods): Load superinterface if not
2525         already loaded.
2526
2527 2004-09-28  Andrew Haley  <aph@redhat.com>
2528
2529         PR java/17586
2530         * jcf-parse.c (load_class): Don't try to read a class that we've
2531         already read.
2532
2533 2004-09-28  Andrew Haley  <aph@redhat.com>
2534
2535         * jcf-parse.c (load_class): Back out previous broken patch.
2536
2537 2004-09-28  Andrew Haley  <aph@redhat.com>
2538
2539         PR java/17586
2540         * jcf-parse.c (load_class): Don't try to read a class that we've
2541         already read.
2542         Check that we really did read the right class.
2543
2544 2004-09-25  Tom Tromey  <tromey@redhat.com>
2545
2546         PR java/17500:
2547         * parse.y (create_artificial_method): Use add_method_1.
2548
2549 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
2550
2551         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
2552         comment typos.
2553         * gcj.texi: Fix typos.
2554
2555 2004-09-24  Tom Tromey  <tromey@redhat.com>
2556
2557         PR java/15656:
2558         * parse.y (class_instance_creation_expression): Set `$$' to NULL
2559         in error parts of rule.
2560         (unary_expression): Don't call error_if_numeric_overflow when $1
2561         is NULL.
2562
2563 2004-09-24  Tom Tromey  <tromey@redhat.com>
2564
2565         PR java/16789:
2566         * parse.y (resolve_qualified_expression_name): Set
2567         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
2568         * expr.c (force_evaluation_order): Check for empty argument list
2569         after stripping COMPOUND_EXPR.
2570
2571 2004-09-23  Andrew Haley  <aph@redhat.com>
2572
2573         PR java/16927:
2574         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
2575         COND_EXPRs.
2576
2577 2004-09-23  Tom Tromey  <tromey@redhat.com>
2578
2579         PR java/17329:
2580         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
2581         where operand is null.
2582
2583 2004-09-23  Tom Tromey  <tromey@redhat.com>
2584
2585         PR java/17380:
2586         * parse.y (not_accessible_p): Allow access to protected members
2587         even when class is not static.
2588
2589 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2590
2591         * Make-lang.in: Revert the gcc-none.o change.
2592
2593 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2594
2595         * parse.y (patch_anonymous_class): VEC_space returns true if there
2596         is space.
2597
2598 2004-09-21  Matt Austern  <austern@apple.com>
2599
2600         Fix bootstrap.
2601         * gjavah.c (free_method_name_list): Fix function definition so
2602         it's a proper C prototype.
2603
2604 2004-09-21  Tom Tromey  <tromey@redhat.com>
2605
2606         PR java/17575:
2607         * gjavah.c (free_method_name_list): New method.
2608         (main): Call it.
2609
2610 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2611             Zack Weinberg  <zack@codesourcery.com>
2612
2613         * java-tree.def: Use tree_code_class enumeration constants
2614         instead of code letters.
2615         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
2616         new tree-class enumeration constants.
2617
2618 2004-09-13  Tom Tromey  <tromey@redhat.com>
2619
2620         PR java/17216:
2621         * class.c (layout_class_method): Put synthetic methods into the
2622         vtable.
2623
2624 2004-09-11  Andrew Pinski  <apinski@apple.com>
2625
2626         * Make-lang.in (java/ggc-none.c): Change dependency
2627         for ggc.h into $(GGC_H).
2628
2629 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2630
2631         * Make-lang.in (java/win32-host.o): Add dependency on
2632         coretypes.h.
2633         * win32-host.c: Add includes for coretypes.h, jcf.h
2634
2635 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2636
2637         * Make-lang.in (GCJH_OBJS): Change dependency from
2638         ggc-none.o to java/ggc-none.o
2639         (JCFDUMP_OBJS): Likewise.
2640         (java/ggc-none.o): New target.
2641
2642 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2643
2644         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
2645         * class.c (build_utf8_ref, build_static_field_ref,
2646         make_field_value, make_method_value, get_dispatch_table,
2647         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2648         * constants.c (get_tag_node, build_ref_from_constant_pool,
2649         build_constants_constructor): Likewise.
2650         * decl.c (java_init_decl_processing): Likewise.
2651         * expr.c (build_java_array_length_access, build_newarray,
2652         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2653         build_java_binop, build_field_ref, expand_java_add_case,
2654         expand_java_call, build_known_method_ref, build_invokevirtual,
2655         build_invokeinterface, build_jni_stub): Likewise.
2656         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2657         * jcf-parse.c (get_constant): Likewise.
2658         * lex.c (do_java_lex): Likewise.
2659         * parse.y (patch_binop, patch_unaryop, patch_cast,
2660         build_newarray_node, patch_newarray): Likewise.
2661         * resource.c (compile_resource_data): Likewise.
2662         * typeck.c (build_prim_array_type): Likewise.
2663
2664 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2665
2666         * decl.c (java_init_decl_processing): Adjust
2667         initialize_sizetypes call.
2668
2669 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2670
2671         * jv-scan.c (fancy_abort): Add.
2672
2673 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
2674
2675         * expr.c (build_java_arrayaccess): Use convert to change
2676         len's type.
2677
2678 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
2679
2680         * class.c (make_local_function_alias): Allocate extra space for 'L'
2681         in name buffer. Reported by Thomas Neumann.
2682
2683 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2684
2685         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
2686         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
2687         * lex.c (do_java_lex): Adjust.
2688         (error_if_numeric_overflow): Likewise.
2689
2690 2004-08-18  Andrew Pinski  <apinski@apple.com>
2691
2692         * class.c (make_local_function_alias): Only make a new decl if we
2693         support alias attribute on all decls.
2694
2695 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
2696
2697         * class.c (make_local_function_alias): New function. Create local
2698         alias for public method DECL.
2699         (make_method_value): Use make_local_function_alias.
2700         * parse.y (craft_constructor): Don't special-case anonymous classes.
2701         Always set ctor_name to init_identifier_node.
2702         (lookup_method_invoke): Call layout_class_method when creating
2703         anonymous class constructor.
2704
2705 2004-08-18  Richard Henderson  <rth@redhat.com>
2706
2707         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2708         default case.  Treat '<' similarly.  Update for
2709         is_gimple_formal_tmp_var name change.
2710
2711 2004-08-17  Andrew Haley  <aph@redhat.com>
2712
2713         * lang.c (lang_printable_name): Obey verbose flag.
2714         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2715         lang_printable_name().
2716         (verify_constructor_circularity, get_printable_method_name,
2717         check_abstract_method_definitions, java_check_regular_methods,
2718         java_check_abstract_methods, check_inner_class_access,
2719         fix_constructors, patch_method_invocation, patch_return):
2720         Likewise.
2721         * expr.c (pop_type_0): Likewise.
2722
2723         * java-tree.h (lang_printable_name_wls): Delete.
2724
2725 2004-08-16  Tom Tromey  <tromey@redhat.com>
2726
2727         PR java/8473:
2728         * parse.y (primary): Changed for initialized and uninitialized
2729         array creations.
2730         (array_access): Handle array_creation_initialized.
2731         (array_creation_expression): Split into
2732         array_creation_initialized and array_creation_uninitialized.
2733
2734 2004-08-16  Andrew Haley  <aph@redhat.com>
2735
2736         * jcf-write.c (find_constant_index): Canonicalize NaNs when
2737         generating bytecode.
2738
2739 2004-08-16  Elliot Lee <sopwith@redhat.com>
2740
2741         PR java/9677
2742         * jcf-parse.c (java_parse_file): Handle filenames with embedded
2743         spaces, and quoted filelists.
2744
2745 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2746
2747         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2748         * class.c (build_utf8_ref, build_static_field_ref,
2749         make_field_value, make_method_value, get_dispatch_table,
2750         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2751         * constants.c (get_tag_node,  build_ref_from_constant_pool,
2752         build_constants_constructor): Likewise.
2753         * decl.c (java_init_decl_processing): Likewise.
2754         * expr.c (build_java_array_length_access, build_newarray,
2755         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2756         build_java_binop, build_field_ref, expand_java_add_case,
2757         expand_java_call, build_known_method_ref, build_invokevirtual,
2758         build_invokeinterface, build_jni_stub): Likewise.
2759         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2760         * jcf-parse.c (get_constant): Likewise.
2761         * lex.c (do_java_lex): Likewise.
2762         * parse.y (patch_binop, patch_unaryop, patch_cast,
2763         build_null_of_type, patch_newarray): Likewise.
2764         * resource.c (compile_resource_data): Likewise.
2765         * typeck.c (build_prim_array_type): Likewise.
2766
2767 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
2768
2769         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2770         Don't create BLOCK here or call java_gimplify_block.
2771
2772 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2773
2774         * java-tree.h (flag_deprecated): Removed.
2775         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2776         * parse.y (check_deprecation): Check warn_deprecated instead of
2777         flag_deprecated.
2778
2779 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
2780
2781         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2782         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2783         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2784         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2785         flag_force_classes_archive_check, flag_optimize_sci,
2786         flag_indirect_dispatch): Remove explicit declarations.
2787         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
2788         final comment.
2789
2790 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
2791
2792         PR bootstrap/14893
2793         * Make-lang.in (java.install-man): Install from either build
2794         tree or source tree, whichever has the file first.
2795
2796 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
2797
2798         * jcf-parse.c (get_constant): Adjust force_fit_type call.
2799         * lex.h (SET_LVAL_NODE_TYPE): Remove.
2800         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2801         (do_java_lex): Likewise. Adjust force_fit_type call.
2802
2803 2004-08-04  Roger Sayle  <roger@eyesopen.com>
2804             Andrew Haley  <aph@redhat.com>
2805
2806         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2807         checking trees as they're being built.
2808         (convert): Call convert_ieee_real_to_integer if we're
2809         converting a constant, even if we're writing a class file.
2810
2811 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
2812
2813         PR java/16701
2814         * parse.y (fold_constant_for_init): Call resolve_field_access with
2815         correct current_class context.
2816
2817 2004-08-01  Roger Sayle  <roger@eyesopen.com>
2818
2819         * decl.c (update_aliases, initialize_local_variable): Replace calls
2820         to build with calls to buildN.
2821         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2822         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2823         * parse.h (BUILD_THROW): Likewise.
2824         * parse.y (switch_expression, synchronized_statement,
2825         catch_clause_parameter, array_creation_expression,
2826         conditional_expression, make_qualified_name,
2827         resolve_qualified_expression_name, patch_method_invocation,
2828         patch_invoke, build_method_invocation, build_new_invocation,
2829         build_assignment, patch_assignment, build_binop, patch_binop,
2830         build_string_concatenation, build_incdec, patch_unaryop,
2831         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
2832         patch_return, build_if_else_statement, build_labeled_block,
2833         build_new_loop, build_loop_body, build_bc_statement,
2834         build_assertion, encapsulate_with_try_catch, build_try_statement,
2835         build_try_finally_statement, patch_synchronized_statement,
2836         emit_test_initialization): Likewise, replace build with buildN.
2837
2838 2004-07-28  Eric Christopher  <echristo@redhat.com>
2839
2840         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2841         (java_unsafe_for_reeval): Ditto.
2842
2843 2004-07-26    <hp@bitrange.com>
2844
2845         * parse.y (build_super_invocation): Adjust declaration order to
2846         avoid declaration after statement.
2847
2848 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
2849
2850         * decl.c: Rename all identifiers named `class' to `cl'.
2851
2852 2004-07-25  Richard Henderson  <rth@redhat.com>
2853
2854         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2855
2856 2004-07-23  Mike Stump  <mrs@apple.com>
2857
2858         * boehm.c (set_bit): Improve type safety wrt unsignedness.
2859         * gjavah.c (throwable_p, decode_signature_piece,
2860         print_full_cxx_name, print_include, add_namelet, add_class_decl,
2861         process_file): Likewise.
2862         * jcf-dump.c (main): Likewise.
2863         * jcf-io.c (read_zip_member): Likewise.
2864         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
2865         give_name_to_class, get_class_constant): Likewise.
2866         * jcf-write.c (find_constant_wide, push_long_const,
2867         generate_classfile): Likewise.
2868         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
2869         * parse.y (read_import_dir): Likewise.
2870         * typeck.c (parse_signature_type): Likewise.
2871         * verify.c (verify_jvm_instructions): Likewise.
2872         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2873
2874 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2875
2876         * Make-lang.in: Replace rmic and rmiregistry references with
2877         grmic and grmiregistry.
2878         * gcj.texi: Likewise.
2879
2880 2004-07-20  Andrew Haley  <aph@redhat.com>
2881
2882         PR java/16431.
2883         * verify.c (verify_jvm_instructions): Comment change only.
2884
2885         * typeck.c (build_java_array_type): Add size field to array name.
2886
2887         * java-tree.h (LOCAL_SLOT_P): New.
2888         (update_aliases): Add PC argument.
2889         (pushdecl_function_level): New function.
2890
2891         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2892         MODIFY_EXPR, and SAVE_EXPR.
2893         (java_gimplify_modify_expr): New function.
2894
2895         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2896         (expand_iinc): Pass PC to update_aliases().
2897         (STORE_INTERNAL): Likewise.
2898         (process_jvm_instruction): Likewise.
2899
2900         * decl.c (base_decl_map): New variable.
2901         (uniq): New variable.
2902         (update_aliases): Rewrite with more thorough checking.
2903         (debug_variable_p): New function.
2904         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2905         (check_local_named_variable): Delete whole function.
2906         (initialize_local_variable): New function.
2907         (check_local_unnamed_variable): Add checks and comments.
2908         (find_local_variable): Rewrite.
2909         (java_replace_reference): New function.
2910         (function_binding_level): New variable.
2911         (pushdecl_function_level): New function.
2912         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2913         (maybe_pushlevels): Call pushdecl() on each of the new decls.
2914         (start_java_method): Reset uniq.  Create base_decl_map.  Set
2915         function_binding_level.
2916         (end_java_method): Null unused fields to save memory.
2917
2918 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2919
2920         * class.c (add_interface_do): Remove.
2921         (set_super_info, interface_of_p, maybe_add_interface,
2922         add_interface, make_class_data, layout_class,
2923         add_miranda_methods): Adjust BINFO accessors and addition.
2924         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2925         accessors.
2926         * jcf-write.c (generate_classfile): Likewise.
2927         * parse.y (patch_anonymous_class, check_inner_circular_reference,
2928         check_circular_reference, java_complete_class,
2929         check_abstract_method_definitions,
2930         java_check_abstract_method_definitions,
2931         check_interface_throws_clauses, java_check_abstract_methods,
2932         lookup_java_interface_method2,
2933         find_applicable_accessible_methods_list): Adjust BINFO accessors
2934         and addition.
2935         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2936
2937 2004-07-18  Roger Sayle  <roger@eyesopen.com>
2938
2939         * builtins.c (max_builtin, min_builtin,
2940         java_build_function_call_expr): Replace calls to build with buildN.
2941         * class.c (build_class_ref, build_static_field_ref,
2942         get_dispatch_table, make_class_data, layout_class_method): Likewise.
2943         * constants.c (build_ref_from_constant_pool): Likewise.
2944         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2945         add_stmt_to_compound): Likewise.
2946         * except.c (build_exception_object_ref, expand_end_java_handler):
2947         Likewise.
2948         * java-gimplify.c (java_gimplify_case_expr,
2949         java_gimplify_default_expr, java_gimplify_block,
2950         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2951         * jcf-write.c (generate_bytecode_insns): Likewise.
2952         * typeck.c (convert_ieee_real_to_integer): Likewise.
2953
2954 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
2955
2956         * java-tree.h (builtin_function): Declare.
2957
2958 2004-07-16  Steven Bosscher  <stevenb@suse.de>
2959
2960         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2961         abuse restore_line_number_status.
2962
2963 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
2964
2965         g++/15861
2966         * jcf-parse.c (java_emit_static_constructor): Specify default
2967         priority.
2968
2969 2004-07-13  Per Bothner  <per@bothner.com>
2970
2971         * java-tree.h (all_class_filename):  Remove useless macro.
2972         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
2973         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
2974         * parse.y (java_parser_context_restore_global):  Replace
2975         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2976         * jcf-parse.c (read_class, java_parse_file):  Likewise.
2977
2978 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2979
2980         PR java/16474
2981         gjavah.c (print_field_info): Emit constant only if field is static.
2982
2983 2004-07-11  Roger Sayle  <roger@eyesopen.com>
2984
2985         * expr.c (java_truthvalue_conversion, flush_quick_stack,
2986         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2987         build_java_ret, build_java_throw_out_of_bounds_exception,
2988         build_java_array_length_access, java_check_reference,
2989         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2990         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2991         expand_java_arrayload, build_java_monitor, expand_java_return,
2992         expand_load_internal, expand_java_NEW, build_get_class,
2993         build_instanceof, expand_java_CHECKCAST, expand_iinc,
2994         build_java_soft_divmod, build_java_binop, build_field_ref,
2995         expand_compare, expand_java_goto, expand_java_switch,
2996         expand_java_add_case, build_class_init, build_known_method_ref,
2997         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2998         expand_invoke, build_jni_stub, expand_java_field_op,
2999         java_expand_expr, expand_byte_code, STORE_INTERNAL,
3000         force_evaluation_order, emit_init_test_initialization): Convert
3001         calls to "build" into calls to the prefered "buildN" functions.
3002
3003 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3004
3005         * java-tree.h (set_block): Remove.
3006         * lang.c (java_clear_binding_stack): New.
3007         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3008         * decl.c (struct binding_level): Remove this_block.
3009         (clear_binding_level): Likewise.
3010         (poplevel): Don't handle this_block.
3011         (set_block): Remove.
3012
3013 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
3014
3015         * class.c (common_enclosing_context_p): Remove statement with no
3016         side-effects.
3017
3018 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3019
3020         PR java/8618
3021         * parse.y (create_anonymous_class): Remove 'location' argument. Use
3022         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3023         (craft_constructor): Inherit access flags for implicit constructor
3024         from the enclosing class.
3025         (create_class): Fix comment typo.
3026         (resolve_qualified_expression_name): Pass type of qualifier to
3027         not_accessible_p, not the type in which target field was found.
3028         (not_accessible_p): Handle inner classes. Expand protected
3029         qualifier-subtype check to enclosing instances, but don't apply this
3030         check to static members. Allow protected access to inner classes
3031         of a subtype. Allow private access within common enclosing context.
3032         (build_super_invocation): Get WFL line number info from current
3033         class decl.
3034         (build_incomplete_class_ref): Update for new create_anonymous_class
3035         signature.
3036         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
3037         common_enclosing_instance_p.
3038         * class.c (common_enclosing_context_p): New. Determine if types
3039         share a common enclosing context, even across static contexts.
3040         (common_enclosing_instance_p): Renamed from
3041         common_enclosing_context_p. Determines if types share a common
3042         non-static enclosing instance.
3043         * java-tree.h (common_enclosing_instance_p): Declare.
3044         * jcf-write.c (get_method_access_flags): New. Surpress private flag
3045         for inner class constructors.
3046         (generate_classfile): Use get_method_access_flags.
3047
3048 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3049
3050         * class.c (interface_of_p): Check for null TYPE_BINFO.
3051
3052 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         * class.c (make_class): Do not create binfo here.
3055         (set_super_info): Create it here.
3056         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
3057
3058 2004-07-08  Richard Henderson  <rth@redhat.com>
3059
3060         * expr.c (case_identity, get_primitive_array_vtable,
3061         java_expand_expr, emit_init_test_initialization): Remove.
3062         * java-tree.h (java_expand_expr): Remove.
3063         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
3064
3065 2004-07-07  Per Bothner  <per@bothner.com>
3066
3067         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
3068         get internal error due to mismatched types.
3069
3070         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
3071
3072         * gcj.texi (Linking):   New node.  Document -lgij usage.
3073
3074 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3075
3076         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
3077         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
3078         * java/class.c (set_super_info, class_depth, interface_of_p,
3079         maybe_add_interface, add_interface, make_class_data,
3080         layout_class, add_miranda_methods): Adjust BINFO macros.
3081         * expr.c (can_widen_reference_to, lookup_field): Likewise.
3082         * jcf-write.c (generate_classfile): Likewise.
3083         * parse.y (patch_anonymous_class,
3084         check_inner_circular_reference, check_circular_reference,
3085         java_complete_class, check_abstract_method_definitions,
3086         java_check_abstract_method_definitions,
3087         check_interface_throws_clauses, java_check_abstract_methods,
3088         lookup_java_interface_method2,
3089         find_applicable_accessible_methods_list): Likewise.
3090         * typeck.c (find_method_in_interface): Likewise.
3091         * verify.c (merge_types): Likewise.
3092
3093 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3094
3095         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
3096         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
3097
3098 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3099
3100         * class.c (make_class): Use make_tree_binfo.
3101         (set_super_info, add_interface_do): Likewise.
3102         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
3103
3104 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
3105
3106         * verify.c: Correct array element access formatting thinko.
3107
3108 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
3109
3110         * verify.c: Insert a short blurb at the start referring to the JVMS.
3111         (merge_type_state): Remove redundant nested if statement.
3112         (verify_jvm_instructions): Ensure current_subr is initialised to
3113         NULL_TREE.
3114         Minor formatting fixes all over the place.
3115
3116 2004-07-02  Richard Henderson  <rth@redhat.com>
3117
3118         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
3119
3120 2004-07-01  Richard Henderson  <rth@redhat.com>
3121
3122         * class.c (registerClass_libfunc): Remove.
3123         (init_class_processing): Don't set it.
3124         (emit_register_classes): Take list_p parameter.  Fill it in
3125         with _Jv_RegisterClass calls.
3126         * decl.c (java_init_decl_processing): Don't call
3127         init_resource_processing.
3128         * jcf-parse.c (java_emit_static_constructor): New.
3129         (java_parse_file): Call it.
3130         * resource.c (registerResource_libfunc): Remove.
3131         (init_resource_processing): Remove.
3132         (write_resource_constructor): Take list_p parameter.  Fill it in
3133         with _Jv_RegisterResource calls.
3134         * java-tree.h: Update prototypes.
3135
3136 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
3137
3138         PR java/1262
3139         * class.c (layout_class_method): Do not override package-private
3140         method if its in a different package.
3141         (split_qualified_name): Move here from parse.y. Rename from
3142         breakdown_qualified. Add comment.
3143         (in_same_package): Move here from parse.y. Add comment.
3144         * java-tree.h (break_down_qualified, in_same_package): Declare.
3145         (in_same_package): Likewise.
3146         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
3147         Callers updated.
3148
3149 2004-06-29  Andrew Haley  <aph@redhat.com>
3150
3151         * except.c (expand_start_java_handler): Push a new binding level.
3152         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3153         register_exception_range() to register where we'll do it.
3154         (expand_end_java_handler): Remove old bogus code.  Replace with
3155         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3156         the top of the expression we're curently building.
3157         (maybe_end_try): Delete.
3158         * decl.c (binding_level.exception_range): New field.
3159         (clear_binding_level): Add field exception_range.  Reformat.
3160         (poplevel): Call expand_end_java_handler().
3161         (poplevel): Call java_add_stmt only if functionbody is false.
3162         (maybe_poplevels): Don't call maybe_end_try() from here.
3163         (end_java_method): Clear no longer used trees in function decl.
3164         (register_exception_range): New function.
3165         * java-tree.h (register_exception_range, struct eh_range): Declare.
3166
3167 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
3168
3169         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
3170
3171 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
3172
3173         Formatting fixes.
3174         * expr.c (class_has_finalize_method): Fix method name indentation.
3175         (expand_java_call): Remove K&R style parameter declaration.
3176         (expand_invoke): Fix statement indentation.
3177         (expand_java_field_op): Likewise.
3178         * parse-scan.y: Fix typo.
3179         (reset_report): Fix method name indentation.
3180         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
3181         line. Fix typos.
3182         * verify.c (verify_jvm_instructions): Document parameters, insert
3183         page break.
3184         * lang.c (lang_init_source): Fix method name indentation.
3185         * class.c (common_enclosing_context_p): Likewise.
3186         (emit_symbol_table): Fix parameter list indentation.
3187         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
3188         parameter declaration.
3189         * constants.c: Fix copyright notice indentation.
3190         * typeck.c (find_method_in_superclasses): Fix parameter list
3191         indentation.
3192         (find_method_in_interfaces): Likewise.
3193         * zextract.c (makelong): Fix method name indentation.
3194
3195 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3196
3197         PR java/15715.
3198         * parse.y (create_interface): Set correct access modifiers for
3199         interfaces.
3200         * jcf-write.c (get_classfile_modifiers): New function.
3201         (generate_classfile): Use get_classfile_modifiers, not
3202         get_access_flags.
3203
3204 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3205
3206         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
3207         dependency to current parser context, not NULL_TREE, for top-level
3208         classes.
3209         (jdep_resolve_class): Enable member access check for all inner
3210         class dependencies.
3211
3212 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3213
3214         * parse.y (qualify_and_find): Pass type decl, not identifier, to
3215         load_class.
3216
3217 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3218
3219         PR java/15734
3220         * expr.c (expand_java_field_op): Ensure that target class for static
3221         field access has been loaded.
3222
3223 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3224             Ranjit Mathew  <rmathew@hotmail.com>
3225
3226         PR java/1207, java/16178
3227         * jcf-parse.c (load_class): Return immediately if passed a type decl
3228         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
3229         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
3230         before calling load_class.
3231         (qualify_and_find): Likewise.
3232         (find_in_imports_on_demand): Likewise.
3233         (find_applicable_accessible_methods_list): Likewise.
3234
3235 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
3236
3237         * parse.y (java_layout_seen_class_methods): Don't call load_class
3238         on class defined by source parser.
3239
3240 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3241
3242         * parse.y (set_nested_class_simple_name_value): Removed.
3243         (java_complete_expand_class): Remove calls to
3244         set_nested_class_simple_name_value.
3245
3246 2004-06-22  Andrew Haley  <aph@redhat.com>
3247             Ranjit Mathew  <rmathew@hotmail.com>
3248
3249         Fixes PR java/16113.
3250         * decl.c (force_poplevels): Remove call to expand_end_bindings.
3251
3252 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
3253
3254         * parse.y (create_class): Correct diagnostic message about
3255         java.lang.Object extending anything else.
3256
3257 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3258
3259         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
3260         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
3261         * constants.c (build_ref_from_constant_pool): Likewise.
3262         * expr.c (build_java_array_length_access): Likewise.
3263         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
3264         (invoke_build_dtable, build_invokevirtual): Likewise.
3265         (build_invokeinterface, java_expand_expr): Likewise.
3266         (emit_init_test_initialization): Likewise.
3267         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3268         * parse.y (make_qualifed_name, build_array_ref): Likewise.
3269
3270 2004-06-21  Andrew Haley  <aph@redhat.com>
3271
3272         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
3273         block.
3274
3275 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3276
3277         * jcf.h (struct JCF): Change java_source, right_zip and finished
3278         to unsigned int.
3279         * lex.h (struct java_lexer): Change hit_eof, read_anything,
3280         byte_swap and use_fallback to unsigned int.
3281         * parse.h (struct _jdep): Change flag0 to unsigned int.
3282
3283 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
3284
3285         Fixes PR java/13948
3286         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
3287         before trying to lay out its methods.
3288         * jcf-parse.c (read_class): Track parsed files using canonical paths
3289         obtained via lrealpath from libiberty.
3290         (java_parse_file): Likewise.
3291         (parse_source_file_1): Rename formal parameter to reflect its
3292         modified purpose. Minor formatting fix.
3293
3294 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
3295
3296         * class.c (emit_register_classes): Make the function uninlinable,
3297         do not set current_function_cannot_inline.
3298         * resource.c (write_resource_constructor): Do not reset
3299         flag_inline_functions around rest_of_compilation.
3300
3301 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
3302
3303         PR java/15769
3304         * expr.c (java_truthvalue_conversion): Handle
3305         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
3306         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
3307         i.e. return the expression.
3308
3309 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
3310
3311         * gjavah.c: Include version.h
3312
3313 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
3314
3315         * jcf-write.c (generate_bytecode_conditional): Correct handling
3316         of unordered conditionals. Add comment.
3317
3318 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
3319             Per Bothner  <per@bothner.com>
3320
3321         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
3322         local variable was initialised upon declaration.
3323         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
3324         variable was final and initialised upon declaration.
3325         * check-init.c (check_final_reassigned): Give error only if a blank
3326         final is not definitely unassigned or if an initialised final is
3327         reassigned.
3328         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
3329         assignment expressions. Remove case MODIFY_EXPR, label do_default.
3330         (check_init): Perform initialised-variable-removing-optimisation
3331         only on non-final local variables.
3332
3333 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3334
3335         * jcf-write.c (generate_bytecode_conditional): Handle binops
3336         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
3337         and LTGT_EXPR.
3338         (generate_bytecode_insns): Likewise.
3339
3340 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3341
3342         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
3343         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
3344
3345 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3346
3347         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
3348         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
3349
3350 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3351
3352         * decl.c (struct binding_level): Add GTY marker. Compile
3353         binding_depth unconditionally.
3354         (current_binding_level, free_binding_level, global_binding_level):
3355         Likewise.
3356         (clear_binding_level): Unconditionally set binding_depth.
3357         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
3358
3359 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3360
3361         * lex.c (java_new_lexer): Set 'encoding'.
3362         (java_read_char): Improve error message for unrecognized characters.
3363         * lex.h (struct java_lexer): New field 'encoding'.
3364
3365 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3366
3367         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
3368
3369 2004-05-21  Mark Wielaard  <mark@klomp.org>
3370
3371         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
3372         extern.
3373
3374 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
3375
3376         * typeck.c: Remove non-printable character 160.
3377
3378 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
3379
3380         * check-init.c: Correct minor typos.
3381
3382 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3383
3384         * Make-lang.in, expr.c, java-gimplify.c: Rename
3385         tree-simple.[ch] to tree-gimple.[ch].
3386
3387 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
3388
3389         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
3390
3391 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3392
3393         Merge from tree-ssa-20020619-branch.  See
3394         ChangeLog.tree-ssa for details.
3395
3396         * Make-lang.in, builtins.c, check-init.c, class.c,
3397         constants.c, decl.c, except.c, expr.c, java-except.h,
3398         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
3399         lang.c, lang.opt, parse.y, resource.c: Merged.
3400         * java-gimplify.c: New file.
3401
3402 2004-05-10  Andrew Haley  <aph@redhat.com>
3403
3404         * parse.y (create_class): Set TYPE_VFIELD.
3405         * decl.c (java_init_decl_processing): Likewise.
3406
3407         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
3408         * class.c (make_method_value): Replace DECL_VINDEX with call to
3409         get_method_index().
3410         (get_dispatch_vector): Likewise.
3411         (layout_class_method): Likewise.
3412         Replace set of DECL_VINDEX with call to set_method_index().
3413         (set_method_index): New function.
3414         (get_method_index): New function.
3415         * java-tree.h (set_method_index): New function decl.
3416         (get_method_index): New function decl.
3417
3418 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
3419
3420         * parse.y (check_pkg_class_access): Add new argument
3421         and use it when cl is NULL to call lookup_cl on it.
3422         (parser_check_super_interface): Do not call lookup_cl.
3423         Pass this_decl to check_pkg_class_access and NULL
3424         instead of lookup_cl.
3425         (parser_check_super): Update for change in
3426         check_pkg_class_access.
3427         (do_resolve_class): Likewise.
3428         (process_imports): Likewise.
3429         (find_in_imports_on_demand): Likewise.
3430         (resolve_qualified_expression_name): Likewise.
3431
3432 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
3433
3434         Fixes PR java/9685, PR java/15073
3435         * parse.y (accessibility_string): New method.
3436         (not_accessible_field_error): Use accessibility_string()
3437         instead of java_accstring_lookup().
3438         (resolve_qualified_expression_name): Check with
3439         check_pkg_class_access() before allowing access using
3440         qualified names.
3441         Fix comment typo.
3442         Use check_pkg_class_access() instead of not_accessible_p()
3443         for unqualified types.
3444         (not_accessible_p): Use DECL_CONTEXT (member) instead of
3445         REFERENCE for package-private access checking.
3446         (patch_method_invocation): Use accessibility_string() instead
3447         of java_accstring_lookup().
3448
3449 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
3450
3451         Fixes PR java/15133
3452         * gjavah.c (struct method_name): Add member is_native.
3453         (overloaded_jni_method_exists_p): Match candidate method only if
3454         it is native.
3455         (print_method_info): Initialise is_native flag from the method's
3456         access flags.
3457
3458 2004-04-30  Roger Sayle  <roger@eyesopen.com>
3459
3460         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
3461         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
3462
3463 2004-04-22  Roger Sayle  <roger@eyesopen.com>
3464
3465         * resource.c (write_resource_constructor): Guard call to possibly
3466         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
3467
3468 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
3469
3470         * class.c (make_class_data): Add new field aux_info.
3471         * decl.c (java_init_decl_processing): Push type and decl for
3472         `aux_info'.
3473
3474 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
3475
3476         * expr.c (expand_java_NEW): Don't use size argument for
3477         _Jv_AllocObject calls.
3478         * parse.y (patch_invoke): Likewise.
3479
3480 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
3481
3482         * expr.c (build_invokeinterface): Remove unused variables to
3483         fix warnings.
3484
3485 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
3486
3487         * class.c (get_interface_method_index): New function. Return dispatch
3488         index for interface method.
3489         (make_method_value): For interface methods, set index field to
3490         iface dispatch index, not DECL_VINDEX.
3491         * expr.c (build_invokeinterface): Use get_interface_method_index.
3492
3493 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3494
3495         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
3496
3497 2004-03-31  Andrew Haley  <aph@redhat.com>
3498
3499         PR java/14104
3500         * jcf-io.c (opendir_in_zip): Tidy up error handling.
3501
3502 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
3503
3504         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
3505         form of GTY markers.
3506
3507 2004-03-25  Marcus Meissner  <meissner@suse.de>
3508
3509         PR java/14689:
3510         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
3511
3512 2004-03-23  Tom Tromey  <tromey@redhat.com>
3513
3514         PR java/14315:
3515         * jcf-write.c (make_class_file_name): Don't report if mkdir
3516         failed with EEXIST.
3517
3518 2004-03-23  Tom Tromey  <tromey@redhat.com>
3519
3520         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
3521
3522 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
3523
3524         * class.c, gjavah.c, lang.c: Fix comment typos.
3525         * gcj.texi: Fix typos.
3526
3527 2004-03-19  Per Bothner  <per@bothner.com>
3528
3529         * gcj.texi (Code Generation):  Document new flags and assert defaults.
3530
3531         * class.c (assume_compiled_node_struct):  Rename type to
3532         class_flag_node_struct, as it is now also used for enable_assertions.
3533         Rename assume_compiled_node typedef.  Rename excludep field to value.
3534         (find_assume_compiled_node):  Rename function to find_class_flag_node.
3535         Minor optimization - avoid needless strlen.
3536         (add_assume_compiled):  Some tweaking and optimization.
3537         Rename and generalize to add_class_flag takem an extra parameter.
3538         (add_assume_compled):  New just calls add_class_flag.
3539         (add_enable_assert, enable_assertions):  New functions.
3540         (enable_assert_tree):  New static.
3541         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
3542         * lang.opt (fenable-assertions, fenable-assertions=,
3543         fdisable-assertions, fdisable-assertions=):  New options.
3544         * lang.c (java_handle_option):  Handle new options.
3545         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
3546         class in an interface - create helper class nested in outer interface.
3547         (build_assertion):  Short-circuit if enable_assertions is false.
3548
3549 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3550
3551         * java-tree.h: Changes throughout to add checking to macros
3552         and numerous whitespace changes.
3553         (VAR_OR_FIELD_CHECK): New macro.
3554         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
3555         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
3556
3557 2004-03-16  Per Bothner  <per@bothner.com>
3558
3559         * jcf-jump.c (options):  New --print-constants option.
3560         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
3561
3562         * jcf-dump.c (flag_print_constant_pool):  Default to off.
3563         (print_constant_terse_with_index):  New helper function.
3564         (various places):  Check flag_print_constant_pool where missing.
3565         (main):  If verbose set flag_print_constant_pool.
3566         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
3567
3568 2004-03-15  Andrew Haley  <aph@redhat.com>
3569
3570         PR java/14581
3571         * parse.y (java_complete_lhs): Check that final variable has an
3572         initializer.
3573
3574 2004-03-12  Andrew Haley  <aph@redhat.com>
3575
3576         PR java/14551
3577         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
3578         conversion.
3579
3580 2004-02-29  Roger Sayle  <roger@eyesopen.com>
3581
3582         * jcf-parse.c (java_parse_file): Handle the case that input_filename
3583         is NULL.
3584
3585 2004-02-27  Per Bothner  <per@bothner.com>
3586
3587         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
3588         suggestion:  Use build_incomplete_class_ref.
3589         This fixes PR java/13508, java/11714.
3590
3591 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
3592
3593         * java/parse.h: Update copyright.
3594
3595 2004-02-26  Andrew Haley  <aph@redhat.com>
3596
3597         PR java/14231:
3598         * parse.y (check_interface_throws_clauses): Check for
3599         !METHOD_INVISIBLE (iface_method).
3600         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
3601         well as CLASS_ABSTRACT.
3602
3603 2004-02-25  Per Bothner  <per@bothner.com>
3604
3605         * parse.y (build_assertion):  If we're in an inner class, create the
3606         class$ helper routine in the outer class.
3607
3608 2004-02-19  Richard Henderson  <rth@redhat.com>
3609
3610         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
3611
3612 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
3613
3614         * Make-lang.in (java.install-man): Add extra dependencies.
3615
3616 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
3617
3618         * Make-lang.in: Install man pages under the same names
3619         (possibly transformed) as the program they document.
3620
3621 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
3622
3623         * gjavah.c: Include "intl.h".
3624         (error): New function.
3625         (main): Call gcc_init_libintl.
3626         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
3627         print_stub_or_jni, process_file, main): Use error rather than
3628         fprintf.
3629         (print_method_info, usage, help, version, main): Mark strings for
3630         translation with _.  Avoid splitting up sentences.  Send
3631         information messages to stdout.
3632         * jcf-dump.c: Include "intl.h".
3633         (main): Call gcc_init_libintl.
3634         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
3635         Mark error, usage and version messages for translation with _.
3636         Avoid splitting up sentences.
3637         * jv-scan.c: Include "intl.h".
3638         (fatal_error, warning): Change parameter s to msgid.  Translate
3639         messages.
3640         (main): Call gcc_init_libintl.
3641         (usage, help, version): Mark error, usage and version messages for
3642         translation with _.  Avoid splitting up sentences.
3643         * jvgenmain.c: Include "intl.h".
3644         (main): Call gcc_init_libintl.
3645         (usage, main): Mark error messages for translation with _.
3646         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
3647         JVGENMAIN_OBJS): Add intl.o.
3648         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
3649         java/jvgenmain.o): Update dependencies.
3650
3651 2004-02-08  Per Bothner  <per@bothner.com>
3652
3653         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
3654         class don't use not_accessible_field_error, which can get confused.
3655
3656 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
3657
3658         Make-lang.in (po-generated):  Delete.
3659
3660 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
3661
3662         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
3663         Depend on target.h.
3664         * decl.c: Include target.h.
3665         (start_java_method): Replace PROMOTE_PROTOTYPES with
3666         targetm.calls.promote_prototypes.
3667         * expr.c: Include target.h.
3668         (pop_arguments): Replace PROMOTE_PROTOTYPES with
3669         targetm.calls.promote_prototypes.
3670         * parse.y: Include target.h.
3671         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
3672         with targetm.calls.promote_prototypes.
3673
3674 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
3675
3676         * typeck.c: Update copyright.
3677
3678 2004-02-02  Tom Tromey  <tromey@redhat.com>
3679
3680         * decl.c (java_init_decl_processing): Remove duplicate
3681         gnu/gcj/RawData.
3682
3683 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
3684
3685         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
3686
3687 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
3688
3689         * expr.c (build_field_ref): Move variable
3690         definition up.
3691
3692 2004-01-28  Andrew Haley  <aph@redhat.com>
3693
3694         * expr.c (build_field_ref): Widen field offset.
3695
3696 2004-01-27  Andrew Haley  <aph@redhat.com>
3697
3698         java/13273
3699         * parse.y (check_interface_throws_clauses): Make sure class_decl
3700         has been loaded.
3701
3702 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
3703
3704         PR java/13733
3705         * parse.y (patch_assignment): Don't modify lhs_type for
3706         reference assignments.
3707
3708 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3709
3710         * Make-lang.in: Replace $(docdir) with doc.
3711         (java.info, java.srcinfo, java.man, java.srcman): New rules.
3712         (java.install-man): Revamp rule.
3713
3714 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3715
3716         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3717         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3718         instead of deferred backquote.
3719
3720 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
3721
3722         * typeck.c (find_method_in_interfaces): Move variable
3723         definition up.
3724
3725 2004-01-16  Andrew Haley  <aph@redhat.com>
3726
3727         PR java/13273:
3728         * typeck.c (shallow_find_method): New.
3729         (find_method_in_superclasses): New.
3730         (find_method_in_interfaces): New.
3731         (lookup_do): Rewrite.
3732         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3733
3734         * jcf-parse.c (read_class): Save and restore output_class.
3735         * decl.c (java_expand_body): Set output_class from fndecl.
3736
3737 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
3738
3739         * class.c (gen_indirect_dispatch_tables): Fix string length
3740         calculations.
3741
3742 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
3743
3744         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3745         (java.srcextra): Copy above back to source directory if requested.
3746         (po-generated): Delete reference to $(parsedir).
3747         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3748         Use implicit rule.
3749
3750 2004-01-14  Jan Hubicka  <jh@suse.cz>
3751
3752         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3753         estimation.
3754
3755 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
3756
3757         * java-tree.h (java_expand_expr): Change prototype.
3758         * expr.c (java_expand_expr): Add alt_rtl parameter.
3759
3760 2004-01-09  Andrew Haley  <aph@redhat.com>
3761
3762         PR java/12755:
3763         * parse.y (java_fix_constructors):  Set output_class.
3764         (java_reorder_fields): Likewise.
3765         (java_layout_classes): Likewise.
3766         (java_expand_classes): Generate indirect dispatch tables.
3767         (java_expand_classes): Set output_class.
3768         (java_finish_classes): Likewise.
3769         * lang.c (java_init): Turn on always_initialize_class_p if we're
3770         using indirect dis[atch.
3771         (java_decl_ok_for_sibcall): Use output_class, not current_class.
3772         (java_get_callee_fndecl): Use class local atable.
3773         * jcf-parse.c
3774         (always_initialize_class_p): Decl moved to java-tree.h.
3775         (HANDLE_CLASS_INFO): Set output_class.
3776         (read_class): Likewise.
3777         (parse_class_file): Call gen_indirect_dispatch_tables.
3778         (parse_zip_file_entries): Set output_class.
3779         (java_parse_file): Set output_class.  Don't emit symbol tables.
3780         * java-tree.h (output_class): New.
3781         Remove global declarations for otable, atable, and ctable.
3782         (always_initialize_class_p): moved here from decl.c.
3783         (DECL_OWNER): New.
3784         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3785         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3786         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3787         (struct lang_type): Add otable_methods, otable_decl,
3788         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3789         ctable_decl, catch_classes, type_to_runtime_map.
3790         * expr.c (build_field_ref): Make otable, atable, and ctable class
3791         local rather than global.
3792         (build_known_method_ref): Likewise.
3793         (build_invokeinterface): Likewise.
3794         (java_expand_expr): Pass runtime type (rather than actual type) to
3795         expand_start_catch.
3796         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3797         this class.  Look up each class in that map to delete duplicates.
3798         (expand_end_java_handler): Pass runtime type (rather than actual
3799         type) to expand_start_catch.
3800         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3801         (do_nothing): New.
3802         (java_init_decl_processing): Rearrange things.  Remove global
3803         declarations of otable, atable, and ctable.
3804         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3805         (java_expand_body): Set output_class.
3806         * constants.c (build_constant_data_ref): Use output_class, not
3807         current_class.
3808         (alloc_name_constant): Likewise.
3809         * class.c (gen_indirect_dispatch_tables): New.
3810         (build_class_ref): Generate hard reference to superclass, even if
3811         using indirect dispatch.
3812         (build_static_field_ref): Use class local atable.
3813         (make_class_data): Generate hard reference to superclass, even if
3814         using indirect dispatch.
3815         Generate symbolic references to interfaces when using indirect
3816         dispatch.
3817         (make_class_data): Emit otable, atable, and ctable.
3818         Make otable, atable, and ctable class local rather than global.
3819         (emit_catch_table): Make otable, atable, and ctable class local
3820         rather than global.
3821
3822 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
3823
3824         * parse.y (catch_clause_parameter): Fix typo.
3825
3826         PR java/13404
3827         * parse.y: (catch_clause_parameter): Return early if $3, aka
3828         formal_parameter, is null.
3829
3830 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3831
3832         * class.c: Remove uses of "register" specifier in
3833         declarations of arguments and local variables.
3834         * decl.c: Likewise.
3835         * expr.c: Likewise.
3836         * gjavah.c: Likewise.
3837         * jcf-dump.c: Likewise.
3838         * jcf-io.c: Likewise.
3839         * jcf-parse.c: Likewise.
3840         * jcf-write.c: Likewise.
3841         * keyword.h: Likewise.
3842         * parse.y: Likewise.
3843         * typeck.c: Likewise.
3844         * verify.c: Likewise.
3845
3846 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
3847
3848         * Make-lang.in (GCJ_CROSS_NAME): Delete.
3849         (java.install_common, java.install-man): Adjust for above.
3850         (java.uninstall): Likewise.
3851
3852 2003-12-03  Michael Koch  <konqueror@gmx.de>
3853
3854         * class.c (make_class_data):
3855         Push field value to 'hack_signers' instead of 'signers'.
3856         * decl.c (java_init_decl_processing):
3857         Push field 'hack_signers' instead of 'signers'.
3858
3859 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
3860
3861         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
3862         including iconv.h.
3863
3864 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
3865
3866         PR java/12374:
3867         * parse.y (qualify_ambiguous_name): Remove lots of broken
3868         field access processing - there's no need to do that here,
3869         because we have resolve_field_access.  Remove
3870         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
3871         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
3872         used.
3873
3874 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
3875
3876         Fix PR java/13237
3877         * parse.y (java_complete_lhs): Save location prior to patching
3878         CALL_EXPR.
3879
3880 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
3881
3882         PR java/12548
3883         * resource.c (write_resource_constructor): Append
3884         "_resource" to constructor identifier name.
3885
3886 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
3887
3888         Fix PR java/13183.
3889         * constants.c (cpool_for_class): New function.
3890         (outgoing_cpool): Remove global variable.
3891         (alloc_name_constant): Use cpool_for_class.
3892         (build_constants_constructor): Likewise.
3893         * decl.c (java_expand_body): Set current_class.
3894         * java-tree.h (outgoing_cpool) Remove declaration.
3895         (init_outgoing_cpool): Likewise.
3896         * jcf-parse.c (init_outgoing_cpool): Remove function.
3897         (parse_class_file): Don't call init_outgoing_cpool.
3898         * parse.y (java_complete_expand_methods): Don't call
3899         init_outgoing_cpool.  Don't save outgoing_cpool.
3900         (java_expand_classes): Don't restore outgoing_cpool.
3901         (java_finish_classes): Likewise.
3902
3903 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
3904
3905         * Make-lang.in: (java.install-common) Add
3906         symlink for $(target_noncanonical)-gcjh for
3907         native builds.
3908
3909 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
3910
3911         * Make-lang.in (java.extraclean): Delete.
3912
3913 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
3914
3915         * Make-lang.in (check-java): Add.
3916
3917 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
3918
3919         Fix PR java/13024.
3920         * except.c (prepare_eh_table_type): Allocate variable-sized
3921         buffer `buf' with alloca.
3922
3923 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
3924
3925         Fix PR java/12857.
3926
3927         decl.c (java_init_decl_processing): Don't initialize
3928         class_not_found_type_node, no_class_def_found_type_node.
3929
3930         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3931         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3932         (class_not_found_type_node, no_class_def_found_type_node):
3933         Don't define.
3934
3935         parse.y (build_dot_class_method_invocation): Add this_class
3936         argument.  Qualify method invocations to a different class.
3937         (create_new_parser_context): Initialize saved_data_ctx to 0.
3938         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3939         (build_dot_class_method): Don't load classes.  Register
3940         incomplete types.
3941         (build_incomplete_class_ref): Special cases for interfaces
3942         and inner classes.  Move build_dot_class_method call to here...
3943         (patch_incomplete_class_ref): ...from here.  Pass current_class
3944         to build_dot_class_method_invocation.
3945         (build_assertion): Pass class_type to
3946         build_dot_class_method_invocation.
3947         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3948
3949 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
3950
3951         Fix PR java/12739.
3952         * java-tree.h (BLOCK_EMPTY_P): Define.
3953         * parse.y (java_complete_lhs): Check for empty blocks
3954         in TRY_FINALLY_EXPR case.
3955
3956 2003-11-17  Andrew Haley  <aph@redhat.com>
3957
3958         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3959         (struct lang_decl_var:freed): New variable.
3960         * decl.c (poplevel): Mark local vars that have gone out of scope.
3961         (push_jvm_slot): Don't use the RTL of a var that has gone out of
3962         scope.
3963
3964 2003-11-16  Jason Merrill  <jason@redhat.com>
3965
3966         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3967         and TAGS files that include them for each front end.
3968
3969 2003-11-15  Tom Tromey  <tromey@redhat.com>
3970
3971         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3972
3973 2003-11-12  Jason Merrill  <jason@redhat.com>
3974
3975         PR optimization/12547
3976         * lang.c (java_tree_inlining_walk_subtrees): Just walk
3977         BLOCK_EXPR_BODY directly.
3978
3979 2003-11-12  Andrew Haley  <aph@redhat.com>
3980
3981         PR java/11045
3982         * parse.y (fold_constant_for_init): Check that we really do have a
3983         constant.
3984
3985         PR java/11533
3986         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3987         init_test_decls being inlined.
3988
3989         PR java/12890:
3990         * parse.y (do_resolve_class): Check return value from
3991         breakdown_qualified().
3992
3993 2003-11-11  Tom Tromey  <tromey@redhat.com>
3994
3995         PR java/12915:
3996         * parse.y (merge_string_cste): Handle case where we have a
3997         pointer that happens to be zero, not null_pointer_node.
3998
3999 2003-11-10  Tom Tromey  <tromey@redhat.com>
4000
4001         * jcf-parse.c (classify_zip_file): Correctly compare
4002         filename_length against length of manifest file's name.
4003
4004 2003-11-08  Tom Tromey  <tromey@redhat.com>
4005
4006         PR java/12894:
4007         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
4008
4009 2003-11-06  Andrew Haley  <aph@redhat.com>
4010
4011         * expr.c (java_stack_swap): Make sure destination stack slots are
4012         of the correct type.
4013
4014 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
4015
4016         * Make-lang.in (dvi): Move targets to $(docobjdir).
4017         (gcj.dvi): Simplify rule and adjust target.
4018         (gcj.info): Simplify rule.
4019         (gcj.pod): New intermediate rule.
4020         (gcjh.pod): Likewise.
4021         (jv-scan.pod): Likewise.
4022         (jcf-dump.pod): Likewise.
4023         (gij.pod): Likewise.
4024         (jv-convert.pod): Likewise.
4025         (rmic.pod): Likewise.
4026         (rmiregistry.pod): Likewise.
4027         (gcj.1): Delete.
4028         (gcjh.1): Delete.
4029         (jv-scan.1): Delete.
4030         (jcf-dump.1): Delete.
4031         (gij.1): Delete.
4032         (jv-convert.1): Delete.
4033         (rmic.1): Delete.
4034         (rmiregistry.1): Delete.
4035
4036 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
4037
4038         Fixes PR java/12866.
4039         * parse.y (resolve_qualified_expression_name): Move test
4040         for outer field access methods from here...
4041         (check_thrown_exceptions) ...to here.
4042
4043 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
4044
4045         * .cvsignore: Delete.
4046
4047 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
4048
4049         * verify.c (verify_jvm_instructions): Don't warn about legal
4050         eh binding regions generated for example by jdk 1.4.1.
4051
4052 2003-10-24  David S. Miller  <davem@redhat.com>
4053
4054         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
4055
4056 2003-10-22  Andrew Haley  <aph@redhat.com>
4057
4058         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
4059         (java_get_callee_fndecl): New.
4060
4061         * jcf-parse.c (java_parse_file): Call emit_catch_table().
4062
4063         * java-tree.h (ctable_decl): New.
4064         (catch_classes):  New.
4065         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
4066
4067         * decl.c (java_init_decl_processing): Add catch_class_type.
4068         Add ctable_decl.
4069         Add catch_classes field.
4070
4071         * class.c (build_indirect_class_ref): Break out from
4072         build_class_ref.
4073         (make_field_value): Check flag_indirect_dispatch.
4074         (make_class_data): Ditto.
4075         Tidy uses of PUSH_FIELD_VALUE.
4076         Add field catch_classes.
4077         (make_catch_class_record): New.
4078
4079         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
4080
4081 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4082
4083         * jcf-write.c: Follow spelling conventions.
4084         * parse.y: Likewise.
4085
4086 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4087
4088         * ChangeLog: Fix typos.
4089         * expr.c: Fix comment typos.
4090         * jcf-write.c: Likewise.
4091         * lang.c: Likewise.
4092         * lex.c: Likewise.
4093         * mangle.c: Likewise.
4094         * parse-scan.y: Likewise.
4095         * parse.y: Likewise.
4096
4097 2003-10-22  Tom Tromey  <tromey@redhat.com>
4098
4099         * expr.c (expand_byte_code): Only warn about dead bytecode when
4100         extra_warnings is set.
4101
4102 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
4103
4104         Fix for PR java/12586.
4105         * mangle.c (find_compression_record_match): Don't iterate through
4106         package namespace elements unless they all match compression_table
4107         entries.
4108
4109 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
4110
4111         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
4112         (generate-manpages): Likewise.
4113         (java.maintainer-clean): Likewise.
4114         (gcj.info): Likewise.
4115         (gcj.1): Likewise.
4116         (gcjh.1): Likewise.
4117         (jv-scan.1): Likewise.
4118         (jcf-dump.1): Likewise.
4119         (gij.1): Likewise.
4120         (jv-convert.1): Likewise.
4121         (rmic.1): Likewise.
4122         (rmiregistry.1): Likewise.
4123         (java.install-man): Likewise.
4124         (parse-scan.o): Move and define complete compile line.
4125         (parse.o): Likewise.
4126         (jcf-tree-inline.o): Move.
4127
4128 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
4129
4130         * Make-lang.in (info): Update dependencies.
4131         (java.install-info): Remove.
4132         ($(srcdir)/java/gcj.info): Replace with ...
4133         ($(docobjdir)/gcj.info): ... this.
4134
4135 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
4136
4137         * Make-lang.in: Replace uses of $(target_alias) with
4138         $(target_noncanonical).
4139
4140 2003-10-09  Tom Tromey  <tromey@redhat.com>
4141
4142         * decl.c (java_init_decl_processing): Declare signers field.
4143         * class.c (make_class_data): Set signers field.
4144
4145 2003-10-09  Jason Merrill  <jason@redhat.com>
4146
4147         * parse.y (patch_assignment): Use make_node to create a BLOCK.
4148         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
4149         POINTER_TYPE.
4150
4151 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
4152
4153         * Make-lang.in (java.info): Replace with ...
4154         (info): ... this.
4155         (java.dvi): Replace with ...
4156         (dvi): ... this.
4157         (java.generated-manpages): Replace with ...
4158
4159 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
4160
4161         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
4162
4163 2003-10-01  Andrew Haley  <aph@redhat.com>
4164
4165         * jcf-parse.c (java_parse_file): Write otable and atable.
4166         * java-tree.h (atable_methods): New.
4167         (atable_decl): New.
4168         (atable_syms_decl): New.
4169         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
4170         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
4171         (symbol_*type): Rename method_symbol* to symbol*type.
4172         (emit_offset_symbol_table): Delete.
4173         (emit_symbol_table): New.
4174         (get_symbol_table_index): New.
4175         (atable_type): New.
4176         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
4177         (build_known_method_ref): Likewise.
4178         (get_symbol_table_index): Rename from get_offset_table_index.
4179         Parameterize to allow re-use by differing types of symbol table.
4180         (build_invokevirtual): Pass table to get_offset_table_index.
4181         * decl.c (java_init_decl_processing): Push types and decls for
4182         atable and atable_syyms.
4183         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
4184         (make_class_data): Add new fields atable and atable_syms.
4185         (emit_symbol_table): Rename from emit_offset_symbol_table.
4186         Parameterize to allow re-use by different types of symbol table.
4187         (build_symbol_entry): Renamed from build_method_symbols_entry.
4188
4189 2003-09-30  Roger Sayle  <roger@eyesopen.com>
4190
4191         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
4192         semantics for SAVE_EXPR, by caching the result in a temporary.
4193
4194 2003-09-28  Richard Henderson  <rth@redhat.com>
4195
4196         * check-init.c (check_init): Save and restore input_location
4197         instead of file and line separately.
4198         * decl.c (java_expand_body): Likewise.
4199         * jcf-write.c (generate_bytecode_insns): Likewise.
4200         * parse.y (safe_layout_class): Likewise.
4201         * jcf-parse.c (read_class, parse_class_file): Likewise.
4202         (java_parse_file): Use %H for warning locator.
4203
4204 2003-09-28  Roger Sayle  <roger@eyesopen.com>
4205
4206         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
4207         with void-type branches instead of using a COMPOUND_EXPR.
4208
4209 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
4210
4211         * decl.c (java_optimize_inline, dump_function): Remove.
4212         * java-tree.h (java_optimize_inline): Remove declaration.
4213         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
4214         * parse.y (source_end_java_method, java_expand_classes):
4215         Likewise.  Remove dead code.
4216
4217 2003-09-27  Roger Sayle  <roger@eyesopen.com>
4218
4219         * lang.c (java_init_options): Set flag_evaluation_order.
4220         * expr.c (force_evaluation_order): Don't attempt to force
4221         evaluation order of binary operations using save_expr.
4222         * parse.y (java_complete_lhs): No longer need to call
4223         force_evaluation_order when constructing binary operators.
4224
4225 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4226             Bryce McKinlay  <bryce@mckinlay.net.nz>
4227
4228         PR java/1333:
4229         * parse.y (not_accessible_field_error): New function.
4230         (resolve_expression_name): Check field access permissions.
4231         (resolve_qualified_expression_name): Use
4232         not_accessible_field_error.
4233         (resolve_qualified_expression_name): Likewise.
4234
4235 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4236
4237         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
4238
4239 2003-09-23  Roger Sayle  <roger@eyesopen.com>
4240
4241         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
4242         with equal operands without side-effects.
4243
4244 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
4245
4246         * decl.c (java_init_decl_processing): Don't emit otable decls
4247         if flag_indirect_dispatch is not set.
4248
4249 2003-09-21  Richard Henderson  <rth@redhat.com>
4250
4251         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
4252         resource.c: Revert.
4253
4254 2003-09-21  Richard Henderson  <rth@redhat.com>
4255
4256         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
4257         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
4258
4259 2003-09-20  Richard Henderson  <rth@redhat.com>
4260
4261         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
4262
4263 2003-09-18  Roger Sayle  <roger@eyesopen.com>
4264
4265         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
4266         * check-init.c (check_init): Likewise.
4267
4268 2003-09-18  Roger Sayle  <roger@eyesopen.com>
4269
4270         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
4271
4272 2003-09-16  Andrew Haley  <aph@redhat.com>
4273
4274         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
4275
4276 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
4277
4278         Fixes PR java/9577
4279         * mangle.c (find_compression_record_match): Skip
4280         over a "6JArray" (the array template mangled string)
4281         IDENTIFIER_NODE.
4282         (mangle_array_type): Correct minor typo.
4283         (atms): Move definition to the beginning.
4284
4285 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
4286
4287         * class.c (add_miranda_methods): Ensure super-interfaces are laid
4288         out. Fix for PR java/12254.
4289
4290 2003-09-11  Richard Henderson  <rth@redhat.com>
4291
4292         * parse.y (source_end_java_method): Update for new
4293         cgraph_finalize_function argument.
4294
4295 2003-09-09  Richard Henderson  <rth@redhat.com>
4296
4297         * parse.y (source_end_java_method): Update call to
4298         cgraph_finalize_function.
4299
4300 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
4301
4302         * decl.c (java_expand_body): New function.
4303         * expr.c (build_class_init): Set DECL_IGNORED_P.
4304         * java-tree.h (start_complete_expand_method,
4305         java_expand_body): Declare.
4306         * jcf-parse.c (cgraph.h): Include.
4307         (java_parse_file): Handle flag_unit_at_a_time.
4308         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
4309         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
4310         (java_estimate_num_insns): Use walk_tree_without_duplicates.
4311         (java_start_inlining): New function.
4312         * parse.h (java_finish_classes): Declare.
4313         * parse.y: Include cgraph.h.
4314         (block): Don't special-case empty block production.
4315         (craft_constructor): Set DECL_INLINE.
4316         (source_end_java_method): Handle flag_unit_at_a_time.
4317         Replace inline code with call to java_expand_body.
4318         (start_complete_expand_method): Remove static modifier.
4319         (java_expand_method_bodies): Patch function tree for
4320         class initialization and/or synchronization as needed.
4321         Don't begin RTL expansion yet.
4322         (java_expand_classes): Check flag_unit_at_a_time before
4323         calling finish_class.
4324         (java_finish_classes): New function.
4325         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
4326         (patch_assignment): Set DECL_CONTEXT on temporary variable.
4327         (emit_test_initialization): Set DECL_IGNORED_P.
4328
4329 2003-09-03  Roger Sayle  <roger@eyesopen.com>
4330
4331         * builtins.c (enum builtin_type): Delete unused enumeration.
4332         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
4333
4334 2003-08-28  Tom Tromey  <tromey@redhat.com>
4335
4336         * gcj.texi (Extensions): Document gcjlib URLs.
4337
4338 2003-08-20  Tom Tromey  <tromey@redhat.com>
4339
4340         * gcj.texi (Extensions): Added xref.
4341         (libgcj Runtime Properties): Document
4342         gnu.gcj.runtime.VMClassLoader.library_control.
4343
4344 2003-08-20  Andrew Haley  <aph@redhat.com>
4345
4346         * except.c (prepare_eh_table_type): Use new encoding for exception
4347         handlers when using -fno-assume-compiled.
4348
4349 2003-08-13  Tom Tromey  <tromey@redhat.com>
4350
4351         * gcj.texi (Invoking gij): Document -X and -?.
4352
4353 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
4354
4355         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
4356         GCJH_OBJS, JCFDUMP_OBJS
4357         * win32-host.c: Removed the unnecessary and broken dependency
4358         on jcf.h
4359
4360 2003-08-11  Tom Tromey  <tromey@redhat.com>
4361
4362         * parse.y (java_check_regular_methods): Typo fixes.  Call
4363         check_interface_throws_clauses.  Use
4364         check_concrete_throws_clauses.
4365         (check_interface_throws_clauses): New function.
4366         (check_concrete_throws_clauses): New function.
4367         (hack_is_accessible_p): New function.
4368         (find_most_specific_methods_list): Added FIXME.
4369         * typeck.c (lookup_do): Use `flags' argument to decide what to
4370         do.  Reimplemented.
4371         (lookup_argument_method_generic): New function.
4372         (lookup_argument_method2): Removed.
4373         * jcf.h (ACC_INVISIBLE): New define.
4374         * jcf-write.c (generate_classfile): Skip invisible methods.
4375         * class.c (add_miranda_methods): New function.
4376         (layout_class_methods): Use it.
4377         (get_access_flags_from_decl): Use ACC_INVISIBLE.
4378         * java-tree.h (METHOD_INVISIBLE): New define.
4379         (lang_decl_func) [invisible]: New field.
4380         (lookup_argument_method_generic): Declare.
4381         (SEARCH_INTERFACE): New define.
4382         (SEARCH_SUPER): Likewise.
4383         (SEARCH_ONLY_INTERFACE): Likewise.
4384         (SEARCH_VISIBLE): Likewise.
4385         (lookup_argument_method2): Removed declaration.
4386
4387 2003-08-05  Tom Tromey  <tromey@redhat.com>
4388
4389         Fix for PR java/11600:
4390         * parse.y (java_complete_lhs): See whether we're calling a method
4391         on an array.
4392         (check_thrown_exceptions): Added `is_array_call' argument;
4393         fixed `clone' checking; updated all callers.
4394
4395 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
4396
4397         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
4398
4399 2003-08-03  Tom Tromey  <tromey@redhat.com>
4400
4401         * java-tree.h (METHOD_TRANSIENT): Removed.
4402         * decl.c (pushdecl): Removed some dead code.
4403         * class.c (get_access_flags_from_decl): Can't have transient
4404         method.
4405         (add_method_1): Can't have a transient method.
4406
4407 2003-07-28  Andreas Jaeger  <aj@suse.de>
4408
4409         * jvspec.c: Convert to ISO C90 prototypes.
4410
4411 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4412
4413         * decl.c (force_poplevels): Fix warning call.
4414
4415 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4416
4417         * expr.c (expand_java_field_op): Don't use xxx_with_decl
4418         (expand_java_field_op): Likewise.
4419         * class.c (layout_class_method): Likewise
4420         (emit_register_classes): Likewise.
4421         * decl.c (pushdecl): Likewise.
4422         (poplevel): Likewise.
4423         (force_poplevels): Likewise.
4424         (give_name_to_locals): Likewise.
4425         * check-init.c (check_for_initialization): Likewise.
4426
4427 2003-07-24  Jason Merrill  <jason@redhat.com>
4428
4429         * java-tree.h: Move boolean_type_node et al to the back end.
4430
4431 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4432
4433         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
4434         casts.
4435
4436 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
4437
4438         * lang.opt: Don't show -MD_ and -MDD_.
4439
4440 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
4441
4442         * lang-options.h: Remove.
4443         * lang.opt: Add help text.
4444
4445 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
4446
4447         * expr.c: Remove the last argument to expand_assignment().
4448
4449 2003-07-09  Jan Hubicka  <jh@suse.cz>
4450
4451         * java-tree.h (DECL_NUM_STMTS): Rename to...
4452         (DECL_ESTIMATED_INSNS): ... this.
4453         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
4454         New static functions.
4455         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
4456         * parser.y (add_stmt_to_compound): Do not account statements.
4457
4458 2003-07-08  Mark Wielaard  <mark@klomp.org>
4459
4460         * gcj.texi: CNI now expands to Compiled Native Interface.
4461
4462 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4463
4464         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
4465
4466 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4467
4468         * expr.c (expand_byte_code): Adjist emit_line_note call.
4469
4470 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
4471
4472         * lang.c (java_handle_option): Don't handle filenames.
4473
4474 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
4475
4476         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
4477         DIR_SEPARATOR.
4478         Use FILENAME_CMP.
4479         * jcf-write.c: Don't default-define DIR_SEPARATOR.
4480         * jcf.h: Delete COMPARE_FILENAMES definition.
4481
4482 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
4483
4484         * lang.c (java_init_options): Update prototype.
4485
4486 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
4487
4488         * decl.c (poplevel): Adjust define_label call.
4489
4490 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
4491
4492         * gjavah.c (flag_jni): Make non-static.
4493         * parse-scan.y (ctxp): Make non-static.
4494
4495         * class.c (build_method_symbols_entry)
4496         * expr.c (get_offset_table_index)
4497         * jcf-parse.c (jcf_parse):
4498         Mark the definition static, matching the forward declaration.
4499
4500 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
4501
4502         * lang.c (java_handle_option): Don't check for missing arguments.
4503
4504 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
4505
4506         * class.c (push_class): Use a location_t to save place.
4507         (emit_register_classes): Set input_location. Adjust
4508         expand_function_end call.
4509         * resource.c (write_resource_constructor): Likewise.
4510         * decl.c (end_java_method): Adjust expand_function_end call.
4511         * parse.y (source_end_java_method): Likewise.
4512
4513 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
4514
4515         * lang.c (java_handle_option): Likewise.
4516
4517 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
4518
4519         * lang.c (java_handle_option): Special-casing of optional
4520         joined arguments no longer needed.
4521         * lang.opt: Update switches that take optional argument.
4522
4523 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
4524
4525         * lang.opt: Declare Java.
4526         * lang.c (java_init_options): Update.
4527
4528 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
4529
4530         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
4531
4532 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
4533
4534         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
4535         * lang.c (java_handle_option): -MD and -MMD have an underscore.
4536         * lang.opt: -MD and -MMD have an underscore.
4537
4538 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
4539
4540         * class.c (emit_register_classes): Adjust init_function_start
4541         call.
4542         * decl.c (complete_start_java_method): Likewise.
4543         * resource.c (write_resource_constructor): Likewise.
4544
4545 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
4546
4547         * Make-lang.in: Update to use options.c and options.h.
4548         * lang.c: Include options.h not j-options.h.
4549         (java_handle_option): Abort on unrecognized option.
4550         (java_init_options): Request Java switches.
4551
4552 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
4553
4554         * Make-lang.in: Handle mostlyclean.
4555
4556 2003-06-11  Tom Tromey  <tromey@redhat.com>
4557
4558         * lang.c (java_handle_option): Update dependency_tracking for
4559         OPT_MF case.
4560
4561         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
4562         empty argument.
4563
4564 2003-06-10  Andrew Haley  <aph@redhat.com>
4565
4566         * resource.c (write_resource_constructor): Use expand_expr to
4567         generate the address of the label attached to a resource.
4568         * Make-lang.in (java/resource.o): Add expr.h
4569
4570 2003-06-10  Andrew Haley  <aph@redhat.com>
4571
4572         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
4573         (java_decl_ok_for_sibcall): New.
4574
4575 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
4576
4577         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
4578         (java/j-options.c, java/j-options.h): New.
4579         * java-tree.h (resource_name, compile_resource_file,
4580         compile_resource_data): Constify.
4581         * jcf-write.c (jcf_write_base_directory): Similarly.
4582         * jcf.h (jcf_write_base_directory): Similarly.
4583         * lang.c: Include j-options.h.
4584         (cl_options_count, cl_options, string_option, java_decode_option,
4585         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
4586         process_option_with_no): Remove.
4587         (resource_name): Constify.
4588         (LANG_HOOKS_HANDLE_OPTION): Override.
4589         (java_handle_option): New.
4590         (java_init): Don't call jcf_path_init.
4591         (java_init_options): Call jcf_path_init.
4592         * lang.opt: New.
4593         * resource.c (compile_resource_data, compile_resource_file): Constify.
4594
4595 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
4596
4597         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
4598         (struct lang_decl_func): Add last_line field.
4599         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
4600         DECL_SOURCE_LINE_LAST): Remove.
4601         * parse.y (missing_return_error, finish_method_declaration,
4602         lookup_cl, start_artificial_method_body, source_end_java_method,
4603         start_complete_expand_method): Adjust.
4604
4605 2003-06-08  Tom Tromey  <tromey@redhat.com>
4606
4607         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
4608         fno-assume-compiled.
4609
4610 2003-06-08  Roger Sayle  <roger@eyesopen.com>
4611
4612         * builtins.c (define_builtin_type, builtin_types): Delete.
4613         (define_builtin): Rewritten to take just the built-in code,
4614         the function's name, type and fallback library function name.
4615         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
4616         (initialize_builtins): Overhaul to define the GCC builtins
4617         used by gcj manually, providing the Java run-time's
4618         implementations as the fallback library function.
4619
4620 2003-06-08  Anthony Green  <green@redhat.com>
4621
4622         * parse.y (patch_cast): Fix conversions from floating-point to
4623         integral types.
4624
4625 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
4626
4627         * Make-lang.in: Update.
4628         * lang.c: Include opts.h. Define cl_options_count and cl_options.
4629
4630 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
4631
4632         * lang.c (java_init_options): Update.
4633
4634 2003-06-05  Jan Hubicka  <jh@suse.cz>
4635
4636         * Make-lang.in:  Add support for stageprofile and stagefeedback
4637
4638 2003-05-31  Roger Sayle  <roger@eyesopen.com>
4639
4640         * lang.c (java_init_options): Prescribe wrap-around two's
4641         complement arithmetic overflow by setting flag_wrapv.
4642
4643 2003-05-29  Roger Sayle  <roger@eyesopen.com>
4644
4645         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
4646         (builtin_record): Add an additional builtin_code field to
4647         record which GCC built-in corresponds to the Java function.
4648         (java_builtins):  Add new entries for atan, atan2, exp, log,
4649         pow and tan.
4650         (max_builtin, min_builtin, abs_builtin): Perform constant
4651         folding on the resulting tree.
4652         (java_build_function_call_expr): Likewise, perform constant
4653         folding on the resulting tree.
4654         (initialize_builtins): The NULL creators are now allowed in
4655         the java_builtins table, which is now terminated by an entry
4656         with builtin_code == END_BUILTINS.
4657         (check_for_builtin): Likewise.  If the matching creator is
4658         NULL, construct the call using java_build_function_call_expr
4659         directly with the decl for the corresponding builtin_code.
4660
4661 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4662
4663         * win32-host.c: Normalize copyright boilerplate.
4664
4665 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4666
4667         * parse.y (print_int_node): Use string concatentation on
4668         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
4669         function calls into one.
4670
4671 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
4672
4673         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
4674         fatal_io_error with calls to fatal_error; add ": %m" to the end of
4675         all the affected error messages.
4676
4677 2003-05-13  Richard Henderson  <rth@redhat.com>
4678
4679         * class.c (layout_class_method): Set DECL_EXTERNAL.
4680         * decl.c (java_mark_decl_local, java_mark_class_local): New.
4681         * java-tree.h (java_mark_class_local): Declare.
4682         * jcf-parse.c (parse_class_file): Use it.
4683         * parse.y (java_expand_classes): Likewise.
4684
4685 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
4686
4687         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
4688         * lex.h: #include input.h.
4689         * jv-scan.c (input_filename): Remove.
4690
4691 2003-05-02  Tom Tromey  <tromey@redhat.com>
4692
4693         PR java/10491:
4694         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
4695         (handle_inner_classes): New function.
4696
4697 2003-05-01  Tom Tromey  <tromey@redhat.com>
4698
4699         PR java/10459:
4700         * parse.y (finish_for_loop): Do nothing if update expression is a
4701         EXPR_WFL_NODE wrapping nothing.
4702         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
4703
4704 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
4705
4706         * lex.h (input_lineno): Remove declaration.
4707         * parse-scan.y: #include input.h.
4708         (input_filename): Remove declaration.
4709         (input_location): Add definition.
4710         (input_line): Remove definition.
4711
4712 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4713
4714         * lex.h (lineno): Rename to ...
4715         (input_line): ... here
4716         * parse-scan.y (lineno): Rename to ...
4717         (input_line): ... here.
4718         (reset_report): Rename lineno to input_line.
4719         * check-init.c (check_init): Likewise.
4720         * class.c (push_class): Likewise.
4721         * decl.c (complete_start_java_method, end_java_method): Likewise.
4722         * expr.c (expand_byte_code): Likewise.
4723         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
4724         * jcf-write.c (generate_bytecode_insns): Likewise.
4725         * lex.c (java_init_lex, java_allocate_new_line,
4726         do_java_lex): Likewise.
4727         * parse.h (YYNOT_TWICE): Likewise.
4728         * parse.y (empty_statement, expression_statement,
4729         java_pop_parser_context, java_parser_context_save_global,
4730         yyerror, register_fields, method_header, safe_layout_class,
4731         find_in_imports_on_demand, create_artificial_method,
4732         source_end_java_method, start_complete_expand_method,
4733         build_thisn_assign, java_complete_lhs,
4734         maybe_absorb_scoping_block): Likewise.
4735
4736 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
4737
4738         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
4739         '/' when computing java source filename
4740
4741 2003-04-13  Tom Tromey  <tromey@redhat.com>
4742
4743         * gjavah.c (print_c_decl): Indentation fix.
4744
4745 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4746
4747         * class.c (make_field_value, make_method_value, get_dispatch_table)
4748         (make_class_data, emit_offset_symbol_table)
4749         * constants.c (build_constants_constructor)
4750         * java-tree.h (START_RECORD_CONSTRUCTOR)
4751         * parse.y (maybe_build_array_element_wfl):
4752         Use build_constructor.
4753
4754 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
4755
4756         PR java/10253:
4757         * parse.y (string_convert_int_cst): Always use at least one digit
4758         in string conversion. Remove ASCII dependence.
4759         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
4760
4761 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
4762
4763         * Make-lang.in: added win32-host.c
4764         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
4765         resolves to open() on non-Win32 platforms and
4766         Win32-specific jcf_open_exact_case() on Win32
4767         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
4768         when trying .java and .class files
4769         * win32-host.c: added to repository. Defines
4770         Win32-specific jcf_open_exact_case()
4771
4772 2003-04-10  Andrew Haley  <aph@redhat.com>
4773
4774         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
4775         (maybe_free_localvar): Renamed from localvar_free.
4776         Add new arg, really.
4777         (generate_bytecode_insns): Set new variable, jsrs.
4778         Only free local vars if no jsr insns have been emittted.
4779         Call maybe_free_localvar, not localvar_free.
4780
4781 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4782
4783         * gcj.texi: Remove @ at start of file.
4784
4785 2003-03-25  Tom Tromey  <tromey@redhat.com>
4786
4787         * parse.y (create_interface): Call CHECK_DEPRECATED.
4788
4789 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
4790
4791         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
4792
4793 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4794
4795         * javaop.h (jfloat, jdouble): Make them structures mirroring
4796         the bit fields of IEEE float and double respectively.
4797         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
4798         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
4799         (union Word, union DWord): Delete.
4800         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
4801
4802         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
4803         D_NAN_MASK): Delete.
4804         (jni_print_float, jni_print_double): New.  Generate
4805         hexadecimal floating constants.
4806         (print_field_info): Use jni_print_float/double.
4807
4808         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
4809         finite floating point numbers for output; special case
4810         non-finite floats.
4811
4812 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4813
4814         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
4815         Replace 0 and 1 with true and false in return statements.
4816
4817 2003-03-19  Tom Tromey  <tromey@redhat.com>
4818
4819         * lex.c (do_java_lex): Renamed from java_lex.
4820         (java_lex): New function.
4821         Include timevar.h.
4822
4823 2003-03-13  Tom Tromey  <tromey@redhat.com>
4824
4825         * parse.y (resolve_inner_class): Error if qualifier is a primitive
4826         type.
4827
4828 2003-03-04  Andrew Haley  <aph@redhat.com>
4829
4830         * gjavah.c (is_first_data_member): New global variable.
4831         (print_c_decl): If it's the first data member, align it as the
4832         superclass.
4833         (process_file): Set is_first_data_member.
4834
4835 2003-03-11  Tom Tromey  <tromey@redhat.com>
4836
4837         * parse.y (resolve_field_access): Initialize class if field is
4838         found in another static field.
4839         * expr.c (build_class_init): Don't optimize out initialization of
4840         implemented interface.
4841
4842 2003-03-11  Andrew Haley  <aph@redhat.com>
4843
4844         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
4845         warning.
4846
4847 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
4848
4849         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
4850         and DIR_SEPARATOR_2 for a target.
4851         Correct minor typos.
4852
4853         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
4854         and DIR_SEPARATOR_2 for a target into account.
4855
4856 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4857
4858         * lang.c (java_init): Update prototype, move code to java_post_options.
4859         (java_post_options): Similarly.
4860
4861 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
4862
4863         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
4864         compare file name components depending on the case-sensitivity
4865         or otherwise of the host file system.
4866
4867         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
4868         "strcmp" to compare file name components.
4869         Use IS_DIR_SEPARATOR instead of comparing directly against
4870         DIR_SEPARATOR.
4871         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
4872         comparing directly against DIR_SEPARATOR.
4873
4874 2003-03-04  Tom Tromey  <tromey@redhat.com>
4875
4876         * Make-lang.in (java.tags): New target.
4877
4878 2003-03-01  Roger Sayle  <roger@eyesopen.com>
4879
4880         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
4881         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
4882
4883 2003-03-01  Tom Tromey  <tromey@redhat.com>
4884
4885         * parse.y (jdep_resolve_class): Only check deprecation if we found
4886         a decl.
4887
4888 2003-02-28  Tom Tromey  <tromey@redhat.com>
4889
4890         PR java/9695:
4891         * class.c (maybe_layout_super_class): Always pass a WFL to
4892         do_resolve_class.
4893         * parse.y (do_resolve_class): Updated comment to explain
4894         parameters.
4895
4896 2003-02-26  Tom Tromey  <tromey@redhat.com>
4897
4898         * jcf-write.c (generate_classfile): Check whether class is
4899         deprecated before writing attribute count.
4900
4901 2003-02-25  Roger Sayle  <roger@eyesopen.com>
4902
4903         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
4904         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
4905
4906 2003-02-23  Tom Tromey  <tromey@redhat.com>
4907
4908         * lang-options.h: Added -Wdeprecated.
4909         * gcj.texi (Warnings): Document -Wdeprecated.
4910         * java-tree.h (flag_deprecated): Declare.
4911         * lang.c (lang_W_options): Added deprecated.
4912         (flag_deprecated): New global.
4913         * chartables.h: Rebuilt.
4914         * gen-table.pl (process_one): Look at whitespace.
4915         (print_tables): Define LETTER_SPACE, LETTER_MASK.
4916         * parse.h (CLEAR_DEPRECATED): New macro.
4917         (CHECK_DEPRECATED_NO_RESET): New macro.
4918         * jcf-parse.c (handle_deprecated): New function.
4919         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
4920         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
4921         * parse.y (resolve_type_during_patch): Check deprecation.
4922         (jdep_resolve_class): Likewise.
4923         (process_imports): Likewise.
4924         (resolve_expression_name): Likewise.
4925         (check_deprecation): Strip arrays from decl.  Check
4926         flag_deprecated.
4927         (patch_method_invocation): Also check the particular constructor
4928         for deprecation.
4929         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
4930         * jcf-write.c (append_deprecated_attribute): New function.
4931         (generate_classfile): Generate deprecated attribute when
4932         appropriate.
4933         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
4934         (java_lex) [case '*']: Simplify logic.
4935         (java_start_char_p): Use LETTER_MASK.
4936         (java_part_char_p): Likewise.
4937         (java_space_char_p): New function.
4938
4939 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4940
4941         Change base class access representation.
4942         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
4943         (add_interface_do): Likewise.
4944
4945 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
4946
4947         * decl.c (java_init_decl_processing): Change
4948         soft_lookupjnimethod_node to reflect the change in
4949         signature of _Jv_LookupJNIMethod in libjava/jni.cc
4950         * expr.c (build_jni_stub): Calculate and pass the size
4951         on the stack of the arguments to a JNI function. Use
4952         new target macro MODIFY_JNI_METHOD_CALL to allow a
4953         target to modify the call to a JNI method.
4954
4955 2003-02-08  Roger Sayle  <roger@eyesopen.com>
4956
4957         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
4958         instead of basename to avoid compiler warnings on Tru64.
4959
4960 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
4961
4962         * gcj.texi: Update to GFDL 1.2.
4963
4964 2003-01-31  Andrew Haley  <aph@redhat.com>
4965
4966         * parse.y (java_expand_classes): Scan the whole class list looking
4967         for access methods that haven't yet been expanded.
4968
4969 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
4970
4971         Fix for java/4269:
4972
4973         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
4974         to fix bootstrap on sparc-unknown-netbsdelf1.5.
4975         * jcf-parse.c: Likewise.
4976
4977 2003-01-31  Mark Wielaard  <mark@klomp.org>
4978
4979         * gjavah.c (throwable_p): Allocate 1 more byte for string.
4980
4981 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4982
4983         * class.c (make_class): Use BINFO_ELTS.
4984         (set_super_info): Likewse.
4985         (add_interface_do): Likewise.
4986
4987 2003-01-30  Tom Tromey  <tromey@redhat.com>
4988
4989         * jcf-parse.c (read_class): Update identifier's class value if it
4990         changed during parsing.
4991
4992 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
4993
4994         * Make-lang.in (po-generated): Find the targets in $(parsedir).
4995         Propagate change to all other rules as required.
4996         (java/parse-scan.o): Add explicit dependency on
4997         $(parsedir)/java/parse-scan.c .
4998
4999 2003-01-29  Tom Tromey  <tromey@redhat.com>
5000
5001         * parse.y (patch_assignment): Only transform the rhs of an
5002         assignment when compiling to native.
5003
5004 2003-01-28  Tom Tromey  <tromey@redhat.com>
5005
5006         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
5007
5008 2003-01-28  Tom Tromey  <tromey@redhat.com>
5009
5010         * lex.c (java_lex): Don't include UEOF as part of token.
5011         (java_read_unicode): Error if \u sequence prematurely terminated.
5012
5013 2003-01-27  Tom Tromey  <tromey@redhat.com>
5014
5015         * parse.y (java_check_regular_methods): Check for construct after
5016         checking types in throws clause.
5017
5018 2003-01-24  Tom Tromey  <tromey@redhat.com>
5019
5020         * class.c (build_static_field_ref): Only a String or numeric field
5021         can fold to a constant.
5022
5023 2003-01-23  Tom Tromey  <tromey@redhat.com>
5024
5025         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
5026         file name in resource buffer.
5027
5028 2003-01-23  Tom Tromey  <tromey@redhat.com>
5029
5030         * expr.c (build_known_method_ref): Use method's context to find
5031         method table index.
5032
5033 2003-01-23  Tom Tromey  <tromey@redhat.com>
5034
5035         * constants.c (set_constant_entry): Allocated cleared memory.
5036
5037 2003-01-22  Tom Tromey  <tromey@redhat.com>
5038
5039         * java-tree.h: Don't use PARAMS.
5040         * resource.c: Add prototypes for all functions.
5041         (write_resource_constructor): Use `const char *' to avoid
5042         warning.
5043
5044 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
5045
5046         * jcf-parse.c (process_zip_dir): Remove unused variable.
5047
5048 2003-01-22  Tom Tromey  <tromey@redhat.com>
5049
5050         * expr.c (build_invokeinterface): Abort if method's context is not
5051         an interface.
5052
5053 2003-01-22  Tom Tromey  <tromey@redhat.com>
5054
5055         * gcj.texi (Input and output files): Mention non-class entries.
5056         * decl.c (java_init_decl_processing): Call
5057         init_resource_processing.
5058         * java-tree.h (compile_resource_data, write_resource_constructor,
5059         compile_resource_file, init_resource_processing): Declare.
5060         * config-lang.in (gtfiles): Added resource.c.
5061         * Make-lang.in (gt-java-resource.h): New target.
5062         (JAVA_OBJS): Added resource.o.
5063         (java/resource.o): New target.
5064         * resource.c: New file.
5065         * class.c (compile_resource_file): Moved to resource.c.
5066         (registerResource_libfunc): Likewise.
5067         (utf8_decl_list): Mark with GTY; now static.
5068         * jcf-parse.c (classify_zip_file): New function.
5069         (parse_zip_file_entries): Use it; compile .properties files.
5070         (process_zip_dir): Use classify_zip_file and compute_class_name.
5071         Don't write class name into zip directory.
5072         (java_parse_file): Call write_resource_constructor.
5073         (compute_class_name): New function.
5074         * jcf-io.c (read_zip_member): Reindented.
5075
5076 2003-01-21  Tom Tromey  <tromey@redhat.com>
5077
5078         * class.c (supers_all_compiled): New function.
5079         (make_class_data): Use it.
5080
5081 2003-01-21  Tom Tromey  <tromey@redhat.com>
5082
5083         * parse.y (method_header): Native method can't be strictfp.
5084         No method can be transient or volatile.
5085
5086 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5087
5088         Make-lang.in (jvspec.o-warn): Add -Wno-error.
5089
5090 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
5091
5092         * check-init.c: Fix comment typos.
5093         * class.c: Likewise.
5094         * constants.c: Likewise.
5095         * decl.c: Likewise.
5096         * except.c: Likewise.
5097         * expr.c: Likewise.
5098         * java-except.h: Likewise.
5099         * java-tree.h: Likewise.
5100         * javaop.h: Likewise.
5101         * jcf-dump.c: Likewise.
5102         * jcf-io.c: Likewise.
5103         * jcf-parse.c: Likewise.
5104         * jcf-write.c: Likewise.
5105         * lang.c: Likewise.
5106         * mangle.c: Likewise.
5107         * typeck.c: Likewise.
5108         * verify.c: Likewise.
5109
5110 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5111
5112         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
5113         * jcf-write.c: Include "tm_p.h".
5114
5115 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5116
5117         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
5118
5119 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5120
5121         * builtins.c (java_build_function_call_expr): Renamed from
5122         build_function_call_expr.  All callers changed.
5123
5124         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
5125         * jcf-parse.c: Include tm_p.h.
5126
5127         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
5128         warning.
5129
5130 2003-01-14  Tom Tromey  <tromey@redhat.com>
5131
5132         * class.c (make_class_data): Check that super is compiled before
5133         building class reference to it.
5134
5135 2003-01-14  Andrew Haley  <aph@redhat.com>
5136
5137         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
5138         varargs function -- correct.
5139
5140 2003-01-14  Andrew Haley  <aph@redhat.com>
5141
5142         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
5143
5144 2003-01-14  Andrew Haley  <aph@redhat.com>
5145
5146         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
5147         varargs function -- correct.
5148
5149         * parse.y (patch_assignment): Copy the rhs of an assignment into a
5150         temporary if the RHS is a reference.
5151
5152 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5153
5154         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
5155         * keyword.h: Regenerated.
5156
5157         * All Files: Convert to ISO C style function definitions.
5158
5159 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5160
5161         * parse.y (check_pkg_class_access): ANSIfy definition.
5162
5163 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5164
5165         * decl.c, parse-scan.y, parse.y: Don't cast return value of
5166         xmalloc et al.
5167
5168         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
5169
5170 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5171
5172         Merge from pch-branch:
5173
5174         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
5175
5176         * Make-lang.in (java/gjavah.o): Update dependencies.
5177         * gjavah.c: Include ggc.h.
5178
5179         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
5180
5181         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
5182         (JCFDUMP_OBJS): Add ggc-none.o.
5183         (java/jcf-dump.o): Depend on GGC_H.
5184         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
5185         CPool substructures.
5186         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
5187         * jcf-dump.c: Include ggc.h.
5188
5189         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
5190
5191         * jcf.h (union cpool_entry): New.
5192         (struct CPool): Use gengtype to mark.  Change field 'data' to be
5193         an array of unions.
5194         (struct JCF): Use gengtype to mark.
5195         (CPOOL_UINT): Update for new cpool_entry type.
5196         (CPOOL_USHORT1): Likewise.
5197         (CPOOL_USHORT2): Likewise.
5198         (CPOOL_FINISH): Use GC to free cpool subfields.
5199         * parse.h (struct parser_ctxt): Mark field current_jcf.
5200         * lex.c (java_init_lex): Use GC to allocate struct JCF.
5201         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
5202         (main_jcf): Use gengtype to mark.
5203         (ggc_mark_jcf): Delete.
5204         (get_constant): Update for new cpool_entry type.
5205         (give_name_to_class): Likewise.
5206         (get_class_constant): Likewise.
5207         (init_outgoing_cpool): Use GGC to allocate struct CPool.
5208         (java_parse_file): Use GGC to allocate struct JCF.
5209         (init_jcf_parse): Don't call ggc_add_root.
5210         * jcf-reader.c (jcf_parse_constant_pool): Update for new
5211         cpool_entry type.
5212         * java-tree.h (current_jcf): Use gengtype to mark.
5213         (CPOOL_UTF): Update for new cpool_entry type.
5214         (outgoing_cpool): Use gengtype to mark.
5215         (struct lang_type): GC struct JCF and struct CPool.
5216         * config-lang.in (gtfiles): Add jcf.h.
5217         * constants.c (find_tree_constant): New.
5218         (set_constant_entry): Allocate cpool subfields using GGC.  Update
5219         for new cpool_entry type.
5220         (find_constant1): Update for new cpool_entry type.
5221         (find_constant2): Likewise.
5222         (find_utf8_constant): Use find_tree_constant.
5223         (find_class_or_string_constant): Remove unnecessary cast to jword.
5224         Update for new cpool_entry type.
5225         (count_constant_pool_bytes): Update for new cpool_entry type.
5226         (write_constant_pool): Likewise.
5227         (alloc_name_constant): Use find_tree_constant.
5228         (build_constants_constructor): Update for new cpool_entry type.
5229
5230         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
5231
5232         * parse.y (mark_parser_ctxt): Delete.
5233         (goal): Don't use ggc_add_root.
5234         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
5235         (java_pop_parser_context): Let GC free parser_ctxt.
5236         (java_parser_context_resume): Likewise.
5237         * parse.h (struct parser_ctxt): Use gengtype to mark.
5238         (ctxp): Likewise.
5239         (ctxp_for_generation): Likewise.
5240         * lex.h (struct java_lc_s): Mark for gengtype.
5241         (java_lexer): Rearrange for gengtype.
5242         * config-lang.in (gtfiles): Add lex.h, parse.h.
5243
5244 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5245
5246         * All Files: Remove PARAMS macro.
5247
5248         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
5249         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
5250         `__STDC__' macros.
5251
5252         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
5253         VA_CLOSE.
5254
5255 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5256
5257         * Make-lang.in (java.install-common, java.uninstall,
5258         java.install-info, java.install-man): Prepend $(DESTDIR)
5259         to destination paths in all (un)installation commands.
5260         (java.install-common): Rewrite $(LN) command to support
5261         DESTDIR with "ln" as well as with "ln -s".
5262
5263 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5264
5265         * java-tree.h: Protect against multiple inclusion.
5266
5267 2003-01-07  Tom Tromey  <tromey@redhat.com>
5268
5269         * class.c (add_assume_compiled): Don't adjust parent if we're
5270         already at the root of tree.
5271
5272 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5273
5274         * lang.c (dump_compound_expr): Prototype.
5275
5276 2003-01-03  Tom Tromey  <tromey@redhat.com>
5277
5278         Fix for PR java/8712:
5279         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
5280         when simply checking against `null'.
5281
5282 2003-01-03  Tom Tromey  <tromey@redhat.com>
5283
5284         * gcj.texi (Standard Properties): Document http.proxyHost and
5285         http.proxyPort.
5286
5287         * gcj.texi (GNU Classpath Properties): Document new properties.
5288
5289 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5290
5291         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
5292         java/lang-options.h, java/mangle.c, java/mangle_name.c,
5293         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
5294
5295 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5296
5297         * Make-lang.in, boehm.c, buffer.c,
5298           buffer.h, builtins.c, class.c,
5299           config-lang.in, constants.c,
5300           convert.h, decl.c, except.c,
5301           expr.c, java-except.h,
5302           java-tree.h, javaop.def,
5303           jcf-parse.c, jcf-write.c,
5304           jv-scan.c, jvgenmain.c,
5305           jvspec.c, keyword.gperf,
5306           keyword.h, lang-options.h,
5307           lang-specs.h, lang.c, lex.c,
5308           lex.h, mangle.c, mangle_name.c,
5309           parse-scan.y, parse.h, parse.y,
5310           typeck.c, verify.c, xref.c,
5311           xref.h: Replace "GNU CC" with
5312           "GCC" in the copyright header.
5313
5314         * check-init.c, gjavah.c, javaop.h,
5315           jcf-depend.c, jcf-dump.c, jcf-io.c,
5316           jcf-path.c, jcf-reader.c, jcf.h,
5317           zextract.c, zipfile.h: These files are
5318           "part of GCC". Also say "GCC" not "GNU CC".
5319
5320 2002-12-30  DJ Delorie  <dj@redhat.com>
5321
5322         * Make-lang.in: Protect against texi2pod/pod2man failing.
5323
5324 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
5325
5326         * gcj.texi: Use @copying.
5327
5328 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5329
5330         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
5331         print_cxx_classname.
5332         (print_cxx_classname): Add add_scope parameter.
5333         (print_class_decls): Do not emit a semicolon after the extern
5334         "Java" block.
5335         (process_file): Adjust calls to print_cxx_classname.
5336
5337 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
5338
5339         * gcj.texi: Include Cover Texts in man page.
5340
5341 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
5342
5343         * class.c (build_static_field_ref): Check FIELD_FINAL.
5344
5345         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
5346         instead of current_constant_pool_data_ref.
5347         * java-tree.h (current_constant_pool_data_ref): Undefine.
5348         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
5349         * jcf-parse.c (init_outgoing_cpool): Don't initialize
5350         current_constant_pool_data_ref.
5351
5352         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
5353         not build_internal_class_name.
5354
5355         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
5356         Use it when class ref isn't certain to be compiled.
5357
5358 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
5359
5360         * gcj.texi: Include gcc-common.texi.
5361         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
5362         $(srcdir)/doc/include/gcc-common.texi.
5363
5364 2002-12-22  Anthony Green  <green@redhat.com>
5365
5366         * gcj.texi (Limitations): Add note about org.xml.sax and
5367         org.w3c.dom.
5368
5369 2002-12-20  Tom Tromey  <tromey@redhat.com>
5370
5371         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
5372         where minimum case value is Integer.MIN_VALUE.
5373         Fixes PR java/8955.
5374
5375 2002-12-18  Andrew Haley  <aph@redhat.com>
5376
5377         * parse.y (patch_invoke): Force evaluation order when `check' is
5378         set.  For PR libgcj/8945.
5379
5380 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
5381
5382         * gcj.texi: Change version number to 3.4.
5383
5384 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
5385         Andrew Haley <aph@redhat.com>
5386
5387         * parse.y (source_end_java_method): Remove custom encoding of line
5388         numbers for a function decl before passing it to the back end.
5389
5390 2002-12-03  Andrew Haley  <aph@redhat.com>
5391
5392         * class.c (make_class_data): New field, "chain".
5393         * decl.c (java_init_decl_processing): Likewise.
5394
5395 2002-12-02  Tom Tromey  <tromey@redhat.com>
5396
5397         For PR java/8740:
5398         * parse.y (do_resolve_class): Handle qualified name via
5399         recursion.
5400
5401 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
5402
5403         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
5404         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
5405         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
5406         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
5407         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
5408         Include coretypes.h and tm.h.
5409         * Make-lang.in: Update dependencies.
5410
5411 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5412
5413         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
5414
5415 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
5416
5417         * jcf-reader.c: Don't expand JCF_readu4 inside the
5418         expansion of JCF_SKIP.
5419
5420 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
5421
5422         * jcf-reader.c: Don't expand JCF_readu4 inside the
5423         expansion of JCF_SKIP.
5424
5425 2002-11-22  Tom Tromey  <tromey@redhat.com>
5426
5427         * parse.y (patch_binop): Cast right hand side of shift expression
5428         to `int'.  Fixes PR java/8676.
5429
5430 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
5431             Andrew Haley <aph@redhat.com>
5432
5433         * gcc/java/jcf-write.c (write_classfile): Remove target
5434         class file, if it exists, before renaming the temporary
5435         class file to it.
5436
5437 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
5438
5439         * jvspec.c (lang_specific_spec_functions): New.
5440
5441 2002-11-18  Tom Tromey  <tromey@redhat.com>
5442
5443         Fix for PR java/7912:
5444         * expr.c (can_widen_reference_to): Allow cast of array to
5445         Cloneable or Serializable.
5446         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
5447         (java_io_serializable_identifier_node): Likewise.
5448         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
5449         (valid_ref_assignconv_cast_p): Use new identifier nodes.
5450         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
5451         java_io_serializable.
5452         * decl.c (java_init_decl_processing): Initialize
5453         java_lang_cloneable_identifier_node and
5454         java_io_serializable_identifier_node.
5455         (java_lang_cloneable_identifier_node): New global.
5456         (java_io_serializable_identifier_node): Likewise.
5457
5458 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
5459
5460         * buffer.c: Remove unnecessary casts.
5461         * check-init.c: Likewise.
5462         * class.c: Likewise.
5463         * constants.c: Likewise.
5464         * decl.c: Likewise.
5465         * except.c: Likewise.
5466         * gjavah.c: Likewise.
5467         * jcf-io.c: Likewise.
5468         * jcf-parse.c: Likewise.
5469         * jcf-path.c: Likewise.
5470         * jvspec.c: Likewise.
5471         * lang.c: Likewise.
5472         * lex.c: Likewise.
5473         * verify.c: Likewise.
5474
5475 2002-11-06  Tom Tromey  <tromey@redhat.com>
5476
5477         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
5478         a JNI header.
5479
5480 2002-11-05  Tom Tromey  <tromey@redhat.com>
5481
5482         Fix for PR java/6388.
5483         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
5484         * java-tree.h (enum java_tree_index): New values
5485         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
5486         (decimal_int_max, decimal_long_max): New defines.
5487         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
5488         (error_if_numeric_overflow): Rewrote range checking.
5489         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
5490         decimal_long_max.
5491
5492 2002-11-02  Tom Tromey  <tromey@redhat.com>
5493
5494         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
5495
5496         * class.c (make_method_value): Put class name, not signature, into
5497         `throws' field.  For PR java/8415.
5498
5499 2002-10-24  Tom Tromey  <tromey@redhat.com>
5500
5501         * gcj.texi (Invoking gij): Document --showversion.
5502         (Standard Properties): java.library.path now set.
5503
5504 2002-10-23  Tom Tromey  <tromey@redhat.com>
5505
5506         * gjavah.c (decode_signature_piece): In JNI mode, print
5507         `jobjectArray' when array depth is nonzero.
5508         Fixes PR java/8296.
5509
5510 2002-10-15  Andrew Haley  <aph@redhat.com>
5511
5512         * parse.y (patch_invoke): Call force_evaluation_order on a static
5513         arg list.
5514         (resolve_qualified_expression_name): Call force_evaluation_order
5515         on a arg list that is part of a Qualified Expression Name.
5516
5517         * lang.c (dump_compound_expr): New.
5518         (java_dump_tree): New.
5519
5520 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
5521
5522         * gcj.texi: Added item describing the GCJ runtime property
5523         "gnu.gcj.progname".
5524
5525 2002-10-15  Richard Henderson  <rth@redhat.com>
5526
5527         * jcf-parse.c (get_constant): Fix type warning.
5528
5529 2002-10-15  Andrew Haley  <aph@redhat.com>
5530
5531         * java-tree.h (java_inlining_merge_static_initializers): Declare.
5532         (java_inlining_map_static_initializers): Declare.
5533
5534 2002-10-14  Andrew Haley  <aph@redhat.com>
5535
5536         * tree-inline.c (remap_block): All local class initialization
5537         flags go in the outermost scope.
5538         (expand_call_inline): Call java_inlining_map_static_initializers.
5539         (expand_call_inline): Call java_inlining_merge_static_initializers.
5540         * java/lang.c (merge_init_test_initialization): New.
5541         (java_inlining_merge_static_initializers): New.
5542         (inline_init_test_initialization): New.
5543         (java_inlining_map_static_initializers): New.
5544
5545 2002-10-11  Mark Wielaard  <mark@klomp.org>
5546
5547         * gcj.texi (Compatibility): Add Limitations and Extensions section.
5548
5549 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5550
5551         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
5552
5553 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5554
5555         * parse.y (merge_string_cste): Add parentheses around & within |.
5556
5557 2002-10-08  Tom Tromey  <tromey@redhat.com>
5558
5559         * parse.y (variable_declarator_id): Simplify error path for
5560         array declarator error.  For PR java/8003.
5561
5562 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
5563
5564         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
5565         bug_report_url.
5566
5567 2002-10-08  Andrew Haley  <aph@redhat.com>
5568
5569         * parse.y (attach_init_test_initialization_flags): Check for
5570         error_mark_node.
5571
5572 2002-10-07  Anthony Green  <green@redhat.com>
5573
5574         * parse.y (merge_string_cste): Fix bug in string concatenation.
5575
5576 2002-10-03  Michael Koch  <konqueror@gmx.de>
5577
5578         * gcj.texi (Standard properties):
5579         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
5580
5581 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5582
5583         PR optimization/6627
5584         * lang.c (java_init): If storing the vbit in function
5585         pointers, ensure that force_align_functions_log is atleast
5586         one to aid compatability with g++ vtables.
5587
5588 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
5589
5590         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
5591         foul of type-based aliasing.
5592
5593 2002-09-30  Anthony Green  <green@redhat.com>
5594
5595         * gcj.texi (Invoking jv-scan): Fix texinfo.
5596
5597 2002-09-28  Anthony Green  <green@redhat.com>
5598
5599         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
5600         (Code Generation): Add -fno-assert documentation.
5601         * jv-scan.c (flag_assert): New global.
5602         (options): Add assert option.
5603         (help): Add --no-assert documentation.
5604         * parse-scan.y (flag_assert): New global.
5605         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
5606         (flag_assert): New global.
5607         * java-tree.h (flag_assert): New global.
5608         * lex.c (java_lex): Obey flag_assert.
5609         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
5610         calling cc1.
5611
5612 2002-09-26  Andrew Haley  <aph@redhat.com>
5613
5614         * expr.c (build_java_array_length_access): Check for null pointer.
5615         * expr.c (expand_java_arrayload): Likewise.
5616
5617 2002-09-21  Richard Henderson  <rth@redhat.com>
5618
5619         * jcf-parse.c (get_constant): Decode from IEEE no matter
5620         what the target format.
5621
5622 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
5623
5624         * ChangeLog: Follow spelling conventions.
5625         * class.c: Likewise.
5626         * decl.c: Likewise.
5627         * expr.c: Likewise.
5628         * gjavah.c: Likewise.
5629         * java-tree.h: Likewise.
5630         * jcf-dump.c: Likewise.
5631         * jcf-parse.c: Likewise.
5632         * jvspec.c: Likewise.
5633         * lang.c: Likewise.
5634         * mangle.c: Likewise.
5635         * parse.y: Likewise.
5636
5637 2002-09-17  Tom Tromey  <tromey@redhat.com>
5638
5639         * lex.c (java_read_unicode_collapsing_terminators): Handle case
5640         where \r appears at EOF.  Fixes PR java/7950.
5641
5642 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5643
5644         * jvspec.c (lang_specific_driver): Remove unused variable.
5645
5646 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5647
5648         * java-tree.h (union lang_tree_node): Add chain_next option.
5649
5650 2002-09-16  Richard Henderson  <rth@redhat.com>
5651
5652         * jcf-parse.c (get_constant): Runtime check for IEEE format;
5653         use new real.h interface.
5654         * jcf-write.c (find_constant_index): Use new real.h interface.
5655         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
5656
5657 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5658
5659         * lang.c: Follow spelling conventions.
5660
5661 2002-09-11  Per Bothner  <per@bothner.com>
5662
5663         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
5664         constant to the type of the field.
5665         (java_complete_tree):  Remove now-redundant code.
5666
5667         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
5668
5669 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
5670
5671         For PR java/5794:
5672         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
5673         return label if a ret instruction for the jsr has been reached.
5674
5675 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
5676
5677         * parse.y (DIR_SEPARATOR): Don't define.
5678         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
5679
5680 2002-08-28  Andrew Haley  <aph@redhat.com>
5681
5682         * verify.c (verify_jvm_instructions): Allow exception handler
5683         inside code that is being protected, but generate a warning.
5684         * except.c (link_handler): Initialize `expanded' in new eh_range.
5685         (binding_depth, is_class_level, current_pc): Declare extern.
5686
5687 2002-09-01  Mark Wielaard <mark@klomp.org>
5688
5689         * gcj.texi: Add chapter about system properties.
5690         Fixed some typos.
5691
5692 2002-08-26  Tom Tromey  <tromey@redhat.com>
5693
5694         * parse.y (try_builtin_assignconv): Allow narrowing primitive
5695         conversion if RHS_TYPE is byte, short, or char.
5696
5697 2002-08-22  Tom Tromey  <tromey@redhat.com>
5698
5699         * gcj.texi (Invoking gij): Document -cp and -classpath.
5700
5701 2002-08-21  Tom Tromey  <tromey@redhat.com>
5702
5703         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
5704         $(prefix)/share.  For PR libgcj/7633.
5705
5706         For PR java/6005 and PR java/7611:
5707         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
5708         (java_can_use_bit_fields_p): New function.
5709
5710 2002-08-16  Tom Tromey  <tromey@redhat.com>
5711
5712         * gcj.texi (Class Initialization): Mention class initialization of
5713         arrays.
5714
5715 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
5716
5717         * Make-lang.in (java-tree-inline.o): New.
5718         (JAVA_OBJS): Add java-tree-inline.o.
5719         * parse.y (source_end_java_method): Call java_optimize_inline.
5720         (java_expand_method_bodies): Save method's tree in
5721         DECL_SAVED_TREE.
5722         (add_stmt_to_compound): Keep track of the number of statments.
5723         * lang.c (java_init): Enable flag_inline_trees.
5724         (java_post_options): If flag_inline_functions is on, enable
5725         flag_inline_trees instread.
5726         (decl_constant_value): New.
5727         (java_tree_inlining_walk_subtrees): New.
5728         * java-tree.h (DECL_NUM_STMTS): New macro.
5729         (java_optimize_inline): Declare.
5730         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
5731         Handle a LABEL_EXPR.
5732         * decl.c (build_result_decl): If we already have a DECL_RESULT
5733         don't make another.
5734         (dump_function): New.
5735         (java_optimize_inline): New.
5736         (dump_function): New.
5737
5738 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
5739
5740         For PR java/7483:
5741         * parse.y (build_assertion): Invert return from
5742         desiredAssertionStatus.
5743
5744 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5745
5746         * jcf-write.c (get_access_flags): Return correct access flags for
5747         private and protected inner classes.
5748
5749 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5750
5751         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
5752
5753 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5754
5755         * mangle_name.c: Don't include obstack.h twice.
5756         * xref.c: Don't include obstack.h.
5757
5758 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5759
5760         * class.c: (permanent_obstack): Delete declaration.
5761         * constants.c: (permanent_obstack): Delete declaration.
5762         * except.c: (permanent_obstack): Delete declaration.
5763         * expr.c: (permanent_obstack): Delete declaration.
5764         * jcf-parse.c: (permanent_obstack): Delete declaration.
5765         (saveable_obstack): Delete declaration.
5766         * parse.h: (permanent_obstack): Delete declaration.
5767         * typeck.c: (permanent_obstack): Delete declaration.
5768
5769 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5770
5771         * gcj.texi (version-gcc): Increase to 3.3.
5772
5773 2002-07-22  Tom Tromey  <tromey@redhat.com>
5774
5775         * lex.c (java_lex): Check for `e' or `E' after 0.
5776
5777 2002-07-21  Richard Henderson  <rth@redhat.com>
5778
5779         * lang.c (java_unsafe_for_reeval): New.
5780         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
5781
5782 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
5783
5784         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
5785         (jcf_path_init): Use GET_ENVIRONMENT.
5786
5787 2002-07-10  Roger Sayle  <roger@eyesopen.com>
5788             Zack Weinberg <zack@codesourcery.com>
5789
5790         * builtins.c (initialize_builtins): Remove defines that
5791         handled C/C++ specific junk hereby removed from builtins.def.
5792
5793 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
5794
5795         * lang.c (java_post_options): Update prototype.
5796
5797 2002-07-05  Roger Sayle  <roger@eyesopen.com>
5798
5799         * builtins.c (initialize_builtins): Ignore the additional
5800         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
5801         the builtins.def file.
5802
5803 2002-07-01  Tom Tromey  <tromey@redhat.com>
5804
5805         For PR libgcj/7073:
5806         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
5807         specially.
5808
5809 2002-07-01  Roger Sayle  <roger@eyesopen.com>
5810
5811         * java/decl.c (builtin_function): Accept additional parameter.
5812         (java_init_decl_processing): Pass an additional NULL_TREE
5813         argument to builtin_function.
5814
5815 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
5816
5817         * gcj.texi: Fixed gcj invocation example so that it compiles.
5818
5819 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5820
5821         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
5822         * parse.y (mark_parser_ctxt): Likewise.
5823         (check_modifiers, declare_local_variables): Avoid incorrect
5824         hardcoded constant 10.
5825
5826         * lex.c (java_read_char): Avoid "comparison is always true"
5827         warning.
5828
5829 2002-06-25  Andreas Schwab  <schwab@suse.de>
5830
5831         * expr.c (JSR): Avoid undefined operation on PC.
5832
5833 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5834
5835         * decl.c (clear_binding_level): Const-ify.
5836
5837 2002-06-13  Akim Demaille  <akim@epita.fr>
5838
5839         * parse.y (class_declaration, interface_declaration): Make sure
5840         all their rules have an action, in order to avoid meaningless `$$
5841         = $1' and their type clashes.
5842
5843 2002-06-11  Tom Tromey  <tromey@redhat.com>
5844
5845         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
5846         * parse-scan.y (statement_without_trailing_substatement): Added
5847         assert_statement.
5848         (assert_statement): New rule.
5849         * java-tree.h (struct lang_type) [assertions]: New field.
5850         (TYPE_USES_ASSERTIONS): New macro.
5851         (CLASS_USES_ASSERTIONS): Likewise.
5852         (FIELD_SYNTHETIC): New define.
5853         * lex.c (java_lval;): Added ASSERT_TK.
5854         * parse.y (ASSERT_TK): Added.
5855         (statement_without_trailing_substatement): Added assert_statement.
5856         (assert_statement): New rule.
5857         (build_assertion): New function.
5858         (maybe_generate_pre_expand_clinit): Create and initialize
5859         $assertionsDisabled.
5860         (lookup_package_type): Removed decl.
5861         * keyword.h: Rebuilt.
5862         * keyword.gperf (assert): New token.
5863
5864 2002-06-10  Akim Demaille  <akim@epita.fr>
5865
5866         * parse.y (interface_type_list, class_member_declaration)
5867         (unary_expression_not_plus_minus): Remove duplicate %type.
5868         Whitespace changes.
5869
5870 2002-06-09  Tom Tromey  <tromey@redhat.com>
5871
5872         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
5873
5874         * parse.y (method_header): Give error message in all cases.
5875         Fixes PR java/6865.
5876
5877 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5878
5879         Don't use RTL inlining. Fix for PR java/6820.
5880         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
5881         (flag_really_inline): New.
5882         (java_decode_option): Set flag_really_inline if -finline-functions
5883         is seen.
5884         (java_post_options): New function. Turn off inlining unless
5885         flag_really_inline is set.
5886
5887 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5888
5889         * gjavah.c (throwable_p): Accept argument as either a classname or
5890         signature fragment. Create null-terminated classname string for super
5891         when calling itself recursively.
5892         (decode_signature_piece): Skip first character from class name
5893         signature when calling throwable_p.
5894
5895 2002-06-08  H.J. Lu  (hjl@gnu.org)
5896
5897         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
5898
5899 2002-06-04  Tom Tromey  <tromey@redhat.com>
5900
5901         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
5902
5903 2002-06-04  Michael Koch  <konqueror@gmx.de>
5904
5905         * gcj.texi (Input Options): Fixed typo.
5906
5907 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
5908
5909         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
5910         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
5911         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
5912         and all now-pointless local variables.  Rename other local
5913         variables to reflect their not being handles.
5914
5915         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
5916         #if JCF_USE_STDIO blocks.
5917
5918         * parse.y: Add missing semicolon at end of rule.
5919
5920 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5921
5922         * check-init.c (attach_initialized_static_class): Delete, unused.
5923         * parse.y: Use htab_t instead of struct hashtable, update
5924         all uses.
5925         * java-tree.h: Include hashtab.h instead of hash.h.
5926         (struct lang_decl_func): Use htab_t, set up for gengtype.
5927         (struct init_test_hash_entry): Delete.
5928         (struct treetreehash_entry): New.
5929         (java_treetreehash_find): New
5930         (java_treetreehash_new): New prototype.
5931         (java_treetreehash_create): New prototype.
5932         (java_mark_tree): Delete prototype.
5933         (java_hash_hash_tree_node): Delete prototype.
5934         (java_hash_compare_tree_node): Delete prototype.
5935         (attach_initialized_static_class): Delete prototype.
5936         * expr.c (build_class_init): Update to use java_treetreehash
5937         functions.
5938         (java_expand_expr): Update to use htab_t.
5939         (emit_init_test_initialization): Likewise.
5940         * decl.c (java_mark_tree): Delete.
5941         * class.c (init_test_hash_newfunc): Delete.
5942         (java_hash_hash_tree_node): Delete.
5943         (java_hash_compare_tree_node): Delete.
5944         (add_method_1): Update to use java_treetreehash functions.
5945         (JAVA_TREEHASHHASH_H): New macro.
5946         (java_treetreehash_hash): New function.
5947         (java_treetreehash_compare): New function.
5948         (java_treetreehash_find): New function.
5949         (java_treetreehash_new): New function.
5950         (java_treetreehash_create): New function.
5951         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
5952
5953         * Make-lang.in (java/parse.o): Depend on debug.h.
5954         * java-tree.h (struct lang_identifier): Use gengtype.
5955         (union lang_tree_node): New.
5956         (struct lang_decl_func): Use gengtype.
5957         (struct lang_decl_var): Likewise.
5958         (struct lang_decl): Likewise.
5959         * parse.y: Include debug.h.
5960         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
5961
5962         * lang.c (struct language_function): New dummy structure.
5963
5964         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
5965         descriminator for DECL_LANG_SPECIFIC.
5966         (struct lang_decl_func): Rename from struct lang_decl.
5967         (enum lang_decl_desc): New.
5968         (struct lang_decl): Make it a union.  Update all the accessor macros.
5969         (struct lang_type): Use gengtype.
5970         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
5971         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
5972         are now the same size.
5973         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
5974         use discriminator to mark DECL_LANG_SPECIFIC.
5975
5976         * Make-lang.in (gt-java-builtins.h): New rule.
5977         (java/builtins.o): Add dependency on gt-<filename>.h.
5978         * builtins.c: Use gengtype for roots.
5979         (union string_or_tree): Use gengtype.
5980         (struct builtin_record): Use gengtype.
5981         * config-lang.in (gtfiles): Add builtins.c.
5982
5983         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
5984         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
5985         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
5986         gt-java-parse.h, gtype-java.h): Add rules to generate.
5987         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
5988         (class.o): Add dependency on gt-*.h.
5989         (constants.o): Likewise.
5990         (decl.o): Likewise.
5991         (expr.o): Likewise.
5992         (jcf-parse.o): Likewise.
5993         (jcf-write.o): Likewise.
5994         (lang.o): Likewise.
5995         * config-lang.in (gtfiles): New.
5996         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5997         * constants.c: Replace uses of ggc_add_* with GTY markers.
5998         Include gt-*.h.
5999         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6000         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6001         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
6002         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
6003         Include gt-*.h.
6004         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
6005         Include gt-*.h.
6006         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6007         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
6008         gt-*.h.
6009         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6010         Include gtype-java.h.
6011
6012 2002-06-02  Tom Tromey  <tromey@redhat.com>
6013
6014         Fix for PR java/5913:
6015         * parse.y (patch_binop): Call patch_string on op1.
6016
6017 2002-06-02  Tom Tromey  <tromey@redhat.com>
6018
6019         Fix for PR java/1343, PR java/6336:
6020         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
6021         formatting.  Changed return type.
6022         (anonymous_class_counter): Moved to top of file.
6023         (maybe_make_nested_class_name): Append number to class name for
6024         function-local classes.
6025
6026 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6027
6028         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
6029         * Make-lang.in: Update dependency lists.
6030
6031 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
6032
6033         * gjavah.c (throwable_p): Do not free the name of the class after
6034         passing it to find_class.
6035         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
6036         * jcf-io.c (dirent.h): Include it.
6037         (fnmatch.h): Likewise.
6038         (compare_path): New function.
6039         (java_or_class_file): Likewise.
6040         (memoized_dirlist_entry): New type.
6041         (memoized_dirlist_lookup_eq): New function.
6042         (memoized_dirlists): New variable.
6043         (caching_stat): New function.
6044         (memoized_class_lookup_eq): New function.
6045         (memoized_class_lookups): Likewise.
6046         (find_class): Use memoized_class_lookups and caching_stat.
6047         * jcf.h (JCF_USE_SCANDIR): Define.
6048         * parse.y (java_expand_classes): Write the class files in reverse
6049         order.
6050
6051 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6052
6053         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
6054
6055 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
6056
6057         * jcf-write.c (write_classfile): Unlink the temporary file if it
6058         cannot be renamed.  Use concat to build up the name of the
6059         temporary file.
6060
6061 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
6062
6063         * jcf-write.c (write_classfile): Write the file to a
6064         temporary file and then rename it.
6065
6066 2002-05-07  Tom Tromey  <tromey@redhat.com>
6067
6068         * gjavah.c (throwable_p): Use xstrdup, not strdup.
6069
6070         Fix for PR java/1200:
6071         * gjavah.c (throwable_p): New function.
6072         (decode_signature_piece): Use it.  A `WeakReference' isn't the
6073         same as a `jweak'.
6074         Include hashtab.h.
6075         (gcjh_streq): New function.
6076
6077 2002-05-07  Andreas Jaeger  <aj@suse.de>
6078
6079         * parse.y (finish_for_loop): Fix if statement.
6080
6081 2002-05-06  Tom Tromey  <tromey@redhat.com>
6082
6083         Fix for PR java/5941:
6084         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
6085         loop update expression.
6086         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
6087         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
6088
6089 2002-05-04  Mark Wielaard  <mark@klomp.org>
6090
6091         For PR java/6519:
6092         * parse.y (build_string_concatenation): Return just op1 only when op2
6093         is null and op1 is a STRING_CST, otherwise always construct a
6094         StringBuffer.
6095
6096 2002-04-27  Tom Tromey  <tromey@redhat.com>
6097
6098         For PR java/6382:
6099         * parse.y (string_convert_int_cst): New function.
6100         (merge_string_cste): Use it.
6101
6102 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6103
6104         * java-tree.h (java_parse_file): Update.
6105         (java_set_yydebug): Remove.
6106         * jcf-parse.c (yydebug): Remove.
6107         (java_set_yydebug): Die.
6108         (java_parse_file): Update.
6109         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6110
6111 2002-04-24  Tom Tromey  <tromey@redhat.com>
6112
6113         For PR java/6425:
6114         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
6115         EXPR_WFL_QUALIFICATION of qual_wfl.
6116
6117 2002-04-23  Per Bothner  <per@bothner.com>
6118
6119         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
6120         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
6121         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
6122
6123 2002-04-23  Tom Tromey  <tromey@redhat.com>
6124
6125         For PR java/6314:
6126         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
6127         recognize `-fcompile-resource='.
6128         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
6129         a bit.
6130
6131 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6132
6133         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
6134         paths. Fixes PR java/2791.
6135
6136 2002-04-19  Andrew Haley  <aph@redhat.com>
6137
6138         * jcf-write.c (push_long_const): lo, hi: New variables.
6139         Use rshift_double to extract the high part of a 64-bit long.
6140         Use WORD_TO_INT to extract the low part.
6141
6142         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
6143         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
6144         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
6145
6146 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6147
6148         * typeck.c (incomplete_type_error): Remove.
6149
6150 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6151
6152         * class.c (make_class_data): Set DECL_ALIGN on static class data,
6153         for hash synchronization.
6154         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
6155         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
6156         class_type_node.
6157
6158 2002-04-16  Mark Wielaard  <mark@klomp.org>
6159
6160         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
6161         negative zero.
6162
6163 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6164
6165         Fix for PR java/6294:
6166         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
6167         interfaces.
6168
6169 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6170
6171         Fix for PR java/6085:
6172         * parse.y (patch_method_invocation): Always use build_access_to_thisn
6173         to get enclosing "this" argument for inner-class constructor
6174         invocation. Pass correct arguments to build_access_to_thisn.
6175
6176 2002-04-10  Andreas Jaeger  <aj@suse.de>
6177
6178         * gcj.texi (Input Options): Fix extdirs patch.
6179
6180 2002-04-10  Anthony Green  <green@redhat.com>
6181
6182         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
6183
6184 2002-04-09  Anthony Green  <green@redhat.com>
6185
6186         * gcj.texi (Input Options): Add --extdirs documentation.
6187         * jcf-dump.c (OPT_extdirs): New macro.
6188         (options): Add extdirs option.
6189         (help): Describe --extdirs.
6190         (main): Handle OPT_extdirs.
6191         * gjavah.c (OPT_extdirs): New macro.
6192         (options): Add extdirs option.
6193         (help): Describe --extdirs.
6194         (main): Handle OPT_extdirs.
6195         * jcf-path.c (jcf_path_init): Add extdirs support.
6196         (jcf_path_extdirs_arg): New function.
6197         (extensions): New variable to hold extensions path entries.
6198         * jvspec.c: Remove -fextdirs= when compiling main().
6199         * lang.c (java_decode_option): Handle -fextdirs=.
6200         * jcf.h (jcf_path_extdirs_arg): Declare new function.
6201         * Make-lang.in: Compile jcf-path with version info for use in
6202         identifying the appropriate libgcj.jar.
6203
6204 2002-04-08  Tom Tromey  <tromey@redhat.com>
6205
6206         For PR libgcj/5303:
6207         * .cvsignore: Added rmic.1 and rmiregistry.1.
6208         * gcj.texi (Top): Link to new nodes.
6209         (Invoking rmic): New node.
6210         (Invoking rmiregistry): Likewise.
6211         * Make-lang.in (java.generated-manpages): Added rmic.1 and
6212         rmiregistry.1.
6213         (java.maintainer-clean): Likewise.
6214         ($(srcdir)/java/rmic.1): New target.
6215         ($(srcdir)/java/rmiregistry.1): Likewise.
6216         (java.install-man): Handle rmic.1 and rmiregistry.1.
6217
6218 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6219
6220         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
6221         Add note about handling uncaught exceptions. Add an exception handler
6222         to example.
6223
6224 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6225
6226         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
6227         after using it to patch CALL_EXPR.
6228
6229 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6230
6231         * gcj.texi (Invocation): Document CNI invocation API.
6232
6233 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6234
6235         * expr.c (truthvalue_conversion): Rename.  Update.
6236         (expand_compare): Update.
6237         * java-tree.h (java_truthvalue_conversion): New.
6238         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6239
6240 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6241
6242         * java-tree.h (java_mark_addressable): New.
6243         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6244         * typeck.c (mark_addressable): Rename, update.
6245
6246 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6247
6248         * expr.c (build_java_binop): Update.
6249         * java-tree.h (java_signed_type, java_unsigned_type,
6250         java_signed_or_unsigned_type): Update.
6251         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6252         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6253         * parse.y (patch_binop): Update.
6254         * typeck.c (signed_or_unsigned_type, unsigned_type,
6255         signed_type): Update.
6256
6257 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6258
6259         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6260         (java_dummy_print): Remove.
6261         (lang_print_error): Rename.  Exit early if inhibiting output.
6262         (inhibit_error_printing_function): New.
6263         (java_init): Don't set hook.
6264         (lang_init_source): Use new boolean.
6265
6266 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
6267
6268         * parse.y (do_resolve_class): Fix infinite recursion.
6269
6270 2002-03-29  Tom Tromey  <tromey@redhat.com>
6271
6272         * parse.y (check_inner_circular_reference): Ignore incomplete
6273         types.
6274
6275 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6276
6277         * Make-lang.in (builtins.o): Update.
6278         * boehm.c (get_boehm_type_descriptor): Update.
6279         * builtins.c: Include langhooks.h.
6280         * decl.c (java_init_decl_processing): Update.
6281         * java-tree.h (java_type_for_mode, java_type_for_size): New.
6282         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
6283         Redefine.
6284         * typeck.c (type_for_mode, type_for_size): Update.
6285
6286 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
6287
6288         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
6289
6290 2002-03-28  Tom Tromey  <tromey@redhat.com>
6291
6292         * except.c (expand_end_java_handler): If the handler type is NULL,
6293         use java.lang.Throwable.  Fixes PR java/5986.
6294
6295 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6296
6297         Fix for PR java/4715:
6298         * jcf-parse.c (parse_source_file_3): New function.
6299         (read_class): Call it.
6300         (java_parse_file): Likewise.
6301
6302 2002-03-28  Jan Hubicka  <jh@suse.cz>
6303
6304         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
6305
6306 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6307
6308         * parse.y (resolve_package): Initialize "decl".
6309         (lookup_package_type): Remove unused function.
6310
6311 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6312
6313         Fix for PR java/5993:
6314         * parse.y (resolve_package): Return the decl if resolution was
6315         successful. Don't special case "java.lang" and "java.lang.reflect"
6316         packages. Set type_name to the merged identifier.
6317         (resolved_qualified_expression_name): Print error using "name" if
6318         resolve_package returns NULL_TREE.
6319
6320 2002-03-27  Tom Tromey  <tromey@redhat.com>
6321
6322         * expr.c (expand_invoke): Don't generate null pointer check if
6323         we're calling <init>.
6324
6325 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6326
6327         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
6328         fix prototype.
6329         * java-tree.h (java_lang_expand_expr): Similarly.
6330         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6331         (java_init): Don't set hook.
6332
6333 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6334
6335         Fix for PR java/5850:
6336         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
6337         context if field was not found in the current scope.
6338         * expr.c (lookup_field): Don't look in enclosing contexts.
6339
6340 2002-03-26  Tom Tromey  <tromey@redhat.com>
6341
6342         Fix for PR java/5942:
6343         * parse.y (init_src_parse): Added sanity check.
6344         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
6345         elements, not 11.
6346
6347 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6348
6349         * decl.c (lang_mark_tree): Rename java_mark_tree.
6350         * java-tree.h (java_mark_tree): New.
6351         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6352
6353 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
6354
6355         * lex.c: Change java_perform_atof to take normal parameters
6356         instead of a pointer to a parameter block.  Call it directly
6357         from java_lex.
6358
6359 2002-03-22  Mark Wielaard  <mark@klomp.org>
6360
6361         Fix for PR java/5368:
6362         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
6363         when printing error message.
6364
6365 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6366
6367         * decl.c (maybe_build_cleanup): Remove.
6368
6369 2002-03-22  Tom Tromey  <tromey@redhat.com>
6370
6371         Andrew Haley  <aph@cambridge.redhat.com>
6372
6373         * expr.c (build_field_ref): Don't build a check if the field is a
6374         member of `this'.
6375
6376 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
6377
6378         Fix for PR java/6026:
6379         * lex.c (java_lex): Fix parsing of consecutive floats.
6380
6381 2002-03-21  Tom Tromey  <tromey@redhat.com>
6382
6383         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
6384         class.
6385
6386 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6387
6388         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6389         insert_block, getdecls, kept_level_p, global_bindings_p): New.
6390
6391 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6392
6393         * gcj.texi: @code{gcj} becomes @command{gcj}.
6394         @code{gcc} becomes @command{gcc}.
6395         GcjRaw changed to gnu.gcc.RawData.
6396
6397 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6398
6399         * decl.c (start_java_method): Use new hook.
6400         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6401         (java_init): Remove old hook.
6402
6403 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
6404
6405         * builtins.c (define_builtin): Do nothing if `type' is null.
6406         Fixes PR java/5876.
6407
6408 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6409
6410         * parse.y (parser_check_super_interface): Fix error message
6411         grammar/order.
6412
6413 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6414
6415         * jcf-parse.c (get_constant): Delete unused variables.
6416
6417 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6418
6419         * java-tree.h (java_parse_file): New.
6420         * jcf-parse.c (yyparse): Rename java_parse_file.
6421         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6422
6423 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6424
6425         * parse.y (craft_constructor): Return the constructor decl.
6426         (java_expand_classes): Update comments.
6427         (lookup_method_invoke): Call fix_constructors immediately for
6428         anonymous class. Fixes PR java/5935.
6429
6430 2002-03-15  Anthony Green  <green@redhat.com>
6431
6432         * jcf-parse.c (yyparse): Don't emit class registration
6433         constructor when compiling resource files.
6434
6435 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6436
6437         * lang.c (java_tree_code_type, java_tree_code_length,
6438         tree_code_name): Delete.
6439         (tree_code_type, tree_code_length, tree_code_name): Define.
6440         (java_init): Don't try to copy into the various tree_code
6441         arrays.
6442
6443 2002-03-12  Tom Tromey  <tromey@redhat.com>
6444
6445         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
6446         UTF-8, not UCS-2.  Fixes PR java/5923.
6447
6448         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
6449         a call_expr wrapped in a convert.  Fixes PR java/5848.
6450
6451 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6452
6453         * jcf-write.c (write_classfile): Improve error strings.
6454
6455 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
6456
6457         * lex.c: Adjust comments to GNU standards.
6458
6459 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
6460
6461         Fix for PR java/5902:
6462         * lex.c (java_lex): Fix parsing of literals.
6463
6464 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6465
6466         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
6467         to prevent it getting evaluated twice in the store checking case.
6468         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
6469         examining OBJECT.
6470
6471 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6472
6473         * decl.c (java_init_decl_processing): Make sure class_type_node
6474         alignment is not less than 64 bits if hash synchronization is enabled.
6475
6476 2002-03-08  Per Bothner  <per@bothner.com>
6477
6478         * parse.y (java_complete_lhs):  Check if patch_assignment
6479         returned an error-mark.
6480
6481         * parse.y (try_builtin_assignconv):  Don't special-case zero.
6482
6483 2002-03-08  Per Bothner  <per@bothner.com>
6484
6485         Fix for PR java/5812.
6486         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
6487         here instead of in JSR macro.  Likewise with load_type_state call.
6488         Do the latter on if the return_pc has been verified (the jsr returns).
6489         (JSR):  Now just call build_java_jsr.
6490
6491 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
6492
6493         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
6494         (java.install-common): Link native driver to
6495         JAVA_TARGET_INSTALL_NAME.
6496
6497 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
6498
6499         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
6500         * builtins.c(sin_builtin): Likewise
6501         * builtins.c(sqrt_builtin): Likewise
6502
6503 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
6504
6505         * java/expr.c, java/jcf-parse.c, java/lex.c:
6506         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
6507         REAL_ARITHMETIC blocks unconditional.  Delete some further
6508         #ifdef blocks predicated on REAL_ARITHMETIC.
6509
6510 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6511
6512         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
6513         explicit sizeof/sizeof.
6514         * decl.c (java_init_decl_processing): Likewise.
6515         * jcf-parse.c (init_jcf_parse): Likewise.
6516         * parse.y (init_src_parse): Likewise.
6517
6518 2002-03-02  Per Bothner  <per@bothner.com>
6519
6520         Make --CLASSPATH by a synonym for --classpath and -classpath.
6521         Implement --bootclasspath.
6522         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
6523         (classpath_l):  Remove.
6524         (jcf_path_CLASSPATH_arg):  Remove.
6525         (jcf_path_bootclasspath_arg):  New function.
6526         (jcf_path_seal):  Simplify accordingly.
6527
6528         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
6529         (jcf_path_CLASSPATH):  Remove declaration.
6530         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
6531         (lang_specific_driver):  Translate -bootclasspath.
6532         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
6533         * lang.c (decode_lang_options):  Do jcf_path_init first.
6534         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
6535         * gjavah.c:  Also handle --bootclasspath.
6536         Handle --CLASSPATH as a synonum for --classpath.
6537         * jcf-dump.c: Likewise.
6538
6539         "." is not part of system path, but is the default for --classpath.
6540         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
6541         (jcf_path_seal):  Add "." if no CLASSPATH specified.
6542
6543         * gcj.texi:  Document changes.
6544
6545 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6546
6547         * expr.c (build_java_arraystore_check): Fix formatting.
6548
6549 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6550
6551         Fix for PR java/5758, java/5632:
6552         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
6553         inner-class separator too.
6554         * parse.y (do_resolve_class): New local `decl_result.'
6555         Progressively build a name for what can have been loaded.
6556
6557 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6558
6559         * expr.c (java_array_data_offset): Removed function.
6560         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
6561         (build_java_array_length_access): Obtain "length" value using a
6562         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
6563         (build_java_arrayaccess): Correct comment. Access "data" using a
6564         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
6565         (build_java_arraystore_check): New function.
6566         (expand_java_arraystore): Use build_java_arraystore_check.
6567         * parse.y (patch_assignment): Simplify code to insert a store check
6568         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
6569         * check-init.c (check_init): Update to reflect that an array length
6570         access is now a COMPONENT_REF.
6571         * gcj.texi (Code Generation): Improve documentation of
6572         -fno-bounds-check. Add documentation for -fno-store-check.
6573         * java-tree.h (flag_store_check): Declare.
6574         (build_java_arraystore_check): Declare.
6575         * lang.c (flag_store_check): Initialize to 1.
6576         (lang_f_options): Add store-check option.
6577         * jvspec.c: Don't pass store-check option to jvgenmain.
6578         * lang-options.h: Add help string for -fno-store-check.
6579
6580 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6581
6582         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
6583         * java-tree.h (java_dup_lang_specific_decl): New.
6584         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6585
6586 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6587
6588         * builtins.c, decl.c: Delete traditional-mode-related code
6589         copied from the C front end but not used, or used only to
6590         permit the compiler to link.
6591
6592 2002-02-22  Tom Tromey  <tromey@redhat.com>
6593
6594         Fix for PR java/2369:
6595         * jvspec.c (verify_class_name): New function.
6596         (lang_specific_driver): Call it.
6597         (JAVA_START_CHAR_P): New macro.
6598         (JAVA_PART_CHAR_P): Likewise.
6599
6600 2002-02-22  Per Bothner  <per@bothner.com>
6601
6602         * class.c:  Change vtable to be more compatible with g++ v3 abi.
6603         (get_dispatch_table):  Prepend offset-to-top (always 0) and
6604         type_info pointer (currently unimplemented hence NULL) to vtable.
6605         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
6606         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
6607         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
6608         (build_dtable_decl):  Add declarations for new fields.
6609
6610 2002-02-20  Per Bothner  <per@bothner.com>
6611
6612         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
6613         to finit$ (otherwise generate_bytecode_insns drops it). However, we
6614         don't need to set it on the COMPOUND_EXPR - the caller does that.
6615
6616 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6617
6618         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
6619         `--CLASSPATH' becomes `--classpath.'
6620         * gjavah.c: Likewise.
6621         * jcf-dump.c: Likewise.
6622         * lang-options.h: Likewise.
6623         * lang.c: Likewise.
6624         * jcf-path.c: Updated comment.
6625         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
6626         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
6627         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
6628         (jcf_path_CLASSPATH_arg): Ditto.
6629         (classpath_u): Updated leading comment.
6630
6631 2002-02-20  Per Bothner  <per@bothner.com>
6632
6633         * builtins.c (check_for_builtin):  New function.
6634         (build_call_or_builtin):  Remove.
6635         * java-tree.h:  Update accordingly.
6636         * expr.c (expand_invoke):  Use build + check_for_builtin instead
6637         of build_call_or_builtin.
6638         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
6639         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
6640         flag (which had caused jcf-write to incorrectly emit invokevirtual).
6641
6642 2002-02-17  Tom Tromey  <tromey@redhat.com>
6643
6644         * java-tree.h (TYPE_STRICTFP): New macro.
6645         (struct lang_type) [strictfp]: New field.
6646         (CLASS_STRICTFP): New macro.
6647         (METHOD_STRICTFP): New macro.
6648         (struct lang_decl) [strictfp]: New field.
6649         * parse.y (method_header): Disallow strictfp constructor or
6650         abstract method.
6651         (STRICT_TK): Move before MODIFIER_TK.
6652         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
6653         (METHOD_MODIFIERS): Likewise.
6654         (INTERFACE_MODIFIERS): Likewise.
6655         * jcf-write.c (get_access_flags): Likewise.
6656         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
6657         (add_method_1): Likewise.
6658         (get_access_flags_from_decl): Likewise.
6659         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
6660         recognize strictfp flag.
6661         * jcf.h (ACC_STRICT): New define.
6662
6663 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
6664
6665         * class.c(build_utf8_ref): Move declaration of decl_size
6666
6667 2002-02-07  Tom Tromey  <tromey@redhat.com>
6668
6669         * gcj.texi (Input Options): --CLASSPATH does not suppress system
6670         path.
6671
6672 2002-02-04  Anthony Green  <green@redhat.com>
6673
6674         * class.c (build_utf8_ref): Put UTF-8 constants into merged
6675         sections if available.
6676
6677 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6678
6679         * parse.y (java_expand_classes): Fix typo in static field loop.
6680
6681 2002-02-02  Richard Henderson  <rth@redhat.com>
6682
6683         * class.c (add_field): Mark static fields external.
6684         (build_class_ref): Remove redundant set.
6685         * parse.y (java_expand_classes): Mark static fields of classes
6686         to be compiled as local.
6687         * jcf-parse.c (parse_class_file): Likewise.
6688
6689 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6690
6691         * gcj.texi (About CNI): New node.
6692
6693 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6694
6695         PR java/5080
6696         * jcf-parse.c : Check for HAVE_LOCALE_H before using
6697         setlocale() with LC_CTYPE as a parameter.
6698         * jv-scan.c: Same.
6699
6700 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
6701
6702         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6703         Follow GNU Coding Standards for --version.
6704
6705 2002-01-28  Tom Tromey  <tromey@redhat.com>
6706
6707         * expr.c (build_jni_stub): Ensure storage for `meth' is
6708         generated.
6709         * parse.y (java_complete_expand_methods): Set
6710         current_function_decl before building JNI stub.
6711
6712 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
6713
6714         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
6715         BUILT_IN_SQRTF.
6716
6717 2002-01-22  Tom Tromey  <tromey@redhat.com>
6718
6719         * decl.c (java_init_decl_processing): Use add_predefined_file.
6720         Predefine RawData.java.
6721         (predef_filenames): Removed.
6722         (java_init_decl_processing): Don't register predef_filenames.
6723         * jcf-parse.c (add_predefined_file): New function.
6724         (predefined_filename_p): Rewrote.
6725         (predefined_filename_p): No longer static.
6726         * decl.c (java_init_decl_processing): Call initialize_builtins.
6727         * Make-lang.in (JAVA_OBJS): Added builtins.o.
6728         (java/builtins.o): New target.
6729         * builtins.c: New file.
6730         * parse.y (patch_invoke): Use build_call_or_builtin.
6731         * java-tree.h (build_call_or_builtin): Declare.
6732         (initialize_builtins): Declare.
6733         (java_set_exception_lang_code): Removed unused declaration.
6734         (PREDEF_FILENAMES_SIZE): Removed.
6735         (java_tree_index): Added JTI_PREDEF_FILENAMES.
6736         (predef_filenames): New define.
6737         (add_predefined_file): Declare.
6738         (predefined_filename_p): Declare.
6739         * expr.c (expand_invoke): Use build_call_or_builtin.
6740
6741 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6742
6743         * parse.y (patch_switch_statement): Fix format specifier.
6744
6745 2002-01-16  Tom Tromey  <tromey@redhat.com>
6746
6747         More for PR java/5365:
6748         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
6749         default.
6750         (process_file): Generate include for
6751         java.lang.UnsupportedOperationExceptions.
6752
6753 2002-01-15  Andreas Jaeger  <aj@suse.de>
6754
6755         * .cvsignore: Add man pages.
6756
6757 2002-01-15  Tom Tromey  <tromey@redhat.com>
6758
6759         Fix for PR java/5365:
6760         * gjavah.c (process_file): Turn class name into a file name.
6761
6762 2002-01-14  Matthias Klose  <doko@debian.org>
6763
6764         * gcj.texi: Fix whitespace and formatting errors in the
6765         synopsis of the man pages. Update copyright.
6766
6767 2002-01-14  Tom Tromey  <tromey@redhat.com>
6768
6769         For PR libgcj/5303:
6770         * Make-lang.in (java.install-man): Handle jv-convert man page.
6771         (java.generated-manpages): Added jv-convert.1.
6772         (java.uninstall): Remove jv-convert.1.
6773         (java.maintainer-clean): Likewise.
6774         ($(srcdir)/java/jv-convert.1): New target.
6775         * gcj.texi (Top): Link to jv-convert node.
6776         (Individual utilities): Likewise.
6777         (Invoking jv-convert): New node.
6778
6779 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
6780             Martin Kahlert  <martin.kahlert@infineon.com>
6781
6782         * jcf-parse.c (get_constant): Don't swap lo/hi for big
6783         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
6784
6785 2002-01-03  Graham Stott  <grahams@redhat.com>
6786
6787         * class.c (compile_resource_file): Update copyright date.
6788         Constify filename parameter.
6789         (java-tree.h): Update copyright date.
6790         (compile_resource_file): Constify filename parameter.
6791
6792 2002-01-03  Graham Stott  <grahams@redhat.com>
6793
6794         * gcc/jcf-parse.c: Update copyright date.
6795         (yyparse): Constify resource_filename.
6796
6797 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6798
6799         * parse.y (src_parse_roots): Don't needlessly zero init.
6800
6801 2001-12-31  Tom Tromey  <tromey@redhat.com>
6802
6803         * parse.y (dump_java_tree): New function.
6804         (source_end_java_method): Call it.
6805         (end_class_declaration): Likewise.
6806         * lang.c (java_decode_option): Call dump_switch_p.
6807
6808 2001-12-28  Tom Tromey  <tromey@redhat.com>
6809
6810         * gen-table.pl: Don't process characters after \uffff.  Added
6811         comment pointing to input file.
6812
6813 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6814
6815         * gen-table.pl: Const-ify output.  Document the location of a
6816         suitable unicode input file.
6817
6818         * chartables.h: Regenerate.
6819
6820 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6821
6822         * chartables.h: Const-ify.
6823         * gjavah.c (options): Likewise.
6824         * jcf-dump.c (options): Likewise.
6825         * jv-scan.c (options): Likewise.
6826         * lex.c (java_start_char_p, java_part_char_p): Likewise.
6827         * parse.y (binop_lookup): Likewise.
6828
6829 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6830
6831         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
6832         the static arrays that are output.
6833         * jvspec.c (jvgenmain_spec): Make static.
6834         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
6835         * keyword.h: Regenerate.
6836         * lang.c (string_option, process_option_with_no, lang_f_options,
6837         lang_W_options): Const-ify.
6838         * lex.c (java_lex): Likewise.
6839
6840 2001-12-21  Richard Henderson  <rth@redhat.com>
6841
6842         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
6843         (get_boehm_type_descriptor): ... here.  Arrange for the
6844         TREE_TYPE to get set properly.
6845
6846 2001-12-21  Richard Henderson  <rth@redhat.com>
6847
6848         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
6849         only if the target requires collect2.
6850
6851         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
6852
6853 2001-12-20  Tom Tromey  <tromey@redhat.com>
6854
6855         For PR java/4509:
6856         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
6857         CAN_COMPLETE_NORMALLY for the node.
6858         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
6859         generate code for second branch if first branch can't complete
6860         normally.
6861         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
6862         the loop head if the loop body can't complete normally.
6863
6864 2001-12-20  Tom Tromey  <tromey@redhat.com>
6865
6866         For PR java/4766:
6867         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
6868         case where `finally' clause can't complete normally.
6869
6870 2001-12-20  Tom Tromey  <tromey@redhat.com>
6871
6872         Fixes PR java/5057:
6873         * parse.y (analyze_clinit_body): Added this_class parameter.
6874         Check for more cases where we must keep <clinit>.
6875         (maybe_yank_clinit): Cleaned up flow control.
6876
6877 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6878
6879         * decl.c (java_init_decl_processing): Don't initialize
6880         finit_leg_identifier_node.
6881         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
6882         (finit_leg_identifier_node): Remove.
6883         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
6884
6885 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6886
6887         * mangle.c (mangle_member_name): Don't special-case for
6888         NO_DOLLAR_IN_LABEL.
6889         * mangle_name.c (unicode_mangling_length): Likewise.
6890         (append_unicode_mangled_name): Likewise.
6891         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
6892         code.
6893
6894 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6895
6896         * expr.c (build_java_array_length_access): Don't force null pointer
6897         check unless flag_check_references is set.
6898
6899 2001-12-20  Tom Tromey  <tromey@redhat.com>
6900
6901         Fix for PR java/3417:
6902         * parse.y (patch_assignment): Added special processing for
6903         `return'.
6904         (patch_return): Don't convert booleans to integers, and don't
6905         special-case `null'.
6906
6907 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6908
6909         * config-lang.in (diff_excludes): Remove.
6910
6911 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6912
6913         * gcj.texi: Update link to GCC manual.
6914
6915 2001-12-17  Tom Tromey  <tromey@redhat.com>
6916
6917         * parse.y (link_nested_class_to_enclosing): Removed useless
6918         statement.
6919
6920 2001-12-16  Tom Tromey  <tromey@redhat.com>
6921
6922         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
6923         Fixes PR java/5088.
6924
6925 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6926
6927         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
6928         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
6929         spelling errors.
6930
6931 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6932
6933         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
6934
6935 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6936
6937         * decl.c (java_init_decl_processing): Build otable_type correctly.
6938         otable_decl is an otable_type.
6939
6940 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6941
6942         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
6943         otable_type, otable_ptr_type, method_symbol_type,
6944         method_symbols_array_type, method_symbols_array_ptr_type): New
6945         field/global tree definitions.
6946         (flag_indirect_dispatch): New flag.
6947         * decl.c (java_init_decl_processing): Initialize new otable and
6948         otable_syms type nodes and decls. Add new field "index" to
6949         method_type_node.
6950         * class.c (build_method_symbols_entry): New function.
6951         (make_method_value): Set "index" to to method's vtable index for
6952         virtual methods when indirect-dispatch is not used.
6953         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
6954         and set vtable_method_count to -1. Set otable and otable_syms field
6955         if indirect-dispatch is used and there was something to put in them.
6956         (build_method_symbols_entry): New function.
6957         (emit_offset_symbol_table): New function.
6958         * expr.c (get_offset_table_index): New function.
6959         (build_invokevirtual): Build array reference to otable at the index
6960         returned by get_offset_table_index, and use the result as the vtable
6961         offset.
6962         (build_invokeinterface): Similar.
6963         * jcf-parse.c (yyparse): If indirect-dispatch, call
6964         emit_offset_symbol_table at the end of compilation, after all classes
6965         have been generated.
6966         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
6967         * lang.c (flag_indirect_dispatch): Define.
6968         (lang_f_options): Add indirect-dispatch flag.
6969
6970 2001-12-14  Matthias Klose  <doko@debian.org>
6971
6972         * gcj.texi: Markup for man page generation. Document missing
6973         options printed by <tool> --help.
6974         Terminate description of gij's -ms option with a dot.
6975         * Make-lang.in ($(srcdir)/java/*.1): New targets.
6976         (java.generated-manpages java.install-man, java.uninstall,
6977         java-maintainer-clean) Updated.
6978
6979 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
6980
6981         * class.c (get_dispatch_table): Fix java vtable layout
6982         for TARGET_VTABLE_USES_DESCRIPTORS.
6983         * decl.c (java_init_decl_processing): Initialize
6984         alloc_no_finalizer_node, finalize_identifier_node.
6985         * expr.c (class_has_finalize_method): New function.
6986         (expand_java_NEW): Generate calls for finalizer-free allocation.
6987         (build_invokevirtual): Fix java vtable layout for
6988         TARGET_VTABLE_USES_DESCRIPTORS.
6989         * java-tree.h (enum java_tree_index): New entries:
6990         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
6991         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
6992         (class_has_finalize_method): declare.
6993         (HAS_FINALIZER_P): New macro.
6994         * parse.y (patch_invoke): Generate calls for finalizer-free
6995         allocation.
6996
6997 2001-12-12  Matthias Klose  <doko@debian.org>
6998
6999         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
7000         whitespace at end of line.
7001
7002 2001-12-11  Tom Tromey  <tromey@redhat.com>
7003
7004         * lex.c (java_init_lex): Define wfl_to_string as
7005         gnu.gcj.runtime.StringBuffer unless generating bytecode.
7006
7007 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
7008
7009         * class.c (make_method_value): Use null_pointer_node to
7010         represent empty exception table.
7011
7012 2001-12-10  Tom Tromey  <tromey@redhat.com>
7013
7014         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
7015
7016 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
7017
7018         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
7019
7020 2001-12-09  Per Bothner  <per@bothner.com>
7021
7022         * check-init.c (current_switch_has_default):  New static field.
7023         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
7024         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
7025         DEFAULT_EXPR seen, simulate a default alternative that copies state.
7026
7027 2001-12-09  Tom Tromey  <tromey@redhat.com>
7028
7029         * check-init.c (check_init): Don't allow pre- or post- increment
7030         or decrement of final variable.
7031         (final_assign_error): Minor error message rewording.
7032
7033 2001-12-08  Tom Tromey  <tromey@redhat.com>
7034
7035         * java-tree.h: Fixed typo.
7036
7037         * gjavah.c (decompile_method): Don't decompile to `return this'
7038         for static methods.
7039
7040         * gjavah.c (cxx_keywords): Re-sorted.
7041         * lex.c (cxx_keywords): Re-sorted.
7042
7043         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
7044         else.
7045
7046         * gjavah.c (print_namelet): Clear subnamelets.
7047         (HANDLE_METHOD): Set `method_printed' earlier.
7048
7049 2001-12-07  Tom Tromey  <tromey@redhat.com>
7050
7051         * lang.c (lang_f_options): Added
7052         optimize-static-class-initialization.
7053         (java_decode_option): Removed special case.
7054
7055 2001-12-07  Per Bothner  <per@bothner.com>
7056
7057         * check-init.c (check_init):  Fix typo freeing memory twice.
7058
7059 2001-12-05  Per Bothner  <per@bothner.com>
7060
7061         Restore support for static class initialization optimization.
7062         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
7063         * check-init.c (check_int):  At end of BLOCK handle initialization
7064         blocks, which used to be done in java_complete_expand_method but did
7065         not handle the case where check_for_initialization might allocate
7066         more than a word of bits.
7067         * decl.c (lang_make_tree):  The smic field is now a tree.
7068         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
7069         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
7070
7071         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
7072
7073         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
7074         Change from a hash table to a list.
7075         (struct_lang_decl):  Change field 'smic' to match.
7076         * class.c (add_method_1):  Initialize
7077         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
7078         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
7079         (java_expand_method_bodies): -here, since 'smic' is now a list.
7080         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
7081
7082         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
7083
7084         * class.c (java_hash_compare_tree_node):  Fix casts.
7085
7086 2001-12-04  Per Bothner  <per@bothner.com>
7087
7088         * check-init.c:   Handle definite unassignment to finals in addition
7089         to definite assignment.
7090         (loop_current_locals):  New field.
7091         (num_current_locals, int start_current_locals, num_current_words):
7092         Make static.
7093         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
7094         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
7095         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
7096         (get_variable_decl, check_final_reassigned):  New functions.
7097         (check_init, check_bool_init):  Modify as needed for checking finals.
7098         (check_for_initialization):  Take extra parameter and return void.
7099         Do extra start-up logic to check final fields for assignment.
7100         * parse.y (check_static_final_variable_assignment_flag,
7101         reset_static_final_variable_assignment_flag, check_final_assignment,
7102         check_final_variable_local_assignment_flag,
7103         reset_final_variable_indirect_assignment_flag,
7104         reset_final_variable_global_assignment_flag):  Remove functions.
7105         (java_complete_expand_methods, outer_field_access_fix,
7106         patch_assignment): Remove no-longer used logic.
7107         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
7108         * parse.y (register_fields, java_complete_tree):  Update accordingly.
7109
7110         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
7111         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
7112         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
7113
7114         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
7115
7116         * java-tree.h (DECL FINAL):  New bit-field.
7117         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
7118         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
7119         (DECL_INIT_CALLS_THIS):  New macro.
7120         (struct lang_decl):  New bit-field init_calls_this.
7121         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
7122         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
7123         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
7124         use it for both local variables and final fields.
7125         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
7126         and local_final.
7127         (struct lang_type):  Remove hfv bit-field.
7128         (check_for_initialization):  Change to return void.
7129
7130         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
7131         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
7132         * check-init.c (final_assign_error):  New helper function.
7133         (check_final_reassigned, check_init):  Use it.
7134         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
7135
7136         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
7137         bit-fields to unsigned.
7138
7139 2001-12-03  Per Bothner  <per@bothner.com>
7140
7141         * parse.y (patch_binop):  Minor constant folding.
7142
7143         * parse.y (build_current_thisn):  Shorter 'buffer'.
7144
7145 2001-12-03  Per Bothner  <per@bothner.com>
7146
7147         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
7148         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
7149         * jcf-write.c (generate_bytecode_insns):  Remove support for
7150         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
7151         * check-init.c (check_init):  Likewise.
7152
7153 2001-12-03  Per Bothner  <per@bothner.com>
7154
7155         * verify.c (subroutine_nesting):  New function.
7156         (verify_jvm_instructions):  Use it to fix logic for checking that
7157         we're done with the current subroutine.
7158
7159         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
7160         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
7161
7162 2001-12-03  Per Bothner  <per@bothner.com>
7163
7164         * jcf.h:  Fix obvious typo in comment.
7165         * typeck.c (build_null_signature):  Add comment.
7166
7167 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7168
7169         * expr.c: Remove leading capital from diagnostic messages, as
7170         per GNU coding standards.
7171         * jcf-io.c: Similarly.
7172         * jcf-parse.c: Similarly.
7173         * jv-scan.c: Similarly.
7174         * jvspec.c: Similarly.
7175         * mangle.c: Similarly.
7176
7177 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
7178             Alexandre Petit-Bianco  <apbianco@redhat.com>
7179
7180         * expr.c (build_java_arrayaccess): Call save_expr on array for
7181         correct evaluation order, modified comment, fixed indentation.
7182         * parse.y: (patch_assignment): Correctly extract the array base
7183         from the tree generate by build_java_arrayaccess, added comments.
7184         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
7185         Fixes PR java/3096, PR java/3803, PR java/3965.
7186
7187 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7188
7189         * expr.c (expand_byte_code): Remove trailing periods from messages.
7190         * jcf-parse.c (load_class, jcf_parse): Similarly.
7191         * jcf-write.c (generate_classfile): Similarly.
7192         * lex.c (java_lex): Similarly.
7193
7194 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7195
7196         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
7197
7198 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7199
7200         * Make-lang.in (java.generated-manpages): New dummy target.
7201
7202 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7203
7204         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7205         ASM_FINAL_SPEC.
7206         (lang_specific_pre_link): Use set_input to set input_filename.
7207         Append `main' here.
7208         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7209         (main): Fix definition.
7210         Strip `main' from classname.
7211         Fixes PR java/227.
7212
7213 2001-11-18  Roger Sayle <roger@eyesopen.com>
7214
7215         * parse.h (java_expand_switch): Remove old prototype.
7216
7217 2001-11-18  Tom Tromey  <tromey@redhat.com>
7218
7219         Fix for PR java/1401:
7220         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
7221         arg0 is null.
7222         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
7223         correctly.
7224
7225 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7226
7227         * lang.c (finish_parse): Rename to java_finish.
7228         (LANG_HOOKS_FINISH, java_finish): New.
7229
7230 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7231
7232         * decl.c (init_decl_processing): Rename java_init_decl_processing.
7233         * java-tree.h: New prototype.
7234         * lang.c (java_init): Update prototype.  Combine with old init_parse.
7235
7236 2001-11-13  Tom Tromey  <tromey@redhat.com>
7237
7238         * gjavah.c (method_signature): New global.
7239         (HANDLE_METHOD): Set it.
7240         (decompile_return_statement): New function.
7241         (decompile_method): Use it.
7242         (print_method_info): Removed `synth' argument.
7243
7244 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7245
7246         * java-tree.h (java_set_yydebug): New.
7247         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
7248         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
7249         (print_lang_decl, print_lang_type, print_lang_identifier,
7250         print_lang_statistics, lang_print_xnode): Remove.
7251
7252 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7253
7254         * jcf-parse.c (init_lex): Remove.
7255         * lang.c (language_string, lang_identify): Remove.
7256         (struct lang_hooks): Constify.
7257         (LANG_HOOKS_NAME): Override.
7258         (init_parse): Update.
7259
7260 2001-11-08  Andreas Franck  <afranck@gmx.de>
7261
7262         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
7263         program_transform_name the way suggested by autoconf.
7264         (java.install-common): Also transform auxiliary program names with
7265         program_transform_name.
7266
7267 2001-11-08  Tom Tromey  <tromey@cygnus.com>
7268
7269         * parse.y (trap_overflow_corner_case): New rule.
7270         (unary_expression): Use it.
7271         * lex.c (java_init_lex): Don't set minus_seen.
7272         (yylex): Don't use minus_seen.  Communicate overflow to parser for
7273         it to handle.
7274         (error_if_numeric_overflow): New function.
7275         * parse.h (minus_seen): Removed field.
7276         (JAVA_RADIX10_FLAG): New define.
7277
7278 2001-11-07  Tom Tromey  <tromey@redhat.com>
7279
7280         Patch for PR java/1414:
7281         * parse.y (case_label_list): New global.
7282         (goal): Register case_label_list with GC.
7283         (java_complete_lhs): Save new case on case_label_list.
7284         (patch_switch_statement): Check for duplicate case labels.
7285
7286 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7287
7288         * parse.y (patch_assignment): Removed unused third argument.
7289         (java_complete_lhs): Removed unused third argument to patch_assignment.
7290
7291 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7292
7293         * lang.c: Include langhooks-def.h.
7294         * Make-lang.in: Update.
7295
7296 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7297
7298         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7299
7300 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7301
7302         * mangle.c (find_compression_record_match): Don't match compression
7303         records for package name elements unless they occur at the start of
7304         the name. Fix for PR java/4717.
7305
7306 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7307
7308         * expr.c (expand_java_field_op): Don't special-case references to
7309         java.lang.PRIMTYPE.TYPE.
7310         (build_primtype_type_ref): Removed.
7311         * java-tree.h (build_primtype_type_ref): Remove prototype.
7312         * parse.y (maybe_build_primttype_type_ref): Removed.
7313         (complete_function_arguments): Don't special-case references to
7314         java.lang.PRIMTYPE.TYPE.
7315         (patch_assignment): Likewise.
7316         (array_constructor_check_entry): Likewise.
7317
7318 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
7319
7320         * mangle.c (static tree compression_table): Fixed leading comment.
7321         * parse.h (struct parser_ctxt): Fixed field comment.
7322         * parse.y (check_pkg_class_access): New prototype, fixed leading
7323         comment, new parameter used to emit error only if passed as true.
7324         (parse_check_super): Pass extra argument to check_pkg_class_access.
7325         (do_resolve_class): Likewise.
7326         (process_imports): Likewise.
7327         (read_import_dir): Fixed indentation.
7328         (find_in_imports_on_demand): New local class_type_name. Local
7329         node_to_use deleted. while loop changed into for loop. Report
7330         multiple definition only for accessible classes. Improved error
7331         message.
7332         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
7333         assigned to parameter list, fixed indentation. while loop changed
7334         into for loop, restore TREE_CHAIN on local `tem' before the next
7335         iteration.
7336
7337 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7338
7339         * lang.c (lang_get_alias_set): Deleted.
7340
7341 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7342
7343         * gjavah.c (jni_print_char): Fix thinko in last change.
7344
7345         * gjavah.c (jni_print_char, decode_signature_piece): Use
7346         safe-ctype macros and/or fold extra calls into fewer ones.
7347         * lex.c (java_read_unicode, java_lex): Likewise.
7348         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
7349         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
7350         * mangle_name.c (append_unicode_mangled_name,
7351         unicode_mangling_length): Likewise.
7352
7353 2001-10-17  Richard Henderson  <rth@redhat.com>
7354
7355         * Make-lang.in (java/lang.o): Depend on langhooks.h.
7356
7357 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
7358
7359         * lang.c (langhooks.h): Included.
7360         (LANG_HOOKS_INIT): Redefined.
7361         (LANG_HOOKS_INIT_OPTIONS): Likewise.
7362         (LANG_HOOKS_DECODE_OPTION): Likewise.
7363         (struct lang_hooks lang_hooks): New initialization.
7364
7365 2001-10-11  Per Bothner  <per@bothner.com>
7366
7367         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
7368         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
7369         The former is simpler, and jcf-write.c handles it better.
7370         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
7371         or WITH_CLEANUP_EXPR.
7372         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
7373         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
7374
7375         * parse.y (patch_if_else_statement):  If the condition is constant,
7376         optimize away the test.
7377
7378 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7379
7380         * parse.y (patch_cast): Call patch_string on the first operand of
7381         the incoming node, update it if necessary. Fixes PR java/4510.
7382
7383 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7384
7385         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
7386         when name qualifier matches a package name.
7387
7388 2001-10-08  Tom Tromey  <tromey@redhat.com>
7389
7390         Fix for PR java/4489:
7391         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
7392         force a new label when computing `body_block'.
7393
7394 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7395
7396         * jcf-io.c (format_uint): Const-ify.
7397         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
7398         * lex.c (java_get_line_col): Likewise.
7399         * parse.y (build_incdec): Likewise.
7400
7401 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
7402
7403         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
7404         a NULL enclosing context if appropriate. Fixes PR java/4466.
7405
7406 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
7407
7408         * parse.y (patch_assignment): Use lvalue's original TYPE when
7409         building the final COMPOUND_EXPR.
7410         (try_reference_assignconv): Fixed leading comment.
7411
7412 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
7413
7414         * parse.y (check_final_variable_indirect_assignment): For
7415         COMPOUND_EXPR, return only if finals were found initialized
7416         properly, if not, keep on checking.
7417         (check_final_variable_global_assignment_flag): New local
7418         error_found, set when appropriate and used to decide whether to
7419         report uninitialized finals. Fixed typo in comment.
7420
7421 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7422
7423         * decl.c (init_decl_processing): Fixed typo in predef_filenames
7424         last three initializations. Fixes PR java/4360.
7425
7426 2001-09-21  Richard Henderson  <rth@redhat.com>
7427
7428         * class.c (get_dispatch_table): Handle function descriptors.
7429         (build_dtable_decl): Likewise.
7430         * expr.c (build_invokevirtual): Likewise.
7431
7432 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7433
7434         * parse.y (patch_method_invocation): Build class initialization
7435         when static finals are used to qualify method invocation.
7436         Fixes PR java/4366.
7437
7438 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
7439
7440         * parse.h: (WFL_STRIP_BRACKET): Re-written using
7441         build_type_name_from_array_name.
7442         (STRING_STRIP_BRACKETS): New macro.
7443         * parse.y (build_type_name_from_array_name): New function.
7444         (array_creation_expression:): Accumulate []s instead of [s.
7445         (cast_expression:): Accumulate []s instead of [s after cast type
7446         name.
7447         (build_array_from_name): Local string deleted, use
7448         build_type_name_from_array_name.
7449         (build_unresolved_array_type): Accumulate []s instead of [s after
7450         type name.
7451         (register_fields): Fixed comment.
7452         (resolve_class): Local name, base deleted, new locals tname and
7453         array_dims. Use build_type_name_from_array_name. Use array_dims to
7454         build array type.
7455         (purify_type_name): Use STRING_STRIP_BRACKETS.
7456
7457 2001-09-18  Andreas Jaeger  <aj@suse.de>
7458
7459         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
7460         * jv-scan.c: Likewise.
7461
7462 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7463
7464         * parse.y (patch_method_invocation): Inner class creation context
7465         check not enforced within constructors. Fixes PR java/1873.
7466
7467 2001-09-16  Tom Tromey  <tromey@redhat.com>
7468
7469         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
7470         NOTE_PUSH for single-case push.  Fixes PR java/4189.
7471
7472 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7473
7474         * java-tree.h (TYPE_IMPORT_LIST): New macro.
7475         (TYPE_IMPORT_DEMAND_LIST): Likewise.
7476         (struct lang_type): New fields import_list and import_demand_list.
7477         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
7478         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
7479         (do_resolve_class): New local saved_enclosing_type, initialized,
7480         passed as parameter to find_in_imports and find_in_imports_on_demand.
7481         (find_in_imports): Added paramater enclosing_type, use its
7482         TYPE_IMPORT_LIST when applicable.
7483         (find_in_imports_on_demand): Added parameter enclosing_type, use
7484         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
7485         declaration and initialization.
7486         (fold_constant_for_init): Switch/restore current_class to the
7487         appropriate context.
7488
7489 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
7490
7491         * verify.c (verify_jvm_instructions): Fix typo.
7492
7493 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7494
7495         * expr.c (expand_invoke): Const-ification.
7496         * parse.y (patch_method_invocation): Likewise.
7497
7498 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7499
7500         * gjavah.c (cxx_keywords): Const-ification.
7501         * keyword.gperf (java_keyword): Likewise.
7502         * lang.c (java_tree_code_name): Likewise.
7503         * lex.c (cxx_keywords): Likewise.
7504         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
7505
7506 2001-09-11  Richard Henderson  <rth@redhat.com>
7507
7508         * parse.h (ctxp_for_generation): Mark extern.
7509
7510 2001-09-10  Richard Henderson  <rth@redhat.com>
7511
7512         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
7513
7514 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7515
7516         * typeck.c (java_array_type_length, build_prim_array_type):
7517         Represent empty arrays by NULL index.
7518
7519 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
7520
7521         * java-tree.h (compile_resource_file): Grouped with other prototypes.
7522         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
7523
7524 2001-09-06  Anthony Green  <green@redhat.com>
7525
7526         * class.c (O_BINARY): Define if necessary.
7527         (registerResource_libfunc): Declare.
7528         (init_class_processing): Initilize registerResource_libfunc.
7529         (compile_resource_file): New function.
7530         * java-tree.h (resource_name): Declare.
7531         (compile_resource_file): Declare.
7532         * jcf-parse.c (yyparse): Handle compiling java resource files.
7533         * lang.c (java_decode_option): Handle -fcompile-resource option.
7534         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
7535         resource files.
7536         * gcj.texi (Code Generation): Add documentation for -R flag.
7537
7538 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
7539
7540         * jcf-write.c (generate_classfile): Issue an error in case of
7541         field/initial value mismatch.
7542         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
7543         being initialized and we're generating bytecode.
7544         (java_complete_lhs): In MODIFY_EXPR section: added comments,
7545         set DECL_INITIAL properly when appropriate.
7546         Fixes PR java/4230
7547         Fixes PR java/4204
7548
7549 2001-09-01  Per Bothner  <per@bothner.com>
7550
7551         * parse.y (maybe_yank_clinit):  A field without an initializer is not
7552         relevant.  All initializers except static final and constant require
7553         <clinit>, regardless of flag_emit_class_files.
7554
7555 2001-08-31  Per Bothner  <per@bothner.com>
7556
7557         * class.c (set_constant_value):  When not emitting class files, then a
7558         String ConstantValue is a utf8const_ptr_type.
7559
7560 2001-08-30  Per Bothner  <per@bothner.com>
7561
7562         * jcf-write.c (generate_classfile):  Check that field is primitive
7563         or string before emitting ConstantValue attribute.
7564
7565 2001-08-30  Per Bothner  <per@bothner.com>
7566
7567         * parse.y (resolve_qualified_expression_name):  If creating a
7568         COMPOUND_EXPR, set it's type correctly.
7569
7570 2001-08-30  Per Bothner  <per@bothner.com>
7571
7572         * jcf-io.c (open_class):  Set filename field.
7573
7574         * jcf-parse,c (parse_class_file):  Set current_function_decl
7575         for better error message when Code attribute is missing.
7576
7577         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
7578         better diagnostics, especially for constructors.
7579
7580 2001-08-30  Per Bothner  <per@bothner.com>
7581
7582         * jcf-write.c (generate_classfile):  Don't write ConstantValue
7583         attribute if field is not final, for compatibility with jdk.
7584
7585         * jcf-write.c (generate_classfile):  Convert ConstantValue values
7586         to correct type.  Work-around for front-end bug.
7587         * class.c (set_constant_value):  Error if constant has wrong type.
7588
7589 2001-08-30  Per Bothner  <per@bothner.com>
7590
7591         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
7592         "Double" are printed at verbosity 1.
7593
7594         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
7595
7596         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
7597
7598 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7599
7600         * parse.y (patch_assignment): Don't verify final re-assignment here.
7601         (java_complete_lhs): Verify assignments to finals calling
7602         patch_assignment. Verify re-assignments to finals before calling
7603         patch_assignment.
7604
7605 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
7606
7607         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
7608         Fixes PR java/1413
7609
7610 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7611
7612         * lex.c (java_lex): new local found_hex_digits. Set and then used
7613         in test to reject invalid hexadecimal numbers.
7614         * parse.y (java_complete_tree): Prevent unwanted cast with
7615         initialized floating point finals.
7616         (patch_binop): Emit a warning when detecting a division by zero,
7617         mark result not constant, don't simplify non integer division.
7618
7619 2001-08-28  Per Bothner  <per@bothner.com>
7620
7621         * jcf-write.c  (generate_bytecode_insns):  For increments and
7622         decrements just recurse to push constant.  Improvement on Mark's patch.
7623
7624 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
7625
7626         * jcf-write.c (generate_bytecode_insns): Generate an integer to
7627         real conversion for increments and decrements of reals.
7628
7629 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7630
7631         * parse.y (resolve_qualified_expression_name): Handle unresolved
7632         qualified expressions, prevent numerical qualifiers, fixed typo.
7633         Fixes PR java/4141
7634
7635 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
7636
7637         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
7638         don't report anything but deprecated class when marked so. Handle
7639         VAR_DECL.
7640         (patch_method_invocation): Check deprecation on methods and types.
7641         (patch_binop): code becomes an enum tree_code, added default: to
7642         switch to handle that. Detect division by zero, try to fold and
7643         return before using a subroutine.
7644
7645 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7646
7647         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
7648         file smaller than 4 bytes.
7649         * parse.y (check_inner_circular_reference): New function.
7650         (check_circular_reference): Likewise.
7651         (array_initializer:): Accept {,}.
7652         (java_check_circular_reference): Rewritten using
7653         check_circular_reference and check_inner_circular_reference.
7654         (java_complete_expand_method): Unconditionally save and restore
7655         the unpurged exception list.
7656         (build_dot_class_method_invocation): Unmangle signature parameter.
7657
7658 2001-08-21  Tom Tromey  <tromey@redhat.com>
7659
7660         * decl.c (init_decl_processing): Add `throws' field to method
7661         descriptor.
7662         * class.c (make_method_value): Compute `throws' field for method.
7663
7664 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7665
7666         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
7667         circularity is detected.
7668         (ctors_unchecked_throws_clause_p): Fixed leading comment.
7669
7670 2001-08-17  Richard Henderson  <rth@redhat.com>
7671
7672         * class.c (emit_register_classes): Add align parameter to
7673         call to assemble_integer.
7674
7675 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
7676
7677         * jcf-parse.c (load_class): New locals saved and class_loaded. If
7678         loading a class_or_name fails, try considering an innerclass name
7679         and load the enclosing context.
7680         * parse.y (resolve_inner_class): New function.
7681         (find_as_inner_class): Added leading comment.
7682         (register_incomplete_type): Keep the current context as enclosing
7683         context for JDEP_FIELD dependencies.
7684         (do_resolve_class): Locals new_class_decl and super initialized to
7685         NULL. Call resolve_inner_class, explore the enclosing context
7686         superclass if necessary.
7687         Fixes PR java/4007
7688
7689 2001-08-16  Tom Tromey  <tromey@redhat.com>
7690
7691         * jcf-dump.c (main): Updated for change to jcf_path_seal.
7692         * gjavah.c (main): Updated for change to jcf_path_seal.
7693         * lang.c (version_flag): New global.
7694         (java_decode_option): Recognize `-version'.
7695         (java_init): Update for change to jcf_path_seal.
7696         * jcf.h (jcf_path_seal): Added `print' argument.
7697         * jcf-path.c (jcf_path_seal): Added `print' argument.
7698
7699 2001-08-13  Zack Weinberg  <zackw@panix.com>
7700
7701         * Make-lang.in (java/decl.o): Update dependencies.
7702         * decl.c: Include libfuncs.h, don't include toplev.h.
7703
7704 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7705
7706         * decl.c (init_decl_processing): exception_type_node,
7707         class_not_found_type_node, and no_class_def_found_type_node
7708         initialized. predef_filenames augmented accordingly.
7709         instinit_identifier_node initialized.
7710         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
7711         * java-tree.h (enum java_tree_index): New entries
7712         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
7713         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
7714         (exception_type_node): New macro.
7715         (class_not_found_type_node): Likewise.
7716         (no_class_def_found_type_node): Likewise.
7717         (instinit_identifier_node): Likewise.
7718         (PREDEF_FILENAMES_SIZE): Adjusted.
7719         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
7720         (struct lang_type): Fixed typo in bitfield name.
7721         (DECL_INSTINIT_P): New macro.
7722         (ID_INSTINIT_P): Likewise.
7723         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
7724         attribute.
7725         * parse.y (encapsulate_with_try_catch): New function.
7726         (generate_instinit): Likewise.
7727         (build_instinit_invocation): Likewise.
7728         (ctors_unchecked_throws_clause_p): Likewise.
7729         (add_instance_initializer): Deleted.
7730         (build_instance_initializer): Likewise.
7731         (in_instance_initializer): Likewise.
7732         (check_method_redefinition): instinit$ not to be verified.
7733         (java_complete_expand_methods): Generate instinit$, simplified code.
7734         (build_dot_class_method): Eliminated unnecessary locals. Use
7735         encapsulate_with_try_catch, removed unnecessary code.
7736         (fix_constructors): New local iii. Use build_instinit_invocation.
7737         (patch_method_invocation): Added comment.
7738         (maybe_use_access_method): Don't consider instinit$.
7739         (find_applicable_accessible_methods_list): Shorten the search for
7740         instinit$ too.
7741         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
7742         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
7743         (patch_throw_statement): Likewise. Fixed typo.
7744
7745 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
7746
7747         Revert:
7748         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7749         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7750         ASM_FINAL_SPEC.
7751         (lang_specific_pre_link): Use set_input to set input_filename.
7752         Append `main' here.
7753         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7754         (main): Fix definition.
7755         Strip `main' from classname.
7756         Fixes PR java/227.
7757
7758 2001-08-11  Zack Weinberg  <zackw@panix.com>
7759
7760         * lex.h: Don't include setjmp.h.  Don't define
7761         SET_FLOAT_HANDLER or prototype set_float_handler.
7762
7763 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7764
7765         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
7766         `poplevel' in the right order.
7767
7768 2001-08-09  Richard Henderson  <rth@redhat.com>
7769
7770         * Make-lang.in (class.o): Depend on TARGET_H.
7771         * class.c (emit_register_classes): Use target hooks instead of
7772         assemble_constructor and assemble_destructor.
7773
7774 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
7775
7776         * check-init.c (flags.h): Include
7777         (check_init): Don't report uninitialized static class
7778         initialization flags, don't free bit index when doing static class
7779         initialization optimization.
7780         (check_for_initialization): Return type changed to `unsigned int.'
7781         (attach_initialized_static_class): New function.
7782         * class.c (add_method_1): Create the initialized static class
7783         table if necessary.
7784         (finish_class): Always emit deferred inline methods.
7785         * decl.c (emit_init_test_initialization): Moved to expr.c
7786         (complete_start_java_method): Don't traverse
7787         DECL_FUNCTION_INIT_TEST_TABLE.
7788         (lang_mark_tree): Mark hash tables in function decls.
7789         * expr.c (emit_init_test_initialization): Moved from decl.c.
7790         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
7791         initialization flag, set DECL_CONTEXT and
7792         LOCAL_CLASS_INITIALIZATION_FLAG.
7793         (java_lang_expand_expr): Emit initialization code for static class
7794         initialized flags when entering block, if necessary.
7795         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
7796         * java-tree.h (flag_optimize_sci): New global variable declaration.
7797         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
7798         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
7799         (LOCAL_FINAL_P): Fixed typo in comment.
7800         (FINAL_VARIABLE_P): Likewise.
7801         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
7802         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
7803         (struct lang_decl): New fields `ict', `smic' and `cif.'
7804         (check_for_initialization): New returned value for global.
7805         (attach_initialized_static_class): New global function.
7806         (STATIC_CLASS_INIT_OPT_P): New macro.
7807         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
7808         * lang.c (java_decode_option): Handle
7809         `-fno-optimize-static-class-initialization'
7810         * parse.y (start_complete_expand_method): New function.
7811         (java_expand_method_bodies): Likewise.
7812         (attach_init_test_initialization_flags): Likewise.
7813         (adjust_init_test_initialization): Likewise.
7814         (emit_test_initialization): Likewise.
7815         (java_complete_expand_methods): Nullify abstract and native method
7816         bodies.
7817         (java_complete_expand_method): New locals `fbody', `block_body'
7818         and `exception_copy.' Reorganized: directly return on empty method
7819         bodies, call `start_complete_expand_method', remember definitely
7820         initialized static class in function, don't expand method bodies.
7821         (java_expand_classes): Call `java_expand_method_bodies' before
7822         `finish_class' when compiling to native.
7823         (resolve_expression_name): Use `orig' after building outer class
7824         field access.
7825         (patch_invoke): Remember static method invocations.
7826
7827 2001-08-06  Richard Henderson  <rth@redhat.com>
7828
7829         * class.c (emit_register_classes): Pass a symbol_ref and priority
7830         to assemble_constructor.
7831
7832 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
7833
7834         * java-tree.h (all_class_filename): New macro.
7835         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
7836         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
7837         newly created IDENTIFIER_NODE to `all_class_filename.'
7838
7839 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
7840
7841         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
7842         Use ggc_add_tree_root to register roots.
7843
7844 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7845
7846         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
7847         second operand calling check_init.
7848         * decl.c (complete_start_java_method): Swaped second and third
7849         arguments while creating WITH_CLEANUP_EXPR node.
7850         * jcf-write.c (generate_bytecode_insns): Use second operand
7851         instead of third when handling WITH_CLEANUP_EXPR.
7852         * parse.y (java_complete_lhs): Expand second operand of
7853         WITH_CLEANUP_EXPR nodes.
7854         (patch_synchronized_statement): Swaped second and third arguments
7855         while creating WITH_CLEANUP_EXPR node.
7856
7857 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7858
7859         * parse.y (create_interface): Avoid cyclic inheritance report when
7860         syntax error encountered during class definition.
7861         Fixes PR java/2956
7862
7863 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7864
7865         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7866         ASM_FINAL_SPEC.
7867         (lang_specific_pre_link): Use set_input to set input_filename.
7868         Append `main' here.
7869         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7870         (main): Fix definition.
7871         Strip `main' from classname.
7872         Fixes PR java/227.
7873
7874 2001-07-18  Tom Tromey  <tromey@redhat.com>
7875
7876         For PR java/2812:
7877         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
7878         * lex.c (java_new_lexer): Use ICONV_CONST.
7879         (java_read_char): Likewise.
7880         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
7881         (jv-scan$(exeext)): Likewise.
7882
7883 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7884
7885         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
7886         * parse.y (check_class_interface_creation): Allow `private' if the
7887         enclosing is not an interface.
7888         (create_interface): Interface tagged public if the enclosing
7889         context is an interface.
7890         (create_class): Class tagged public if the enclosing context
7891         is an interface.
7892         Fixes PR java/2959
7893
7894 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7895
7896         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
7897         Fixes PR java/2665
7898
7899 2001-07-14  Tim Josling  <tej@melbpc.org.au>
7900
7901         * check-init.c (check_init): Remove references to EXPON_EXPR.
7902
7903 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7904
7905         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
7906         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
7907         Fixes PR java/3602
7908
7909 2001-07-13  Tom Tromey  <tromey@redhat.com>
7910
7911         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
7912         invocation.
7913
7914 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7915
7916         * parse.y (patch_method_invocation): Don't override primary if one
7917         is already provided, but let this$<n> be built. Fixed comment.
7918
7919 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7920
7921         * parse.y (empty_statement:): Report empty statement error only
7922         when found at class declaration level.
7923         Fixes PR java/3635
7924
7925 2001-07-12  Tom Tromey  <tromey@redhat.com>
7926
7927         * expr.c (expand_load_internal): New function.
7928         (LOAD_INTERNAL): Use it.
7929
7930 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
7931
7932         * parse.y (verify_constructor_super): Compare anonymous class ctor
7933         args with `valid_method_invocation_conversion_p.'
7934         Fixes PR java/3285
7935
7936 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7937
7938         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
7939         `-fsyntax-only.' Fixes PR java/3248
7940
7941 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7942
7943         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
7944
7945 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7946
7947         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
7948         current function is static. Fixes PR java/1970
7949
7950 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7951
7952         * parse.y (patch_method_invocation): Add enclosing context to ctor
7953         calls if necessary. Fixes PR java/2953
7954
7955 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7956
7957         * parse.y (resolve_package): Abort if qualified expression member
7958         isn't right.
7959         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
7960         Fixes PR java/1391
7961
7962 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
7963
7964         * verify.c: Don't use // comments.
7965
7966 2001-07-05  Tom Tromey  <tromey@redhat.com>
7967
7968         * lang.c (flag_assume_compiled): Removed.
7969         * java-tree.h (flag_assume_compiled): Removed.
7970         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
7971         -fhash-synchronization, -fuse-divide-subroutine,
7972         -fcheck-references, -femit-class-file, -femit-class-files,
7973         -fassume-compiled.  Updated --encoding information.  Changed
7974         -foutput-class-dir to `-d'.
7975
7976 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
7977
7978         * jcf-parse.c (parse_class_file): Add lineno parameter to
7979         debug_start_source_file call.
7980
7981 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7982
7983         * gcj.texi: Use gpl.texi.
7984         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
7985         dependencies and use doc/include in search path.
7986
7987 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
7988
7989         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
7990         `this'.  If so, don't build instance initializers.
7991
7992 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
7993
7994         * parse.y (resolve_expression_name): Improved error message for
7995         inner class cases. Fixes PR java/1958
7996
7997 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
7998
7999         * lang.c: #include diagnostic.h
8000         (lang_print_error): Add a `diagnostic_context *' parameter.
8001         (java_dummy_print): Likewise.
8002         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
8003
8004 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8005
8006         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
8007         * jcf.h (typedef struct JCF): New bitfield `finished.'
8008         (JCF_FINISH): Set `finished.'
8009         (JCF_ZERO): Reset `finished.'
8010         Fixes PR java/2633
8011
8012 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8013
8014         * parse.y (class_body_declaration:): Don't install empty instance
8015         initializers.
8016         Fixes PR java/1314
8017
8018 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8019
8020         * class.c (set_super_info): Call `set_class_decl_access_flags.'
8021         (set_class_decl_access_flags): New function.
8022         * java-tree.h (set_class_decl_access_flags): New prototype.
8023         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
8024         (parse_class_file): New local `decl_max_locals.' Take wide types
8025         into account to compute DECL_MAX_LOCALS.
8026         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
8027         imports on demand.
8028
8029 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
8030
8031         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
8032
8033 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8034
8035         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
8036         * parse.y (do_resolve_class): Moved comments out to leading comment
8037         section. Removed local `start', New local `_ht' and
8038         `circularity_hash.'  Record `enclosing' in hash table and search
8039         it to detect circularity.  Use `enclosing' as an argument to
8040         `lookup_cl.' Free the hash table when done.
8041
8042 2001-06-19  Tom Tromey  <tromey@redhat.com>
8043
8044         * lex.c (java_read_char): Disallow invalid and overlong
8045         sequences.  Fixes PR java/2319.
8046
8047 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
8048
8049         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
8050
8051 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8052
8053         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
8054         arguments accordingly.
8055
8056 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8057
8058         * gcj.texi: Move contents to just after title page.
8059
8060 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
8061
8062         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
8063         builtin type.
8064         (patch_incomplete_class_ref): Build the class ref, build the class
8065         init if necessary, complete the tree.
8066         Fixes PR java/2605
8067
8068 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8069
8070         * parse.y (lookup_field_wrapper): Test `name' code.
8071         (resolve_qualified_expression_name): Test `qual_wfl' code.
8072         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
8073         handle `qual_wfl' by code.
8074         (maybe_build_primttype_type_ref): Test `wfl' code.
8075
8076 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8077
8078         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
8079         fdl.texi.
8080         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
8081         the dvi file in the java directory.
8082
8083 2001-05-25  Sam TH  <sam@uchicago.edu>
8084
8085         * gen-table.pl javaop.h jcf.h lex.h,
8086         parse.h: Fix header include guards.
8087
8088 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
8089
8090         * jv-scan.c (version): Update copyright year.
8091
8092 2001-05-21  Per Bothner  <per@bothner.com>
8093
8094         * jcf-parse.c (read_class):  If class is from .class or .zip file
8095         and it's already been read, don't push/pop parser context.
8096
8097 2001-05-18  Per Bothner  <per@bothner.com>
8098
8099         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
8100         command line so the jvgenmain-generated main program comes first.
8101
8102 2001-05-15  Tom Tromey  <tromey@redhat.com>
8103
8104         * class.c (build_utf8_ref): Don't generate identifier based on
8105         utf8const contents.
8106
8107 2001-05-12  Richard Henderson  <rth@redhat.com>
8108
8109         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
8110         * expr.c (java_lang_expand_expr): Expand it.
8111         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
8112         calling build_exception_object_ref.
8113         * parse.y (catch_clause_parameter): Likewise.
8114         (build_dot_class_method): Likewise.
8115         (try_reference_assignconv): Likewise.
8116         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
8117         * jcf-write.c (generate_bytecode_insns): Likewise.
8118
8119 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8120
8121         * parse.y (build_unresolved_array_type): Set
8122         EXPR_WFL_QUALIFICATION on the newly created wfl.
8123         Fixes PR java/2538. Fixes PR java/2535.
8124
8125 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8126
8127         * parse.y (fix_constructors): Removed unnecessary assignment to
8128         local. Moved assignment to `this$<n>', fixed comments and
8129         indentation.
8130         (build_wfl_wrap): Fixed indentation.
8131         Fixes PR java/2598, java/2579 and java/2658.
8132
8133 2001-05-03  Mo DeJong  <mdejong@redhat.com>
8134
8135         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
8136         check for byte swap.
8137
8138 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
8139
8140         * expr.c (build_class_init): Move MODIFY_EXPR
8141         outside of COND_EXPR.  Remove variable `call'.
8142
8143 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8144
8145         * decl.c: NULL_PTR -> NULL.
8146         * jcf-write.c: Likewise.
8147
8148 2001-05-01  Tom Tromey  <tromey@redhat.com>
8149
8150         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
8151         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
8152         * gcj.texi: Updated copyright text.  Include fdl.texi.
8153         (Top): Link to new node.
8154
8155 2001-05-01  Per Bothner  <per@bothner.com>
8156
8157         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
8158
8159 2001-05-01  Per Bothner  <per@bothner.com>
8160
8161         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
8162         import_list contains the name, not the TREE_PURPOSE.
8163
8164 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8165
8166         * jcf-io.c (read_zip_member): Cast to long in comparison with
8167         signed value.
8168
8169         * jvspec.c (lang_specific_driver): Initialize variables.
8170
8171         * mangle.c (find_compression_record_match): Likewise.
8172
8173         * typeck.c (build_null_signature): Provide static prototype.  Mark
8174         parameter with ATTRIBUTE_UNUSED.
8175
8176         * verify.c (verify_jvm_instructions): Initialize variable.
8177
8178 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8179
8180         * parse.y (do_resolve_class): Check for cyclic inheritance during
8181         inner class resolution.
8182
8183 2001-04-27  Per Bothner  <per@bothner.com>
8184
8185         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
8186         while iterating, since that could cause gc to lose stuff.
8187
8188 2001-04-26  Per Bothner  <per@bothner.com>
8189
8190         Fix method search wrt scope of inner classes to match JLS2.
8191         * typeck.c (build_null_signature):  New static function.
8192         (has_method):  New function.  Uses build_null_signature and lookup_do.
8193         * java-tree.h (has_method):  New declaration.
8194         * parse.y (find_applicable_accessible_methods_list):  Do not search
8195         context of inner classes here.
8196         (patch_method_invocation):  Search scope, ie. current and outer clases,
8197         for method matching simple name, to find class.
8198
8199 2001-04-26  Per Bothner  <per@bothner.com>
8200
8201         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
8202         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
8203
8204         * constants.c (find_methodref_with_class_index):  New function.
8205         (find_methodref_index):  Use find_methodref_with_class_index.
8206         * java-tree.h (find_methodref_with_class_index):  New declaration.
8207         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
8208         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
8209         If context changed from interface to class, don't use invokeinterface.
8210
8211 2001-04-25  Per Bothner  <per@bothner.com>
8212
8213         * verify.c (verify_jvm_instructions):  For field instructions,
8214         check that field index is valid.  For invoke instructions, check that
8215         method index is valid.
8216
8217 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
8218
8219         * config-lang.in (target_libs): Copy from $libgcj_saved.
8220
8221 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8222
8223         * decl.c (init_decl_processing): Add new class "protectionDomain"
8224         field.
8225         * class.c (make_class_data): Set initial value for "protectionDomain".
8226
8227 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8228
8229         * jvspec.c (lang_specific_driver): Fix memory allocation
8230         deficit, by using concat in lieu of xmalloc/sprintf.
8231
8232 2001-04-20  Per Bothner  <per@bothner.com>
8233
8234         Fixes to compile multiple .class files at once.
8235         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
8236         * java-tree.h (CLASS_PARSED_P):  New macro.
8237         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
8238         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
8239         (read_class):  Avoid some code duplication.
8240         Don't call JCF_FINISH for a .class file - might be needed later.
8241         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
8242         rather than CLASS_LOADED_P, since latter implies class laid out.
8243         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
8244         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
8245
8246 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8247
8248         * Make-lang.in (java/boehm.o): Depend on toplev.h.
8249
8250         * boehm.c: Include toplev.h.
8251
8252 2001-04-06  Tom Tromey  <tromey@redhat.com>
8253             Alexandre Petit-Bianco  <apbianco@redhat.com>
8254
8255         Fix for PR gcj/1404 and PR gcj/2332:
8256         * parse.y (build_array_from_name): If we use the type_wfl then
8257         accumulate dimensions from the original type as well.
8258         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
8259
8260 2001-04-06  Tom Tromey  <tromey@redhat.com>
8261
8262         * parse.y (analyze_clinit_body): Return true if the second operand
8263         of a METHOD_EXPR is nonzero.
8264
8265 2001-04-06  Tom Tromey  <tromey@redhat.com>
8266
8267         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
8268         directory.
8269         ($(srcdir)/java/parse.c): Likewise.
8270
8271 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8272
8273         * gcj.texi: Use `which-gcj' instead of `which-g77.'
8274         (version-gcc): Initialized.
8275         (which-gcj): Likewise.
8276
8277 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8278
8279         * java-tree.h (struct lang_decl): New macro
8280         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
8281         * parse.y (build_instance_initializer): New function.
8282         (add_instance_initializer): Use it.
8283         (java_fix_constructors): Set `current_class' before fix pass.
8284         (fix_constructors): Just return if already fixed. Move `super()'
8285         invocation ahead. Use `build_instance_initializer.'
8286         Fixes PR java/1315.
8287
8288 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8289
8290         * parse.y (resolve_qualified_expression_name): Pass field's
8291         DECL_CONTEXT to `not_accessible_p.'
8292         (not_accessible_p): Changed parameters order in `inherits_from_p'
8293         invocation.
8294
8295 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
8296
8297         * lang-options.h: Add flag_check_references.
8298
8299 2001-04-04  Per Bothner  <per@bothner.com>
8300
8301         * java-tree.h (CONSTANT_VALUE_P):  New macro.
8302         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
8303         * parse.y (maybe_build_class_init_for_field):  New static function.
8304         (resolve_expression_name, resolve_field_access):  Use
8305         maybe_build_class_init_for_field instead of build_class_init
8306         This does not do the init if the field is compile-time-constant.
8307         (resolve_field_access):  Simplify.
8308
8309         * parse.y (fold_constant_for_init):  Merge test into switch.
8310
8311 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
8312
8313         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
8314         on gansidecl.h.
8315         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
8316
8317 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
8318
8319         * expr.c (pop_type_0): Save the result of the first
8320         lang_printable_name call in a scratch buffer, so it
8321         won't be clobbered by the second call.
8322
8323 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8324
8325         * parse-scan.y (array_type:): Rewritten.
8326         (type_declaration:): `empty_statement' replaces `SC_TK.'
8327         (class_member_declaration:): `empty statement' added.
8328         (method_body:): Simplified.
8329         (static_initializer:): Likewise.
8330         (primary_no_new_array:): Use `type_literals.'
8331         (type_literals:): New rule.
8332         (dims:): Set and update `bracket_count.'
8333         Fixes PR java/1074. Fixes PR java/2412.
8334
8335 2001-03-28  Hans Boehm  <boehm@acm.org>
8336
8337         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
8338         (get_boehm_type_descriptor): Set type on returned value to be a
8339         pointer length integer.
8340
8341 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8342
8343         * expr.c (pop_type_0): Call `concat' rather than building the
8344         string manually.
8345         (pop_type): Add format specifier in call to `error'.
8346
8347         * parse.y (patch_method_invocation): Avoid casting away
8348         const-ness.
8349
8350 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
8351
8352         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
8353
8354 2001-03-28  Richard Henderson  <rth@redhat.com>
8355
8356         IA-64 ABI Exception Handling:
8357         * Make-lang.in (except.o): Don't depend on eh-common.h.
8358         * check-init.c (check_init): Handle EXC_PTR_EXPR.
8359         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
8360         [soft_exceptioninfo_call_node]: Remove.
8361         [eh_personality_libfunc, lang_eh_runtime_type]: New.
8362         (end_java_method): No emit_handlers.
8363         * except.c (java_set_exception_lang_code): Remove.
8364         (method_init_exceptions): Don't call it.
8365         (prepare_eh_table_type): No CATCH_ALL_TYPE.
8366         (build_exception_object_ref): New.
8367         (expand_end_java_handler): Update for except.h name changes.
8368         (emit_handlers, expand_resume_after_catch): Remove.
8369         * expr.c (java_lang_expand_expr): Update for except.h name changes.
8370         (process_jvm_instruction): Use build_exception_object_ref.
8371         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
8372         (soft_exceptioninfo_call_node): Remove.
8373         (build_exception_object_ref): Declare.
8374         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
8375         soft_exceptioninfo_call_node.  Move processing ...
8376         [EXC_PTR_EXPR]: ... here.
8377         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
8378         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
8379         (source_end_java_method): No java_set_exception_lang_code or
8380         emit_handlers.
8381         (build_dot_class_method): Use build_exception_object_ref.
8382         (try_reference_assignconv): Check EXC_PTR_EXPR not
8383         soft_exceptioninfo_call_node.
8384
8385 2001-03-28  Richard Henderson  <rth@redhat.com>
8386
8387         * java-tree.h (throw_node): Define as a single member of
8388         java_global_trees instead of a separate array.
8389         (JTI_THROW_NODE): New.
8390         * decl.c (throw_node): Don't declare.
8391         (init_decl_processing): Init a scalar throw_node.
8392         Don't register it for gc.
8393         * check-init.c (check_init): Reference scalar throw_node.
8394         * expr.c (build_java_athrow): Likewise.
8395         * jcf-write.c (generate_bytecode_insns): Likewise.
8396         * parse.h (BUILD_THROW): Likewise.
8397
8398 2001-03-28  Richard Henderson  <rth@redhat.com>
8399
8400         * decl.c (end_java_method): Do not save and restore
8401         flag_non_call_exceptions.
8402         * parse.y (source_end_java_method): Likewise.
8403         * lang.c (flag_exceptions): Don't declare.
8404         (java_init_options): Set flag_non_call_exceptions.  Set
8405         flag_exceptions here ...
8406         (java_init): ... not here.
8407
8408 2001-03-27  Richard Henderson  <rth@redhat.com>
8409
8410         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
8411         exceptions_via_longjmp.
8412
8413         * lang.c (flag_new_exceptions): Don't declare it.
8414         (java_init_options): Or set it.
8415
8416 2001-03-27  Richard Henderson  <rth@redhat.com>
8417
8418         * decl.c (end_java_method): Rename asynchronous_exceptions to
8419         flag_non_call_exceptions.
8420         * parse.y (source_end_java_method): Likewise.
8421
8422 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8423
8424         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8425
8426 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8427
8428         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
8429
8430 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8431
8432         * parse.y (find_as_inner_class): Follow current package
8433         indications not to mistakingly load an unrelated class.
8434
8435 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8436
8437         * constants.c (PUTN): Use memcpy, not bcopy.
8438
8439         * lex.c (java_read_char): Use memmove, not bcopy.
8440
8441         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
8442
8443 2001-03-23  Per Bothner  <per@bothner.com>
8444
8445         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
8446         macro for better error pin-pointing.
8447         * java-tree.h:  Fix typo in comment.
8448
8449         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
8450         Don't include jsr/goto in exception range.
8451         Check if start and end of exception range are the same (also TRY_EXPR).
8452         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
8453         However, do emit the following goto even if try_block is empty.
8454         Defer freeing exception_decl until after the finalizer, to make
8455         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
8456
8457         * parse.y (java_complete_lhs):  If the try-clause is empty, just
8458         return the finally-clause and vice versa.
8459
8460 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8461
8462         * gcj.texi (Input Options): documented the check for attribute
8463         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
8464         * java-tree.h (flag_force_classes_archive_check): Declared extern.
8465         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
8466         (jcf_parse): Check for the right classes archive if necessary.
8467         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
8468         (jcf_parse_fields): Fixed indentation.
8469         * jcf-write.c (append_gcj_attribute): New function.
8470         (generate_classfile): Compute the attribute count, invoke
8471         `append_gcj_attribute'.
8472         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
8473         turned into bit-fields. New bit-field `right_zip.'
8474         (JCF_ZERO): Set `right_zip' to zero.
8475         * lang-options.h (-fforce-classes-archive-check): Added flag.
8476         * lang.c (flag_force_classes_archive_check): New flag.
8477         (lang_f_options): New entry `force-classes-archive-check.'
8478         Fixes PR java/1213.
8479
8480 2001-02-07  Andrew Haley  <aph@redhat.com>
8481
8482         * gcj.texi (Configure-time Options): Add -fcheck-references.
8483         * expr.c (build_java_indirect_ref): New function.
8484         (java_check_reference): New function.
8485         (build_java_array_length_access): Use build_java_indirect_ref to
8486         check for null references.
8487         (build_java_arrayaccess): Likewise.
8488         (build_get_class): Likewise.
8489         (build_field_ref): Likewise.
8490         (invoke_build_dtable): Likewise.
8491         (build_invokeinterface): Likewise.
8492         * lang.c (lang_f_options): Add flag_check_references.
8493         * jvspec.c (jvgenmain_spec): Add flag_check_references.
8494         * java-tree.h (flag_check_references): New variable.
8495         * lang.c (flag_check_references): Likewise.
8496         * parse.y (patch_invoke): Use java_check_reference.
8497         (patch_assignment): Allow for extra nesting in
8498         _Jv_CheckArrayStore.
8499
8500 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
8501
8502         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
8503         * lex.c (cxx_keywords): Likewise.
8504
8505 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
8506
8507         * parse.y (qualify_ambiguous_name): Broaden `length'
8508         recognition. Help MODIFY_EXPR be resolved as expression names.
8509         Fixes PR java/2066. Fixes PR java/2400.
8510
8511 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
8512
8513         * gjavah.c (process_file): Mark interface definitions with
8514         "__attribute__ ((java_interface))".
8515
8516 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
8517
8518         * class.c (layout_class): Fixed push_super_field's second
8519         argument. Fixes PR java/2333.
8520         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
8521         too early to lay innerclasses out.
8522
8523 2001-03-20  Tom Tromey  <tromey@redhat.com>
8524             Alexandre Petit-Bianco <apbianco@redhat.com>
8525
8526         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
8527         inside an array reference. Insertion of the array store check
8528         rewritten. Fixes PR java/2299.
8529
8530 2001-03-20  Tom Tromey  <tromey@redhat.com>
8531
8532         * lex.c (java_read_unicode): Only accept leading `u's.
8533
8534 2001-03-20  Tom Tromey  <tromey@redhat.com>
8535
8536         * jcf-parse.c (read_class): Initialize `class'.
8537
8538 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8539
8540         * jcf_parse.c (jcf_parse): Eliminate unused variable.
8541
8542 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8543
8544         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
8545         (layout_class): Likewise.
8546         (layout_class_method): Likewise.
8547         (emit_register_classes): Likewise.
8548         * decl.c (builtin_function): Likewise.
8549         (give_name_to_locals): Likewise.
8550
8551 2001-03-19  Per Bothner  <per@bothner.com>
8552
8553         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
8554         before trying to load an inner class.
8555
8556         Fixes to process to command-line .class files in two passes.
8557         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
8558         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
8559         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
8560         * class.c (is_compiled_class):  Fix for renamed flag.
8561         * parse.y (maybe_create_class_interface_decl):  Likewise.
8562         * jcf-parse.c (yyparse):  Also set if compiling .class files.
8563         * jcf-parse.c (read_class);  Read current_class.
8564         (jcf_parse):  Make static.
8565         (load_inner_classes):  New function, with code moved from jcf_parse,
8566         because we need to inner classes after the command-line files are read.
8567         (yyparse):  Set finput to NULL when it doesn't need to be closed.
8568         Reduce use of main_jcf (basically only for archive) and
8569         use finput instead of main_jcf->read_state.
8570         Inline jcf_figure_file_type into yyparse.
8571         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
8572         Defer load_inner_classes and parse_class_file to a second pass,
8573         after we've correctly mapped command-line .clas fiels to classes.
8574         (jcf_figure_file_type):  Removed.
8575         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
8576         (JCF_ZERO):  Also clear zipd field.
8577         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
8578
8579 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8580
8581         * jcf-parse.c (yyparse): Change ch from char * to char.
8582
8583 2001-03-19  Per Bothner  <per@bothner.com>
8584
8585         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
8586         Add constructed filelist-file at end, following -xjava.  Thus any .o
8587         and library files are not affected by the -xjava.  Also wrap
8588         explicit @FILE with -xjava and -xnone.
8589
8590 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
8591
8592         * class.c (build_static_field_ref): Call make_decl_rtl() after
8593         setting the DECL_EXTERNAL flag.
8594
8595 2001-03-17  Per Bothner  <per@bothner.com>
8596
8597         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
8598
8599         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
8600         when result is is needed (target is STACK_TARGET).
8601
8602         * parse.h (JDEP_SOLV):  Removed.
8603         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
8604
8605         * parse.y (incomplete_class_list): Removed.
8606         (obtain_incomplete_type): Don't use or set incomplete_class_list.
8607         It doesn't work if resolve_class changes the name of an array type
8608         that is on the list and then someone else looks for the modified name.
8609         Also, seems liable to break when compiling multiple source files at
8610         once.  So the simplest is to just remove incomplete_class_list -
8611         it is only a minor space win and it is not even clear it saves time.
8612
8613         * parse.y (resolve_class):  Remove unneeded promote_type.
8614
8615 2001-03-15  Per Bothner  <per@bothner.com>
8616
8617         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
8618         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
8619         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
8620         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8621
8622         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
8623         * parse.y (java_expand_classes):  Likewise.
8624
8625         * parse.y (expand_start_java_method):  Was only called once and had a
8626         misleading name, so inline in caller java_complete_expand_method.
8627         (enter_a_block):  Likewise inline in enter_block and remove.
8628
8629         Remove junk from when gcc/java was created (by copying from C/C++).
8630         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
8631         (struct binding_level):  Remove fields keep, keep_if_subblocks,
8632         more_cleanups_ok, have_cleanups (which have never been used).
8633         (pushlevel, poplevel):  Remove related useless code.
8634
8635         * class.c (make_class_data):  The class_dtable_decl (i.e. the
8636         vtable for Class) should be external, except when compiling Class.
8637
8638         * jvspec.c (lang_specific_driver):  Fix -C handling.
8639         Check -save-temps to see if temp @FILE should be deleted.
8640         Follow-up to/fix for February 16 patch.
8641
8642         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
8643         (type_stack_dup):  Remove no-longer neded error check.
8644
8645 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
8646
8647         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
8648         to 'for_pointer'. If this type is for a pointer (argument) mangling,
8649         don't surround the element with 'N..E' if the type name is
8650         unqualified.
8651
8652 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8653
8654         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
8655         DECL_RTL_SET_P, etc.
8656         (make_method_value): Likewise.
8657         (get_dispatch_table): Likewise.
8658
8659         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8660
8661 2001-03-07  Tom Tromey  <tromey@redhat.com>
8662
8663         * config-lang.in (lang_requires): Define.
8664
8665 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
8666
8667         * typeck.c (convert): Check flag_unsafe_math_optimizations,
8668         not flag_fast_math.
8669
8670 2001-03-05  Per Bothner  <per@bothner.com>
8671
8672         Fix a problem where rest_of_decl_compilation applied to
8673         class_dtable_decl causes problems because it was done too early,
8674         before output file was opened.
8675         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
8676         * class.c (class_dtable_decl):  Add macro - element of class_roots.
8677         (make_class_data):  Define class_dtable_decl.
8678         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
8679
8680 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8681
8682         * java/class.c, java/decl.c, java/java-tree.h: Replace all
8683         uses of 'boolean' with 'bool'.
8684
8685 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8686
8687         * lang-specs.h: Add zero initializer for cpp_spec field to all
8688         array elements.
8689
8690 2001-02-16  Per Bothner  <per@bothner.com>
8691
8692         Handle compiling multiple input files at once, and @FILE syntax.
8693         * gcj.texi:  Updated documentation to match.
8694         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
8695         * jcf-parse.c (parse_source_file):  Split into ...
8696         (parse_source_file_1):  New function - and:
8697         (parse_source_file_2):  New function.
8698         (yyparse):  On -ffilelist-file, open and scan named file.
8699         On first pass over files, only do parse_source_file_1.
8700         A new second pass calls parse_source_file_2 for each file to compile.
8701         (init_jcf_parse):  Call init_src_parse.
8702         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
8703         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
8704         as multiple input file combined in one compilation.
8705         * lang-options.h:  Add -ffilelist-file
8706         * lang.c (flag_filelist_file):  New flag variable.
8707         (lang_f_options):  Handle -ffilelist-file.
8708         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
8709         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
8710         gclass_list - use global fields of src_parse_roots instead.
8711         * parse.y (src_parse_roots):  New array.
8712         (incomplete_class_list, gclass_list):  New macros.
8713         (push_parser_context, java_pop_parser_context,
8714         java_parser_context_resume):  Don't fiddle with deleted fields.
8715         (various):  Use incomplete_class gclass_list and global macros
8716         instead of parse_ctxt fields - the lists are global.
8717         (init_src_parse):  New function.
8718
8719 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8720
8721         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
8722
8723 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8724
8725         * parse.y (check_inner_class_access): Moved declaration of local
8726         `enclosing_decl_type' to the right location.
8727
8728 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
8729
8730         * parse.y (parser_check_super_interface): Don't call
8731         check_pkg_class_access for an inner interface.
8732         (parser_check_super): Don't call check_pkg_class_access for inner
8733         class.
8734         (do_resolve_class): Simplify enclosing type loop. Don't call
8735         check_pkg_class_access if CL and DECL are not set.
8736         (find_in_imports_on_demand): Set DECL if class_type needed to be
8737         loaded. Don't call check_pkg_class_access for an inner class.
8738         (check_inner_class_access): Rewritten to implement member access
8739         rules as per spec 6.6.1.
8740         (check_pkg_class_access): Handle the empty package correctly.
8741         (in_same_package): New function. Determine if two classes are in the
8742         same package.
8743
8744 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
8745
8746         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
8747         method into array types.
8748         * parse.y (patch_method_invocation): Bypass access check on clone call
8749         to array instance.
8750
8751 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8752
8753         * expr.c (build_instanceof): Check for arrays when trying fold to
8754         false.
8755
8756 2001-02-15  Jim Meyering  <meyering@lucent.com>
8757
8758         * Make-lang.in (java.install-common): Depend on `installdirs'.
8759         (java.install-info): Likewise.
8760
8761 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
8762
8763         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
8764
8765 2001-02-14  Tom Tromey  <tromey@redhat.com>
8766             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8767
8768         Fix for PR java/1261.
8769         * typeck.c (build_java_array_type): Add public `clone' method to
8770         arrays.
8771         * parse.y (resolve_qualified_expression_name): Use current_class
8772         when checking for inaccessibility.
8773         (patch_method_invocation): Fixed error message when accessibility
8774         denied.  Added `from_super' argument.
8775
8776 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8777
8778         * parse.y (resolve_class): Don't build a fake decl. Use the one
8779         already built.
8780         * typeck.c (build_java_array_type): Build and assign decl to array
8781         type.
8782
8783 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8784
8785         * parse.y (not_accessible_p): Changed leading comment. Added extra
8786         `where' argument. Use it to enforce protected access rules.
8787         (resolve_qualified_expression_name): Added extra argument to
8788         not_accessible_p.
8789         (patch_method_invocation): Use argument `primary' to provide
8790         not_accessible_p with an extra argument.
8791         (lookup_method_invoke): Added extra argument to not_accessible_p.
8792         (search_applicable_method_list): Likewise.
8793
8794 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8795
8796         * parse.y (resolve_qualified_expression_name): Try to resolve as
8797         an inner class access only if `decl' is a TYPE_DECL.
8798
8799 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8800
8801         * decl.c (classdollar_identifier_node): Initialize.
8802         * java-tree.h (enum java_tree_index): New entry
8803         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
8804         (classdollar_identifier_node): New macro.
8805         (ID_CLASSDOLLAR_P): Likewise.
8806         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
8807         (build_dot_class_method_invocation): Likewise.
8808         (find_applicable_accessible_methods_list): `class$' can't be
8809         inherited.
8810
8811 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
8812
8813         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
8814
8815 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8816
8817         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
8818         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
8819         gone.
8820
8821 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8822
8823         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
8824         outside of the `__U' sequence too.
8825         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
8826         sequence too.
8827
8828 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8829
8830         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
8831
8832 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8833
8834         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
8835         (JVGENMAIN_OBJS): Likewise.
8836         * java-tree.h (append_gpp_mangled_name): New prototype.
8837         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
8838         Removed cast calling `gcc_add_root.'
8839         * jvgenmain.c (mangle_obstack): New global, initialized.
8840         (main): Use it.
8841         (do_mangle_class): Constify local `ptr.'
8842         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
8843         append_gpp_mangle_name and update `count' if necessary.
8844         Use `mangle_obstack.'
8845         * mangle.c (append_unicode_mangled_name): Removed.
8846         (append_gpp_mangled_name): Likewise.
8847         (unicode_mangling_length): Likewise.
8848         (mangle_member_name): Return type set to `void.'
8849         (mangle_field_decl): Don't append `U' in escaped names.
8850         (mangle_method_decl): Likewise.
8851         (mangle_member_name): Just use `append_gpp_mangled_name.'
8852         * mangle_name.c: New file.
8853
8854 2001-02-07  Per Bothner  <per@bothner.com>
8855
8856         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
8857
8858         * check-init.c (check_init):  Don't call done_alternative after
8859         processing loop code, as a LOOP_EXPR never terminates normally.
8860
8861 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8862
8863         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
8864
8865 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8866
8867         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
8868         DECLs.
8869
8870 2001-02-06  Tom Tromey  <tromey@redhat.com>
8871
8872         * lex.c (java_new_lexer): Longer error message.
8873
8874 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
8875             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8876
8877         * typeck.c (build_prim_array_type): Added leading comment.
8878         (build_java_array_type): Moved locals out of
8879         block. Always create the `data' field, fixed alignment to match
8880         C++.
8881
8882 2001-02-04  Tom Tromey  <tromey@redhat.com>
8883
8884         * expr.c (java_lang_expand_expr): Don't bother recomputing
8885         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
8886         Fixes PR java/1866.
8887
8888 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8889
8890         * parse.y (process_imports): Save the original name of the import
8891         for better error report.
8892
8893 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
8894
8895         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
8896         of macros used when compiling jvspec.c.
8897         * jvspec.c (lang_specific_driver): Link with the shared
8898         libgcc by default.
8899
8900 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8901
8902         * check-init.c (check_init): Call internal_error instead of fatal.
8903         * expr.c (java_lang_expand_expr): Likewise.
8904         * jcf-parse.c (get_constant): Likewise.
8905         * mangle.c (java_mangle_decl): Likewise.
8906         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
8907         (operator_string): Likewise.
8908         * check-init.c (check_init): Call abort instead of fatal.
8909         * class.c (build_class_ref): Likewise.
8910         * constants.c (write_constant_pool): Likewise.
8911         * decl.c (start_java_method): Likewise.
8912         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
8913         (java_stack_dup, encode_newarray_type): Likewise.
8914         (build_java_array_length_access): Likewise.
8915         (build_java_check_indexed_type, expand_java_pushc): Likewise.
8916         (build_java_soft_divmod, build_invokeinterface): Likewise.
8917         * java-tree.h (INNER_CLASS_P): Likewise.
8918         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
8919         (give_name_to_class, get_class_constant): Likewise.
8920         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
8921         (find_constant_index, generate_bytecode_conditional): Likewise.
8922         (generate_bytecode_insns, perform_relocations): Likewise.
8923         * lex.c (java_unget_unicode, java_lex): Likewise.
8924         * mangle.c (mangle_type, mangle_record_type): Likewise.
8925         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
8926         (finish_mangling): Likewise.
8927         * parse.h (MARK_FINAL_PARMS): Likewise.
8928         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
8929         (obtain_incomplete_type, java_complete_class): Likewise.
8930         (java_check_regular_methods, java_complete_expand_method): Likewise.
8931         (cut_identifier_in_qualified, check_deprecation): Likewise.
8932         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
8933         (java_complete_lhs, lookup_name_in_blocks): Likewise.
8934         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
8935         * typeck.c (set_local_type, parse_signature_type): Likewise.
8936         (parse_signature_string, build_java_signature): Likewise;
8937         (set_java_signature): Likewise.
8938         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
8939         * class.c (add_method): Call fatal_error instead of fatal.
8940         (build_static_field_ref): Likewise.
8941         * expr.c (build_known_method_ref, expand_invoke): Likewise.
8942         * jcf-parse.c (get_constant, jcf_parse): Likewise.
8943         * lex.c (java_new_new_lexer): Likewise.
8944         * jv-scan.c (main): Likewise.
8945         (fatal_error): Renamed from fatal.
8946         * jcf-parse.c (yyparse): Call fatal_io_error instead of
8947         pfatal_with_name.
8948         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
8949         (yyparse): Likewise.
8950         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
8951         * lex.c (java_get_line_col): Likewise.
8952         * jcf-parse.c (load_class): Make errors non-fatal.
8953         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
8954
8955 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
8956
8957         * jvgenmain.c (class_mangling_suffix): Remove unused string.
8958         (error): Remove unused function.
8959         (main): Don't use "__attribute__ alias" on generated class symbol.
8960
8961 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8962
8963         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
8964         argument.
8965         * parse.y (finish_method_declaration): Code accounting for WFLed
8966         method DECL_NAMEs deleted.
8967         (check_abstract_method_definitions): Likewise.
8968         (resolve_type_during_patch): Layout resolved type.
8969         * typeck.c (lookup_do): Removed unused local.
8970
8971 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
8972
8973         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
8974         * decl.c (init_decl_processing): Use integer_minus_one_node, not
8975         integer_negative_one_node.
8976         * expr.c (build_java_binop): Likewise.
8977
8978 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
8979
8980         * zextract.c (read_zip_archive): Read file_offset before writing
8981         zipd and consequently clobbering the header contents.
8982
8983 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8984
8985         * Make-lang.in: Remove all dependencies on defaults.h.
8986         * decl.c: Don't include defaults.h.
8987         * expr.c: Likewise.
8988         * parse.y: Likewise.
8989
8990 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8991
8992         * ChangeLog (2001-01-21): Fixed typo.
8993         * class.c (layout_class_method): Code accounting for WFLed
8994         method DECL_NAMEs deleted.
8995         * constant.c (find_methodref_index): Likewise.
8996         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
8997         * java-tree.h (DECL_FUNCTION_WFL): New macro.
8998         (struct lang_decl): New field `wfl'.
8999         (java_get_real_method_name): Prototype deleted.
9000         * mangle.c (mangle_method_decl): Code accounting for WFLed
9001         method DECL_NAMEs deleted.
9002         * parse.h (GET_METHOD_NAME): Macro deleted.
9003         * parse.y (reset_method_name): Deleted.
9004         (method_header): Set DECL_FUNCTION_WFL.
9005         (check_abstract_method_header): Code accounting for WFLed method
9006         DECL_NAMEs deleted.
9007         (java_get_real_method_name): Deleted.
9008         (check_method_redefinition): Code accounting for WFLed method
9009         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
9010         (java_check_regular_methods): Likewise.
9011         (java_check_abstract_methods): Likewise.
9012         (java_expand_classes): Don't call `reset_method_name.'
9013         (search_applicable_method_list): Use DECL_NAMEs instead of
9014         GET_METHOD_NAME.
9015         * typeck.c (lookup_do): Code accounting for WFLed method
9016         DECL_NAMEs deleted.
9017
9018 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
9019
9020         * lex.c (java_read_char): Check for EOF from getc first.
9021
9022 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9023
9024         * class.c (layout_class): Don't lay the superclass out if it's
9025         already being laid out.
9026         * jcf-parse.c (handle_innerclass_attribute): New function.
9027         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
9028         handle_innerclasses_attribute.
9029         (jcf_parse): Don't load an innerclasses if it's already being
9030         laid out.
9031         * jcf-write.c (append_innerclass_attribute_entry): Static
9032         `anonymous_name' and its initialization deleted. `ocii' and `ini'
9033         to be zero for anonymous classes.
9034
9035 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9036
9037         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
9038         necessary.
9039         * jcf-parse.c (set_source_filename): Use
9040         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
9041
9042 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9043
9044         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
9045         gets a unique asm name.
9046
9047 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9048
9049         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
9050         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9051         if necessary.
9052         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
9053         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
9054         * parse.y (lookup_package_type_and_set_next): Deleted.
9055         (resolve_package): Removed unnecessary code.
9056         (find_applicable_accessible_methods_list): `finit$' can't be
9057         inherited.
9058         * verify.c (pop_argument_types): Added missing prototype.
9059
9060 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
9061
9062         * config-lang.in: Disable java by default.
9063
9064 2001-01-23  Tom Tromey  <tromey@redhat.com>
9065
9066         * gcj.texi (Copying): New node.
9067         Added copyright information.
9068
9069 2001-01-21  Per Bothner  <per@bothner.com>
9070
9071         Various fixes to allow compiling a compressed .jar/.zip archive.
9072         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
9073         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
9074         (struct ZipDirectory):  New field zipf points to owning ZipFile.
9075         * jcf.h (struct ZipDirectory):  Add forward declaration.
9076         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
9077         Remove seen_in_zip and zip_offset fields.
9078         (JCF_SEEN_IN_ZIP):  New macro.
9079         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
9080         * jcf-io.c:  Change all ZipFileCache to ZipFile.
9081         (read_zip_member):  New function.
9082         (open_in_zip):  Call read_zip_member.
9083         * jcf-parse.c (find_in_current_zip):  Remove function.
9084         (read_class):  Merge in find_in_current_zip functionality.
9085         Call read_zip_member if needed.
9086         (parse_zip_file_entries):  Use read_zip_member.
9087         (process_zip_dir):  Update for removed and added JCF fields.
9088         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
9089
9090 2001-01-21  Per Bothner  <per@bothner.com>
9091
9092         Minor optimization of static ggc roots.
9093         * jcf-parse.c (parse_roots):  New static field.
9094         (current_field, current_method, current_file_list):  Replace by macros
9095         naming fields of parse_roots.
9096         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
9097         * class.c (class_roots):  New static field.
9098         (registered_class, fields_ident, info_ident, class_list):
9099         New macros naming fields of parse_roots.
9100         (build_static_field_ref):  Don't register roots here.
9101         (layout_class):  Static field list replaced by macro class_list.
9102         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
9103         Initialize fields_ident and info_ident here.
9104
9105 2001-01-21  Per Bothner  <per@bothner.com>
9106
9107         * jcf-parse.c (ggc_mark_jcf):  New function.
9108         (init_jcf_parse):  Register current_jcf as ggc root.
9109
9110 2001-01-21  Per Bothner  <per@bothner.com>
9111
9112         * lang.c (put_decl_node):  Print method's name.
9113
9114 2001-01-21  Per Bothner  <per@bothner.com>
9115
9116         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
9117         (verify_jvm_instructions):  Use it, for better error messages on loads.
9118
9119 2001-01-21  Per Bothner  <per@bothner.com>
9120
9121         * verify.c (merge_type_state):  Still may have to merge even if
9122         LABEL_VERIFIED (label).
9123
9124 2001-01-21  Per Bothner  <per@bothner.com>
9125
9126         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
9127         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
9128
9129 2001-01-19  Per Bothner  <per@bothner.com>
9130
9131         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
9132         if expeting an interface type.  Refines Tom's change of 2000-09-12.
9133
9134 2001-01-18  Per Bothner  <per@bothner.com>
9135
9136         * gcj.texi (Input Options): Mention .java files.
9137
9138 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9139
9140         * lang-options.h (-Wunsupported-jdk11): Removed.
9141         * lang.c (flag_not_overriding): Deleted.
9142         (flag_static_local_jdk1_1): Likewise.
9143         (lang_W_options): Removed "unsupported-jdk11" entry.
9144         * parse.y (java_check_methods): Removed dead code.
9145
9146 2001-01-17  Tom Tromey  <tromey@redhat.com>
9147
9148         Changes suggested by Per Bothner:
9149         * gcj.texi (Input Options): Don't mention input files.
9150         (Code Generation): Updated --main information.
9151         (Invoking jcf-dump): Mention that --javap is incomplete.
9152         From Alexandre Petit-Bianco:
9153         (Warnings): Don't mention -Wunsupported-jdk11.
9154         My stuff:
9155         (Compatibility): Mention JDK 1.2-ness of libraries.
9156         (Resources): Mention resources used when writing gcj.
9157
9158 2001-01-17  Tom Tromey  <tromey@redhat.com>
9159
9160         * gcj.texi: New file.
9161         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
9162         (java.info): Depend on gcj.info.
9163         (java/gcj.dvi): New target.
9164         (java.dvi): Depend on gcj.dvi.
9165         (java.install-info): Wrote.
9166
9167 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
9168
9169         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
9170         having called make_decl_rtl.
9171
9172 2001-01-14  Per Bothner  <per@bothner.com>
9173
9174         Various patches to emit better messages on verification errors.
9175         * expr.c (push_type_0):  Return error indication on stack overflow,
9176         instead of callinfg fatal.
9177         (push_type):  Now just call push_type_0 (nd fatal on overflow).
9178         (pop_type_0):  Return detailed error message (in a char** argument).
9179         (pop_type):  If pop_type_0 fails, print error message.
9180         (pop_argument_types):  Moved to verify.c.
9181         * verify.c (pop_argument_types):  Moved from expr.c.
9182         Return a (possible) error message, rather than void.
9183         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
9184         (verify_jvm_instruction):  Use new macros, improving error messages.
9185         For case OPCODE_astore use object_ptr_type_node.
9186         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
9187         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
9188
9189         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
9190         constant, return body without wrapper.  (Improves constant folding.)
9191         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
9192
9193 2001-01-13  Per Bothner  <per@bothner.com>
9194
9195         * expr.c (expand_java_field_op):  Assigning to a final field outside
9196         an initializer does not violate JVM spec, so should be warning, not
9197         error.  (Sun's verifier does not complain - though MicroSoft's does.)
9198
9199 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
9200
9201         * gjavah.c (version), jcf-dump.c (version): Update copyright year
9202         to 2001.
9203
9204 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
9205
9206         * parse.y (resolve_expression_name): Permit instance variables from
9207         enclosing context in super constructor call.
9208         (resolve_qualified_expression_name): Permit enclosing class's qualified
9209         "this" in super constructor call.
9210
9211 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9212
9213         * class.c (build_utf8_ref): Remove last argument in call to
9214         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9215         (build_class_ref): Likewise.
9216         (build_static_field_ref): Likewise.
9217         (get_dispatch_table): Likewise.
9218         (layout_class_method): Likewise.
9219         (emit_register_classes): Likewise.
9220         * constants.c (build_constant_data_ref): Likewise.
9221         * decl.c (builtin_function): Likewise.
9222         (create_primitive_vtable): Likewise.
9223         * expr.c (build_known_method_def): Likewise.
9224         (build_jni_stub): Likewise.
9225         (java_lang_expand_expr): Likewise.
9226
9227 2001-01-10  Tom Tromey  <tromey@redhat.com>
9228
9229         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
9230
9231 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9232
9233         * java-tree.h (lang_printable_name_wls): New prototype.
9234         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
9235         rather than `current_class' to print type name. Don't prepend type
9236         names when printing constructor names.
9237         (lang_printable_name_wls): New function.
9238         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
9239         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
9240         * parse.y (patch_method_invocation): Message tuned for constructors.
9241         (not_accessible_p): Grant `private' access from within
9242         enclosing contexts.
9243
9244 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9245
9246         All files with updated copyright when applicable.
9247         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
9248         * class.c (mangle_class_field): Function removed.
9249         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
9250         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
9251         (build_class_ref): Call `java_mangle_class_field' instead of
9252         `mangle_class_field.'
9253         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
9254         (layout_class): Call `java_mangle_decl' instead of
9255         `mangle_static_field.'
9256         (cxx_keywords): Initialized static array moved to `lex.c.'
9257         (layout_class_method): Changed leading comment. Simplified to
9258         call `java_mangle_decl.' Local `ptr' moved in for loop body.
9259         * decl.c (lang_mark_tree): Mark field `package_list.'
9260         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
9261         (struct lang_type): New field `package_list.'
9262         (unicode_mangling_length): Prototype removed.
9263         (append_gpp_mangled_name, append_gpp_mangled_classtype,
9264         emit_unicode_mangled_name): Likewise.
9265         (cxx_keyword_p): New prototype.
9266         (java_mangle_decl, java_mangle_class_field,
9267         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
9268         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
9269         `build_expr_wfl.'
9270         * jvgenmain.c (main_method_prefix): Global variable removed.
9271         (main_method_suffix): Likewise.
9272         (do_mangle_classname): New function.
9273         (main): Call it. Format changed to accommodate new mangling scheme.
9274         * lex.c: (utf8_cmp): Conditionally prototyped.
9275         (cxx_keywords): Moved from class.c, conditionally defined.
9276         (utf8_cmp, cxx_keyword_p): Likewise.
9277         * mangle.c (obstack.h, ggc.h): Included.
9278         (mangle_field_decl): New function.
9279         (mangle_method_decl, mangle_type, mangle_pointer_type,
9280         mangle_array_type, mangle_record_type,
9281         find_compression_pointer_match, find_compression_array_match,
9282         find_compression_record_match,
9283         find_compression_array_template_match, set_type_package_list,
9284         entry_match_pointer_p, emit_compression_string, init_mangling,
9285         finish_mangling, compression_table_add, mangle_member_name): Likewise.
9286         (mangle_obstack): New global.
9287         (MANGLE_RAW_STRING): New macro.
9288         (unicode_mangling_length): Turned static.
9289         (append_unicode_mangled_name): Renamed from
9290         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
9291         replaces `obstack', removed from the parameter list.
9292         (append_gpp_mangled_name): Turned static. `mangle_obstack'
9293         replaces parameter `obstack', removed from the parameter list. Call
9294         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
9295         (append_gpp_mangled_classtype): Removed.
9296         (compression_table, compression_next): New static variables.
9297         * parse.y (temporary_obstack): Extern declaration removed.
9298
9299 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9300
9301         * parse.y (patch_binop): Compute missing type in error situations.
9302
9303 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
9304
9305         * class.c (make_class_data): Push initial value for "arrayclass".
9306         * decl.c (init_decl_processing): Add new class field "arrayclass".
9307
9308 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
9309
9310         From patha@softlab.ericsson.se:
9311         * parse.y (switch_label): Use build, not build1, to construct
9312         DEFAULT_EXPR.
9313
9314 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9315
9316         * lang.c (lang_decode_option): Change -MA to -MP.
9317         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
9318         Update to new prototype; do quote targets.
9319         (jcf_dependency_write): Update.
9320
9321 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
9322
9323         Shorten primitive array allocation path:
9324         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
9325         to create new primitive arrays.
9326         * expr.c (build_newarray): If generating native code, call
9327         soft_newarray_node with a reference to the primitive TYPE identifier
9328         instead of type_value.
9329
9330 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
9331
9332         Fix for PRs gcj/312 and gcj/253:
9333         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
9334         dest if they arn't already.
9335         * class.c (layout_class): Call maybe_layout_super_class on
9336         superinterfaces also, but only if compiling from bytecode.
9337
9338         Fix for PR gcj/373:
9339         * parse.y (create_class): Set ACC_STATIC if class is declared in an
9340         interface.
9341
9342 2000-12-15  Tom Tromey  <tromey@redhat.com>
9343
9344         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
9345         set.
9346
9347 2000-12-14  Andrew Haley  <aph@redhat.com>
9348
9349         * boehm.c (mark_reference_fields): Change test to correctly detect
9350         bitmap overflow.
9351
9352 2000-12-15  Andreas Jaeger  <aj@suse.de>
9353
9354         * config-lang.in (lang_dirs): Added.
9355
9356 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9357
9358         * parse.y (end_artificial_method_body): Fixed undefined behavior.
9359         Credits go to rth for finding it.
9360
9361 2000-12-13  Mike Stump  <mrs@wrs.com>
9362
9363         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
9364
9365 2000-11-07  Tom Tromey  <tromey@cygnus.com>
9366
9367         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
9368         * lex.c (java_ignorable_control_p): Removed.
9369         (java_letter_or_digit_p): Removed.
9370         (java_start_char_p): New function.
9371         (java_read_char): Return `int', not `unicode_t'.  Changed
9372         callers.
9373         (java_read_unicode): Likewise.
9374         (java_read_unicode_collapsing_terminators): Likewise.
9375         (java_get_unicode): Likewise.
9376         (java_new_lexer): Initialize hit_eof.
9377         (java_parse_end_comment): Take `int' argument.
9378         (java_parse_doc_section): Likewise.
9379         (java_parse_escape_sequence): Don't allow backlash-newline.
9380         Return `int'.
9381         * lex.h (JAVA_DIGIT_P): Removed.
9382         (_JAVA_LETTER_OR_DIGIT_P): Removed.
9383         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
9384         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
9385         (JAVA_PART_CHAR_P): New macro.
9386         (UEOF): Now -1.
9387         (JAVA_CHAR_ERROR): Now -2.
9388         (java_lexer): New field `hit_eof'.
9389         * chartables.h: New file.
9390         * gen-table.pl: new file.
9391
9392 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9393             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9394
9395         * parse.y (java_complete_lhs): Only allow compound assignment of
9396         reference type if type is String.
9397
9398 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9399
9400         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
9401         jcf-path.c: Likewise.
9402
9403 2000-12-09  Anthony Green  <green@redhat.com>
9404
9405         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
9406         filestart and filename_length as int values.
9407
9408 2000-12-07  Mo DeJong  <mdejong@redhat.com>
9409
9410         * jcf-io.c (find_class): Correct the logic that tests to see if a
9411         .java file is newer than its .class file. The compiler was
9412         incorrectly printing a warning when file mod times were equal.
9413
9414 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
9415
9416         * jvgenmain.c: Use ISPRINT not isascii.
9417
9418 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9419
9420         * parse.y (end_artificial_method_body): Fixed typo.
9421
9422 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9423
9424         * parse.y (patch_method_invocation): Pick the correct enclosing
9425         context when creating inner class instances.
9426         Fixes gcj/332.
9427
9428 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
9429
9430         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9431         Update copyright year to 2000.
9432
9433 2000-11-23  Anthony Green  <green@redhat.com>
9434
9435         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
9436         Move current_file_list out of yyparse and make it static.
9437
9438         * expr.c: Declare quick_stack and tree_list_free_list as static
9439         (init_expr_processing): Register quick_stack and
9440         tree_list_free_list roots.
9441
9442 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9443
9444         * parse.y (build_outer_field_access): New local `decl_ctx', use
9445         it. Check for field's context and current class immediate outer
9446         context inheritance.
9447         (outer_field_access_p): Consider fields inherited from the last
9448         enclosing context.
9449         (build_access_to_thisn): Stop at the last enclosing context if
9450         necessary.
9451         Fixes gcj/367.
9452
9453 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
9454
9455         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
9456
9457 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
9458
9459         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
9460         scratch buffer.
9461
9462 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9463
9464         * jv-scan.c (help): Document --complexity.
9465         (options): Added --complexity.
9466         (flag_complexity): New global.
9467         (main): Call `report'.
9468         * parse-scan.y (complexity): New global.
9469         (if_then_statement, if_then_else_statement,
9470         if_then_else_statement_nsi, switch_block_statement_group,
9471         while_expression, do_statement, for_begin, continue_statement,
9472         throw_statement, catch_clause, finally, method_invocation,
9473         conditional_and_expression, conditional_or_expression,
9474         conditional_expression): Update complexity.
9475         (reset_report): Reset complexity.
9476         (report): New function.
9477
9478 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9479
9480         * lex.c (yylex): Added STRICT_TK case.
9481         * parse.y (STRICT_TK): Added.
9482         * parse-scan.y (STRICT_TK): Added.
9483         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
9484         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
9485         file.
9486         * keyword.h: Rebuilt.
9487         * keyword.gperf (strictfp): Added.
9488
9489 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9490
9491         * lex.c (yylex): Recognize floating point constants with leading
9492         0.
9493
9494 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9495
9496         * java-tree.h (cyclic_inheritance_report): Constify.
9497         * parse.y (cyclic_inheritance_report): Likewise.
9498
9499 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9500
9501         * parse.y (goal): Remove call to ggc_add_string_root.
9502
9503 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9504
9505         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
9506         Create string in scratch buffer, then pass to build_string.
9507
9508 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9509
9510         * parse.y (issue_warning_error_from_context): Add
9511         ATTRIBUTE_PRINTF.
9512
9513 2000-11-11  Anthony Green  <green@redhat.com>
9514
9515         * jcf-parse.c (process_zip_dir): Add finput parameter.
9516         (jcf_figure_file_type): Call process_zip_dir with appropriate
9517         argument.
9518
9519 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9520
9521         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
9522         * jcf-parse.c (jcf_figure_file_type): Likewise.
9523
9524 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9525
9526         * parse.y (create_new_parser_context): Use memset () instead of
9527         bzero ().
9528
9529 2000-11-08  Tom Tromey  <tromey@cygnus.com>
9530
9531         * gjavah.c (process_file): Only include gcj/cni.h when generating
9532         CNI stubs.
9533
9534 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9535
9536         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
9537         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
9538         instead of bzero ().
9539
9540 2000-11-05  Tom Tromey  <tromey@cygnus.com>
9541
9542         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
9543         * lex.c (IS_ZERO): New define.
9544         (java_perform_atof): Error on floating point underflow.
9545
9546 2000-11-04  Tom Tromey  <tromey@cygnus.com>
9547
9548         * lex.c (java_parse_escape_sequence): Only read two octal
9549         characters if the first one is greater than 3.  Don't allow
9550         "octal" numbers to include the digits 8 or 9.
9551
9552 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9553
9554         * Make-lang.in (java.distdir): Remove.
9555
9556 2000-11-03  Tom Tromey  <tromey@cygnus.com>
9557
9558         * Make-lang.in (java.dvi): New target.
9559         Partial fix for PR other/567.
9560
9561         * lang-options.h: Mention -Wout-of-date.
9562         * jcf-dump.c (flag_newer): New global.
9563         * gjavah.c (flag_newer): New global.
9564         * jcf-io.c (find_class): Only warn when flag_newer set.
9565         * lang.c (flag_newer): New global.
9566         (struct string_option): New declaration.
9567         (lang_W_options): New global.
9568         (process_option_with_no): New function.
9569         (lang_decode_option): Use it.
9570
9571         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
9572         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
9573         `$'.
9574
9575         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
9576         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
9577         * lex.c (java_read_unicode): Removed `term_context' argument.
9578         Recognize any number of `u' in `\u'.
9579         (java_read_unicode_collapsing_terminators): New function.
9580         (java_get_unicode): Use it.
9581         (java_lineterminator): Removed.
9582         (yylex): Produce error if character literal is newline or single
9583         quote.  Return if eof found in middle of `//' comment.  EOF in
9584         `//' comment is only an error if pedantic.
9585         (java_ignorable_control_p): New function.
9586         (java_parse_end_comment): Return if eof found in middle of
9587         comment.
9588         Include flags.h.
9589         * jv-scan.c (pedantic): New global.
9590
9591 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9592
9593         * parse.y (outer_field_access_p): Inherited fields aren't
9594         consider outer fields.
9595         (maybe_build_thisn_access_method): Use
9596         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
9597         (resolve_expression_name): Trigger an error if a static field
9598         is being accessed as an outer field.
9599
9600 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9601
9602         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
9603         Fixes gcj/365.
9604
9605 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9606
9607         * Make-lang.in: Move all build rules here from Makefile.in,
9608         adapt to new context.  Wrap all rules that change the current
9609         directory in parentheses.  Expunge all references to $(P).
9610         When one command depends on another and they're run all at
9611         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9612         all object-file generation rules.  Delete obsolete variables.
9613
9614         * Makefile.in: Delete.
9615         * config-lang.in: Delete outputs= line.
9616
9617 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9618
9619         * parse.y (patch_method_invocation): NULLify this_arg when already
9620         inserted.
9621         (maybe_use_access_method): Handle call to methods unrelated to the
9622         current class. Fixed comment.
9623         Fixes gcj/361.
9624
9625 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9626
9627        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
9628        scope.
9629
9630 2000-10-24  Tom Tromey  <tromey@cygnus.com>
9631
9632         * lex.c (java_new_lexer): Initialize new fields.  Work around
9633         broken iconv() implementations.
9634         (java_read_char): Swap bytes if required.  Use fallback decoder if
9635         required.
9636         (byteswap_init, need_byteswap): New globals.
9637         (java_destroy_lexer): Only close iconv handle if it is in use.
9638         * lex.h (java_lexer): New fields read_anything, byte_swap,
9639         use_fallback.
9640         Made out_buffer unsigned.
9641
9642 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9643
9644         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
9645         where an enclosing context can be set on the jdep.
9646         (do_resolve_class): Fixed identation.
9647
9648 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9649
9650         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
9651
9652         * jcf-reader.c (peek_attribute, skip_attribute): Only define
9653         when requested.
9654
9655         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
9656
9657         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
9658
9659 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9660
9661         * jcf-write.c (OP1): Update `last_bc'.
9662         (struct jcf_block): Fixed indentation and typo in comments.  New
9663         field `last_bc'.
9664         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
9665         follows `monitorenter'.
9666         * parse.y (patch_synchronized_statement): New local `tmp'. Call
9667         `patch_string'.
9668         Fixes gcj/232.
9669
9670 2000-10-16  Tom Tromey  <tromey@cygnus.com>
9671
9672         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
9673         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
9674         * lang-options.h: Added -MA, -MT, -MF..
9675         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
9676         (DEPEND_TARGET_SET): New macro.
9677         (DEPEND_FILE_ALREADY_SET): Likewise.
9678         (init_parse): Handle new flags.
9679         * jcf.h (jcf_dependency_print_dummies): Declare.
9680         * Make-lang.in (s-java): Added mkdeps.o.
9681         * Makefile.in (BACKEND): Added mkdeps.o.
9682         (../gcjh$(exeext)): Added mkdeps.o.
9683         (../jcf-dump$(exeext)): Added mkdeps.o.
9684         * jcf-depend.c: Include mkdeps.h.
9685         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
9686         add_entry): Removed.
9687         (jcf_dependency_reset): Rewrote.
9688         (dependencies): New global.
9689         (jcf_dependency_set_target): Rewrote.
9690         (jcf_dependency_add_target): Likewise.
9691         (jcf_dependency_add_file): Likewise.
9692         (munge): Removed.
9693         (print_ents): Removed.
9694         (jcf_dependency_write): Rewrote.
9695         (print_dummies): New global.
9696         (jcf_dependency_print_dummies): New function
9697         (jcf_dependency_write): Call deps_dummy_targets if required.
9698
9699 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9700
9701         * gjavah.c (add_class_decl): Removed unused variables `tname',
9702         `tlen' and `name_index'.
9703         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
9704         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
9705         in `wfl_operator' with value.
9706         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
9707         (jcf_figure_file_type): Fixed identation.
9708         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
9709         * parse.y (analyze_clinit_body): New function.
9710         (static_initializer:): Reset `current_static_block'.
9711         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
9712         `wfl_operator' with new value.
9713         (lookup_cl): Use EXPR_WFL_FILENAME.
9714         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
9715         analyze_clinit_body.
9716         (build_outer_field_access): Access to this$<n> built from
9717         current_class, not its outer context.
9718         (build_access_to_thisn): Fixed leading comment. Tidied things up.
9719         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
9720         (patch_method_invocation): Use `is_static_flag' when already
9721         initialized.
9722         (patch_newarray): Removed assignment in ternary operator.
9723
9724 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9725
9726         * except.c (free_eh_ranges): Don't free `whole_range'.
9727
9728 2000-10-15  Anthony Green  <green@redhat.com>
9729
9730         * decl.c (init_decl_processing): Call init_class_processing before
9731         anything else.
9732
9733 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9734
9735         * check-init.c (check_init): Fixed leading comment. Use
9736         LOCAL_FINAL_P.
9737         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9738         (give_name_to_locals): Likewise.
9739         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
9740         fields in lang_decl_var.
9741         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
9742         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
9743         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
9744         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
9745         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
9746         (LOCAL_FINAL): Rewritten.
9747         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
9748         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
9749         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
9750         `init_final' fields.
9751         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
9752         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
9753         (TYPE_HAS_FINAL_VARIABLE): New macro.
9754         (struct lang_type): Added `afv' field.
9755         * parse.y (check_static_final_variable_assignment_flag): New function.
9756         (reset_static_final_variable_assignment_flag): Likewise.
9757         (check_final_variable_local_assignment_flag): Likewise.
9758         (reset_final_variable_local_assignment_flag): Likewise.
9759         (check_final_variable_indirect_assignment): Likewise.
9760         (check_final_variable_global_assignment_flag): Likewise.
9761         (add_inner_class_fields): Use LOCAL_FINAL_P.
9762         (register_fields): Handle local finals and final variables.
9763         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
9764         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9765         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9766         on local finals.
9767         (java_complete_expand_methods): Loop to set
9768         TYPE_HAS_FINAL_VARIABLE. Call
9769         `reset_final_variable_local_assignment_flag' and
9770         `check_final_variable_local_assignment_flag' accordingly before
9771         and after constructor expansion. Call
9772         `reset_static_final_variable_assignment_flag'
9773         before expanding <clinit> and after call
9774         `check_static_final_variable_assignment_flag' if the
9775         current_class isn't an interface. After all methods have been
9776         expanded, call `check_final_variable_global_assignment_flag' and
9777         `check_static_final_variable_assignment_flag' if the current class
9778         is an interface.
9779         (maybe_yank_clinit): Fixed typo in comment.
9780         (build_outer_field_access_methods): Removed old sanity check. Use
9781         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9782         Don't create access methods for finals.
9783         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
9784         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
9785         existing DECL_INIT has been processed.
9786         (java_complete_lhs): Likewise.
9787         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
9788         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
9789         logic.
9790         (patch_assignment): Use LOCAL_FINAL_P.
9791         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
9792         DECL_INITIAL is nullified.
9793         Fixes gcj/163.
9794
9795 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9796
9797         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
9798
9799         * Makefile.in (parse.c, parse-scan.c): Likewise.
9800
9801 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9802
9803         * class.c (temporary_obstack): Remove.
9804         (make_class): Don't mess with obstascks.
9805         (push_class): Likewise.
9806         (set_super_info): Likewise.
9807         (add_method_1): Likewise.
9808         (add_method): Likewise.
9809         (add_field): Likewise.
9810         (build_utf8_ref): Likewise.
9811         (build_class_ref): Likewise.
9812         (build_static_field_ref): Likewise.
9813         (finish_class): Likewise.
9814         (push_super_field): Likewise.
9815         (layout_class): Likewise.
9816         (layout_class_methods): Likewise.
9817         (init_class_processing): Likewise.
9818         * constants.c (get_tag_node): Likewise.
9819         (build_constant_data_ref): Likewise.
9820         * decl.c (ggc_p): Remove.
9821         (copy_lang_decl): Use ggc_alloc.
9822         (complete_start_java_method): Don't mess with obstacks.
9823         (start_java_method): Likewise.
9824         (end_java_method): Likewise.
9825         * except.c (link_handler): Use xmalloc.
9826         (free_eh_ranges): New function.
9827         (method_init_exceptions): Use it.
9828         (add_handler): Use xmalloc.
9829         (expand_start_java_handler): Don't mess with obstacks.
9830         (prepare_eh_table_type): Likewise.
9831         (expand_end_java_handler): Likewise.
9832         * expr.c (push_value): Likewise.
9833         (create_label_decl): Likewise.
9834         (build_jni_stub): Likewise.
9835         (java_lang_expand_expr): Likewise.
9836         (note_instructions): Use xrealloc.
9837         (java_push_constant_from_pool): Don't mess with obstacks.
9838         (process_jvm_instruction): Likewise.
9839         * java-tree.h (cyclic_inheritance_report): Remove duplicate
9840         declaration.
9841         * jcf-parse.c (get_constant): Don't mess with obstacks.
9842         (read_class): Likewise.
9843         (jcf_parse): Likewise.
9844         * lex.c (expression_obstack): Remove.
9845         (java_lex): Don't use obstack_free.
9846         * parse.h (exit_java_complete_class): Don't mess with obstacks.
9847         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
9848         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
9849         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
9850         * parse.y (gaol): Add more GC roots.
9851         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
9852         (lookup_field_wrapper): Likewise.
9853         (obtain_incomplete_type): Don't mess with obstacks.
9854         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
9855         macros.
9856         (craft_constructor): Don't mess with obstacks.
9857         (safe_layout_class): Likewise.
9858         (java_complete_class): Likewise.
9859         (source_end_java_method): Likewise.
9860         (build_outer_field_access_methods): Likewise.
9861         (build_outer_method_access_method): Likewise.
9862         (maybe_build_thisn_access_method): Likewise.
9863         (build_dot_class_method_invocation): Likewise.
9864         (java_complete_tree): Likewise.
9865         (java_complete_lhs): Likewise.
9866         (do_merge_string_cste): Likewise.
9867         (patch_string_cst): Likewise.
9868         (array_constructor_check_entry): Likewise.
9869         * typeck.c (build_java_array_type): Likewise.
9870         (parse_signature_string): Likewise.
9871         (build_java_signature): Likewise.
9872
9873 2000-10-12  Tom Tromey  <tromey@cygnus.com>
9874
9875         Fix for PR gcj/356:
9876         * gjavah.c (add_class_decl): Don't special-case inner classes.
9877         (add_namelet): Likewise.
9878
9879 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
9880
9881         * java-tree.h: Constify current_encoding.
9882         * lang.c: Constify current_encoding.
9883
9884 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
9885
9886         * jvgenmain.c (class_mangling_suffix): Omit `.'.
9887         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
9888
9889 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9890
9891         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
9892         patch. Fixes gcj/340.
9893
9894 2000-10-10  Tom Tromey  <tromey@cygnus.com>
9895
9896         * lex.c (java_new_lexer): Initialize out_first and out_last
9897         fields.
9898         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
9899
9900 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9901
9902         * parse.y (pop_current_osb): New function.
9903         (array_type:): Use `dims:', changed actions
9904         accordingly. Suggested by Anthony Green.
9905         (array_creation_expression:): Used pop_current_osb.
9906         (cast_expression:): Likewise.
9907         (search_applicable_method_list): Fixed indentation.
9908
9909 2000-10-08  Anthony Green  <green@redhat.com>
9910
9911         * parse.y (array_type_literal): Remove production.
9912         (type_literals): Refer to array_type, not array_type_literal.
9913
9914 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9915
9916         Patch contributed by Corey Minyard.
9917         * decl.c (check_local_named_variable): New function.
9918         (tree check_local_unnamed_variable): Likewise.
9919         (find_local_variable): Splitted. Call check_local_{un}named_variable.
9920
9921 2000-10-07  Anthony Green  <green@redhat.com>
9922
9923         * class.c (layout_class): Handle case where superclass can't be
9924         layed out yet.
9925
9926 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9927
9928         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
9929         gperf.
9930
9931 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9932
9933         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
9934         * jvgenmain.c (class_mangling_prefix): Removed.
9935         (class_mangling_suffix): New global.
9936         (main): Use it.
9937         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
9938         `$'.
9939         (print_method_info): Handle overrides for static and final
9940         methods.
9941         (process_file): Generate declaration for class object field.
9942         * class.c (cxx_keywords): New array.
9943         (utf8_cmp): New function.
9944         (cxx_keyword_p): New function.
9945         (layout_class_method): Mangle C++ keywords by appending `$'.
9946         (mangle_field): New function.
9947         (mangle_class_field): Use mangle_field.  Mangle class name as
9948         `class$'.
9949         (mangle_static_field): Use mangle_field.
9950
9951 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9952
9953         * decl.c (find_local_variable): Removed uncessary type check and
9954         fixed range check typo. From Corey Minyard.
9955
9956 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9957
9958         * decl.c (give_name_to_locals): New local `code_offset'. Call
9959         `maybe_adjust_start_pc'.
9960         * expr.c (note_instructions): New function.
9961         (expand_byte_code): Don't collect insn starts here.
9962         (peek_opcode_at_pc): New function.
9963         (maybe_adjust_start_pc): Likewise.
9964         * java-tree.h (maybe_adjust_start_pc): Declare.
9965         (note_instructions): Likewise.
9966         * jcf-parse.c (parse_class_file): Call `note_instructions'.
9967
9968 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9969
9970         * parse.y (field_access:): Fixed indentation.
9971         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
9972
9973 2000-09-07  Tom Tromey  <tromey@cygnus.com>
9974
9975         Fix for PR gcj/307:
9976         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
9977         JPRIMITIVE_TYPE_P, for arithmetic operators.
9978         (patch_method_invocation): Indentation fix.
9979         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
9980         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
9981         (do_unary_numeric_promotion): Cleaned up code.
9982         (valid_cast_to_p): Handle boolean correctly.
9983
9984 2000-09-27  Tom Tromey  <tromey@cygnus.com>
9985
9986         * lex.c (java_read_unicode): Reset bs_count when finished with
9987         `\u' sequence.
9988
9989 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9990
9991         Convert to GC.
9992         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
9993         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
9994         (typeck.o): Depend on ggc.h.
9995         * class.c (add_method_1): Use GC functions for allocation.
9996         (init_class_processing): Register roots.
9997         * decl.c (ggc_p): Set to 1.
9998         (pending_local_decls): Make it static.
9999         (push_jvm_slot): Use GC functions for allocation.
10000         (init_decl_processing): Register roots.
10001         (give_name_to_locals): Use GC functions for allocation.
10002         (lang_mark_tree): New function.
10003         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
10004         functions for allocation.
10005         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
10006         * lex.c (java_lex): Use build_string, rather than replicating it
10007         inline.
10008         * parse.y (goal): Add more roots.
10009         (mark_parser_ctxt): New function.
10010         * typeck.c: Include ggc.h.
10011
10012 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10013
10014         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
10015         contains something else than MODIFY_EXPR.
10016
10017 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
10018
10019         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
10020         * Makefile.in (parse.o): Depend on ggc.h.
10021         (class.o): Likewise.
10022         (constants.o): Likewise.
10023         (decl.o): Likewise.
10024         (expr.o): Likewise.
10025         (jcf-parse.o): Likewise.
10026         (jcf-write.o): Likewise.
10027         (mangle.o): Likewise.
10028         * class.c: Include ggc.h.
10029         (build_static_field_ref): Register GC roots.
10030         (layout_class): Likewise.
10031         (init_class_processing): Likewise.
10032         * constants.c: Include ggc.h.
10033         (current_constant_pool_data_ref): Remove.
10034         (tag_nodes): Move it to ...
10035         (get_tag_node): ... here.  Register GC roots.
10036         * decl.c: Include ggc.h.  Remove many global tree definitions.
10037         (throw_node): Define.
10038         (java_global_trees): Likewise.
10039         (predef_filenames): Make the size a constant.
10040         (init_decl_processing): Adjust accordingly.
10041         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
10042         * expr.c: Include ggc.h.
10043         (init_expr_processing): Register GC roots.
10044         (build_invokeinterface): Likewise.
10045         * java-tree.h: Replace extern tree declarations with macros.
10046         (java_global_trees): New variable.
10047         (java_tree_index): New enumeration.
10048         (init_jcf_parse): Declare.
10049         * jcf-parse.c: Include ggc.h.
10050         (current_class): Remove declaration.
10051         (main_class): Likewise.
10052         (all_class_list): Likewise.
10053         (predefined_filename_p): Adjust for constant size of
10054         predef_filenames.
10055         (init_jcf_parse): New function.
10056         * jcf-write.c: Include ggc.h.
10057         (generate_classfile): Register GC roots.
10058         (append_synthetic_attribute): Likewise.
10059         (append_innerclass_attribute_entry): Likewise.
10060         * lang.c: Include ggc.h.
10061         (lang_print_error): Register GC roots.
10062         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
10063         with macros.
10064         * parse.y: Include ggc.h.
10065         (wfl_operator): Remove.
10066         (goal): Register GC roots.
10067         (java_pop_parser_context): Adjust for new field names.
10068         (java_parser_context_save_global): Likewse.
10069         (java_parser_context_restore_global): Likewise.
10070         (java_parser_context_suspend): Likewise.
10071         (java_parser_context_resume): Likewise.
10072         (verify_constructor_circularity): Register GC roots.
10073         (lookup_cl): Likewise.
10074         (java_reorder_fields): Likewise.
10075         (build_current_this): Likewise.
10076         (class_in_current_package): Likewise.
10077         (argument_types_convertible): Likewise.
10078         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
10079
10080 2000-09-14  Tom Tromey  <tromey@cygnus.com>
10081
10082         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
10083
10084 2000-09-13  Tom Tromey  <tromey@cygnus.com>
10085
10086         * jcf-parse.c: Include <locale.h>.
10087         * jv-scan.c: Include <locale.h>.
10088
10089 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10090
10091         * expr.c (pop_type_0): Return `Object' if trying to merge two
10092         interface types.
10093         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
10094         interface types; `Object' is always a valid supertype.
10095
10096 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10097
10098         Fix for PR gcj/33:
10099         * jv-scan.c (help): Document --encoding.
10100         (options): Added `encoding' entry.
10101         (OPT_ENCODING): New define.
10102         (main): Handle --encoding.
10103         Include <langinfo.h> if nl_langinfo exists.
10104         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
10105         --encoding.
10106         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
10107         (parse_source_file): Correctly call java_init_lex.  Added `finput'
10108         argument.  Use nl_langinfo to determine default encoding.
10109         * java-tree.h (current_encoding): Declare.
10110         * parse.y (java_parser_context_restore_global): Don't restore
10111         `finput'.
10112         (java_parser_context_save_global): Don't set `finput' field.
10113         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
10114         if required.
10115         * lang.c (current_encoding): New global.
10116         (lang_decode_option): Recognize `-fencoding='.
10117         (finish_parse): Don't close finput.
10118         * parse.h (struct parser_ctxt): Removed `finput' and
10119         `unget_utf8_value' fields.  Added `lexer' field.
10120         (java_init_lex): Fixed declaration.
10121         * lex.c (java_new_lexer): New function.
10122         (java_destroy_lexer): Likewise.
10123         (java_read_char): Added `lex' argument.  Handle iconv case.
10124         (java_read_unicode): Added `lex' argument.  Count backslashes in
10125         lexer structure.
10126         (java_init_lex): Added `finput' and `encoding' arguments.  Set
10127         `lexer' field in ctxp.
10128         (BAD_UTF8_VALUE): Removed.
10129         (java_lex): Handle seeing UEOF in the middle of a string literal.
10130         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
10131         (java_lexer): New structure.
10132         (UNGETC): Removed.
10133         (GETC): Removed.
10134         (DEFAULT_ENCODING): New define.
10135         (java_destroy_lexer): Declare.
10136
10137 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10138
10139         Fix for PR gcj/343:
10140         * lex.c (java_init_lex): Initialize java_io_serializable.
10141         * parse.y (java_io_serializable): New global.
10142         (valid_ref_assignconv_cast_p): An array can be cast to
10143         serializable.
10144
10145 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10146
10147         * decl.c, expr.c: Include defaults.h if not already included.
10148         Don't define the *_TYPE_SIZE macros.
10149
10150 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
10151
10152         * typeck.c (build_java_array_type): Correct first parameter
10153         in ADJUST_FIELD_ALIGN invocation.
10154
10155 2000-09-06  Tom Tromey  <tromey@cygnus.com>
10156
10157         * lang-specs.h: Also recognize `-femit-class-files'.
10158
10159 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10160
10161         * verify.c (merge_types): Load the types to merge if necessary.
10162
10163 2000-09-02  Anthony Green  <green@redhat.com>
10164
10165         * jcf-io.c: Include zlib.h.
10166         (open_in_zip): Read compressed class file archives.
10167         * zipfile.h (ZipDirectory): Add uncompressed_size and
10168         compression_method fields.
10169         * zextract.c (read_zip_archive): Collect file compression info.
10170
10171 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
10172
10173         * parse.y (do_resolve_class): Also explore superclasses of
10174         intermediate enclosing contexts when searching for inner classes.
10175
10176 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10177
10178         * parse.y (variable_declarator_id:): Better error message.
10179         (expression_statement:): Use YYNOT_TWICE.
10180         (cast_expression:): Likewise.
10181         (assignment:): Likewise.
10182
10183 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10184
10185         * parse.y (do_merge_string_cste): New locals. Create new
10186         STRING_CSTs each time, use memcpy. Fixes gcj/311.
10187
10188 2000-08-07  Hans Boehm  <boehm@acm.org>
10189
10190         * boehm.c (mark_reference_fields): Set marking bits for all words in
10191         a multiple-word record.
10192         (get_boehm_type_descriptor): Use the procedure marking descriptor for
10193         java.lang.Class.
10194
10195 2000-08-31  Mike Stump  <mrs@wrs.com>
10196
10197         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
10198         jcf-dump$(exeext)): Make parallel safe.
10199
10200 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10201
10202         * jcf-parse.c (set_source_filename): Constify a char *.
10203         * jcf-write.c (append_innerclasses_attribute,
10204         make_class_file_name): Constify a char *.  Don't recycle a
10205         variable for an unrelated purpose.
10206         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
10207         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
10208
10209 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10210
10211         * expr.c (can_widen_reference_to): Fixed indentation.
10212         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
10213         * parse.y: `finit$' replaces `$finit$' in comments.
10214         (try_builtin_assignconv): Fixed leading comment.
10215
10216 2000-08-25  Greg McGary  <greg@mcgary.org>
10217
10218         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
10219
10220 2000-08-24  Greg McGary  <greg@mcgary.org>
10221
10222         * lang.c (lang_decode_option): Use ARRAY_SIZE.
10223         * parse.y (BINOP_LOOKUP): Likewise.
10224
10225 2000-08-22  Andrew Haley  <aph@cygnus.com>
10226
10227         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
10228         sign extending. Fixes gcj/321.
10229         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
10230         combining to make a jlong. Fixes gcj/321.
10231
10232 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10233
10234         * lang-specs.h: Do not process -o or run the assembler if
10235         -fsyntax-only.
10236
10237 2000-08-16  Andrew Haley  <aph@cygnus.com>
10238
10239         * typeck.c (build_java_array_type): Rewrite code to do array
10240         alignment.  Take into account back-end macros when aligning array
10241         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
10242         user to set alignment. Fixes gcj/252 and 160.
10243
10244 2000-08-09  Tom Tromey  <tromey@cygnus.com>
10245
10246         * parse.y (check_abstract_method_definitions): Now return `int'.
10247         Check implemented interfaces.  Fixes PR gcj/305.
10248
10249         * parse.y (patch_switch_statement): Disallow `long' in switch
10250         expressions.  Fixes PR gcj/310.
10251
10252 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10253
10254         * decl.c (finit_leg_identifier_node): New global.
10255         (init_decl_processing): Use `finit$' to initialize
10256         finit_identifier_node. Use `$finit$' to initialize
10257         finit_leg_identifier_node.
10258         * expr.c (expand_java_field_op): Use ID_FINIT_P.
10259         * java-tree.h (finit_identifier_node): Changed attached comment.
10260         (finit_leg_identifier_node): New declaration.
10261         (ID_FINIT_P): Take finit_identifier_node and
10262         finit_leg_identifier_node into account. This is a backward
10263         compatibility hack.
10264
10265 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10266
10267         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
10268         Jan 6 2000 patch.
10269         (generate_bytecode_insns): Check `nargs' before emitting it.
10270         * verify.c (merge_type_state): Fixed typo.
10271         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
10272         generate_bytecode_{conditional,insns}.
10273
10274 2000-08-13  Anthony Green  <green@redhat.com>
10275
10276         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
10277         for -pg builds).
10278
10279 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10280
10281         * class.c (maybe_layout_super_class): Fixed indentation.
10282         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
10283         (java_check_methods): New function declaration.
10284         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
10285         instead of `str_ptr'.
10286         * jcf-write.c (generate_bytecode_insns): Emit number the of args
10287         of a `invokeinterface' at the right time.
10288         * parse.h (WFL_STRIP_BRACKET): New macro.
10289         (SET_TYPE_FOR_RESOLUTION): Use it.
10290         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
10291         (check_class_interface_creation): Don't check for cross package
10292         innerclass name clashes.
10293         (method_header): Behave properly if MDECL is `error_mark_node'.
10294         (method_declarator): Return `error_mark_node' if bogus current
10295         class.
10296         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
10297         (resolve_and_layout): New local `decl_type', set and used. Call
10298         java_check_methods.
10299         (java_check_methods): New method.
10300         (java_layout_classes): Use it.
10301         (resolve_qualified_expression_name): No EH check necessary in
10302         access$<n>.
10303         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
10304         `case' statement.
10305         (patch_assignment): Set DECL_INITIAL on integral final local.
10306
10307 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10308
10309         * java-tree.h (flag_extraneous_semicolon): New extern.
10310         * lang-options.h: (-Wextraneous-semicolon): New option.
10311         * lang.c (flag_redundant): Fixed typo in leading comment.
10312         (flag_extraneous_semicolon): New global.
10313         (lang_decode_option): Set `flag_extraneous_semicolon' when
10314         -Wall. Decode `-Wextraneous-semicolon'.
10315         * parse.y (type_declaration:): Removed `SC_TK' hack, added
10316         `empty_statement' rule.
10317         (class_body_declaration): Likewise.
10318         (method_body:): Accept `;' as a method body.
10319         (static_initializer:): Removed `SC_TK' hack.
10320         (constructor_block_end:): Likewise.
10321         (empty_statement:): Report deprecated empty declaration. Fixes
10322         gcj/295
10323
10324 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10325
10326         * parse.y (build_dot_class_method_invocation): Changed parameter
10327         name to `type'. Build signature from `type' and convert it to a
10328         STRING_CST if it's an array.
10329         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
10330         to use `ref_type' directly.
10331
10332 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
10333
10334         * lang-options.h: Added a comma after the last element to avoid
10335         syntax errors when other languages define additional options.
10336
10337 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10338
10339         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
10340         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
10341         (jc1): Link with $(BACKEND).
10342         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
10343
10344 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10345
10346         * jvspec.c: Adjust type of second argument to
10347         lang_specific_driver, and update code as necessary.
10348
10349         * class.c (build_dtable_decl): Initialize dummy.
10350
10351 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10352
10353         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
10354         method bodies not to rule out discarding `<clinit>'; don't use
10355         <clinit> to initialize static fields with constant initializers.
10356
10357 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10358
10359         * gjavah.c (print_method_info): Added `synth' parameter. Skip
10360         synthetic methods.
10361         (method_synthetic): New global.
10362         (HANDLE_METHOD): Recognize synthetic method and tell
10363         `print_method_info' about it.
10364         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
10365         processing a synthetic method.
10366         * jcf-reader.c (skip_attribute): New function.
10367         ( skip_attribute): Likewise.
10368
10369 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10370
10371         * parse.y (build_outer_field_access): Fixed comments.
10372         (fix_constructors): Emit the initialization of this$<n> before
10373         calling $finit$.
10374         (resolve_qualified_expression_name): Build an access to `decl' if
10375         necessary.
10376
10377 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10378
10379         * parse-scan.y (curent_class): Non longer const.
10380         (inner_qualifier, inner_qualifier_length): Deleted.
10381         (current_class_length): New global.
10382         (bracket_count): Fixed typo in leading comment.
10383         (anonymous_count): New global.
10384         (class_instance_creation_expression:): Handle anonymous classes.
10385         (anonymous_class_creation:): New rule.
10386         (push_class_context): Rewritten.
10387         (pop_class_context): Likewise.
10388         (INNER_QUALIFIER): Macro deleted.
10389         (report_class_declaration): call `push_class_context' when
10390         entering the function. `fprintf' format modified not to use
10391         INNER_QUALIFIER.
10392         (report_class_declaration): Assign `package_name' and
10393         `current_class' to NULL separately.
10394
10395 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10396
10397         * expr.c (build_invokeinterface): Call layout_class_methods on
10398         target interface.
10399
10400 2000-07-27  Tom Tromey  <tromey@cygnus.com>
10401             Anthony Green  <green@cygnus.com>
10402             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10403
10404         * class.c (make_class_data): Create vtable for abstract classes.
10405         (get_dispatch_table): Changed to cope with abstract classes.
10406
10407 2000-07-27  Tom Tromey  <tromey@cygnus.com>
10408
10409         * parse.y (patch_method_invocation): Don't reverse the argument
10410         list when dealing with anonymous class constructors. Fixed typo in
10411         comment.
10412
10413 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10414
10415         * parse.y (build_alias_initializer_parameter_list): Reverse
10416         crafted list when building aliases for anonymous class
10417         constructors.
10418
10419 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10420
10421         * parse.y (jdep_resolve_class): Don't bother checking potential
10422         innerclass access if `decl' is NULL.
10423         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
10424         WFL.
10425
10426 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10427
10428         * parse.c: Remove (again.)
10429
10430 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10431
10432         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
10433         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
10434         outside the `if' statement, alias to innerclass removed, `decl'
10435         used to mark the class complete.
10436
10437 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10438
10439         * parse.y (simple_name:): Fixed typo in error message.
10440
10441 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10442
10443         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
10444         or its first operand can be error marks.
10445
10446 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10447
10448         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
10449         * parse.y (method_header): Likewise.
10450
10451 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10452
10453         * parse.y (process_imports): Consider that one might be trying to
10454         import an innerclass. Fixes gcj/254
10455
10456 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10457
10458         * parse.y (find_as_inner_class): Handle the case where the
10459         enclosing context of an innerclass has been loaded as bytecode.
10460
10461 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10462
10463         * parse.y (simple_name:): Reject `$' in type names.
10464         (resolve_type_during_patch): Use `type' as a second
10465         argument to resolve_no_layout. Fixes gcj/257.
10466
10467 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
10468
10469         * parse.y (find_most_specific_methods_list): Select the only
10470         non-abstract method even if max has been set.
10471         Fixes gcj/285, gcj/298.
10472
10473 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
10474
10475         * lang-specs.h: Added %(jc1) to java compiler options.
10476
10477 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10478
10479         * .cvsignore: New file.
10480
10481 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10482
10483         * parse.y (not_accessible_p): Access granted to innerclasses
10484         (indirectly) extending the reference type. Fixes gcj/249.
10485
10486 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10487
10488         * parse.y (patch_method_invocation): Fixed comment.
10489         (maybe_use_access_method): Build this$<n>s to the context of the
10490         target method, or a type that extends it. Fixes gcj/242.
10491
10492 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10493
10494         * parse.c: Remove.
10495
10496 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10497
10498         * parse.y (fold_constant_for_init): Avoid bullish conversion.
10499
10500 2000-07-13  Tom Tromey  <tromey@cygnus.com>
10501
10502         * lang-specs.h: Added %{I*}.
10503
10504 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10505
10506         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10507
10508 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10509
10510         * parse-scan.c: Remove.
10511
10512 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10513
10514         * class.c (set_super_info): Handled protected inner classes.
10515         (common_enclosing_context_p): Bail early if arguments aren't both
10516         inner classes.
10517         (get_access_flags_from_decl): Handle private and protected inner
10518         classes.
10519         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
10520         (CLASS_PROTECTED): Likewise.
10521         (struct lang_type): New bitfield `poic'.
10522         * parse.y (jdep_resolve_class): Call check_inner_class_access on
10523         inner classes only.
10524         (check_inner_class_access): Renamed arguments, added
10525         comments. Handles protected inner classes (fixes gcj/225)
10526         (not_accessible_p): Fixed comments. Avoid handling inner classes.
10527
10528 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10529
10530         * parse.y (resolve_qualified_expression_name): Verify qualified
10531         access to `this'. Fixes gcj/239.
10532
10533 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10534
10535         * jcf-write.c (generate_classfile): Don't install ConstantValue
10536         for null pointers.
10537
10538 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10539
10540         * parse.y (resolve_qualified_expression_name): Handle inner class
10541         access. Fixes gcj/256.
10542
10543 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10544
10545         * jcf-write.c (generate_classfile): Properly install the
10546         ConstantValue attribute and the initial value constant pool index
10547         on string constants.
10548         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
10549         class files.
10550
10551 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10552
10553         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
10554         construct.
10555         * parse.y (find_as_inner_class): Fixed typo.
10556         (do_resolve_class): Explore enclosing contexts when searching for
10557         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
10558         (check_inner_class_access): Check `decl' which can be null in case
10559         of previous errors.
10560
10561 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10562
10563         * java-tree.h (java_debug_context): Declared `extern'.
10564         (safe_layout_class): Likewise.
10565         * parse.y (resolve_field_access): Field must be `static' in order
10566         to be replaced by its initial value. Added comments.
10567         (find_applicable_accessible_methods_list): Fixed typo.
10568         (find_most_specific_methods_list): Methods found in innerclasses
10569         take over methods founds in the enclosing contexts.
10570         (java_complete_tree): Loosen restrictions on the type of DECLs
10571         that can be replaced by their initialization values.
10572         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
10573
10574 2000-07-05  Tom Tromey  <tromey@cygnus.com>
10575
10576         * Make-lang.in (PARSE_DIR): New macro.
10577         (PARSE_RELDIR): Likewise.
10578         (PARSE_C): Likewise.
10579         (PARSE_SCAN_C): Likewise.
10580         ($(PARSE_C)): New target.
10581         ($(PARSE_SCAN_C)): Likewise.
10582         (SET_BISON): New macro.
10583         (BISONFLAGS): Likewise.
10584         (JAVABISONFLAGS): Likewise.
10585
10586 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
10587
10588         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
10589         argument on the first pass for CNI as well as JNI.
10590         (print_method_info): Set up method name on the first pass only.
10591
10592 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10593
10594         * parse.y (parser_qualified_classname): Removed parameter
10595         `is_static'.
10596         (create_interface): Removed first passed parameter to
10597         parser_qualified_classname.
10598         (create_class): Likewise. Don't install alias on static
10599         innerclasses. Fixes gcj/275.
10600
10601 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10602
10603         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
10604         debugable statement with empty_stmt_node. Fixes gcj/272
10605
10606 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10607
10608         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
10609         gcj/271.
10610
10611 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10612
10613         * jcf-write.c (push_long_const): Appropriately cast short negative
10614         constant to jword.
10615
10616 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10617
10618         * parse.y (verify_constructor_super): Use loop variable
10619         `m_arg_type' initialized with `mdecl_arg_type'.
10620
10621 2000-06-29  Tom Tromey  <tromey@cygnus.com>
10622
10623         * parse.y (resolve_field_access): Handle case where `type_found'
10624         is NULL.
10625
10626 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10627
10628         * expr.c (lookup_field): The same field can be found through two
10629         different interface. Don't declare it ambiguous in that case.
10630
10631 2000-06-27  Tom Tromey  <tromey@cygnus.com>
10632
10633         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
10634         follows \r, then unget it at a lower level.
10635
10636 2000-06-26  Tom Tromey  <tromey@cygnus.com>
10637
10638         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
10639         java_complete_tree.
10640
10641 2000-06-25  Tom Tromey  <tromey@cygnus.com>
10642
10643         * parse.y (for_statement): Wrap expression in a WFL if it is a
10644         constant.  For PR gcj/268.
10645
10646 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10647
10648         * parse.y (do_resolve_class): Minor optimiztion in the package
10649         list search. Removed unnecessary test and return statement.
10650         (valid_ref_assignconv_cast_p): Order of arguments to
10651         enclosing_context_p fixed.
10652
10653 2000-06-24  Tom Tromey  <tromey@cygnus.com>
10654
10655         * expr.c (lookup_field): Print error and return error_mark_node if
10656         field reference is ambiguous.
10657
10658         * parse.y (check_abstract_method_definitions): Also check if
10659         `other_method' is abstract.
10660
10661 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10662
10663         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
10664         classes.
10665         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
10666         (struct lang_type): New field `pic'.
10667         (CLASS_PRIVATE): New macro.
10668         * parse.y (check_inner_class_access): New function.
10669         (jdep_resolve_class): Call it.
10670
10671 2000-06-23  Tom Tromey  <tromey@cygnus.com>
10672
10673         * parse.y (patch_incomplete_class_ref): Initialize the returned
10674         class.  For PR gcj/260.
10675
10676 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10677
10678         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
10679
10680 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10681
10682         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10683         Java specific checks.
10684         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
10685         screened by DECL_P.
10686         * java-tree.def (CASE_EXPR): Marked 'e'.
10687         (DEFAULT_EXPR): Likewise.
10688         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
10689         screened by DECL_P.
10690         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10691         Java specific checks.
10692         (generate_bytecode_insns): Test try_block for BLOCK before using
10693         BLOCK_EXPR_BODY.
10694         * parse.y (build_wfl_wrap): Added `location' argument. Set
10695         EXPR_WFL_LINECOL accordingly.
10696         (dim_expr:): Wrap constants with WFLs.
10697         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
10698         (resolve_package): Check for `stmt' not being a BLOCK before
10699         building a debuggable statement with it.
10700         (make_qualified_primary): Added extra parameter to build_wfl_wrap
10701         invocation.
10702         (resolve_field_access): Make sure `decl' is a DECL before treating
10703         it as such.
10704         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
10705         IDENTIFIER_NODE before treating it as such.
10706         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
10707         treating it as such.
10708         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
10709         to be applied only on non array types.
10710
10711 2000-06-16  Per Bothner  <per@bothner.com>
10712
10713         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
10714         define in terms of DECL_RESULT, as that fails when --enable-checking.
10715
10716 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10717
10718         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
10719         types the same in comparison.
10720         (CHECK_OP): Add static prototype.
10721
10722 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
10723
10724         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
10725         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
10726         * parse.c: Rebuilt.
10727
10728 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10729
10730         * decl.c (create_primitive_vtable): Prototype.
10731
10732         * jcf-write.c (generate_bytecode_insns): Initialize variable
10733         `saved_context'.
10734
10735         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
10736
10737 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10738
10739         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
10740         to track searched classes, and do not search the same class more than
10741         once. Call find_applicable_accessible_methods_list on immediate
10742         superclass, instead of search_applicable_method_list on all ancestors.
10743         Fix for PR gcj/238.
10744
10745 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10746
10747         * parse.y (register_fields): Permit static fields in inner classes
10748         if they are final. Fix for PR gcj/255.
10749
10750 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10751
10752         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
10753         * parse.y (find_in_imports): Returned type changed to void,
10754         leading comment fixed.
10755         (register_package): New function.
10756         (qualify_and_find): Likewise.
10757         (package_declaration:): Use `register_package'.
10758         (single_type_import_declaration:): Removed local variable
10759         `node'. Added missing `;' for consistency.
10760         (type_import_on_demand_declaration:): Use `chainon' to link new
10761         entries.
10762         (lookup_field_wrapper): Lookup local variables defined in outer
10763         contexts first.
10764         (java_complete_class): Don't reverse the list of imported on demand.
10765         (do_resolve_class): Reorganized. Removed local variable
10766         `original_name'. Call `qualify_and_find' with the current package
10767         name, invoke `find_in_imports_on_demand' right after. Call
10768         `qualify_and_find' with the packages we've seen so far. Fixed
10769         operations numbering in comments.
10770         (java_expand_class): Don't reverse `package_list'.
10771         (find_most_specific_methods_list): New local variables `abstract'
10772         and `candidates'. Use them to pick the right method.
10773
10774 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
10775
10776         * parse.y (check_modifiers_consistency): Don't subtract out
10777         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
10778
10779 2000-06-04  Philipp Thomas  <pthomas@suse.de>
10780
10781         * Makefile.in (INTLLIBS): New.
10782         (LIBS): Add above.
10783         (DEPLIBS): Ditto.
10784
10785 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10786
10787         * class.c (get_dispatch_table): Build the vtable dummy entry list
10788         element with a null purpose. Fixed leading comment.
10789         (build_dtable_decl): Build an accurate dtable type when appropriate
10790         and use it.
10791
10792 2000-06-02  Richard Henderson  <rth@cygnus.com>
10793
10794         * lang.c (lang_get_alias_set): New.
10795
10796 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10797
10798         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
10799         before using it as the accessed field.
10800
10801 2000-05-31  Tom Tromey  <tromey@cygnus.com>
10802
10803         * java-tree.h (boolean_array_vtable, byte_array_vtable,
10804         char_array_vtable, short_array_vtable, int_array_vtable,
10805         long_array_vtable, float_array_vtable, double_array_vtable):
10806         Declare.
10807         * expr.c (get_primitive_array_vtable): New function.
10808         (create_primitive_vtable): New function.
10809         (java_lang_expand_expr): Enable code to statically generate
10810         arrays.
10811         * decl.c (init_decl_processing): Create primitive vtables.
10812         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
10813         short_array_vtable, int_array_vtable, long_array_vtable,
10814         float_array_vtable, double_array_vtable): Define.
10815
10816 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
10817
10818         * java/parse.y (find_applicable_accessible_methods_list):
10819         Don't add an uninitialized value to the list.
10820
10821 2000-05-25  Tom Tromey  <tromey@cygnus.com>
10822
10823         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
10824         when trying to see if field's class should be initialized.  Always
10825         initialize field's declaring class, not qualified class.
10826         For PR gcj/162.
10827
10828         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
10829         `wfl_operator', to maybe_build_primttype_type_ref.
10830         Fixes PR gcj/235.
10831
10832 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
10833
10834        * parse.y (patch_method_invocation): Don't try to lookup methods
10835        in primitive types.
10836
10837 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10838
10839         * parse.y (resolve_field_access): Call the appropriate <clinit>
10840         before accessing the length of a static array. Craft a decl for
10841         the field while its time. Fixes PR gcj/129.
10842
10843 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10844
10845         * parse.y (resolve_package): Correctly set `*next' (was off by
10846         one.)
10847         (resolve_qualified_expression_name): Fixed comment.
10848
10849 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10850
10851         * jcf-parse.c (jcf_parse_source): Reset current_class and
10852         current_function_decl to NULL before parsing a new file.
10853
10854 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10855
10856         * parse.y (block_end:): If the collected block doesn't feature a
10857         statement, insert an empty statement.
10858
10859 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10860
10861         * parse.y (maybe_yank_clinit): New function.
10862         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
10863         end of the list of methods belonging to a class.
10864         (java_complete_expand_method): Check whether <clinit> is really
10865         necessary and expand it accordingly.
10866
10867 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10868
10869         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
10870         processed by the method's switch statement.
10871
10872 2000-05-19  Tom Tromey  <tromey@cygnus.com>
10873
10874         * java-tree.h: Added init state enum.
10875         * decl.c (emit_init_test_initialization): Initialize class
10876         initialization check variable by looking at class' state.
10877
10878 2000-05-19  Tom Tromey  <tromey@cygnus.com>
10879
10880         * java-tree.h (build_instanceof): Declare.
10881         (build_get_class): Declare.
10882         * parse.y (patch_binop): Use build_instanceof.
10883         * expr.c (build_instanceof): New function.  If class is final,
10884         don't make a function call.
10885         (expand_java_INSTANCEOF): Use it.
10886         (build_get_class): New function.
10887
10888 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
10889
10890         * jcf-write.c (generate_classfile): Scan the source_file for
10891         slashes with the right pointer variable.
10892
10893 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
10894
10895         * lang.c (lang_decode_option): Update -Wunused flags by calling
10896         set_Wunused.
10897         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
10898
10899 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
10900
10901         * check_init.c (check_init): Constify local char *.
10902         * class.c (push_class): Constify local char *.
10903         * java_tree.h: Update prototypes.
10904         * jcf-io.c (open_class): Constify filename parameter and
10905         return value.
10906         (find_class): Remove redundant string copy.  Cast return from
10907         open_class.
10908         * jcf-parse.c (read_class, parse_class_file, yyparse):
10909         Constify local char *.
10910         * jcf-write.c (generate_bytecode_insns, generate_classfile):
10911         Constify local char *.
10912         * jcf.h (JCF): Constify filename and classname.
10913         (JCF_FINISH): Cast args to FREE to char * when appropriate.
10914         * lang.c (init_parse): Constify parameter and return value.
10915         * lex.c (java_get_line_col): Constify filename parameter.
10916         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
10917         * parse.y (java_parser_context_suspend,
10918         issue_warning_error_from_context, safe_layout_class): Constify
10919         local char *.
10920         * parse.c: Regenerate.
10921
10922 2000-05-08  Tom Tromey  <tromey@cygnus.com>
10923
10924         * expr.c (build_jni_stub): Cache the result of
10925         _Jv_LookupJNIMethod.
10926
10927 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10928
10929         * decl.c (predef_filenames_size): Now 7.
10930         (predef_filenames): New seventh entry.
10931
10932 2000-05-04  Tom Tromey  <tromey@cygnus.com>
10933
10934         * boehm.c (mark_reference_fields): Don't mark RawData fields.
10935         Keep track of when we've seen a reference field after a
10936         non-reference field.
10937         (get_boehm_type_descriptor): Handle case where we see
10938         non-reference fields but no trailing reference field.
10939         * decl.c (rawdata_ptr_type_node): Define.
10940         (init_decl_processing): Initialize rawdata_ptr_type_node.
10941         * java-tree.h (rawdata_ptr_type_node): Declare.
10942
10943 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10944
10945         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
10946         specifiers in calls to fprintf.
10947
10948 2000-05-03  Andrew Haley  <aph@cygnus.com>
10949
10950         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
10951
10952         * javaop.h (WORD_TO_INT): New function.
10953         (IMMEDIATE_s4): Use WORD_TO_INT.
10954         * jcf.h (JPOOL_INT): Ditto.
10955
10956         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
10957         separator.
10958
10959 2000-04-19  Tom Tromey  <tromey@cygnus.com>
10960
10961         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
10962         on native function.
10963         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
10964         JNI methods.
10965         * expr.c (build_jni_stub): New function.
10966         * lang-specs.h: -fjni and -femit-class-file are incompatible.
10967         * parse.c: Rebuilt.
10968         * parse.y (java_complete_expand_methods): Expand a native method
10969         and call build_jni_stub if -fjni given.
10970         * lang-options.h: Document -fjni.
10971         * lang.c (flag_jni): New global.
10972         (lang_f_options): Added `jni' entry.
10973         * java-tree.h (soft_lookupjnimethod_node,
10974         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
10975         Declare.
10976         (flag_jni): Declare.
10977         (build_jni_stub): Declare.
10978         (struct lang_decl): Added `native' flag.
10979         (METHOD_NATIVE): Redefined to use `native' field of lang specific
10980         structure.
10981         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
10982         soft_jnipopsystemframe_node): New globals.
10983         (init_decl_processing): Set them.  _Jv_InitClass only takes one
10984         argument.
10985
10986         * java-tree.def: Put into `C' mode.
10987
10988 2000-04-27  Tom Tromey  <tromey@cygnus.com>
10989
10990         Fix for PR gcj/2:
10991         * expr.c (expand_invoke): Generate check to see if object pointer
10992         is null in nonvirtual invocation case.
10993         * java-tree.h (soft_nullpointer_node): Declare.
10994         * decl.c (soft_nullpointer_node): New global.
10995         (init_decl_processing): Initialize soft_nullpointer_node.
10996         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10997         or `private' methods.
10998         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10999
11000 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11001
11002         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11003         from <clinit>
11004
11005 2000-04-26  Tom Tromey  <tromey@cygnus.com>
11006
11007         * zextract.c (find_zip_file_start): New function.
11008         (read_zip_archive): Use it.
11009
11010 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11011
11012         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
11013
11014 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11015
11016         * class.c (common_enclosing_context_p): New function.
11017         * java-tree.h (common_enclosing_context_p): Added prototype.
11018         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
11019         classes sharing an outer context with the current instance.
11020         * parse.y (build_access_to_thisn): Fixed leading comment.
11021         (verify_constructor_super): New local `supper_inner'. Skip
11022         enclosing context argument in the case of inner class constructors.
11023         (patch_method_invocation): Insert proper context as second
11024         parameter to pure inner class constructor super invocations.
11025
11026 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11027
11028         * parse.y (end_class_declaration): Reset the interface number
11029         counter.
11030
11031 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11032
11033         * parse.y (source_start_java_method): Deleted unnecessary code.
11034         (patch_method_invocation): Fixed comment.
11035
11036 2000-04-24  Robert Lipe <robertlipe@usa.net>
11037
11038         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
11039
11040 2000-04-23  Tom Tromey  <tromey@cygnus.com>
11041
11042         * boehm.c (mark_reference_fields): Use int_byte_position.
11043
11044 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11045
11046         * boehm.c (mark_reference_fields): Only call byte_position on
11047         non-static fields.
11048
11049 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11050
11051         * boehm.c (mark_reference_fields): Added `last_view_index'
11052         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
11053
11054 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
11055
11056         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
11057         * parse.y (check_class_interface_creation): Fixed comments. Select
11058         permitted modifiers for (inner) interfaces. Changed error message
11059         to report rejected modifiers used with local classes.
11060
11061 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11062
11063         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
11064         of directly inherited type considered in scope.
11065         * parse.y (do_resolve_class): Search inherited classes for inner
11066         classes.
11067
11068 2000-04-20  Tom Tromey  <tromey@cygnus.com>
11069
11070         * parse.y (not_accessible_p): Use member's class, not current
11071         class, when doing inheritance check for protected reference.
11072         Fixes PR gcj/124.
11073
11074 2000-04-20  Jason Schroeder  <shrode@subnature.com>
11075
11076         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
11077
11078 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11079
11080         * parse.y (lookup_field_wrapper): Search for final local aliases.
11081         (resolve_expression_name): Let lookup_field_wrapper search for
11082         final local aliases. Force the value of `name' if one is found.
11083         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
11084         an expression name. Fixed comments.
11085
11086 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11087
11088         * parse.y (yyerror): `msg' can be null, don't use it in that case.
11089
11090 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11091
11092         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
11093
11094 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11095
11096         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
11097
11098 2000-04-18  Tom Tromey  <tromey@cygnus.com>
11099
11100         PR gcj/211:
11101         * gjavah.c (utf8_cmp): Changed return value.
11102         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
11103         result.
11104         (cxx_keywords): New global.
11105         (get_field_name): Handle new result of cxx_keyword_subst.
11106         (print_method_info): Likewise.
11107
11108 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
11109
11110         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
11111         with a newline, for CNI.
11112         (print_stub_or_jni): Print a space or newline before method name for
11113         CNI as well as JNI.
11114         (print_cxx_classname): Don't write leading "::" in CNI stub method.
11115         (process_file): Include gcj/cni.h if generating CNI stubs.
11116
11117 2000-04-16  Tom Tromey  <tromey@cygnus.com>
11118
11119         * gjavah.c (decompile_method): Use print_field_name.
11120         Fixes PR gcj/205.
11121
11122 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11123
11124         * parse.y (java_expand_classes): Reverse the package list once.
11125         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
11126         reduction.
11127         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
11128         the `==' and `!=' operators.
11129
11130 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11131
11132         * jcf-write.c (generate_bytecode_insns): At invocation time,
11133         always relate an interface method to the type of its selector.
11134
11135 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11136
11137         Fix for PR gcj/2:
11138         * expr.c (expand_invoke): Generate check to see if object pointer
11139         is null in nonvirtual invocation case.
11140         * java-tree.h (soft_nullpointer_node): Declare.
11141         * decl.c (soft_nullpointer_node): New global.
11142         (init_decl_processing): Initialize soft_nullpointer_node.
11143         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11144         or `private' methods.
11145         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11146
11147 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11148
11149         Fix for PR gcj/140:
11150         * parse.y (check_final_assignment): Recognize assignments to the
11151         `length' field of an array when generating class files.
11152
11153 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11154
11155         * class.c (decl_hash): Prototype removed.
11156         (decl_compare): Likewise.
11157
11158 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11159
11160         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
11161         * parse.y (check_modifiers_consistency): Check for final/volatile
11162         clash.  Fixes PR gcj/164.
11163
11164 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11165
11166         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
11167         made global.
11168         (java_hash_compare_tree_node): Renamed from `decl_compare, made
11169         global.
11170         (add_method_1): Use `java_hash_hash_tree_node' and
11171         `java_hash_compare_tree_node'.
11172         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
11173         (java_hash_compare_tree_node): Likewise.
11174         * parse.y (find_applicable_accessible_methods_list): Create,
11175         delete and use a hash table to remember already searched interfaces.
11176
11177 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
11178
11179         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
11180         with latest entry.
11181
11182 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11183
11184         * boehm.c (mark_reference_fields, set_bit): Prototype.
11185         (set_bit): Un-ANSI-fy definition.
11186
11187         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
11188         Prototype.
11189
11190         * decl.c (emit_init_test_initialization): Likewise.
11191
11192         * gjavah.c (jni_print_char): Likewise.
11193
11194         * parse.y (create_new_parser_context): Likewise.
11195
11196 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11197
11198         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
11199         patch missing hunk. Fixed indentation.
11200
11201 2000-03-30  Tom Tromey  <tromey@cygnus.com>
11202
11203         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
11204         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
11205
11206 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11207
11208         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
11209         when negative *before* using it as an array index.
11210         * ChangeLog: Fixed typo.
11211
11212 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11213
11214         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
11215         to 0 when it reaches -1.
11216
11217 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11218
11219         * jcf-parse.c (get_constant): Properly cast `num' during the
11220         invocation of `add_double'.
11221         * jcf-write.c (push_long_const): Properly cast `lo' before
11222         comparing it to short bounds.
11223         * parse-scan.y (interface_declaration:): Rule re-arrange so that
11224         `interface_body:' is reduced after the current interface is
11225         pushed.
11226
11227 2000-03-26  Tom Tromey  <tromey@cygnus.com>
11228
11229         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
11230         Java-specific `-f' option.
11231
11232 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11233
11234         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
11235         Adjust order of making types.
11236         Make bitsize_*_node values.
11237
11238 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11239
11240         * class.c (make_field_value): Use byte_position.
11241         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
11242         (java_array_data_offset): Likewise.
11243         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
11244         bzero call.
11245
11246 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11247
11248         * parse.y (check_abstract_method_definitions): New local
11249         `end_type_reached'. Make sure we also consider `end_type'.
11250         (java_check_abstract_method_definitions): Make sure we eventually
11251         consider `java.lang.Object'.
11252         (maybe_use_access_method): Don't use access method if not in the
11253         context of a pure inner class or if the method's context is right.
11254         (find_applicable_accessible_methods_list): New static flag
11255         `object_done'. Don't search abstract classes as interfaces. Fixed
11256         indentation. Fixed the `java.lang.Object' only search. Search
11257         class interface(s) first, then fully search enclosing contexts.
11258         (find_most_specific_methods_list): Pick the closest candidate when
11259         they're all abstract.
11260
11261 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11262
11263         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
11264         properly initialize `finished_label'. Don't emit gotos for empty
11265         try statements.
11266
11267 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11268
11269         * except.c (emit_handlers): Clear catch_clauses_last.
11270
11271 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11272
11273         * parse.y (check_method_types_complete): New function.
11274         (create_class): Reset anonymous class counter only when seeing an
11275         non inner classe.
11276         (java_complete_class): JDEP_METHOD: Don't recompute signature
11277         if incomplete.
11278
11279 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11280
11281         * class.c (build_static_ref): Fixed indentation in comment.
11282         * java-tree.def (TRY_EXPR): Fixed typo in name.
11283         (CLASS_LITERAL): Likewise.
11284         * java-tree.h: (TYPE_DOT_CLASS): New macro.
11285         (struct lang_type): New field `dot_class'.
11286         * jcf-write.c (generate_bytecode_insns): Fixed error message.
11287         (generate_classfile): Method `class$' is synthetic.
11288         * parse.y (build_do_class_method): New function.
11289         (build_dot_class_method_invocation): Likewise.
11290         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
11291         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
11292         (qualify_ambiguous_name): Likewise.
11293         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
11294         (build_try_statement): Fixed leading comment.
11295
11296 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11297
11298         * class.c (make_field_value): Properly handle sizes.
11299         (get_dispatch_vector): Use tree_low_cst and host_integerp.
11300         (layout_class_method): Count using trees.
11301         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
11302         * expr.c (java_array_data_offset): Use int_bit_position.
11303         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
11304         (build_invokevirtual): Use tree_low_cst and do computations with trees.
11305
11306 2000-03-16  Tom Tromey  <tromey@cygnus.com>
11307
11308         * lang.c (flag_hash_synchronization): New global.
11309         (lang_f_options): Added `hash-synchronization'.
11310         * lang-options.h: Mention -fhash-synchronization.
11311         * java-tree.h (flag_hash_synchronization): Declare.
11312         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
11313         hash table synchronization is disabled.
11314         * decl.c (init_decl_processing): Only push `sync_info' value when
11315         hash table synchronization is disabled.
11316         * class.c (make_class_data): Only push `sync_info' field when hash
11317         table synchronization is disabled.  Removed dead code.
11318
11319 2000-03-16  Tom Tromey  <tromey@cygnus.com>
11320
11321         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
11322
11323 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11324
11325         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
11326         classes.
11327         * parse.y (patch_method_invocation): Handle anonymous classes
11328         creation in static context.
11329
11330 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11331
11332         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
11333         * parse.y (resolve_qualified_expression_name): Use it.
11334         (patch_method_invocation): Likewise.
11335
11336 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11337
11338         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
11339         depending on the type of dependency which dictates what the
11340         current class is.
11341         (unresolved_type_p): Resolved types limited to the current class.
11342
11343 2000-03-15  Tom Tromey  <tromey@cygnus.com>
11344
11345         * decl.c (init_decl_processing): Set type of `sync_info' to be
11346         pointer to Object.
11347
11348         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
11349         Correctly compute bit number for current slot.  Zero `high' and
11350         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
11351         mark_reference_fields.
11352         (mark_reference_fields): New function.
11353
11354 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11355
11356         * parse.y (register_incomplete_type): Fixed initialization of
11357         JDEP_ENCLOSING.
11358
11359 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11360
11361         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
11362         static globals.
11363         (push_class_context, pop_class_context): New function.
11364         (class_body:): Call pop_class_context.
11365         (interface_body:): Likewise.
11366         (INNER_QUALIFIER): New macro.
11367         (report_class_declaration): Changed output format and use
11368         INNER_QUALIFIER. Call push_class_context.
11369
11370 2000-02-14  Andrew Haley  <aph@cygnus.com>
11371
11372         * check-init.c (check_init): Add new cases for unary and binary
11373         tree nodes.
11374
11375 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11376
11377         * parse.y (resolve_package): Set `next' once a type name has been
11378         progressively discovered.
11379         (resolve_qualified_expression_name): Propagate resolution only if
11380         there are remaining qualifiers. Take into account `q' might have
11381         been cleared after re-qualification.
11382         * parse.y (patch_method_invocation): New local `resolved'.
11383         Section dealing with qualified expression rewritten to use
11384         resolve_field_access.
11385
11386 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11387
11388         * parse.h (PUSH_CPC): Fixed indentation.
11389         (DEBUG_CPC): New macro.
11390         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
11391         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
11392         * parse.y (class_body_declaration:): Use
11393         SET_CPC_INSTANCE_INITIALIZER_STMT.
11394         (method_declaration:): Check for null current_function_decl.
11395         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
11396         (java_parser_context_pop_initialized_field): Better handling of
11397         empty lists.
11398         (maybe_make_nested_class_name): Mark nested class name as
11399         qualified when necessary.
11400         (end_class_declaration): Don't call java_parse_context_resume when
11401         one or more error occurred.
11402         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
11403         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
11404         SET_CPC_INITIALIZER_STMT.
11405         (method_header): Check for inner classes declaring static methods.
11406         (resolve_qualified_expression_name): Handle situation where `this'
11407         is implied.
11408
11409 2000-03-13  Hans Boehm <boehm@acm.org>
11410
11411         * typeck.c (build_prim_array_type): Correctly set the high word too.
11412
11413 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11414
11415         * parse.y (java_complete_expand_methods): Leave <clinit> out of
11416         ordinary methods.
11417         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
11418         list of methods for interfaces.
11419
11420 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11421
11422         * parse.y (qualify_ambiguous_name): Properly handle expressions
11423         using `null'.
11424
11425 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11426
11427         * parse.y (check_final_assignment): Extended to process
11428         COMPOUND_EXPR.
11429         (patch_assignment): Have check_final_assignment called only once.
11430
11431 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11432
11433         * java-tree.h (IS_INIT_CHECKED): New flag.
11434         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
11435         * parse.y (patch_string): Call force_evaluation_order on the
11436         completed string concatenation tree.
11437         * expr.c (force_evaluation_order): Call force_evaluation_order on
11438         function's arguments too.
11439
11440 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11441
11442         * decl.c (emit_init_test_initialization): Mark KEY as unused.
11443         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11444         (build_anewarray): Likewise.
11445         * parse.y (patch_newarray): Likewise.
11446         * parse.c: Regenerated.
11447
11448 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
11449
11450         * decl.c (init_decl_processing): Added new class fields `depth',
11451         `ancestors', and `idt' to class_type_node. Use
11452         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
11453         * class.c (make_class_data): Push initial values for new fields.
11454         * java-tree.h: Updated prototype for `build_invokeinterface'.
11455         * expr.c (build_invokeinterface): Changed parameters to accept
11456         `method' tree. Calculate index of `method' in its declaring
11457         interface. Build call to _Jv_LookupInterfaceMethodIdx.
11458         (expand_invoke): Call `build_invokeinterface' with new parameters.
11459         * parse.y (patch_invoke): Call `build_invokeinterface' with new
11460         parameters.
11461
11462 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
11463
11464         * typeck.c (lookup_do): Search superinterfaces first
11465         when looking up an interface method. From Godmar Back
11466         <gback@cs.utah.edu>
11467
11468 2000-03-06  Tom Tromey  <tromey@cygnus.com>
11469
11470         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
11471
11472 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11473
11474         * java-tree.h (lookup_argument_method2): Declared.
11475         (safe_layout_class): Prototype moved from parse.h.
11476         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
11477         * parse.y (java_check_regular_methods): Local `super_class' gone.
11478         Call lookup_argument_method2 instead of lookup_argument_method.
11479         Perform modifier match for methods found declared in implemented
11480         interfaces. Fixed indentation problem. Overriding/hiding error
11481         report to take place only for methods found in classes.
11482         * typeck.c (lookup_argument_method): Changed leading
11483         comment. Re-written by calling lookup_do.
11484         (lookup_argument_method2): New function.
11485         (lookup_java_method): Re-written by calling lookup_do.
11486         (lookup_do): New function.
11487
11488 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11489
11490         * check-init.c (check_init): Removed dead code. Handle (blank)
11491         final variables.
11492         * parse.y (declare_local_variables): New local `final_p', set it
11493         and use it to initialize LOCAL_FINAL.
11494         (check_final_assignment): Only check FIELD_DECLs.
11495
11496 2000-02-17  Tom Tromey  <tromey@cygnus.com>
11497
11498         * Makefile.in (JAVA_OBJS): Added boehm.o.
11499         (boehm.o): New target.
11500         * Make-lang.in (JAVA_SRCS): Added boehm.c.
11501         * java-tree.h (flag_use_boehm_gc): Declare.
11502         (get_boehm_type_descriptor): Declare.
11503         * lang.c (lang_f_options): Added `use-boehm-gc'.
11504         (flag_use_boehm_gc): New global.
11505         * lang-options.h: Added -fuse-boehm-gc.
11506         * boehm.c: New file.
11507         * class.c (get_dispatch_table): If class uses a Boehm type
11508         descriptor, put it in the vtable.
11509         (make_class_data): Removed dead code.
11510
11511 2000-03-03  Per Bothner  <per@bothner.com>
11512
11513         * decl.c (init_decl_processing):  Initialize sizetype properly.
11514
11515 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11516
11517         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
11518         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
11519         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
11520         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
11521         (jcf_parse): New local `current'. Load innerclasses seen in outer
11522         context being processed.
11523         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
11524         * jcf-write.c (append_innerclasses_attribute): New function.
11525         (append_innerclasses_attribute_entry): Likewise.
11526         (get_access_flags): Handle static classes. Set anonymous and local
11527         classes to be private.
11528         (generate_classfile): Attribute count adjusted. Call
11529         append_innerclasses_attribute.
11530         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
11531         PURE_INNER_CLASS_TYPE_P.
11532         * parse.y (parser_qualified_classname): New parameter `is_static',
11533         produce non qualified name accordingly.
11534         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
11535         (create_interface): Added argument to parser_qualified_classname.
11536         (create_class): Added argument to parser_qualified_classname. Setup
11537         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
11538         (add_inner_class_fields): Fixed indentation.
11539         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
11540         (method_declarator): Fixed typo in comment.
11541         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
11542         (build_current_thisn): Likewise.
11543         (patch_method_invocation): Likewise.
11544
11545 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11546
11547         * decl.c (current_function_decl): Move to toplev.c.
11548
11549 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11550
11551         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
11552         (DECL_BIT_INDEX): Use underlying representation.
11553         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
11554
11555 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11556
11557         * expr.c (build_java_ret): Pass proper type to size_binop.
11558
11559 2000-02-25  Anthony Green  <green@cygnus.com>
11560
11561         * expr.c (build_class_init): Mark the decl to be ignored by
11562         check_init.
11563         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
11564         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
11565         * class.c (init_test_hash_newfunc): New function.
11566         (decl_hash): New function.
11567         (decl_compare): New function.
11568         * decl.c (emit_init_test_initialization): New function.
11569         (complete_start_java_method): Traverse the init test hashtable,
11570         calling emit_init_test_initialization.
11571         (always_initialize_class_p): Define.
11572         * expr.c (build_class_init): Use initialization tests when
11573         emitting class initialization code.
11574         (always_initialize_class_p): Declare.
11575         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
11576         1.
11577         * java-tree.h: Include hash.h.
11578         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
11579         (struct lang_decl): Add init_test_table field.
11580         (init_test_hash_entry): Define.
11581
11582 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11583
11584         * gjavah.c (main): Avoid using `argi' to report unimplemented
11585         options.
11586
11587 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11588
11589         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
11590         initialize locals to avoid warnings. Local `exception_type' moved
11591         into if statement.
11592
11593 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11594
11595         * parse.y (resolve_expression_name): Use `orig' as a second
11596         argument to resolve_field_access.
11597         (resolve_field_access): Removed unnecessary code when dealing with
11598         static fields.
11599
11600 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11601
11602         * class.c (push_super_field): Don't push the field twice.
11603         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
11604         * parse.h (java_reorder_fields): Prototyped.
11605         * parse.y (java_reorder_fields): New function.
11606         (java_layout_class): Simplified not to worry about re-ordering.
11607
11608 2000-02-23  Tom Tromey  <tromey@cygnus.com>
11609
11610         * gjavah.c (print_name): In JNI case, correctly quote string.
11611         (print_method_info): Don't handle overrides in JNI mode.
11612
11613 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11614
11615         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
11616         value type set to `boolean_type_node'.
11617
11618 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11619
11620         * jcf-dump.c (main): Test for correct condition after
11621         output file creation.
11622
11623 2000-02-19  Anthony Green  <green@cygnus.com>
11624
11625         * jcf-depend.c (add_entry): Fix test for first list entry.
11626
11627 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11628
11629         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
11630         * constants.c (build_constants_constructor): Likewise.
11631
11632 2000-02-19  Anthony Green  <green@cygnus.com>
11633
11634         * jcf-depend.c (add_entry): Add entries to the end of the list.
11635
11636 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
11637
11638         * decl.c (INT_TYPE_SIZE): Define if necessary.
11639         (expand_java_return): Handle the case of a native integer smaller
11640         than a JVM integer.
11641
11642 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11643
11644         * gjavah.c (help): Use GCCBUGURL.
11645         * jv-scan.c (help): Likewise.
11646         * jcf-dump.c (help): Likewise.
11647
11648 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11649
11650         * jcf-write.c (generate_bytecode_insns): Don't generate empty
11651         `finally' clauses.
11652
11653 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11654
11655         * jcf-parse.c (load_class): Call `fatal' if no file containing
11656         the target class are found.
11657
11658 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
11659
11660         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
11661         lex.c, lex.h, and PARSE_H to...
11662         (parse.o, parse-scan.o): ...here, respectively.
11663
11664         * lex.c: Split out code that may trigger SIGFPE from yylex()
11665         to its own function.
11666         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
11667
11668 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11669
11670         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
11671
11672 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11673
11674         * parse.y (outer_field_access_p): Stop in time when outer contexts
11675         are exhausted.
11676         (resolve_qualified_expression_name): Properly qualify *everything*
11677         after a package.type to be resoled as expression names.
11678         (find_applicable_accessible_methods_list): Save/restore `class' to
11679         isolate it from a possible outer context search.
11680
11681 2000-02-15  Tom Tromey  <tromey@cygnus.com>
11682
11683         * gjavah.c (jni_print_char): New function.
11684         (print_full_cxx_name): Use it.
11685         (decode_signature_piece): Likewise.
11686         (print_cxx_classname): Likewise.
11687
11688 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11689
11690         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
11691         version.o.
11692         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
11693
11694         * gjavah.c: Include version.h.
11695
11696         * jcf-dump.c: Likewise.
11697
11698         * jv-scan.c: Likewise.
11699
11700 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11701
11702         * parse.y (outer_field_access_fix): First parameter now a tree
11703         node. Check for assignment to final. First argument to
11704         build_outer_field_access_fix modified to accommodate prototype.
11705         (build_outer_field_access): Don't check for assignment to final
11706         here.
11707         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
11708         possibly returned by outer_field_access_fix. Changed
11709         outer_field_access_fix's first argument.
11710         (check_final_assignment): $finit$'s context is OK.
11711         (patch_unaryop): Use node instead of its line/column value when
11712         calling outer_field_access_fix.
11713
11714 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11715
11716         * parse.y (interface_declaration:): No longer tagged
11717         <node>. Re-installed default action.
11718         (class_member_declaration:): Handle inner interfaces.
11719         (interface_member_declaration): Handle inner interfaces and
11720         classes.
11721         (create_interface): Push error if one seen. Suspend parsing
11722         context when processing an inner interface.
11723         (register_fields): Inner class static field limitations not to
11724         apply to inner interfaces.
11725
11726 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11727
11728         * jcf-parse.c (load_class): Update `java_error_count' when a
11729         class' file can't be found.
11730         (parse.y): Avoid (byte)code generation when errors seen.
11731
11732 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11733
11734         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
11735         decodes a valid node.
11736         (patch_binop): Handle TRUNC_DIV_EXPR.
11737
11738 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11739
11740         * parse.y (resolve_package): New local `acc'. Try to progressively
11741         build and guess a package and type name.
11742
11743 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11744
11745         * parse.y (find_applicable_accessible_methods_list): Load and
11746         layout the search class if necessary.
11747         (java_complete_tree): Keep to original type of the folded initial
11748         value.
11749
11750 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11751
11752         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
11753         Generate error message if circularity is detected. New static
11754         local `list'.
11755         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
11756         * jcf-write.c (generate_bytecode_insns): Very simply handle
11757         SAVE_EXPR.
11758         * parse.y (java_check_circular_reference): Use
11759         `cyclic_inheritance_report' during report, if necessary.
11760         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
11761         walking NEW_ARRAY_INIT twice.
11762
11763 2000-02-09  Tom Tromey  <tromey@cygnus.com>
11764
11765         * parse.y (check_class_interface_creation): Allow inner classes to
11766         be `private' or `protected', check modifiers' consistency. Prevent
11767         block local classes from bearing any modifiers.
11768
11769 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11770
11771         * except.c (check_start_handlers): Re-add prototype lost in last
11772         patch.
11773         (maybe_start_try): Remove excess argument to `check_start_handlers'.
11774
11775 2000-02-09  Andrew Haley  <aph@cygnus.com>
11776
11777         * decl.c (clear_binding_level): Remove excess initializer.
11778         (maybe_poplevels): Remove unused variable.
11779         (force_poplevels): Ditto.
11780         (struct binding_level): Add comment.
11781
11782 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11783
11784         * jcf-write.c (generate_classfile): Don't consider
11785         pre-initialization with reference value (use <clinit> instead.)
11786         * parse.y (java_fix_constructors): No generated constructor for
11787         interfaces.
11788         (build_outer_field_access): Removed debug message.
11789         (outer_field_expanded_access_p): Adapted to bytecode generation.
11790         (build_outer_field_access_method): Use fix_method_argument_names.
11791         (build_outer_method_access_method): Fixed indentation. Added
11792         comment. Handle access method generation for static and also void
11793         methods.
11794         (build_access_to_thisn): Inserted debug message.
11795         (maybe_build_thisn_access_method): Use fix_method_argument_names.
11796         (resolve_qualified_expression_name): Fixed comment.
11797         (not_accessible_p): Adapted to bytecode generation. Added comment.
11798         (patch_method_invocation): Added comment.
11799         (maybe_use_access_method): Fixed leading comment. Handle static
11800         methods.
11801         (java_complete_lhs): Don't shortcut handling of initialized upon
11802         declaration String type static fields when generating bytecode.
11803         (patch_unaryop): Handle outer field access when generating
11804         bytecode.
11805
11806 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11807
11808         * java-tree.h (FIELD_THISN): New macro.
11809         * jcf-write.c (append_synthetic_attribute): New function.
11810         (generate_classfile): Set "Synthetic" attribute on this$<n>,
11811         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
11812         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
11813         this$<n> fields.
11814         (build_outer_field_access): Turned on access functions usage and
11815         generation when compiling to bytecode.
11816         (maybe_use_access_method): Likewise.
11817
11818 2000-01-25  Andrew Haley  <aph@cygnus.com>
11819
11820         * java-except.h (struct eh_range): Add `expanded' field.
11821         (maybe_start_try): Add end_pc arg.
11822         (maybe_end_try): Ditto.
11823         * java-tree.h (force_poplevels): new function.
11824         * expr.c (expand_byte_code): Don't call maybe_start_try or
11825         maybe_end_try.
11826         * except.c (add_handler): Reset expanded.
11827         (expand_start_java_handler): Set expanded.
11828         (check_start_handlers): Don't expand a start handler that's
11829         already been expanded.
11830         (maybe_start_try): Add end_pc arg.  Only expand a handler which
11831         ends after end_pc.
11832         (expand_end_java_handler): call force_poplevels.
11833         (force_poplevels): new function.
11834         * decl.c (binding_level): Add start_pc of binding level.
11835         (maybe_pushlevels): Call maybe_start_try when pushing binding
11836         levels.
11837         (maybe_poplevels): Call maybe_end_try when popping binding levels.
11838         (LARGEST_PC): Define.
11839         (clear_binding_level): Use LARGEST_PC.
11840
11841         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
11842         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
11843         (binding_depth, is_class_level, current_pc): new variables.
11844         (struct binding_level): ditto.
11845         (indent): new function.
11846         (push_jvm_slot): add debugging info.
11847         (maybe_pushlevels): ditto.
11848         (maybe_poplevels): ditto.
11849         (pushlevel): ditto.
11850         (poplevel): ditto.
11851         (start_java_method): ditto.
11852         (give_name_to_locals): comment only.
11853         * except.c (binding_depth, is_class_level, current_pc):
11854         new variables.
11855         (expand_start_java_handler): add debugging info.
11856         (expand_end_java_handler): ditto.
11857
11858 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11859
11860         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
11861         (print_name_for_stub_or_jni, process_file): Constify a char*.
11862
11863 2000-02-03  Tom Tromey  <tromey@cygnus.com>
11864
11865         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
11866
11867 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
11868
11869         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
11870         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
11871         defined to be 1.
11872
11873 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11874
11875         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
11876         * java-tree.h (TYPE_II_STMT_LIST): New macro.
11877         (struct lang_type): New field `ii_block'.
11878         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
11879         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
11880         * parse.h (struct parser_ctxt): New field `instance_initializers'.
11881         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
11882         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
11883         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
11884         macros.
11885         * parse.y (add_instance_initializer): New function.
11886         (in_instance_initializer): New static global.
11887         (class_body_declaration:): Link instance initializer block.
11888         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
11889         (array_creation_expression:): Remove unused local.
11890         (java_parser_context_push_initialized_field): Fixed leading
11891         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
11892         CPC_INSTANCE_INITIALIZER_LIST.
11893         (java_parser_context_pop_initialized_field): Likewise.
11894         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
11895         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
11896         CPC_INITIALIZER_STMT.
11897         (fix_constructors): New local `class_type'. Use it. Call
11898         add_instance_initializer.
11899         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
11900         (patch_return): Forbid return in instance initializers.
11901         (patch_throw_statement): Enforce exception handling in the context
11902         of instance initializers.
11903
11904 2000-02-03  Tom Tromey  <tromey@cygnus.com>
11905
11906         * Make-lang.in (java.mostlyclean): Remove executables in
11907         `mostlyclean'.
11908
11909 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
11910
11911         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
11912         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
11913         (java_float_finite): Convert to use union Word from javaop.h.
11914         (java_double_finite): Convert to use union DWord from javaop.h.
11915
11916 2000-02-02  Tom Tromey  <tromey@cygnus.com>
11917
11918         * gjavah.c (options): Added `jni' entry.
11919         (help): Document -jni.
11920         (flag_jni): New global.
11921         (process_file): Handle JNI output.  Don't print text from
11922         -prepend, -add, etc, when generating stubs.  Only remove `.class'
11923         suffix if it actually exists.
11924         (main): Create a `.c' file when run with `--jni --stubs'.  Create
11925         correct output file name with `--jni'.
11926         (print_include): Mangle header name differently in JNI case.
11927         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
11928         method list.
11929         (print_method_info): Handle JNI case.  Put signature info into
11930         method name.  Handle case when STREAM is NULL.
11931         (print_name_for_stub_or_jni): New function.
11932         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
11933         (print_cxx_classname): Handle JNI.
11934         (print_full_cxx_name): Likewise.
11935         (decode_signature_piece): Likewise.
11936         (overloaded_jni_method_exists_p): New function.
11937         (struct method_name): Added `signature' and `sig_length' fields.
11938         (HANDLE_END_FIELD): Do nothing in JNI mode.
11939
11940 2000-02-02  Tom Tromey  <tromey@cygnus.com>
11941
11942         * jv-scan.c: Include version.c, <getopt.h>.
11943         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
11944         (options): New array.
11945         (usage): New function.
11946         (version): New function.
11947         (main): Use getopt_long to parse command line.
11948         * jcf-dump.c: Include version.c, <getopt.h>.
11949         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
11950         OPT_JAVAP): New macros.
11951         (options): New array.
11952         (usage): Return `void'.  Changed message.
11953         (help): New function.
11954         (version): New function.
11955         (main): Use getopt_long_only to parse command line.
11956         * gjavah.c: Include <getopt.h>.
11957         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
11958         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
11959         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
11960         (options): New array.
11961         (java_no_argument): Removed.
11962         (help): Updated with missing options.
11963         (main): Use getopt_long_only to parse command line.
11964         (usage): Changed message.
11965
11966 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11967
11968         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
11969         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
11970         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
11971         * parse.y (array_creation_expression:): Handle anonymous arrays.
11972         (build_array_from_name): Don't set `ret_name' if null.
11973         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
11974         (qualify_ambiguous_name): Likewise.
11975         (java_complete_expand_class): Likewise.
11976
11977 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11978
11979         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
11980         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
11981         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
11982         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
11983         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
11984         AIPL_FUNCTION_COMPLETED_INVOCATION.
11985         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
11986         AIPL_FUNCTION_INVOCATION_READY.
11987         (AIPL_FUNCTION_DECLARATION): New enum entry.
11988         * parse.y (reorder_static_initialized): New function.
11989         (java_parser_context_pop_initialized_field): Use it.
11990         (add_inner_class_fields): Use
11991         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
11992         augmented. Install marker after last alias initializer, if any.
11993         (generate_finit): Fixed typo. Don't try to retain only the used
11994         fields.
11995         (method_header): Compute and set DECL_FUNCTION_NAP.
11996         (method_declarator): Fixed comment. Insert alias initializer in
11997         parameter list.
11998         (build_alias_initializer_parameter_list): Fixed leading
11999         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
12000         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
12001         (java_complete_expand_class): Code to retain only used aliases
12002         removed.
12003         (java_complete_expand_methods): New local `first_decl'. Generate
12004         $finit$ first, then expand the constructors, regular methods and
12005         <clinit>.
12006         (java_complete_expand_method): Don't report error on missing
12007         return statement if previously detected bogus.
12008         (fix_constructors): Don't patch constructor parameters list.
12009         (patch_method_invocation): Use new AIPL enum values. Reverse
12010         alias initializer list for anonymous classes.
12011
12012 2000-01-30  Anthony Green  <green@redhat.com>
12013
12014         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
12015         determine how many stack slots to pop.
12016
12017 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12018
12019         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
12020         error handling/recovery.
12021         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
12022
12023 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12024
12025         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
12026         FIELD_LOCAL_ALIAS_USED): New macros.
12027         (DECL_FUNCTION_NAP): New macro.
12028         (struct lang_decl): New field `nap'.
12029         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
12030         (struct lang_type): New fields `finit_stmt_list' and
12031         `clinit_stmt_list'.
12032         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
12033         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
12034         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
12035         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
12036         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
12037         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
12038         (BUILD_THROW): Macro line separator re-indented.
12039         * parse.y (end_class_declaration): New function.
12040         (maybe_generate_pre_expand_clinit): New name for
12041         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
12042         pre-expand static fields.
12043         (maybe_generate_clinit): Function deleted.
12044         (check_for_static_method_reference): Prototype's parameter list
12045         indented.
12046         (generate_finit): New name for maybe_generate_finit. Changed
12047         leading comment. Function rewritten to use
12048         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
12049         (build_alias_initializer_parameter_list): New function.
12050         (java_parser_context_pop_initialized_field): Likewise.
12051         (add_inner_class_fields): Likewise.
12052         (type_declaration:): Call end_class_declaration.
12053         (class_member_declaration:): Likewise.
12054         (formal_parameter_list:): Fixed typos.
12055         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
12056         element. Improved error handling.
12057         (block_statement:): Call end_class_declaration.
12058         (anonymous_class_creation:): Likewise.
12059         (create_anonymous_class): Fixed comments.
12060         (create_class): Call add_inner_class_fields.
12061         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
12062         (method_header): Use MARK_FINAL_PARMS.
12063         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
12064         (method_declarator): Propagate final argument flag.
12065         (craft_constructor): New local `artificial'. Call
12066         build_alias_initializer_parameter_list. Use
12067         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
12068         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
12069         necessary.
12070         (complete_expand_class): Get rid of unused outer context local
12071         alias fields.
12072         (java_complete_expand_methods): Fixed leading
12073         comment. Generate/pre-expand <clinit> first. Changed method
12074         expansion order to regular, $finit$, constructors, <clinit>.
12075         (java_complete_expand_method): Set current_function_decl.
12076         (fix_constructors): Fix constructor parameter list to account for
12077         outer context local alias initializers.
12078         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12079         (resolve_expression_name): Lookup outer context local aliases. New
12080         local `access', use it.
12081         (patch_method_invocation): Patch inner class ctor invocation with
12082         outer context local aliases initialization values. $finit$
12083         invocation patching now includes things generated with
12084         build_alias_initializer_parameter_list.
12085         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12086         (build_super_invocation): Likewise.
12087         (patch_assignment): Changed comment.
12088
12089 2000-01-27  Andrew Haley  <aph@cygnus.com>
12090
12091         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
12092         (emit_if): Ditto.
12093         (emit_jsr): Ditto.
12094
12095 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12096
12097         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
12098         concatenation.
12099         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
12100
12101         * parse.y (register_fields): Don't pass a format specifier to
12102         OBSOLETE_MODIFIER_WARNING.
12103         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
12104         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
12105         specifier.
12106         (check_modifiers): Change function into a macro.
12107         (check_class_interface_creation): Pass a literal format string.
12108
12109 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12110
12111         * buffer.h: PROTO -> PARAMS.
12112         * check-init.c: Likewise.
12113         * class.c: Likewise.
12114         * constants.c: Likewise.
12115         * convert.h: Likewise.
12116         * decl.c: Likewise.
12117         * except.c: Likewise.
12118         * expr.c: Likewise.
12119         * gjavah.c: Likewise.
12120         * java-except.h: Likewise.
12121         * java-tree.h: Likewise.
12122         * jcf-depend.c: Likewise.
12123         * jcf-dump.c: Likewise.
12124         * jcf-parse.c: Likewise.
12125         * jcf-path.c: Likewise.
12126         * jcf-reader.c: Likewise.
12127         * jcf-write.c: Likewise.
12128         * jcf.h: Likewise.
12129         * jv-scan.c: Likewise.
12130         * jvgenmain.c: Likewise.
12131         * jvspec.c: Likewise.
12132         * lang.c: Likewise.
12133         * lex.c: Likewise.
12134         * lex.h: Likewise.
12135         * parse-scan.y: Likewise.
12136         * parse.h: Likewise.
12137         * parse.y: Likewise.
12138         * typeck.c: Likewise.
12139         * verify.c: Likewise.
12140         * xref.c: Likewise.
12141         * xref.h: Likewise.
12142         * zextract.c: Likewise.
12143         * zipfile.h: Likewise.
12144
12145 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12146
12147         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
12148         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
12149         * constants.c (build_constant_data_ref): Check for cached
12150         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
12151         in TYPE_CPOOL_DATE_REF.
12152         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
12153         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
12154         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
12155         (LOCAL_FINAL): New macro.
12156         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
12157         constant pool -- don't try to reuse.
12158         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
12159         TYPE_LANG_SPECIFIC.
12160         (find_in_current_zip): Use TYPE_JCF.
12161         * parse.h (java_check_final): Prototype removed.
12162         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
12163         (maybe_create_class_interface_decl,
12164         check_class_interface_creation): Likewise.
12165         (java_expand_finals): Function removed.
12166         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
12167         (block_statement:): Fixed comment.
12168         (anonymous_class_creation:): Likewise.
12169         (check_class_interface_creation): Reversed Jan 12, 2000 extra
12170         argument patch.
12171         (check_class_interface_creation): Loosened error report on (inner)
12172         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
12173         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
12174         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
12175         argument patch.
12176         (create_interface): Likewise.
12177         (anonymous_class_counter): New static global.
12178         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
12179         patch. Fixed comments.
12180         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
12181         anonymous_class_counter when declaring a toplevel class.
12182         (craft_constructor): Fixed constructor name when handling
12183         anonymous classes. Anonymous class constructors to feature hidden
12184         this$<n> parameter.
12185         (java_fix_constructors): Added comment.
12186         (java_check_final): Function removed.
12187         (java_complete_expand_methods): Fixed comment. Don't generate
12188         class data, save its outgoing constant pool instead.
12189         (verify_constructor_super): Skip anonymous class constructor
12190         hidden this$<n> parameter.
12191         (java_expand_classes): New local `saved_ctxp'. Removed call to
12192         java_expand_finals and java_check_final. Expand anonymous class
12193         constructors. Generate class data.
12194         (build_super_invocation): Skip anonymous class hidden this$<n>
12195         parameter.
12196         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
12197         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
12198         (set_java_signature): Likewise.
12199
12200 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12201
12202         * gjavah.c: Delete ACC_VISIBILITY define.
12203         * jcf.h: Add ACC_VISIBILITY define.
12204         * parse.y: final: rule tagged <value>.
12205         (java_check_regular_methods): Use ACC_VISIBILITY define for
12206         default package access check.
12207         (local_variable_declaration_statement): Use final: rule.
12208
12209 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12210
12211         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
12212         (final:): New rule.
12213
12214 2000-01-17  Tom Tromey  <tromey@cygnus.com>
12215
12216         * gjavah.c (print_field_info): Allow non-static final fields.
12217
12218 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12219
12220         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
12221         * parse.y (patch_anonymous_class): New function.
12222         (create_anonymous_class): Register incomplete type when the
12223         class/interface to extends/implement isn't known yet.
12224         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
12225         (verify_constructor_super): Tuned error message.
12226
12227 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12228
12229         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
12230         (ANONYMOUS_CLASS_P): New macro.
12231         (TYPE_SIGNATURE, TYPE_JCF): New macros.
12232         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
12233         * parse.y (create_class): Added leading argument.
12234         (maybe_create_class_interface_decl,
12235         check_class_interface_creation): Likewise.
12236         (craft_constructor): New function.
12237         (verify_constructor_super): Added argument in prototype.
12238         (class_declaration:): Inserted leading argument.
12239         (for_begin:): Use FOR_LOOP_P.
12240         (anonymous_class_creation): Create WFL of the anonymous class to
12241         instantiate. Call build_new_invocation. Added comments.
12242         (check_class_interface_creation): Handle parameter `anonymous' in
12243         verbose mode class creation announce.
12244         (link_nested_class_to_enclosing): Exclude anonymous classes.
12245         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
12246         anonymous class, even though they appear to have an enclosing
12247         context.
12248         (create_interface): Pass extra argument to
12249         check_class_interface_creation.
12250         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
12251         (create_class): Call check_class_interface_creation and
12252         maybe_create_class_interface_decl with extra new argument. Don't
12253         add private this$<n> to anonymous classes.
12254         (method_declarator): Insert hidden this$<n> to anonymous class
12255         constructors.
12256         (java_fix_constructors): Deleted code creating default
12257         constructor. Call craft_constructor instead.
12258         (java_check_regular_methods): Set `saw_constructor' to 1 for
12259         anonymous classes.
12260         (fix_constructors): Pass extra argument to verify_constructor_super.
12261         (verify_constructor_super): New local `sdecl', use it. Search for
12262         matching constructor (possibly featuring arguments) in super
12263         class.
12264         (lookup_method_invoke): Craft constructor according to arguments
12265         list when dealing with anonymous class constructors.
12266         (build_super_invocation): Pass arguments to anonymous class super
12267         constructors.
12268         (search_loop): Use FOR_LOOP_P.
12269         (labeled_block_contains_loop_p): Likewise.
12270
12271 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12272
12273         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
12274         (enclosing_context_p): New function.
12275         (get_access_flags_from_decl): Handle CLASS_STATIC.
12276         (maybe_layout_super_class): Extra first argument passed to
12277         do_resolve_class.
12278         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
12279         ID_INIT_P.
12280         * decl.c (access0_identifier_node): New global.
12281         (init_decl_processing): access0_identifier_node initialized.
12282         (pushdecl): Set DECL_CONTEXT only on non type decls.
12283         * expr.c (lookup_field): Lookup inner class fields in enclosing
12284         contexts.
12285         (expand_invoke): Use ID_INIT_P.
12286         (expand_java_field_op): Use DECL_CLINIT_P.
12287         * java-tree.def (CLASS_LITERAL): New tree code.
12288         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
12289         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
12290         (struct lang_decl): New field `inner_access'.
12291         (enclosing_context_p): Prototyped.
12292         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
12293         ID_CLINIT_P): New macros.
12294         (CLASS_STATIC): New macro.
12295         (CLASS_ACCESS0_GENERATED_P): New macro.
12296         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
12297         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
12298         INNER_CLASS_P): New macros.
12299         (DECL_INNER_CLASS_LIST): New macro.
12300         * jcf-parse.c (yyparse): Avoid the use of ANSI string
12301         concatenation.
12302         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
12303         the shift value to int. Fixed typo in comment.
12304         * lex.c (inst_id, wpv_id): Initialize.
12305         * mangle.c (unicode_mangling_length): Take `$' into account.
12306         * parse.h (DRECOVER, RECOVER): Terminate properly.
12307         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
12308         (typedef struct _jdep): New field `enclosing'.
12309         (JDEP_ENCLOSING): New macro.
12310         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
12311         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
12312         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
12313         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
12314         GET_ENCLOSING_CPC_CONTEXT): New macros.
12315         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
12316         (do_resolve_class): Added extra argument in prototype.
12317         * parse.y (resolve_class): Added extra argument in prototype.
12318         (maybe_create_class_interface_decl): Likewise.
12319         (maybe_use_access_method, build_wfl_wrap): New functions.
12320         (java_complete_expand_classes, java_complete_expand_class):
12321         Likewise.
12322         (java_parser_context_push_initialized_field,
12323         java_parser_context_suspend, java_parser_context_resume):
12324         Likewise.
12325         (maybe_make_nested_class_name, make_nested_class_name,
12326         set_nested_class_simple_name_value,
12327         link_nested_class_to_enclosing, find_as_inner_class,
12328         find_as_inner_class_do, check_inner_class_redefinition,
12329         build_thisn_assign, build_current_thisn, build_access_to_thisn,
12330         maybe_build_thisn_access_method, build_outer_field_access,
12331         build_outer_field_access_methods, build_outer_field_access_expr,
12332         build_outer_method_access_method, build_new_access_id,
12333         build_outer_field_access_method, outer_field_access_p,
12334         outer_field_expanded_access_p, outer_field_access_fix,
12335         build_incomplete_class_ref, patch_incomplete_class_ref,
12336         create_anonymous_class): Likewise.
12337         (inst_id, wpv_id): New static global variables.
12338         (synchronized:): New rule, tagged <node>.
12339         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
12340         rules.
12341         (anonymous_class_creation:): New rule, tagged <node>.
12342         (NEW_TK): Tagged <node>.
12343         (type_literals, array_type_literal): New rules, tagged <node>.
12344         (class_declaration:): Removed action when reducing by class_body:
12345         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
12346         using GET_CPC in sub-rules.
12347         (class_member_declaration): Handle inner classes.
12348         (method_declaration): When reducing method_header:, reset
12349         current_function_decl when appropriate.
12350         (method_declarator:): Set the number of formal parameter to 0 for
12351         method declared without arguments.
12352         (constructor_declarator:): Likewise.
12353         (static_initializer:): List of elements kept in a list.
12354         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
12355         use of the keyword `static' for type declarations.
12356         (block_statement:): Handle inner class declarations.
12357         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
12358         type qualified `this'.
12359         (class_instance_creation_expression): Use anonymous_class_creation:
12360         to handle inner class instances creation. Handle qualified `new'.
12361         (something_dot_new): Added appropriate actions.
12362         (create_new_parser_context): New function.
12363         (java_push_parser_context, java_parser_context_save_global,
12364         java_parser_context_suspend): Use create_new_parser_context.
12365         (check_modifiers): Changed leading comment.
12366         (check_class_interface_creation): Handle interclasses.
12367         (add_superinterfaces): Fixed comment.
12368         (create_interface): Build qualified name from the raw_name instead
12369         of its matching WFL. Push the initialized fields list. raw_name added
12370         as an extra argument to maybe_create_class_interface_decl.
12371         (create_class): Build qualified name from the raw_name instead of
12372         its matching WFL. Removed assignment to current_parsed_class_un.
12373         Call PUSH_ERROR before returning an error. Suspend the current
12374         parser context when processing an inner class. Push the
12375         initialized fields list. raw_name added as an extra argument to
12376         maybe_create_class_interface_decl. Add the private this$<n>
12377         field.
12378         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
12379         (register_fields): Get the class type from GET_CPC and handle
12380         previous errors.  Added code to handle the creation of static
12381         fields in inner classes. Initialized fields initialization
12382         statements kept in a list of lists.
12383         (maybe_generate_finit): Initialized fields initialization
12384         statements kept in a list of lists. Use GET_CPC.
12385         (maybe_generate_clinit): Likewise.
12386         (method_header): Use GET_CPC and GET_CPC_UN.
12387         (parser_qualified_classname): Handle inner classes.
12388         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
12389         (java_fix_constructors): Hide pointer to enclosing context
12390         instance in constructor list when dealing with inner classes.
12391         (jdep_resolve_class): Call resolve_class with extra first argument
12392         JDEP_ENCLOSING.
12393         (resolve_class): Add enclosing context as a first extra argument
12394         to do_resolve_class.
12395         (do_resolve_class): Call find_as_inner_class. Handle WFLs
12396         properly.
12397         (resolve_no_layout): Extra argument added to resolve_class
12398         invocation.
12399         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
12400         (java_get_real_method_name): Use GET_CPC_UN.
12401         (check_abstract_method_definitions): Use DECL_CLINIT_P.
12402         (java_check_abstract_methods): Handle static method declared in
12403         inner classes by an error.
12404         (java_check_regular_methods): Use DECL_CLINIT_P.
12405         (source_start_java_method): Also set DECL_MAX_LOCALS.
12406         (create_artificial_method): Call java_parser_context_save_global
12407         and java_parser_context_restore_global instead of saving/restoring
12408         the context by hand.
12409         (expand_start_java_method): Improved verbose mode message.
12410         (java_complete_expand_methods): Fixed leading comment. Use
12411         DECL_CLINIT_P.
12412         (fix_constructors): Added assignment to this$<n> if necessary.
12413         (java_expand_classes): Call java_complete_expand_classes instead
12414         of java_complete_expand_methods.
12415         (make_qualified_primary): Simplified.
12416         (merge_qualified_name): Optimized for missing left or right parts.
12417         (resolve_expression_name): Handle access to outer class fields from
12418         interclasses.
12419         (resolve_qualified_expression_name): New macro
12420         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
12421         classes. Report error on non appropriate qualification of
12422         `new'. Handle qualified `this'.
12423         (not_accessible_p): Allow access to outer class private fields from
12424         inner classes.
12425         (patch_method_invocation): Handle method invocations through
12426         access methods and inner class constructor invocations.
12427         (find_applicable_accessible_methods_list): Search enclosing
12428         contexts of an inner class.
12429         (search_applicable_methods_list): Fixed typo.
12430         (argument_types_convertible): Handle inner class constructors'
12431         hidden outer context reference argument.
12432         (qualify_ambiguous_name): Handle qualified `this'.
12433         (java_complete_lhs): Handle use of field accessed through
12434         artificial access methods in various cases of assignments. Handle
12435         CLASS_LITERAL node.
12436         (check_final_assignment): Use DECL_CLINIT_P.
12437         (valid_ref_assignconv_cast_p): Handle the destination being an
12438         enclosing context of the source.
12439         (patch_unaryop): Handle use of field accessed through artificial
12440         access methods.
12441         (patch_return): Use DECL_CLINIT_P.
12442         (patch_throw_statement): Use DECL_CLINIT_P.
12443         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
12444         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
12445         ID_INIT_P.
12446
12447 2000-01-16  Anthony Green  <green@cygnus.com>
12448
12449         * parse.y (build_string_concatenation): Only use
12450         StringBuffer(String) shortcut if String arg is constant.
12451
12452 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12453
12454         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
12455         the shift value to int. Fixed typo in comment.
12456
12457 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12458
12459         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
12460         * jcf-write.c: Likewise.
12461         * parse.y: Likewise.
12462         * parse.c: Regenerate.
12463
12464 2000-01-09  Anthony Green  <green@cygnus.com>
12465
12466         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
12467         bytecodes in the correct order.
12468
12469 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12470
12471         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
12472
12473 2000-01-06  Anthony Green  <green@cygnus.com>
12474
12475         * expr.c (java_lang_expand_expr): Switch to permanent obstack
12476         before building constant array decl.
12477
12478 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12479
12480         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
12481         method invocation and typo in conditional expression.
12482         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
12483         the appropriate NOTE_POP.
12484         * parse.y (patch_binop): Shift value mask to feature the right
12485         type.
12486
12487 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12488
12489         * class.c (assume_compiled, assume_compiled_node): Add static
12490         prototype.
12491         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
12492
12493         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
12494
12495         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
12496
12497         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
12498         to `__modifier' to avoid stringifying it.
12499
12500         * parse.y (verify_constructor_circularity): Don't call a variadic
12501         function with a non-literal format string.
12502         (java_check_abstract_methods): Move unreachable code inside
12503         `continue' statement.
12504         (lookup_method_invoke): Call xstrdup, not strdup.
12505
12506         * expr.c (expand_java_field_op): Avoid the use of ANSI string
12507         concatenation.
12508
12509         * jcf-parse.c (yyparse): Likewise.
12510
12511         * jv-scan.c (main): Likewise.
12512
12513 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12514
12515         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
12516         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
12517         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
12518         concatenation.
12519
12520         * parse.y (synchronized, variable_redefinition_error,
12521         check_class_interface_creation, create_interface, create_class,
12522         method_header, finish_method_declaration,
12523         check_modifiers_consistency, method_declarator,
12524         complete_class_report_errors, check_abstract_method_definitions,
12525         java_check_regular_methods, check_throws_clauses,
12526         java_check_abstract_methods, read_import_dir,
12527         check_pkg_class_access, declare_local_variables, fix_constructors,
12528         cut_identifier_in_qualified, resolve_expression_name,
12529         resolve_qualified_expression_name, patch_method_invocation,
12530         java_complete_lhs, patch_assignment, try_builtin_assignconv,
12531         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
12532         patch_exit_expr, patch_exit_expr, patch_switch_statement,
12533         patch_try_statement, patch_synchronized_statement,
12534         patch_throw_statement, check_thrown_exceptions,
12535         patch_conditional_expr): Likewise.
12536
12537 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12538
12539         * Makefile.in (LIBDEPS): Added gcc's errors.o
12540         (../jcf-dump$(exeext):): Link with gcc's errors.o
12541         (../gcjh$(exeext):): Likewise.
12542         * expr.c (expand_java_NEW): Layout the entire target type instead of
12543         laying out its methods only.
12544         (lookup_field): Layout the class after having loaded it.
12545         * java-tree.h (java_debug_context): Declared.
12546         * jcf-io.c (toplev.h): Included.
12547         (find_class): Removed assignment to jcf's outofsynch
12548         field. Force source file to be read if newer than its matching
12549         class file. Tweaked debug messages.
12550         * jcf-parse.c (jcf_out_of_synch): Deleted.
12551         (read_class): Call to jcf_out_of_synch removed.
12552         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
12553         (jcf_out_of_synch): Prototype deleted.
12554         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
12555         `deprecated' and `class_err': integer turned into bit-fields.
12556         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
12557         * parse.y (package_list): New global.
12558         (package_declaration:): Record newly parsed package name.
12559         (extra_ctxp_pushed_p): Static global deleted.
12560         (java_parser_context_save_global): Create buffer context for the
12561         purpose of saving globals, if necessary.
12562         (java_parser_context_restore_global): Pop context pushed for the
12563         purpose of saving globals, if necessary.
12564         (java_debug_context_do): New prototype and function.
12565         (java_debug_context): Likewise.
12566         (do_resolve_class): Use already parsed package names to qualify
12567         and lookup class candidate.
12568         (java_pre_expand_clinit): Removed unnecessary local variable.
12569
12570 1999-12-17  Tom Tromey  <tromey@cygnus.com>
12571
12572         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
12573         fixes PR gcj/119.
12574         (process_file): Use `\n\' at end of each line in string.
12575
12576 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12577
12578         * expr.c (expand_invoke): Layout the loaded class before
12579         attempting to use it.
12580         (expand_java_field_op): Allow final field assignments to take
12581         place in $finit$.
12582         * typeck.c (convert): Return error_mark_node if expr is null.
12583
12584 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12585
12586         * class.c (class_depth): Return -1 if the class doesn't load
12587         properly.
12588         * expr.c (can_widen_reference_to): Check for errors during depth
12589         computation and return 0 accordingly.
12590         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
12591         create default constructors and add an other error check.
12592         * parse.h (java_fix_constructors): Prototyped.
12593         * parse.y (java_pre_expand_clinit): Likewise.
12594         (build_super_invocation): Re-prototyped to feature one argument.
12595         (java_check_circular_reference): Directly use `current'.
12596         (java_fix_constructors): New function.
12597         (java_check_regular_methods): Don't create default constructors
12598         here, but abort if none were found.
12599         (java_complete_expand_methods): Pre-process <clinit> calling
12600         java_pre_expand_clinit.
12601         (java_pre_expand_clinit): New function.
12602         (fix_constructors): build_super_invocation invoked with the
12603         current method declaration as an argument.
12604         (build_super_invocation): Use the context of the processed method
12605         decl argument instead of current_class.
12606         * typeck.c (lookup_java_method): Take WFLs in method names into
12607         account.
12608
12609 1999-12-14  Per Bothner  <per@bothner.com>
12610
12611         * class.c (make_class_data): flag_keep_inline_functions to keep
12612         private methods in the method array.
12613
12614 1999-12-15  Anthony Green  <green@cygnus.com>
12615
12616         * check-init.c (check_init): Take into account both types of
12617         `throw's when checking for uninitialized variables.
12618
12619 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12620
12621         * parse.y (java_complete_lhs): Force conversion of array
12622         dimensions to int_type_node, that's what runtime's ABI expects.
12623
12624 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12625
12626         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
12627         operand of a WFL, until the Java front-end gets fixed with regard
12628         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
12629
12630 1999-12-10  Andrew Haley  <aph@cygnus.com>
12631
12632         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
12633         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
12634         expr.c (build_java_athrow): Add support for sjlj-exceptions.
12635         java-tree.h: Ditto.
12636         jcf-write.c: Ditto.
12637
12638 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12639
12640         * expr.c (java_lang_expand_expr): Switch to permanent obstack
12641         before calling expand_eh_region_start and expand_start_all_catch.
12642         * except.c (expand_start_java_handler): Switch to permanent
12643         obstack before calling expand_eh_region_start.
12644         (expand_end_java_handler): Switch to permanent obstack before
12645         calling expand_start_all_catch.
12646
12647 1999-12-5  Anthony Green  <green@cygnus.com>
12648
12649         * decl.c (init_decl_processing): Mark throw_node as a noreturn
12650         function with side effects.
12651         (init_decl_processing): Mark all memory allocating DECLs with
12652         DECL_IS_MALLOC.
12653
12654 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12655
12656         * except.c (expand_end_java_handler): Call
12657         expand_resume_after_catch and end_catch_handler.
12658
12659 1999-11-30  Anthony Green  <green@cygnus.com>
12660
12661         * verify.c (verify_jvm_instructions): Create new return label
12662         chain if non existent (don't rely on the verified state of the jsr
12663         target.)
12664
12665 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12666
12667         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
12668         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
12669
12670         * parse.y (patch_assignment): Removed bogus final class test on
12671         lhs when checking on whether to emit an ArrayStoreException runtime
12672         check.
12673         * expr.c (expand_java_arraystore): Likewise.
12674
12675 1999-11-28 Anthony Green <green@cygnus.com>
12676
12677         * decl.c (find_local_variable): Reuse single slot decls when
12678           appropriate.
12679
12680 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12681
12682         * jcf-parse.c (saw_java_source): Global variable removed.
12683         (read_class): Don't use `saw_java_source'. Added extra braces.
12684         (yyparse): Code setting `saw_java_source' removed.
12685
12686 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
12687
12688         * except.c (emit_handlers): Zero catch_clauses after emitting them.
12689
12690 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12691
12692         * verify.c (merge_type_state): Non verified subroutines being
12693         considered more than once to trigger passive type merge.
12694
12695 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12696
12697         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
12698         in case of error. Error message tuned.
12699
12700 1999-11-21  Anthony Green  <green@cygnus.com>
12701
12702         * constants.c (find_methodref_index): Unwrap method names before
12703         inserting them in the constant pool.
12704
12705         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
12706
12707         * class.c (assume_compiled_node): New typedef.
12708         (assume_compiled_tree): New static data.
12709         (find_assume_compiled_node): New function.
12710         (add_assume_compiled): New function.
12711         (assume_compiled): New function.
12712         * class.c (make_class_data): Use assume_compiled.
12713         (is_compiled_class): Use assume_compiled.
12714
12715         * java-tree.h (add_assume_compiled): Declare.
12716
12717         * lang.c (lang_decode_option): Parse new options.
12718
12719 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12720
12721         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
12722         int_type_node: that's what `_Jv_AllocObject' expects.
12723
12724 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12725
12726         * parse.y (lookup_method_invoke): Use lang_printable_name to
12727         reliably build the type name during error report. Fixes PR gcj/97.
12728
12729 1999-11-09  Tom Tromey  <tromey@cygnus.com>
12730
12731         * jcf-path.c: Include <sys/stat.h>.
12732         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
12733         (DIR_UP): New macro.
12734
12735 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12736
12737         * parse.y (source_end_java_method): Resume permanent allocation,
12738         reversing Apr 27 1998 patch.
12739         (patch_string_cst): Pop obstacks after having pushed the permanent
12740         ones.
12741
12742 1999-11-05  Tom Tromey  <tromey@cygnus.com>
12743
12744         * class.c (finish_class): Emit inlined methods if any native
12745         methods exist in the class.  Fixes PR gcj/85.
12746
12747 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12748
12749         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
12750         (qualify_ambiguous_name): Likewise.
12751
12752 1999-11-03  Godmar Back <gback@cs.utah.edu>
12753
12754         * typeck.c: (lookup_java_method):  search all inherited
12755         interfaces when looking up interface method.
12756
12757 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12758
12759         * parse.y (method_header:): Issue error message for rule `type
12760         error'.
12761         (synchronized:): Error report when not using synchronized.
12762
12763 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12764
12765         * parse.y (resolve_qualified_expression_name): Prevent `this' from
12766         being used before the superclass constructor has been called.
12767         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
12768         instead of `CALL_THIS_CONSTRUCTOR_P'.
12769
12770 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
12771
12772         * check-init.c: Fix typo in comment.
12773
12774 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12775
12776         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
12777         and final method.
12778
12779 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12780
12781         * parse.y (expression_statement:): Call function to report
12782         improper invocation of a constructor.
12783         (parse_ctor_invocation_error): New function.
12784
12785 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
12786
12787         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
12788         remember_end_note.
12789
12790 1999-10-21  Tom Tromey  <tromey@cygnus.com>
12791
12792         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
12793         in generated `main'.
12794
12795 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12796
12797         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
12798         (qualify_ambiguous_name): Likewise.
12799
12800 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12801
12802         * parse.y (java_complete_tree): fold_constant_for_init to work on
12803         permanent_obstack.
12804         (java_complete_lhs): Likewise.
12805         (array_constructor_check_entry): Complete an initializer element
12806         on permanent_obstack.
12807
12808 1999-10-19  Tom Tromey  <tromey@cygnus.com>
12809
12810         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
12811         From Mike Moreton <mike@pillim.demon.co.uk>.
12812
12813 1999-10-15  Greg McGary  <gkm@gnu.org>
12814
12815         * java-tree.h (flag_bounds_check): Remove extern decl.
12816         * lang.c (flag_bounds_check): Remove global variable.
12817         (lang_f_options): Remove "bounds-check" entry.
12818         (lang_init_options): Default flag_bounds_check to "on".
12819
12820 1999-10-14  Tom Tromey  <tromey@cygnus.com>
12821
12822         * jvgenmain.c (usage): New function.
12823         (main): Use it.  Also, handle `-D' options.
12824         * jvspec.c (lang_specific_driver): Recognize -D.
12825         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
12826
12827         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
12828
12829 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12830
12831         * jcf-dump.c (print_constant, disassemble_method): Don't call a
12832         variadic function with a non-literal format string.
12833
12834         * parse-scan.y (report_main_declaration): Likewise.
12835
12836         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
12837
12838         * parse.y (read_import_dir, patch_assignment, patch_binop,
12839         patch_array_ref): Likewise.
12840
12841         * typeck.c (build_java_array_type): Likewise.
12842
12843         * verify.c (verify_jvm_instructions): Likewise.
12844
12845 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12846
12847         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
12848
12849 1999-10-07  Anthony Green  <green@cygnus.com>
12850
12851         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
12852         where CHECK_PUT may fail for valid reasons.
12853
12854         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
12855         UNSAFE_PUTN): New macros.
12856
12857 1999-10-04  Tom Tromey  <tromey@cygnus.com>
12858
12859         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
12860         well.  Fixes Java PR gcj/59.
12861         * parse-scan.y (yyerror): Report errors.
12862
12863 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
12864
12865         * decl.c (insert_block): Remove unconditional `abort'.
12866
12867 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
12868
12869         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
12870         FUNCTION_CODE now of type int.  All callers changed.
12871         Set the builtin's DECL_BUILT_IN_CLASS.
12872
12873 1999-09-23  Tom Tromey  <tromey@cygnus.com>
12874
12875         * jvspec.c (lang_specific_driver): Don't read spec file if
12876         -fsyntax-only given.
12877
12878 1999-09-22  Tom Tromey  <tromey@cygnus.com>
12879
12880         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
12881
12882         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
12883         (WORDS_TO_LONG): Likewise.
12884         (WORDS_TO_DOUBLE): Likewise.
12885
12886 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12887
12888         * jcf-write.c (RELOCATION_VALUE_0): New macro.
12889         (RELOCATION_VALUE_1): Likewise.
12890         (emit_iinc, emit_reloc, push_constant1, push_constant2,
12891         push_in_const, push_long_const): Prototyped.
12892         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
12893         (push_constant2): Likewise.
12894         (push_int_const): Cast find_constant1's integer arguments to `jword'.
12895         (find_constant_wide): Cast find_constant2's integer arguments to
12896         `jword'.
12897         (find_constant_index): Cast find_constant2's and find_constant2's
12898         integer arguments to `jword'.
12899         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
12900         (emit_switch_reloc): Use RELOCATION_VALUE_0.
12901         (emit_if): Use RELOCATION_VALUE_1.
12902         (emit_goto): Likewise.
12903         (emit_jsr): Likewise.
12904         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
12905         argument to push_long_const to HOST_WIDE_INT.
12906
12907 1999-09-15  Andreas Schwab  <schwab@suse.de>
12908
12909         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
12910
12911 1999-09-20  Nick Clifton  <nickc@cygnus.com>
12912
12913         * lang.c (lang_decode_option): Extend comment.
12914
12915 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12916
12917         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
12918         instead of fndecl.
12919
12920 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12921
12922         * gjavah.c (get_field_name, print_method_info, print_include,
12923         add_namelet): Use xmalloc, not malloc.
12924
12925         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
12926         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
12927         NULL pointer.
12928
12929         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
12930
12931         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
12932
12933         * jcf-path.c (add_entry): Likewise.
12934
12935         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
12936
12937         * jv-scan.c (xmalloc): Remove definition.
12938
12939         * jvgenmain.c (xmalloc): Likewise.
12940
12941         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
12942
12943         * lex.c (java_store_unicode): Use xrealloc, not realloc.
12944
12945         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
12946         concat, not xmalloc/sprintf.
12947         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
12948         (xstrdup): Remove definition.
12949
12950         * parse.y (duplicate_declaration_error_p,
12951         constructor_circularity_msg, verify_constructor_circularity,
12952         check_abstract_method_definitions, java_check_regular_methods,
12953         java_check_abstract_methods, patch_method_invocation,
12954         check_for_static_method_reference, patch_assignment, patch_binop,
12955         patch_cast, array_constructor_check_entry, patch_return,
12956         patch_conditional_expr): Use xstrdup, not strdup.
12957
12958         * zextract.c (ALLOC): Use xmalloc, not malloc.
12959
12960 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12961
12962         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
12963
12964         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
12965         (do_spec, lang_specific_pre_link, lang_specific_driver,
12966         input_filename, input_filename_length): Don't declare.
12967         (main_class_name, jvgenmain_spec, lang_specific_driver):
12968         Constify a char*.
12969         (lang_specific_driver): All calls to the function pointer
12970         parameter now explicitly call `fatal'.
12971
12972 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12973
12974         * parse.y (find_applicable_accessible_methods_list): Search
12975         abstract classes as interfaces.
12976
12977 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12978
12979         * class.c (finish_class): We're now outside a valid method
12980         declaration. Tell the rest of gcc so.
12981
12982 1999-09-08  Bruce Korb  autogen@linuxbox.com
12983
12984         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
12985
12986 1999-09-07  Tom Tromey  <tromey@cygnus.com>
12987
12988         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
12989         java-array.h.
12990         (decode_signature_piece): Don't emit "::" in JArray<>.
12991         (print_namelet): Only print trailing `;' when printing a class.
12992
12993 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
12994
12995         * java-tree.h: Delete declarations for all tree nodes now moved to
12996         global_trees.
12997         * decl.c: Delete their definitions.
12998
12999 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
13000
13001         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
13002         * Makefile.in (OBJS): Add ggc-callbacks.o.
13003         (OBJDEPS): Likewise.
13004
13005 1999-09-03  Tom Tromey  <tromey@cygnus.com>
13006
13007         * parse.y (strip_out_static_field_access_decl): Return operand if
13008         it satisfies JDECL_P.
13009
13010 1999-09-02  Tom Tromey  <tromey@cygnus.com>
13011
13012         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
13013         Handle nested arrays, like `[[I'.
13014
13015 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13016
13017         * class.c (finish_class): Remove unused parameter, all callers
13018         changed.
13019
13020         * expr.c (build_java_athrow): Change return type to void.
13021         (java_lang_expand_expr): Make sure each case in switch returns a
13022         value.
13023
13024         * java-tree.h (finish_class): Fix prototype to take void args.
13025
13026         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
13027         (main): Issue return from main, not exit.
13028
13029         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
13030
13031         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
13032
13033         * jv-scan.c (main): Issue return from main, not exit.
13034
13035         * parse.y (check_abstract_method_definitions,
13036         java_check_abstract_method_definitions): Add static prototypes.
13037         (java_complete_expand_methods): Fix call to `finish_class'.
13038
13039         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
13040         and `prevpc'.
13041
13042 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13043
13044         * lang.c (language_string): Constify.
13045
13046 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13047
13048         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
13049         Remove hacks for stuff which comes from libiberty.
13050
13051         * Make-lang.in: Likewise.
13052
13053 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
13054
13055         * Makefile.in (xref.o): Depend on xref.c explicitly.
13056
13057 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13058
13059         * java-tree.h (lang_printable_name): Constify a char*.
13060
13061         * lang.c (lang_printable_name): Likewise.
13062
13063 1999-08-27  Jeffrey A Law  (law@cygnus.com)
13064
13065         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
13066         comments in C code.
13067
13068 1999-08-26  Tom Tromey  <tromey@cygnus.com>
13069
13070         * gjavah.c (print_cxx_classname): Print "::" before qualified
13071         name.
13072
13073 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13074
13075         * parse.y (lookup_cl): Changed leading comment. Now does its best
13076         to set the column number.
13077         (qualify_ambiguous_name): Take WFL wrappers into account.
13078
13079 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
13080
13081         * verify.c (verify_jvm_instructions): Don't check instruction
13082         validity beyond end of method.
13083
13084 1999-08-25  Tom Tromey  <tromey@cygnus.com>
13085
13086         * jvspec.c (lang_specific_driver): Correctly handle --help again.
13087
13088 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13089
13090         * gjavah.c (print_name, print_base_classname, utf8_cmp,
13091         cxx_keyword_subst, generate_access, name_is_method_p,
13092         get_field_name, print_field_name, super_class_name, print_include,
13093         decode_signature_piece, print_class_decls, usage, help,
13094         java_no_argument, version, add_namelet, print_namelet): Add static
13095         prototype.
13096         (print_base_classname, utf8_cmp, cxx_keyword_subst,
13097         name_is_method_p): Constify a char*.
13098         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
13099         Provide a final else clause in an if-else-if.
13100         (print_field_info): Add missing final arg in function call to
13101         `print_field_name'.
13102         (print_method_info, decompile_method, decode_signature_piece,
13103         print_c_decl, print_full_cxx_name, print_stub,
13104         print_mangled_classname, super_class_name, print_include,
13105         add_namelet, add_class_decl, print_class_decls, process_file,
13106         help): Constify a char*.
13107
13108         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
13109         push_int_const, find_constant_wide, find_constant_index,
13110         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
13111         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
13112         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
13113         emit_if, emit_goto, emit_jsr, call_cleanups,
13114         make_class_file_name): Add static prototypes.
13115         (generate_bytecode_return, generate_bytecode_insns): Pass a
13116         NULL_PTR, not a NULL_TREE.
13117
13118         * jv-scan.c: Include "jcf.h".
13119         (main): Declare using DEFUN macro.
13120
13121         * jvspec.c (find_spec_file, lang_specific_pre_link,
13122         lang_specific_driver): Add prototypes.
13123         (find_spec_file): Constify a char*.
13124
13125         * keyword.gperf (hash, java_keyword): Add prototypes.
13126
13127         * lang.c (lang_print_error): Add static prototype.
13128         (lang_init): Prefer memcpy over bcopy to avoid casts.
13129
13130         * lex.c (yylex): Add static prototype.
13131
13132         * parse-scan.y: Include "lex.c" earlier.
13133
13134         * parse.h: Remove redundant declaration for `yylex'.
13135
13136         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
13137         labeled_block_contains_loop_p): Add static prototypes.
13138         (not_accessible_p): Make static to match prototype.
13139
13140         * verify.c (start_pc_cmp): Don't needlessly cast away const.
13141
13142 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13143
13144         * parse.y (check_method_redefinition): Changed leading comment.
13145         (check_abstract_method_definitions): New function.
13146         (java_check_abstract_method_definitions): New function.
13147         (java_check_regular_methods): Call it.
13148         (verify_constructor_super): Fixed indentation.
13149         (lookup_method_invoke): Likewise.
13150
13151 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13152
13153         * parse.y (method_header): Return a null pointer if the current
13154         class node is null.
13155         (finish_method_declaration): Return if the current function decl
13156         is null.
13157         (source_start_java_method): Likewise.
13158         (java_method_add_stmt): Likewise.
13159
13160 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13161
13162         * class.c (emit_register_class): Removed unnecessary call to
13163         start_sequence.
13164         * parse.y (labeled_block_contains_loop_p): Removed unused local
13165         variable.
13166
13167 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13168
13169         * parse.y (java_refold): Added prototype.
13170
13171 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13172
13173         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
13174         (java_stabilize_reference): Removed unnecessary `else'.
13175         (java_complete_lhs): Set flag to remember boolean. Call
13176         java_refold. Added comments.
13177         (java_decl_equiv): New function.
13178         (binop_compound_p): Likewise.
13179         (java_refold): Likewise.
13180         (patch_unaryop): Striped static field access assigned to decl and
13181         op. Changed promotion scheme for ++/-- operators.
13182         (search_loop): New function.
13183         (labeled_block_contains_loop_p): Likewise.
13184         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
13185         comment.
13186         (patch_bc_statement): Call search_loop. Fixed comment.
13187
13188 1999-08-14  Anthony Green  <green@cygnus.com>
13189
13190         * expr.c (java_lang_expand_expr): Mark static array data as
13191         referenced.
13192
13193 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
13194
13195         * jvgenmain.c (main): NUL-terminate name_obstack.
13196
13197 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13198
13199         * check-init.c (check_bool2_init, done_alternative): Add static
13200         prototypes.
13201
13202         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
13203         (add_method, build_utf8_ref, build_class_ref,
13204         append_gpp_mangled_type, layout_class_method): Constify a char*.
13205
13206         * decl.c (push_promoted_type, make_binding_level): Add static
13207         prototypes.
13208         (push_promoted_type, pushdecl): Constify a char*.
13209
13210         * except.c (find_handler_in_range, link_handler,
13211         check_start_handlers): Add static prototypes.
13212
13213         * expr.c (process_jvm_instruction): Constify a char*.
13214
13215         * gjavah.c (main): Constify a char*.
13216
13217         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
13218         Constify a char*.
13219
13220         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
13221         static prototypes.
13222         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
13223         munge, print_ents): Constify a char*.
13224
13225         * jcf-dump.c (disassemble_method): Constify a char*.
13226         (print_constant_pool, print_exception_table): Add static prototypes.
13227         (print_constant, print_exception_table, main, disassemble_method):
13228         Constify a char*.
13229
13230         * jcf-io.c (find_classfile, find_class): Likewise.
13231
13232         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
13233         (set_source_filename, predefined_filename_p): Add static prototypes.
13234         (set_source_filename, get_constant, get_class_constant,
13235         find_in_current_zip): Constify a char*.
13236
13237         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
13238         static prototypes.
13239         (add_entry, add_path, jcf_path_classpath_arg,
13240         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
13241
13242         * jcf-reader.c (get_attribute, jcf_parse_preamble,
13243         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
13244         jcf_parse_one_method, jcf_parse_methods,
13245         jcf_parse_final_attributes): Add static prototypes.
13246         (get_attribute): Constify a char*.
13247
13248         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
13249         jcf_dependency_add_target, jcf_path_classpath_arg,
13250         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
13251
13252         * jv-scan.c (main): Constify a char*.
13253         (gcc_obstack_init): Add prototype arguments.
13254
13255         * jvgenmain.c (gcc_obstack_init): Likewise.
13256         (main): Constify a char*.
13257
13258         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
13259         static prototypes.
13260         (put_decl_string, lang_print_error): Constify a char*.
13261         (lang_init): Remove redundant extern prototype.
13262
13263         * mangle.c (emit_unicode_mangled_name): Constify a char*.
13264
13265         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
13266         Add static prototypes.
13267         (get_type_from_signature): Constify a char*.
13268
13269         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
13270         Add static prototypes.
13271         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
13272         (verify_jvm_instructions): Constify a char*.
13273
13274         * xref.c (xref_flag_value): Likewise.
13275
13276         * xref.h (xref_flag_value): Likewise.
13277
13278         * zextract.c (makeword, makelong): Add static prototypes.
13279         (makeword, makelong): Constify a uch*.
13280
13281 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13282
13283         * lang.c (java_dummy_print): Constify a char*.
13284         (lang_print_error): Likewise.
13285         (lang_init): Remove redundant prototype for `print_error_function'.
13286         (lang_init_source): Likewise.
13287         (lang_identify): Constify a char*.
13288
13289 1999-08-09  Tom Tromey  <tromey@cygnus.com>
13290
13291         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
13292         (WORDS_TO_LONG): Likewise.
13293         (WORDS_TO_DOUBLE): Likewise.
13294
13295 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13296
13297         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
13298
13299         * expr.c (java_stack_pop, java_array_data_offset,
13300         build_java_throw_out_of_bounds_exception, case_identity,
13301         build_java_check_indexed_type): Add static prototypes.
13302         (linenumber_table, expand_invoke, expand_java_field_op,
13303         build_primtype_type_ref, expand_byte_code): Constify a char*.
13304
13305         * java-tree.h (build_primtype_type_ref, linenumber_table):
13306         Constify a char*.
13307         (java_lang_expand_expr): Add prototype.
13308
13309         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
13310         `java_lang_expand_expr'.
13311
13312         * lex.c (java_lex_error): Constify a char*.
13313         (java_get_unicode, java_read_char, java_allocate_new_line,
13314         java_unget_unicode, java_sneak_unicode): Prototype.
13315
13316         * parse-scan.y (current_class, package_name, method_declarator,
13317         report_class_declaration, yyerror): Constify a char*.
13318
13319         * parse.h (java_report_errors): Prototype.
13320         (yyerror): Constify a char*.
13321
13322         * parse.y (classitf_redefinition_error, check_modifiers,
13323         parse_jdk1_1_error, lookup_package_type,
13324         lookup_package_type_and_set_next, get_printable_method_name,
13325         purify_type_name): Constify a char*.
13326         (build_super_invocation, maybe_generate_finit,
13327         verify_constructor_super, parser_add_interface,
13328         add_superinterfaces, jdep_resolve_class, note_possible_classname,
13329         java_complete_expand_methods, java_expand_finals,
13330         cut_identifier_in_qualified, java_stabilize_reference,
13331         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
13332         merge_string_cste): Prototype.
13333         (single_type_import_declaration, yyerror,
13334         variable_redefinition_error, build_array_from_name,
13335         build_unresolved_array_type, check_class_interface_creation,
13336         resolve_class, complete_class_report_errors,
13337         note_possible_classname, read_import_dir,
13338         find_in_imports_on_demand, resolve_package, fix_constructors,
13339         check_deprecation, lookup_method_invoke,
13340         maybe_build_primttype_type_ref, array_constructor_check_entry):
13341         Constify a char*.
13342         (java_complete_expand_methods, java_expand_finals): Make static.
13343         (convert_narrow): Remove static prototype.
13344
13345 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
13346
13347         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
13348
13349 1999-08-02  Richard Henderson  <rth@cygnus.com>
13350
13351         * decl.c: Include defaults.h instead of expr.h.
13352         * parse.y: Likewise.
13353
13354 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
13355
13356         * java/decl.c (start_java_method): Change all uses of
13357         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
13358         Ensure expr.h is included.
13359         * java/expr.c (pop_arguments): Ditto.
13360         * java/parse.y (expand_start_java_method): Ditto.
13361
13362 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13363
13364         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
13365
13366 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
13367
13368         * decl.c: Include "function.h".
13369         * except.c: Likewise.
13370         * parse.y: Likewise.
13371         * Makefile.in: Update dependencies.
13372
13373 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13374
13375         * expr.c (build_java_soft_divmod): Provide a default case in switch.
13376         (java_lang_expand_expr): Mark parameters `target', `tmode' and
13377         `modifier' with ATTRIBUTE_UNUSED.
13378
13379         * gjavah.c (process_file): Add braces around ambiguous `else'.
13380
13381         * jcf-dump.c (print_access_flags, localvar_free): Change return
13382         type to void.
13383
13384         * parse.y (java_complete_expand_method): Initialize variable
13385         `exception_copy'.
13386         (resolve_qualified_expression_name): Likewise for `field_decl'.
13387         (patch_method_invocation): Likewise for `class_to_search'.
13388         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
13389         (patch_assignment): Likewise for `lhs_type'.
13390
13391         * verify.c (verify_jvm_instructions): Remove unused variable
13392         `caller'.
13393
13394 1999-07-25  Richard Henderson  <rth@cygnus.com>
13395
13396         * decl.c (va_list_type_node): New.
13397
13398 1999-07-25  Anthony Green  <green@cygnus.com>
13399
13400         * gjavah.c (print_stub): New function.
13401         (METHOD_IS_NATIVE): New macro.
13402         (print_mangled_classname): Make static.
13403         (HANDLE_END_FIELD): Don't emit fields during stub generation.
13404         (process_file): Perform stub generation.
13405         (HANDLE_METHOD): Don't emit class decls during stub
13406         generation.
13407         (HANDLE_END_METHOD): Take into account stub generation.
13408         (print_method_info): Handle stub generation.
13409         (print_stub): New function.
13410         (print_cxx_classname): Make signature consistant with others.
13411         (help): Describe -stubs option.
13412         (main): Create stub file.
13413         (version): Use version.c.
13414         (print_full_cxx_name): New function.
13415         (print_c_decl): Use print_full_cxx_name.
13416
13417 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13418
13419         * check-init.c (check_init): Handle MAX_EXPR.
13420
13421 1999-07-15  Andrew Haley  <aph@cygnus.com>
13422
13423         * lang.c (flag_use_divide_subroutine): New variable.
13424         * typeck.c: (convert_ieee_real_to_integer): Bounds check
13425         fp-to-integer conversion.
13426         (convert): Call convert_ieee_real_to_integer when flag_fast_math
13427         is not set.
13428
13429         * expr.c (build_java_soft_divmod): New function.
13430         (build_java_binop): Call build_java_soft_divmod if
13431         flag_use_divide_subroutine is set.
13432         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
13433         soft_lrem_node: new builtin functions.
13434         (init_decl_processing) Initialize the new builtins.
13435         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
13436         soft_lrem_node: new builtin functions.
13437         (build_java_soft_divmod): New function.
13438         * parse.y: Call build_java_soft_divmod if
13439         flag_use_divide_subroutine is set.
13440         * parse.c: Rebuilt.
13441
13442         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
13443         a --specs= arg) even if not linking.
13444         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
13445         -fuse-divide-subroutine
13446
13447 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13448
13449         * parse.y (resolve_and_layout): Check methods only once.
13450         (resolve_qualified_expression_name): Verify thrown exceptions
13451         compatibility.
13452         (check_thrown_exceptions): Reject exceptions thrown in
13453         initializer. Error message tuned.
13454
13455 1999-07-14  Andrew Haley  <aph@cygnus.com>
13456
13457         * expr.c (expand_expr): Do not return the last statement in a
13458         block as the block's value.
13459
13460 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13461
13462         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
13463         CALL_EXPR, to avoid order of evaluation changes.
13464
13465 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13466
13467         * parse.y (qualify_ambiguous_name): Do not use
13468         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
13469
13470 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13471
13472         * check-init.c (check_init): Handle MAX_EXPR.
13473         * expr.c (force_evaluation_order): Force method call arguments to
13474         be evaluated in left-to-right order.
13475         * parse.y (qualify_ambiguous_name): Loop again to qualify
13476         NEW_ARRAY_EXPR properly.
13477
13478 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13479
13480         * parse.y (patch_invoke): Resolve unresolved invoked method
13481         returned type.
13482         (qualify_ambiguous_name): STRING_CST to qualify expression for
13483         type name resolution.
13484
13485 1999-06-24  Andrew Haley  <aph@cygnus.com>
13486
13487         * class.c (finish_class): Whenever a deferred method is
13488         output, rescan the list of methods to see if a new candidate for
13489         output can be found.
13490
13491 1999-06-28  Tom Tromey  <tromey@cygnus.com>
13492
13493         * jvspec.c (lang_specific_driver): Recognize --help.
13494
13495 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13496
13497         * parse.y (resolve_package): Fixed bogus return statement.
13498         (patch_method_invocation): Resolve method invocation beginning with
13499         a package name qualifier.
13500
13501 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13502
13503         * Make-lang.in (java.stage1): Depend on stage1-start.
13504         (java.stage2): Likewise for stage2-start.
13505         (java.stage3): Likewise for stage3-start.
13506         (java.stage4): Likewise for stage4-start.
13507
13508 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13509
13510         * parse.y (java_complete_lhs): When doing cross referencing, don't
13511         try to keep file location on a WFL expanded as a CALL_EXPR.
13512
13513 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13514
13515         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
13516         compiling to class file a void method with an empty method body.
13517         As a side effect, the bytecode backend will generate the
13518         appropriate `return' instruction.
13519
13520 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13521
13522         * parse.y (lookup_package_type_and_set_next): New function prototype.
13523         (resolve_package): Search current and imported packages.
13524         (lookup_package_type_and_set_next): New function.
13525
13526 1999-06-22  Andrew Haley  <aph@cygnus.com>
13527
13528         * verify.c (verify_jvm_instructions): Check for pending blocks
13529         before invalid PC test and opcode switch, not after.
13530
13531 1999-06-21  Andrew Haley  <aph@cygnus.com>
13532
13533         * except.c (find_handler_in_range): The upper limit for exception
13534         ranges is exclusive, not inclusive: (start <= pc < end).
13535         (link_handler): find child pointer which points to outer by
13536         searching sibling list: previous code incorrectly assumed that
13537         outer->outer->first_child must point to outer.
13538         * verify.c (verify_jvm_instructions): FIXME added to code for
13539         `athrow'.
13540         (verify_jvm_instructions): Do not assume that the last block
13541         processed in a subroutine is a block which ends with a `ret'
13542         instruction.  With some control flows it is possible that the last
13543         block ends with an `athrow'.
13544
13545 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13546
13547         * parse.y (qualify_ambiguous_name): Reorganized the post
13548         evaluation of non WFL leading expression nodes.
13549
13550 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13551
13552         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
13553         CONVERT_EXPR.
13554
13555 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13556
13557         * parse.y (qualify_ambiguous_name): Handle qualified expression
13558         beginning with a STRING_CST.
13559
13560 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13561
13562         * parse.y (register_fields): Set DECL_INITIAL on both
13563         pre-initialized static and public fields.
13564         (resolve_field_access): Static field access expressions to always
13565         use pointer types.
13566         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
13567         qualification. CONVERT_EXPR to be resolved as an expression name.
13568         (java_complete_lhs): Identify and access qualified final
13569         initialized field in switch statement case expression.
13570         (fold_constant_for_init): Pre-initialized field decl constant to
13571         be folded.
13572
13573 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13574
13575         * parse.y (note_possible_classname): Mark returned node with
13576         QUALIFIED_P only if the original class name contained a '/'.
13577
13578 1999-06-05  Anthony Green  <green@cygnus.com>
13579
13580         * Make-lang.in (gcjh): More parallel build fixes.
13581
13582 1999-06-03  Mike Stump  <mrs@wrs.com>
13583
13584         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
13585
13586 1999-06-02  Anthony Green  <green@cygnus.com>
13587
13588         * except.c (link_handler): Chain exception handlers in order.
13589
13590 1999-06-02  Anthony Green  <green@cygnus.com>
13591
13592         * expr.c (expand_byte_code): Fill unreachable bytecode regions
13593         with nops and process as usual in order to always set correct EH
13594         ranges.  Emit detailed warnings about unreachable bytecodes.
13595
13596 1999-06-02  Anthony Green  <green@cygnus.com>
13597
13598         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
13599         constant.
13600
13601 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13602
13603         * parse.y (lookup_field_wrapper): Unified returned value to NULL
13604           or the searched field decl.
13605
13606 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13607
13608         * parse.y (fold_constant_for_init): Convert numerical constant
13609         values to the type of the assigned field.
13610
13611 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13612
13613         * expr.c (lookup_field): Relaxed the test on class loading error
13614         detection.
13615         * parse.y (fold_constant_for_init): Enabeled old code.
13616
13617 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13618
13619         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
13620         decide the validity of the cast of a java.lang.Cloneable reference
13621         to an array.
13622         (patch_conditional_expr): Fixed first argument passed to
13623         binary_numeric_promotion.
13624
13625 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13626
13627         * parse.y (qualify_ambiguous_name): Take into account that a
13628         CONVERT_EXPR might specify a type as a WFL.
13629
13630 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13631
13632         * parse.y (patch_assignment): Save the rhs before using it as an
13633         argument to _Jv_CheckArrayStore.
13634
13635 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13636
13637         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
13638
13639 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13640
13641         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
13642         floating point literal only when the exponent indicator has been
13643         parsed.
13644
13645 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13646
13647         * parse.y (formal_parameter:): Construct argument tree list
13648         element even if a yet unsupported final parameter was encountered.
13649
13650 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13651
13652         * parse.y (finish_method_declaration): Issue errors for native or
13653         abstract methods declared with a method body, as well as for non
13654         native or non abstract methods with no method body.
13655
13656 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13657
13658         * class.c (build_utf8_ref): Initialize variable `field'.
13659
13660         * decl.c (init_decl_processing): Initialize variable `field'.
13661
13662         * expr.c (build_known_method_ref): Mark parameters `method_type',
13663         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
13664         (process_jvm_instruction): Likewise for parameter `length'.
13665
13666         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
13667         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
13668         ATTRIBUTE_UNUSED.
13669
13670         * parse.y (maybe_generate_clinit): Remove unused variable
13671         `has_non_primitive_fields'.
13672         (find_in_imports_on_demand): Initialize variables `node_to_use'
13673         and `cl'.
13674         (patch_binop): Likewise for variable `prom_type'.
13675         (patch_unaryop): Likewise for variable `prom_type'.
13676
13677         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
13678
13679         * xref.c (xref_table): Add missing initializer.
13680
13681 1999-05-14  Tom Tromey  <tromey@cygnus.com>
13682
13683         * java-except.h (struct eh_range): Removed unused `next' member.
13684         * verify.c (verify_jvm_instructions): Call check_nested_ranges
13685         after adding all exception handlers.  Sort exception ranges in
13686         order of start PC.
13687         (struct pc_index): New structure.
13688         (start_pc_cmp): New function.
13689         * except.c (add_handler): Return `void'.  Don't call link_handler;
13690         instead construct an ordinary linked list and do range
13691         coalescing.
13692         (check_nested_ranges): New function.
13693         (link_handler): Changed interface to allow merging of eh_ranges.
13694         Split overlapping ranges.  Return `void'.
13695
13696 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13697
13698         * parse.y (constructor_block_end:): New rule, tagged <node>.
13699         (constructor_body:): Use `constructor_block_end' instead of
13700         `block_end'.
13701
13702 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13703
13704         * parse.y (statement_nsi:): Pop `for' statement block.
13705         (java_complete_lhs): Labeled blocks containing no statement are
13706         marked as completing normally.
13707
13708 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13709
13710         * xref.c (xref_set_current_fp): New function, defined.
13711         * xref.h (xref_set_current_fp): New function, prototyped.
13712
13713 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13714
13715         * check-init.c (check_init): Take into account that
13716         LABELED_BLOCK_STMT can be empty.
13717
13718 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13719
13720         * parse.y (java_check_regular_methods): Warning check on not
13721         overriding methods with default access in other packages does not
13722         apply to `<clinit>'.
13723         (java_complete_lhs): If block body is an empty_stmt_node, replace
13724         it by NULL_TREE. This prevents gcc from generating an irrelevant
13725         warning.
13726
13727 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13728
13729         * check-init.c (check_init): Removed code accepting to see things
13730         falling through default:, when doing xrefs.
13731         * java-tree.h (do_not_fold): New global variable, declared.
13732         * parse.y (do_not_fold): New global variable, defined.
13733         (java_complete_expand_method): Set `do_not_fold' to the value of
13734         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
13735         and reinstall them after them have been purged; do not check for
13736         initializations; do not issue missing return errors.
13737         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
13738         when doing xrefs.
13739         (patch_binop): Skip the fold part when doing xrefs.
13740         (build_string_concatenation): Skip the concatenation part when
13741         doing xrefs.
13742         (patch_synchronized_statement): Do not generate a try-finally when
13743         doing xrefs.
13744         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
13745         and keep the location where the throw was seen.
13746         * typeck.c (convert): When `do_not_fold' is set, do not attempt
13747         any treatment on the converted node an simply return a NOP_EXPR of
13748         the targeted type.
13749         * xref.c (xref_get_data): New function, defined.
13750         * xref.h (xref_get_data): New function, declared.
13751         (XREF_GET_DATA): Use xref_get_data.
13752
13753 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13754
13755         * gjavah.c (print_include): Cast the result of `strlen' to int
13756         when comparing against a signed value.
13757         (add_namelet): Likewise.
13758
13759 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13760
13761         * expr.c (expand_invoke): Mark parameter `nargs' with
13762         ATTRIBUTE_UNUSED.
13763         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
13764
13765         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
13766         ATTRIBUTE_UNUSED.
13767
13768         * jcf-reader.c (get_attribute): Cast a value to long
13769         when comparing against a signed expression.  Likewise.
13770
13771         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
13772         HOST_BITS_PER_CHAR.
13773
13774 1999-05-11  Andrew Haley  <aph@cygnus.com>
13775
13776         * parse.y (source_end_java_method): If the current method contains
13777         any exception handlers, force asynchronous_exceptions: this is
13778         necessary because signal handlers in libjava may throw exceptions.
13779         * decl.c (end_java_method): Ditto.
13780
13781 1999-05-11  Tom Tromey  <tromey@cygnus.com>
13782
13783         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
13784         flags.
13785         * jvspec.c (THREAD_NAME): Removed.
13786         (GC_NAME): Likewise.
13787         (MATHLIB): Likewise.
13788         (WITHLIBC): Likewise.
13789         (GCLIB): Likewise.
13790         (THREADLIB): Likewise.
13791         (MATH_LIBRARY): Likewise.
13792         (lang_specific_driver): Don't add `-l' options to command line.
13793         Instead, add a single --specs option.  Recognize `-L' options and
13794         use them to search for spec file.
13795         (find_spec_file): New function.
13796         (SPEC_FILE): New define.
13797
13798 1999-05-11  Dave Brolley  <brolley@cygnus.com>
13799
13800         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
13801         cpplib-enabled build.
13802
13803 1999-05-05  Per Bothner  <bothner@cygnus.com>
13804
13805         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
13806         temporarily zero it while calling rest_of_decl_compilation.
13807
13808         * java-tree.h (string_ptr_type_node):  Add declaration.
13809         * decl.c:  Define and initialize string_ptr_type_node.
13810         * parse.y (patch_string_cst):  Use string_ptr_type_node.
13811
13812         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
13813         * parse.y (for_statement):  Now unconditionally exit_block.
13814         (finish_labeled_statement):  No longer exit_block if for-loop.
13815         (patch_loop_statement):  Check harder if the loop is already labeled.
13816
13817         * parse.y (patch_initialized_static_field):  Removed function.
13818         (maybe_generate_clinit):  Removed special handling for interfaces.
13819         (java_complete_expand_methods):  Do a preliminary java_complete_tree
13820         on <clinit> to determine if it can be removed.
13821         (java_complete_expand_method):  Remove special handling for <clinit>.
13822         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
13823         optimize if we get back empty_stmt_node.
13824         For MODIFY_EXPR, re-do checking of static initializers.
13825         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
13826         For VAR_DECL, pass correct context.
13827
13828         * verify.c (verify_jvm_instructions):  Better error messages.
13829
13830 1999-05-03  Tom Tromey  <tromey@cygnus.com>
13831
13832         * parse-scan.y (interface_declaration): Call
13833         report_class_declaration for interfaces.
13834
13835 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
13836
13837         * Makefile.in: Remove -v from bison command lines.
13838
13839 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13840
13841         * check-init.c (check_init): Exclude a case of error when doing
13842         xrefs.
13843         * class.c (layout_class_method): Don't generate the error message
13844         twice when compiling from source.
13845         * lang-options.h: Added `-Wredundant-modifers' and
13846         `-Wunusupported-jdk11' flags and help text.
13847         * lang.c (lang_decode_option): Added support for
13848         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
13849         flag_static_local_jdk11 and flag_redundant set accordingly.
13850         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
13851         * parse.h (EXPR_WFL_ADD_COL): New macro.
13852         (DECL_END_SOURCE_LINE): Likewise.
13853         (DECL_INHERITED_SOURCE_LINE): Likewise.
13854         * parse.y (static_ref_err): New function, prototyped.
13855         (CCB_TK): Now tagged <operator>.
13856         (class_body:): Remember the location of the closing '}' of a class
13857         definition when doing xrefs.
13858         (block:): Likewise.
13859         (block_end:): Likewise.
13860         (create_class): Remember the location of the inherited class
13861         identifier when doing xrefs.
13862         (register_fields): Added test on first operand of `init' before
13863         testing it TREE_CODE.
13864         (method_header): Store the location of the class identifier in the
13865         class decl when doing xrefs.
13866         (finish_method_declaration): Don't combine first/last method line
13867         when doing xref.
13868         (java_check_regular_methods): Warning check on not overriding
13869         methods with default access on other packages move before check on
13870         static methods. Initialization of `aflags' also moved up.
13871         (resolve_expression_name): Call static_ref_err to report the error.
13872         (static_ref_err): New function, implemented.
13873         (resolve_field_access): Returned simplified static field access
13874         when doing xrefs.
13875         (resolve_qualified_expression_name): Check for illegal use of
13876         static fields in a non static context. Call static_ref_err to
13877         report error in various places.
13878         (java_complete_tree): Do not fold initialized static fields when
13879         doing xrefs.
13880         (java_complete_lhs): Likewise.
13881
13882 1999-04-29  Anthony Green  <green@cygnus.com>
13883
13884         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
13885         create internal labels.
13886         (lookup_label): Ditto.
13887
13888 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13889
13890         * class.c (layout_class_method): Generate <clinit>'s rtl for
13891         interfaces.
13892         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13893         for interfaces' <clinit>.
13894         * expr.c (lookup_field): Search for fields in interfaces.
13895         (expand_invoke): Fixed indentation.
13896         (expand_java_field_op): Likewise. Use IS_CLINIT.
13897         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
13898         (IS_CLINIT): New macro.
13899         * parse.y (type_declaration:): Call maybe_generate_clinit after an
13900         interface was parsed.
13901         (maybe_generate_clinit): Don't generate if the current class is an
13902         interface with only fields of primitive types.
13903         (reset_method_name): Use IS_CLINIT.
13904         (java_complete_expand_method): Expand <clinit> when it exists for
13905         interfaces. Use IS_CLINIT.
13906         (resolve_expression_name): Use DECL_CONTEXT instead of
13907         current_class to build static field references.
13908         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
13909         ARRAY_REF when doing xreferencing.
13910         (check_final_assignment): Fixed typo in leading comment. Use
13911         IS_CLINIT.
13912         (patch_array_ref): Don't fully expand array references when
13913         xreferencing.
13914         (patch_return): Use IS_CLINIT.
13915         (patch_throw_statement): Likewise.
13916
13917 1999-04-22  Tom Tromey  <tromey@cygnus.com>
13918
13919         * Make-lang.in (JAVA_SRCS): Added check-init.c.
13920
13921 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13922
13923         * decl.c (predef_filenames, predef_filenames_size): New globals
13924         (init_decl_processing): predef_filenames and predef_filenames_size
13925         initialized.
13926         * java-tree.h (predef_filenames, predef_filenames_size): Declared
13927         extern.
13928         * jcf-parse.c (predefined_filename_p): New function.
13929         (yyparse): Check that files on the command line are specified only
13930         once and issue a warning otherwise.
13931         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
13932         * parse.y (source_end_java_method): Nullify NOP method bodies, to
13933         avoid a gcc warning with -W -Wall turned on.
13934         (java_expand_classes): Abort if errors were encountered.
13935         (java_complete_lhs): If the cross reference flag is set, wrap
13936         field DECL node around a WFL when resolving expression name.
13937
13938 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13939
13940         * lang.c (lang_decode_option): Fixed returned value when parsing
13941         `-fxref=...' and `-Wall'.
13942         * parse.y (source_end_java_method): Do not generate code when
13943         flag_emit_xref is set.
13944         (resolve_expression_name): Do not build static field access when
13945         flag_emit_xref is set.
13946         (resolve_field_access): No special treatment on `length' when
13947         flag_emit_xref is set. Do not build qualified static field access
13948         when flag_emit_xref is set.
13949         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
13950         when flag_emit_xref is set.
13951         (patch_assignment): Do not generate array store runtime check when
13952         flag_emit_xref is set.
13953         * xref.c (xref_flag_value): Fixed function declaration
13954         indentation.
13955         (xset_set_data): New function.
13956         * xref.h (xref_set_data): Added prototype for new function.
13957         (typedef struct xref_flag_table): New field data.
13958         (XREF_GET_DATA): New macro.
13959
13960 1999-04-19  Tom Tromey  <tromey@cygnus.com>
13961
13962         * xref.h (enum): Removed trailing comma.
13963
13964         * parse.y (resolve_qualified_expression_name): Added missing
13965         `break'.
13966
13967 1999-04-15  Anthony Green  <green@cygnus.com>
13968
13969         * gjavah.c: New prototypes for java_float_finite and
13970         java_double_finite.
13971
13972 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13973
13974         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
13975         references.
13976
13977 1999-04-06  Jeffrey A Law  (law@cygnus.com)
13978
13979         * Makefile.in (TREE_H): Add tree-check.h.
13980         (RTL_H): Add genrtl.h.
13981
13982 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13983
13984         * parse.y (patch_assignment): Added ArrayStoreException runtime
13985         check.
13986
13987 1999-04-06  Per Bothner  <bothner@cygnus.com>
13988
13989         * expr.c (pop_type_0):  New function.
13990         (pop_type):  Use pop_type_0.
13991         * java-tree.h (pop_type_0):  New declaration.
13992         * verify.c (verify_jvm_instructions):  Check return instructions.
13993
13994         * parse.y (patch_binop):  Don't fold if non-constant and emiting
13995         class files.
13996
13997 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13998
13999         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
14000
14001         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
14002         (main_jcf): Don't define.
14003         (process_file): Don't set `main_jcf'.
14004
14005         * java-tree.h (main_jcf): Don't declare.
14006
14007         * jcf-parse.c (main_jcf): Add static definition.
14008
14009         * lang.c (main_jcf): Don't define.
14010
14011 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14012
14013         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
14014
14015         * decl.c (copy_lang_decl): Likewise for `bcopy'.
14016
14017         * jcf-depend.c: Include "config.h", not <config.h>.
14018
14019         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
14020         `bcopy' to PTR.
14021
14022         * jcf-path.c: Include "config.h", not <config.h>.
14023
14024         * lex.c: Don't include various system header files.
14025         (java_init_lex): Cast the argument of `bzero' to PTR
14026
14027         * parse-scan.y (java_push_parser_context): Likewise.
14028
14029         * parse.y (java_push_parser_context): Likewise.
14030         (patch_bc_statement): Match format specifier to variable argument.
14031
14032         * xref.c: Don't include <stdio.h>.
14033
14034 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14035
14036         * parse.y (struct parser_ctxt *ctxp): Now global.
14037         (declare_local_variables): Use WFL compound value for the
14038         declaration source line value, when doing cross-referencing.
14039
14040 1999-03-31  Tom Tromey  <tromey@cygnus.com>
14041
14042         * gjavah.c (print_field_info): Allow constants of other types.
14043         (print_include): Generate include when new name is proper prefix
14044         of already printed name.
14045         (add_namelet): Likewise.
14046         (cxx_keyword_subst): New function.
14047         (print_method_info): Use it.
14048         (print_field_name): New function.
14049         (get_field_name): New function.
14050         (print_field_info): Use get_field_name and print_field_name.
14051
14052 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14053
14054         * Makefile.in (keyword.h): Generate using gperf language 'C', not
14055         'KR-C', so gperf uses the `const' keyword on strings.
14056
14057         * keyword.gperf (java_keyword): Const-ify a char*.
14058
14059 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14060
14061         * parse.y (patch_bc_statement): Fixed identation and a bogus
14062         `printf' format.
14063
14064 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14065
14066         * parse.y (patch_assignment): Allow static variables in other
14067         classes to be assigned.
14068
14069 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14070
14071         * class.c (maybe_add_interface): Remove unused variable
14072         `interface_binfo'.
14073         (make_class_data): Use = for assignment, not ==.  Likewise.
14074         (emit_register_classes): Remove unused variable `decl'.
14075
14076         * lex.c: Fix comment so as not to contain an embedded `/*'.
14077
14078         * verify.c (verify_jvm_instructions): Remove unused variable
14079         `self_type'.
14080
14081 1999-03-27  Per Bothner  <bothner@cygnus.com>
14082
14083         * parse.y (complete_loop_body):  Rename to finish_loop_body.
14084         (complete_labeled_statement):  Rename to finish_labeled_statement.
14085         (complete_for_loop):  Rename to finish_for_loop.
14086         (complete_method_declaration):  Rename to finish_method_declaration.
14087
14088         * java-tree.h (continue_identifier_node):  New global node.
14089         * decl.c:  Define and initialize continue_identifier_node.
14090         * parse.y (generate_labeled_block):  Remove - no longer needed.
14091         (build_loop_body):  Use continue_identifier_node for continue block.
14092         (finish_labeled_statement):  Also do pop_labeled_block actions.
14093         (java_complete_lhs):  POP_LOOP even if error.
14094         (build_labeled_block):  Special handling for continue_identifier_node.
14095         (patch_loop_statement):  Re-organize.
14096         (patch_bc_statement):  Re-write.
14097
14098 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14099
14100         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
14101         using a WFL compound value.
14102         * parse.y (xref.h): Include.
14103         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
14104         WFL compound value.
14105         (register_fields): Set WFL compound value to lineno if doing
14106         xrefs.
14107         (java_complete_expand_method): Call expand_xref if flag_emit_xref
14108         is set.
14109         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
14110         * xref.h (expand_xref): Prototype renamed from xref_generate.
14111
14112 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14113
14114         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
14115         (GET_CURRENT_BLOCK): New macro.
14116         * parse.y (current_static_block): New global variable.
14117         (method_body:): Define action.
14118         (complete_method_declaration): Set current_function_decl to NULL
14119         when work on the current method is done.
14120         (declare_local_variables): Use GET_CURRENT_BLOCK.
14121         (java_method_add_stmt): Likewise.
14122         (java_complete_expand_method): Disable the use of `this' when
14123         expanding <clinit>.
14124         (enter_a_block): If no current method exist, use
14125         current_static_block to link static initializer blocks.
14126         (exit_block): Rewritten to use current_static_block when no current
14127         method decl exists.
14128         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
14129         (patch_return): Forbid the use of `return' in static initializers.
14130         (patch_throw_statement): Fixed indentation. Issue specific error
14131         for uncaught thrown checked exception in static initializer
14132         blocks. Removed FIXME.
14133
14134 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
14135
14136         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
14137         Link gcj from gcc.o.
14138
14139 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14140
14141         * parse.y (find_applicable_accessible_methods_list): When dealing
14142         with interface: ensure that a given interface or java.lang.Object
14143         are searched only once.
14144
14145 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14146
14147         * gjavah.c (print_c_decl): Remove unused argument `flags'.
14148
14149         * jcf-dump.c (print_access_flags): Add braces around if-else.
14150
14151         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
14152         COMBINE_INPUTS.
14153
14154         * lex.c (build_wfl_node): Add static prototype.
14155
14156         * lex.h (build_wfl_node): Remove static prototype.
14157
14158         * parse.y: Include lex.c early enough to declare everything needed.
14159         Ensure calls to `build_wfl_node' pass the proper arguments.
14160         (create_class): Remove unused variable `super_decl'.
14161         (get_printable_method_name): Initialize variable `name'.
14162
14163 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14164
14165         * Changelog: Fixed 1999-03-22 typos.
14166         * lang.c (lang_decode_option): Fixed typo in error string in the
14167         XARG section.
14168
14169 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14170
14171         * Makefile.in (JAVA_OBJS): Added entry xref.o.
14172         (xref.o): New rule.
14173         * java-tree.h (flag_emit_xref): Declared extern.
14174         * lang.c (xref.h): Included.
14175         (flag_emit_xref): New global variable.
14176         (lang_decode_option): Added support for -fxref.
14177         * xref.c: Created.
14178         * xref.h: Likewise.
14179
14180 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
14181
14182         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
14183         linked with.
14184
14185 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14186
14187         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
14188         $(srcdir)/../system.h and $(JAVA_TREE_H).
14189         (jcf-io.o): Depend on $(JAVA_TREE_H).
14190         (mangle.o): Likewise.
14191
14192         * check-init.c (check_cond_init): Add static prototype.
14193
14194         * class.c (build_java_method_type, hashUtf8String,
14195         make_field_value, get_dispatch_vector, get_dispatch_table,
14196         append_gpp_mangled_type, mangle_static_field): Likewise.
14197         (strLengthUtf8): Hide unused definition.
14198         (hashUtf8String): Const-ify.
14199         (make_field_value): Un-ANSI-fy.
14200
14201         * constants.c: Move inclusion of jcf.h above java-tree.h.
14202         (set_constant_entry, find_class_or_string_constant,
14203         find_name_and_type_constant, get_tag_node,
14204         build_constant_data_ref): Add static prototype.
14205
14206         * decl.c (push_jvm_slot, builtin_function,
14207         lookup_name_current_level): Likewise.
14208         (builtin_function): Const-ify.
14209
14210         * except.c (expand_start_java_handler, expand_end_java_handler):
14211         Add static prototype.
14212
14213         * expr.c (flush_quick_stack, push_value, pop_value,
14214         java_stack_swap, java_stack_dup, build_java_athrow,
14215         build_java_jsr, build_java_ret, expand_java_multianewarray,
14216         expand_java_arraystore, expand_java_arrayload,
14217         expand_java_array_length, build_java_monitor, expand_java_pushc,
14218         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
14219         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
14220         expand_compare, expand_test, expand_cond, expand_java_goto,
14221         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
14222         expand_java_field_op, java_push_constant_from_pool): Likewise.
14223
14224         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
14225         (build_java_arraynull_check): Mark parameters `node' and `type'
14226         with ATTRIBUTE_UNUSED.
14227         (note_label): Likewise for parameter `current_pc'.
14228         (expand_java_call, expand_java_ret): Hide unused definition.
14229
14230         * java-tree.h (make_class, build_constants_constructor,
14231         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
14232         init_outgoing_cpool, register_class, emit_register_classes,
14233         java_layout_seen_class_methods): Prototype.
14234         (unicode_mangling_length): Const-ify.
14235         (append_gpp_mangled_name, append_gpp_mangled_classtype,
14236         emit_unicode_mangled_name, format_int, format_uint,
14237         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
14238         jcf_print_utf8_replace, open_class): Prototype.
14239
14240         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
14241         <stdio.h>.  Include tree.h/java-tree.h.
14242         (utf8_equal_string usage, process_class): Add static prototype.
14243         (open_class): Don't prototype this here.
14244         (utf8_equal_string): Match arguments to format specifiers.
14245         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
14246         TABLE_SWITCH, disassemble_method): Likewise.
14247
14248         * jcf-io.c: Include tree.h/java-tree.h.
14249         (open_class, find_classfile, jcf_print_utf8,
14250         jcf_print_utf8_replace): Const-ify.
14251
14252         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
14253         parse_class_file): Add static prototype.
14254         (find_in_current_zip): Match definition to existing static
14255         prototype.
14256
14257         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
14258         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
14259         finish_jcf_block, define_jcf_label, get_jcf_label_here,
14260         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
14261         write_chunks, adjust_typed_op, generate_bytecode_conditional,
14262         generate_bytecode_return, perform_relocations, init_jcf_state,
14263         init_jcf_method, release_jcf_state, generate_classfile):
14264         Add static prototype.
14265         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
14266         (make_class_file_name): Const-ify.
14267
14268         * jcf.h (find_classfile): Const-ify.
14269
14270         * jv-scan.c (reset_report): Remove prototype.
14271
14272         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
14273         (error): Rewrite to allow varargs.
14274
14275         * lang.c (lang_f_options): Const-ify.
14276
14277         * lex.c (java_parse_escape_sequence): Add static prototype.
14278         (java_allocate_new_line): Match definition to existing static
14279         prototype.
14280
14281         * mangle.c Include tree.h/java-tree.h.
14282         (unicode_mangling_length, emit_unicode_mangled_name,
14283         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
14284
14285         * parse.h (jdep_code): Remove trailing comma in enumeration.
14286         (java_get_line_col): Move prototype outside of !JC1_LITE test.
14287         (reset_report): Add prototype.
14288
14289         * verify.c (push_pending_label, merge_types): Add static
14290         prototypes.
14291
14292         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
14293
14294 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14295
14296         * parse.y (find_applicable_accessible_methods_list): Extend the
14297         search to superinterfaces when relevant.
14298         (search_applicable_methods_list): New function.
14299
14300 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14301
14302         * class.c (unmangle_classname): Implemented stricter testing
14303         before setting the QUALIFIED_P flag on an identifier.
14304
14305 1999-03-16  Per Bothner  <bothner@cygnus.com>
14306
14307         * parse.y (java_complete_lhs):  Call force_evaluation_order
14308         after patch_newarray.
14309         (patch_binop):  Don't call fold if there are side effects.
14310
14311 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14312
14313         * parse.y (java_stabilize_reference): Use save_expr instead of
14314         building a SAVE_EXPR node.
14315         (java_complete_lhs): Patch the resulting string of the `+='
14316         operator (if necessary) and complete the RHS after having built
14317         the cast.
14318
14319 1999-03-15  Per Bothner  <bothner@cygnus.com>
14320
14321         * class.c (make_class):  Don't set CLASS_P here (because
14322         this function is also called by build_java_array_type).
14323         (push_class):  Set CLASS_P here instead.
14324         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
14325
14326         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
14327         context.  If the context is class, perfer "super" over "synchronized".
14328         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
14329
14330         * parse.y (create_class):  Don't call parser_check_super here;
14331         it is not robust.  Always wait until later.
14332
14333         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
14334         match what JDK 1.2 does), but don't set ACC_PUBLIC.
14335
14336 1999-03-13  Per Bothner  <bothner@cygnus.com>
14337
14338         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
14339         * lex.h (UNGETC):  Change misleading macro.
14340
14341 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14342
14343         * parse.y (java_stabilize_reference): Return NODE when patching a
14344         COMPOUND_EXPR.
14345         (java_complete_lhs): Put parenthesis around truth values.
14346
14347 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14348
14349         * class.c (layout_class_method): Don't make rtl for interface
14350         methods.
14351         * parse.h (GET_TYPE_NAME): New macro.
14352         * parse.y (if_then_statement:): Fixed indentation.
14353         (if_then_else_statement:): Likewise.
14354         (for_statement:): Fixed spacing.
14355         (try_statement:): Fixed indentation.
14356         (create_interface): Don't force interfaces to be abstract.
14357         (method_header): Abstract methods are OK in interfaces.
14358         (declare_local_variables): Fixed typo in comment.
14359         (java_complete_expand_method): Fixed indentation.
14360         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
14361         non accessible fields.
14362         (java_stabilize_reference): New function.
14363         (java_complete_lhs): Fixed indentation. Use
14364         java_stabilize_reference in compound assignment. Insert the
14365         cast. If not processing `+' fix string constants before processing
14366         binop.
14367
14368 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14369
14370         * constants.c (find_class_or_string_constant): Cast variable `j'
14371         to a `jword' when comparing against one.
14372
14373         * expr.c (java_lang_expand_expr): Remove unused variables
14374         `has_finally_p' and `op0'.
14375
14376         * gjavah.c (print_field_info): Cast a value to jint when comparing
14377         against one.  Likewise for a jlong.
14378         (add_namelet): Likewise cast a `sizeof' to an int when comparing
14379         against a signed quantity.
14380
14381         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
14382         (print_signature): Don't needlessly dereference variable `str'
14383
14384         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
14385         `max_locals' with ATTRIBUTE_UNUSED.
14386         (jcf_parse_class): Likewise for variable `index'.
14387
14388         * parse.h (reverse_jdep_list): Remove static prototype.
14389
14390         * parse.y (build_jump_to_finally): Remove prototype and definition.
14391         (reverse_jdep_list): Add static prototype.
14392
14393         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
14394         `assignment' and `expr_decl'.
14395
14396         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
14397
14398 1999-03-12  Andrew Haley  <aph@cygnus.com>
14399
14400         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
14401         we'll need a directory separator and a null character.
14402
14403 1999-03-10  Per Bothner  <bothner@cygnus.com>
14404
14405         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
14406
14407   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14408
14409         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
14410         interfaces.
14411
14412 1999-03-05  Per Bothner  <bothner@cygnus.com>
14413
14414         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
14415
14416         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
14417
14418         * class.c (layout_class_method):  A static method in a base class
14419         is never overridden, so treat it like it doesn't exist.
14420         However, do complain about private non-static method overriding
14421         public static method.
14422
14423         * parse.y:  Don't set unused INITIALIZED_P flag.
14424         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
14425
14426         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
14427         (build_array_from_name):  Re-order &index[string] to &string[index].
14428
14429         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
14430         error_mark (it might catch more errors, but it is more likely to lose).
14431
14432 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14433
14434         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
14435         (parse-scan.o): Depend on toplev.h.
14436
14437         * class.c (make_method_value): Add prototype.  Make it static.
14438         Remove unused second argument, caller changed.
14439
14440         * expr.c (java_lang_expand_expr): Remove unused variable
14441         `return_label'.
14442
14443         * java-tree.h: Don't prototype find_in_current_zip.
14444         Add prototypes for verify_constant_pool, start_java_method,
14445         end_java_method, give_name_to_locals, expand_byte_code,
14446         open_in_zip, set_constant_value, find_constant1, find_constant2,
14447         find_utf8_constant, find_string_constant, find_class_constant,
14448         find_fieldref_index, find_methodref_index, write_constant_pool,
14449         count_constant_pool_bytes and encode_newarray_type.
14450
14451         * jcf-dump.c: Remove unused variable `LONG_temp'.
14452
14453         * jcf-parse.c: Include parse.h.
14454         (jcf_parse_source): Remove unused parameter, all callers changed.
14455         (jcf_figure_file_type): Add static prototype.
14456         (find_in_current_zip): Likewise.  Also remove unused parameter,
14457         all callers changed.
14458         (read_class): Initialize variable `saved_pos'.
14459
14460         * jcf-reader.c (jcf_parse_preamble): Mark variables
14461         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
14462
14463         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
14464         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
14465         (java_parse_doc_section): Initialize variable `seen_star'.
14466         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
14467         (java_lex_error): Mark parameters `msg' and `forward' with
14468         ATTRIBUTE_UNUSED.
14469         (java_get_line_col): Mark parameters `filename' and `line' with
14470         ATTRIBUTE_UNUSED.
14471
14472         * parse-scan.y: Include toplev.h.
14473         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
14474
14475         * parse.h: use `struct JCF', not plain `JCF'.
14476         (java_parser_context_save_global, java_expand_classes
14477         java_parser_context_restore_global, java_parse): Add prototypes.
14478
14479         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
14480         `node'.
14481
14482 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
14483
14484         *  check-init.c (check_init):  COPYN takes word count, not bit count.
14485
14486 1999-02-26  Per Bothner  <bothner@cygnus.com>
14487
14488         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
14489         explicit build_decl.  (Avoids crash in reload when optimizing.)
14490
14491 1999-02-25  Per Bothner  <bothner@cygnus.com>
14492
14493         * decl.c (complete_start_java_method):  Handle synchronized method
14494         even when compiling from bytecode.
14495
14496 1999-02-26  Tom Tromey  <tromey@cygnus.com>
14497
14498         * gjavah.c (add_class_decl): Only generate `#include' if outer
14499         class is not the name of the class we are processing.  Correctly
14500         append `.h' in #include.
14501         (process_file): Clean up newlines around generated `#include's.
14502         (decode_signature_piece): Correctly handle inner classes.
14503         (struct include): New structure.
14504         (all_includes): New global.
14505         (print_include): New function.
14506         (add_class_decl): Use it.
14507         (process_file): Likewise.
14508         (add_class_decl): Generate include for java-array.h if array
14509         seen.
14510         (process_file): Don't generate java-array.h include.
14511
14512         * gjavah.c (add_namelet): Check for standard package names here.
14513         (add_class_decl): Don't check for standard package names here.
14514
14515 1999-02-25  Tom Tromey  <tromey@cygnus.com>
14516
14517         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
14518         When reading a zip file, only use strncmp if both strings are
14519         bigger than the buffer length.  Initialize `k' when looping
14520         through zip file.
14521
14522 1999-02-24  Tom Tromey  <tromey@cygnus.com>
14523
14524         * gjavah.c (struct namelet): New structure.
14525         (add_namelet): New function.
14526         (print_namelet): New function.
14527         (print_class_decls): Use add_namelet and print_namelet to generate
14528         namespaces and not classes.
14529         (method_printed): New global.
14530         (HANDLE_END_METHOD): Examine method_printed.
14531         (print_method_info): Set method_printed when required.  Print
14532         error if function to be ignored is marked virtual.  Handle $finit$
14533         method.
14534         (METHOD_IS_FINAL): New macro.
14535         (print_field_info): Use it.
14536         (HANDLE_METHOD): Clear method_printed.
14537         (method_pass): New global.
14538         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
14539         (process_file): Do two passes over both fields and methods.
14540         (HANDLE_METHOD): Examine method_pass.
14541         (root): New global.
14542         (add_class_decl): New function.
14543         (print_class_decls): Don't scan over entire constant pool.
14544
14545 1999-02-23  Tom Tromey  <tromey@cygnus.com>
14546
14547         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
14548         disable linking in that case.
14549
14550 1999-02-20  Tom Tromey  <tromey@cygnus.com>
14551
14552         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
14553         not 0x1f.
14554
14555 1999-02-21  Per Bothner  <bothner@cygnus.com>
14556
14557         * decl.c (build_result_decl), java-tree.h:  New method.
14558         (complete_start_java_method):  Handle synchronized methods.
14559         Don't build DECL_RESULT here.  (Ordering dependency problem.)
14560         (start_java_method):  Call build_result_decl here instead  ...
14561         * parse.y (java_complete_expand_method):  ... and here.
14562         (expand_start_java_method): Don't call complete_start_java_method here.
14563         (java_complete_expand_method):  Call it here instead.
14564         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
14565         * java-tree.h:  ... here.
14566
14567         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
14568         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
14569         for ARRAY_REF - it doesn't work when array bounds are checked.
14570         (patch_array_ref):  Handle it here instead.
14571
14572         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
14573
14574 1999-02-19  Per Bothner  <bothner@cygnus.com>
14575
14576         Force left-to-right evaluation of binary operations etc.
14577         * expr.c (force_evaluation_order), java-tree.h:  New function.
14578         * parse.y (java_complete_lhs):  Pass binary operations, procedure
14579         calls, and ARRAY_REFs to force_evaluation_order.
14580         (various):  Set TREE_SIDE_EFFECTS more carefully.
14581
14582         Tolerate random (non-UTF8) encoding in comments without complaining.
14583         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
14584         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
14585
14586         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
14587         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
14588
14589         * parse.y (java_complete_lhs):  Ignore an empty statement in a
14590         COMPOUND_EXPR.  Don't complain about empty statement after return.
14591
14592 1999-02-19  Per Bothner  <bothner@cygnus.com>
14593
14594         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
14595         in TREE_LIST - just chain the POINTER_TYPEs together.
14596         (resolve_class):  If type already resolved, return decl.
14597         After resolving, update TREE_TYPE(class_type), and name (if array).
14598         * parse.h (do_resolve_class), parse.y:  Make non-static.
14599         * class.c (maybe_layout_super_class):  Take this_class argument.
14600         Do do_resolve_class if necessary.
14601         (layout_class, layout_class_methods): Adjust calls appropriately.
14602         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
14603         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
14604         * typeck.c (build_java_array_type):  Don't call layout_class.
14605
14606 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14607
14608         * parse.y (check_pkg_class_access): Allow private class access
14609         within the same package.
14610         (strip_out_static_field_access_decl): New function.
14611         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
14612         operator argument before testing its nature.
14613
14614 1999-02-03  Per Bothner  <bothner@cygnus.com>
14615
14616         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
14617         (TRY_EXPR):  Simplify - it no longer has a finally clause.
14618         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
14619         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14620         * expr.c (java_lang_expand_expr):  Likewise.
14621         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
14622         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
14623         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
14624         (build_try_statement):  Remove finally parameter and handling.
14625         (build_try_finally_statement):  New function.
14626         (patch_try_statement):   No longer need to support finally clause.
14627         (try_statement):  Update grammar action rules.
14628         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
14629         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14630
14631 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
14632
14633         * jcf-parse.c (get_constant): Add braces around computation of 'd'
14634         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
14635
14636 1999-02-17  Andrew Haley  <aph@cygnus.com>
14637
14638         * class.c (build_utf8_ref): Back out broken patch which was
14639         intended to to output signatures using '.' as a separator.
14640
14641         * class.c (make_class_data): Output signatures using '.' as a
14642         separator, rather than '/'.
14643         (mangled_classname): Likewise.
14644         (make_field_value): Likewise.
14645         (make_method_value): Likewise.
14646         * constants.c (alloc_class_constant): Likewise.
14647         * expr.c (build_invokeinterface): Likewise.
14648
14649 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14650
14651         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
14652         of an ancient workaround.
14653
14654 1999-02-10  Jeffrey A Law  (law@cygnus.com)
14655
14656         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
14657         here anymore.
14658
14659 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14660
14661         * lex.c (yylex): Encode \0 as UTF8.
14662
14663 1999-02-10  Tom Tromey  <tromey@cygnus.com>
14664
14665         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
14666         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
14667         (libgcj_zip): Renamed.
14668         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
14669         LIBJAVA_ZIP_FILE.
14670         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
14671
14672         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
14673         (GC_NAME): Renamed -lgc to -lgcjgc.
14674
14675 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14676
14677         * lex.c (java_lang_cloneable): Initialize.
14678         * parse.y (java_lang_cloneable): New static variable.
14679         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
14680         doing one more qualification round.
14681         (valid_ref_assignconv_cast_p): Reject null source or
14682         destination. Allow an array to be cast into java.lang.Cloneable.
14683         (patch_cast): Swapped two first arguments to first call to
14684         valid_ref_assignconv_cast_p.
14685
14686 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14687
14688         * parse.h: DECL_P renamed JDECL_P.
14689         * parse.y: DECL_P replaced by JDECL_P.
14690         (build_array_from_name): Always use pointer's type.
14691         (patch_bc_statement): Extra code to search continue target in a
14692         for loop. Fixed comments. Continue target is current loop when
14693         unlabeled.
14694
14695 1999-02-05  Andrew Haley  <aph@cygnus.com>
14696
14697         * class.c (make_class_data): The superclass of an interface should
14698         be null, not class Object.
14699
14700         * lex.c (java_lex): Sign extend hex literals.
14701
14702 1999-02-04  Andrew Haley  <aph@cygnus.com>
14703
14704         * class.c (build_utf8_ref): Output signatures using '.' as a
14705         separator, rather than '/'.
14706         (make_class_data): Likewise.
14707
14708 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
14709
14710         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
14711         mkstemp.o.  Get them from libiberty now.
14712
14713 1999-02-02  Jeffrey A Law  (law@cygnus.com)
14714
14715         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
14716
14717 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14718
14719         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
14720         from libiberty.h
14721
14722 1999-02-02  Per Bothner  <bothner@cygnus.com>
14723
14724         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
14725         * jcf-write.c (generate_bytecode_return):  New function.
14726         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
14727
14728         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
14729         generate special [fd]const_[01] instructions.
14730
14731         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
14732
14733         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
14734         handling OPCODE_lookupswitch or OPCODE_tableswitch.
14735
14736 1999-02-01  Per Bothner  <bothner@cygnus.com>
14737
14738         * parse.y (patch_method_invocation):  Handle calling static methods,
14739         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
14740
14741         * parse.y (java_complete_lhs):  Don't complain about unreachable
14742         exit condition in a do-while statement.
14743
14744 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14745
14746         * lex.c (java_read_char): Fixed utf8 decoding.
14747         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
14748         range.
14749         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
14750         comments. Local variable `all_primitive' is gone. Broadened
14751         acceptance of `0' to floating point targets. `long' can now be
14752         widened to `double' or `float'.
14753         (valid_method_invocation_conversion_p): Added leading
14754         comment. Fixed tabulation.
14755         (build_string_concatenation): Optimize out left or right empty
14756         string constants.
14757
14758 1999-01-28  Per Bothner  <bothner@cygnus.com>
14759
14760         * jcf-write.c (localvar_alloc):  Only emit entry for
14761         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
14762         (generate_bytecode_insns):  Only call put_linenumber if
14763         debug_info_level > DINFO_LEVEL_NONE.
14764         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
14765         is specified, add -g1 (for compatibility wih javac).
14766
14767 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
14768
14769         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
14770         gjavah.o, check-init.o, jv-scan.o
14771
14772 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14773
14774         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
14775
14776         * gjavah.c: Include config.h and system.h.
14777
14778         * javaop.h (inline): Don't define, its handled by system.h.
14779         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
14780         from `inline' to `static inline'.
14781
14782         * jcf.h (inline): Don't define, its handled by system.h.
14783
14784         * lex.c (inline): Likewise.
14785
14786 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
14787
14788         * lang-specs.h: Map -Qn to -fno-ident.
14789
14790 1999-01-29  Richard Henderson  <rth@cygnus.com>
14791
14792         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
14793
14794 1999-01-29  Tom Tromey  <tromey@cygnus.com>
14795
14796         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
14797         then cast it to Object before calling `append' method.
14798
14799 1999-01-28  Per Bothner  <bothner@cygnus.com>
14800
14801         * check-init.c (check_bool2_init, check_bool_init, check_init):
14802         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
14803         * jcf-write.c (generate_bytecode_insns):  Likewise.
14804
14805 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14806
14807         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
14808         * parse.y (patch_cast): Allow a boolean to be cast into a
14809         boolean.
14810
14811 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14812
14813         * parse.y: (class_declaration:): Fixed indentation.
14814         (class_member_declaration:): Extra `;' after field declaration now
14815         accepted.
14816         (interface_declaration:): Removed debug messages in error reports.
14817         (patch_binop): Nodes created and returned inherit the orignal
14818         node's COMPOUND_ASSIGN_P flag value.
14819         (patch_cast): Fix cast from char to floating point.
14820
14821 1999-01-25  Andrew Haley  <aph@cygnus.com>
14822
14823         * except.c, java-except.h (expand_resume_after_catch): new
14824         function.
14825         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
14826         to branch back to main flow of control after a catch block.
14827
14828 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14829
14830         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
14831         $(srcdir)/../system.h.
14832         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
14833         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
14834         (jcf-write.o): Likewise.
14835         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14836         (mangle.o): Depend on $(srcdir)/../toplev.h.
14837         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14838         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14839
14840         * class.c: Include output.h and parse.h.
14841         (mangled_classname): Add the `const' keyword to a char*.
14842         (find_named_method): Hide unused function definition.
14843         (build_utf8_ref): Change type of variable `c' to unsigned char.
14844         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
14845         (build_class_ref): Add the `const' keyword to a char*.
14846         (layout_class_method): Remove unused variable `buf'.
14847
14848         * decl.c (find_local_variable): Remove unused variable `rtl'.
14849         (pushdecl): Likewise for variables `different_binding_level' and
14850         `oldglobal'.
14851         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
14852         (maybe_build_cleanup): Likewise for parameter `decl'.
14853
14854         * except.c (expand_start_java_handler): Mark parameter `range'
14855         with ATTRIBUTE_UNUSED.
14856
14857         * expr.c: Include except.h.
14858         (pop_type): Remove unused variable `i'.
14859         (pop_value): Likewise for variables `n_words' and `i'.
14860         (expand_java_arrayload): Likewise for variable `convert'.
14861         (java_lang_expand_expr): Likewise for variables `op0', `type',
14862         `mode', `unsignedp', `node' and `elements'.
14863         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
14864         `eh_ranges'.
14865         (process_jvm_instruction): Add a `const' qualifier to a char*.
14866
14867         * gjavah.c (output_directory): Add the `const' keyword to a char*.
14868         (temp_directory): Likewise.
14869         (print_c_decl): Likewise.
14870         (print_method_info): Likewise.
14871         (decode_signature_piece): Likewise.
14872         (print_mangled_classname): Likewise.
14873
14874         * java-except.h: Provide prototypes for maybe_start_try,
14875         maybe_end_try and add_handler.
14876
14877         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
14878         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
14879         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
14880         init_expr_processing, push_super_field, init_class_processing,
14881         can_widen_reference_to, class_depth, verify_jvm_instructions,
14882         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
14883         set_local_type, merge_type_state, push_type, load_type_state,
14884         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
14885         emit_unicode_mangled_name): Add prototypes.
14886
14887         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
14888         (print_signature_type): Use ISDIGIT, not isdigit.
14889         (print_signature): Remove unused variable `j'.
14890
14891         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
14892         int when comparing against one.
14893
14894         * jcf-parse.c: Include toplev.h.
14895
14896         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
14897         (localvar_free): Remove unused variable `i'.
14898         (generate_bytecode_conditional): Likewise for variable `kind'.
14899
14900         * jv-scan.c: Include config.h and system.h.  Remove redundant
14901         OS header and gansidecl.h includes.
14902         (warning): Add the `const' keyword to a char*.  Also add
14903         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
14904         __STDC__, when determining whether to use ANSI-isms.
14905         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
14906         (xmalloc): Don't redundantly prototype here.
14907         (main): Remove unused parameter `envp'.  Also fix the arguments
14908         passed to function `fatal' to match the format specifier.
14909
14910         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
14911
14912         * mangle.c: Include toplev.h.
14913         (emit_unicode_mangled_name): Declare parameter `len'.
14914
14915         * parse.y (parse_warning_context): Add the `const' keyword to a
14916         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
14917         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
14918         (issue_warning_error_from_context): Add the `const' keyword to
14919         a char*.
14920         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
14921         not `__STDC__' for whether to use ANSI-isms.
14922
14923         * typeck.c (incomplete_type_error): Mark parameters `value' and
14924         `type' with ATTRIBUTE_UNUSED.
14925         (parse_signature_type): Use ISDIGIT, not isdigit.
14926
14927         * verify.c (check_pending_block): Add the `const' keyword to a char*.
14928         (verify_jvm_instructions): Likewise.  Remove unused variables
14929         `field_name' and `default_val'.
14930
14931         * zextract.c: Include config.h and system.h.  Remove redundant
14932         OS header includes.
14933
14934         * zipfile.h: Prototype `read_zip_archive'.
14935
14936 1999-01-21  Andrew Haley  <aph@cygnus.com>
14937
14938         * typeck.c (convert): Allow conversions to void type: some
14939         optimizations in gcc do this.
14940
14941 1999-01-21  Andrew Haley  <aph@cygnus.com>
14942
14943         * typeck.c (convert_ieee_real_to_integer): New function.
14944         (convert): When not using fast-math and using hardware fp, convert
14945         an IEEE NaN to zero.
14946
14947 1999-01-18  Andrew Haley  <aph@cygnus.com>
14948
14949         * parse.y (patch_binop): Do a type conversion from signed to
14950         unsigned and then back to signed when a ">>>" is found.
14951
14952 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14953
14954         * java-tree.h: (check_for_initialization): Added prototype.
14955         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
14956         * parse.y (do_resolve_class): Removed unused locals.
14957         (read_import_dir): Likewise.
14958         (resolve_qualified_expression_name): Array creation
14959         expressions are valid primary expressions.
14960         (qualify_ambiguous_name): Likewise.
14961         (patch_synchronized_statement): Removed unused local.
14962
14963 1999-01-17  Jeffrey A Law  (law@cygnus.com)
14964
14965         * Makefile.in (zextract.o): Add dependencies.
14966
14967         * Makefile.in: Do not put ^Ls at the start of a line.
14968
14969 1999-01-15  Per Bothner  <bothner@cygnus.com>
14970
14971         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
14972         sub-type the result of the call that gets the exception value.
14973
14974         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
14975         don't call finish_class.
14976
14977         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
14978         clear found before continuing.
14979
14980         * verify.c (verify_jvm_instructions):  On an array load, allow
14981         and handle top of stack to be TYPE_NULL.
14982
14983         * gjavah.c (generate_access):  Translate Java package private or
14984         protected access to C++ public, but with a comment.
14985
14986 1999-01-13  Andrew Haley  <aph@cygnus.com>
14987
14988         * expr.c (generate_name): Name prefix changed to avoid clashes
14989         with assembler temp labels.
14990
14991         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
14992         MODIFY_EXPR.  Without this, code for the assignment may not be
14993         generated at all and the synchronized statement will read an
14994         uninitialized variable.
14995
14996 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14997
14998         * class.c (maybe_layout_super_class): Fixed returned value.
14999         * lex.c: Added 1999 to the copyright.
15000         (java_init_lex): Initialize java_lang_imported.
15001         * lex.h: Added 1999 to the copyright.
15002         * parse.h: Added 1999 to the copyright.
15003         (REGISTER_IMPORT): Fixed typo in trailing macro.
15004         (CURRENT_OSB): New macro.
15005         (struct parser_ctxt): New fields osb_depth, osb_limit.
15006         * parse.y (java_lang_id): New global variable.
15007         (type_import_on_demand_declaration): Don't import java.lang.* twice.
15008         (array_creation_expression:): Use CURRENT_OSB.
15009         (dims:): Uses a stack to keep track of array dimensions.
15010         (cast_expression:): Use CURRENT_OSB.
15011         (find_expr_with_wfl): Return NULL if node found doesn't meet the
15012         conditions.
15013         (register_fields): Fixed typos in comment.
15014         (check_method_redefinition): Fixed comment indentation.
15015         (java_check_regular_methods): Set saved found wfl to NULL after
15016         having reinstalled it in the previously found DECL_NAME.
15017
15018 1999-01-10  Richard Henderson  <rth@cygnus.com>
15019
15020         * gjavah.c (java_float_finite): Use a union to do type punning.
15021         (java_double_finite): Likewise.
15022
15023 1999-01-09  Per Bothner  <bothner@cygnus.com>
15024
15025         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
15026         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
15027         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
15028         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
15029         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
15030         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
15031
15032 1999-01-08  Per Bothner  <bothner@cygnus.com>
15033
15034         * check-init.c (check_init):  If compiling to native, we don't
15035         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
15036
15037 1999-01-08  Tom Tromey  <tromey@cygnus.com>
15038
15039         * parse-scan.y (variable_declarator_id): Set or increment
15040         bracket_count.
15041         (bracket_count): New global.
15042         (formal_parameter): Handle case where bracket pairs trail variable
15043         declarator id.
15044
15045 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
15046
15047         * jcf-parse.c (yyparse): variable len changed from a char to an
15048         int to prevent overflow.
15049
15050 1999-01-06  Per Bothner  <bothner@cygnus.com>
15051
15052         * java-tree.h:  Declare read_class.
15053         * jcf-parse.c (read_class):  New function.
15054         (load_class):  Now just call read_class.
15055
15056         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
15057         * jcf-parse.c (parse_source_file):  Declare save_error_count,
15058         which is needed by java_parse_abort_on_error macro,
15059         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
15060
15061         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
15062         constructor, if initializing a static field.
15063         (patch_new_array_init):  Set TREE_CONSTANT if it is.
15064         * expr.c (java_lang_expand_expr):  For a static array constructor
15065         of primitive elements, allocate the array itself statically.
15066         Disabled until we can set the vtable field statically.
15067
15068         * check-init.c:  New file.  Checks for definite assignment.
15069         * Makefile.in (JAVA_OBJS):  Add check-init.o.
15070         * parse.y (java_complete_expand_method): Call check_for_initialization.
15071         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
15072
15073 1999-01-06  Graham <grahams@rcp.co.uk>
15074
15075         * parse.y : include system.h instead of including
15076         standard headers directly with the exception of <dirent.h>.
15077
15078 1999-01-06  Per Bothner  <bothner@cygnus.com>
15079
15080         * lex.h:  Moved static function declarations to lex.c,
15081         to shut up some -Wall warnings.
15082         * lex.c:  Static function declarations moved here.
15083         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
15084
15085 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15086
15087         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
15088
15089 1998-12-22  Per Bothner  <bothner@cygnus.com>
15090
15091         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
15092         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
15093
15094         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
15095         (localvar_alloc):  Change return type to void,
15096         (emit_unop):  Remove unused variable size.
15097
15098         * jcf-write.c (struct jcf_block):  Add new union.
15099         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
15100         (call_cleanups):  New functions.
15101         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
15102         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
15103         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
15104         * lang.c (lang_init):  Call using_eh_for_cleanups.
15105         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
15106         completing operands to patch_synchronized_statement.
15107         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
15108         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
15109         WITH_CLEANUP_EXPR instead of TRY_EXPR.
15110
15111 1998-12-20  John F. Carr  <jfc@mit.edu>
15112
15113         * Make-lang.in: Comment out control-Ls; they upset some makes.
15114
15115 1998-12-18  Tom Tromey  <tromey@cygnus.com>
15116
15117         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
15118         consistently.
15119
15120 1998-12-17  Tom Tromey  <tromey@cygnus.com>
15121
15122         * parse.y (DIR_SEPARATOR): New define.
15123         (check_class_interface_creation): Use it.
15124
15125         * parse-scan.y (report_main_declaration): Recognize
15126         `java.lang.String' in argument to main.
15127
15128 1998-12-16  Per Bothner  <bothner@cygnus.com>
15129
15130         * parse.y (create_interface):  Remove bogus test.
15131
15132 1998-12-16  Per Bothner  <bothner@cygnus.com>
15133
15134         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
15135         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
15136
15137 1998-12-16  Tom Tromey  <tromey@cygnus.com>
15138
15139         * parse-scan.y (qualified_name): Use correct sprintf format.
15140
15141 1998-12-15  Tom Tromey  <tromey@cygnus.com>
15142
15143         * gjavah.c (print_field_info): Changed how most negative number is
15144         printed.
15145
15146 1998-12-14  Per Bothner  <bothner@cygnus.com>
15147
15148         * parse.y (fold_constant_for_init):  New function.
15149         (resolve_expression_name):  Don't replace static final
15150         constant-initialized fields by its value.
15151         (java_complete_lhs):  New.  Same as java_complete_tree, except does
15152         not replace static final constant-initialized fields by their values.
15153         (register_fields):  If there is an initializer, set DECL_INITIAL and
15154         MODIFY_EXPR_FROM_INITIALIZATION_P.
15155         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
15156         Only call patch_initialized_static_field if
15157         MODIFY_EXPR_FROM_INITIALIZATION_P.
15158         (patch_initialized_static_field):  If not valid constant, clear
15159         DECL_INITIAL.
15160
15161         * parse.y (lookup_field_wrapper):  Fix thinko.
15162
15163         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
15164         set and restore global lineno.
15165
15166 1998-12-14  Tom Tromey  <tromey@cygnus.com>
15167
15168         * gjavah.c (print_field_info): If value to print is the smallest
15169         value of its size, then print as hex to avoid later warnings from
15170         C++ compiler.
15171
15172 1998-12-14  Tom Tromey  <tromey@cygnus.com>
15173
15174         * gjavah.c (decompile_method): Decompile `return null'.
15175         (process_file): Generate `#pragma interface'.
15176         (method_declared): New global.
15177         (print_method_info): Set it.
15178         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
15179         (print_method_info): Handle abstract methods.
15180
15181 1998-12-13  Per Bothner  <bothner@cygnus.com>
15182
15183         * parse.y (patch_method_invocation):  If class_decl is null
15184         (e.g. an array type), use original type.
15185
15186         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
15187         errors about uncaught exception from clone (of array, specifically).
15188
15189 1998-12-13  Tom Tromey  <tromey@cygnus.com>
15190
15191         * gjavah.c (decompile_method): Handle all types of `return'
15192         opcode.  Decompile `return this' and `return'.
15193         (method_access): New global.
15194         (print_method_info): Set it.
15195         (decompile_method): Don't decompile a synchronized method.
15196
15197 1998-12-13  Tom Tromey  <tromey@cygnus.com>
15198
15199         * jcf-reader.c (jcf_parse_one_method): Recognize
15200         HANDLE_END_METHOD.
15201         * gjavah.c (HANDLE_END_METHOD): New macro.
15202         (HANDLE_CODE_ATTRIBUTE): New macro.
15203         (decompile_method): New function.
15204         (print_method_info): Don't print `;\n' at end of function decl.
15205         Include java-opcodes.h.
15206         (decompiled): New global.
15207
15208 1998-12-12  Per Bothner  <bothner@cygnus.com>
15209
15210         * class.c (build_class_ref):  Handle PRIMTYPE.class if
15211         flag_emit_class_files.
15212         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
15213         if flag_emit_class_files.
15214         * parse.y (java_complete_tree):  Pre-liminary support for
15215         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
15216
15217         * parse.y (patch_synchronized_statement):   Don't call monitorexit
15218         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
15219
15220         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
15221
15222         * zipfile.h (opendir_in_zip):  New declaration.
15223         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
15224         (opendir_in_zip):  New function, using code from open_in_zip.
15225         (open_in_zip):  Call opendir_in_zip.
15226         (find_class):  Remove no-longer-used do_class_file parameter,
15227         but add source_ok parameter.  Change logic so if we find a .java file,
15228         we don't look for .class in later classpath emtries.
15229         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
15230         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
15231         * gjavah.c: Update call to find_class.
15232         * jcf-dump.c:  Likewise.
15233
15234         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
15235         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
15236         nothing if body is empty_stmt_node.
15237         Various little fixes so SP gets correctly adjusted.
15238         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
15239         For CALL_EXPR, test if static first.
15240         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
15241         such as the ones we create for Object and Class.
15242         Set and restore current_function_decl.
15243         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
15244         (note_possible_classname):  New function.
15245         (read_import_entry):  Removed.  Merged with read_import_dir.
15246         (read_import_dir):  Don't call find_class - that only gives us
15247         the first classpath entry having the needed package.
15248         Use the struct buffer data structure from buffer.h.
15249         (read_import_dir, find_in_imports_on_demand):  The remembered
15250         class names now use '.' (not '/') as package separator.
15251
15252         * parse.y (java_complete_expand_methods):  Call write_classfile
15253         here, and not in java_expand_classes (which only gets first class).
15254
15255 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15256
15257         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
15258         (register_fields):  If a static fields has an initializer, just
15259         chain it on ctxp->static_initialized, and handle later.
15260         (java_complete_expand_methods):  Force <clinit> first.
15261         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
15262         - it's already been completed.
15263         (patch_initialized_static_field):  New function.
15264         (java_complete_field):  Call it.
15265
15266 1998-12-12  Per Bothner  <bothner@cygnus.com>
15267
15268         * expr.c (encode_newarray_type, build_new_array):  New functions.
15269         * java-tree.h:  Declare build_new_array.
15270         * jcf-write.c (patch_newarray):  Use build_new_array.
15271
15272         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
15273         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
15274
15275         * parse.y (patch_new_array_init):  Re-organize.
15276         Now is passed the actual array (pointer) type of the value.
15277         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
15278         (patch_array_constructor):  Removed - merged into patch_new_array_init.
15279         (java_complete_tree):  Update patch_new_array_init.
15280
15281         * jcf-write.c (find_constant_index):  New function.
15282         (generate_bytecode_insns):  Use find_constant_index.
15283         (generate_classfile):  Use find_constant_index for ConstantValue.
15284
15285 1998-12-11  Tom Tromey  <tromey@cygnus.com>
15286
15287         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
15288         * decl.c (init_decl_processing): Renamed dtable -> vtable.
15289         * class.c (make_class_data): Renamed dtable -> vtable, and
15290         dtable_method_count -> vtable_method_count.
15291
15292 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15293
15294         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
15295         global variables, initialized.
15296         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
15297         Declared new global variables.
15298         * lex.c (java_lex): Return long_zero_node, float_zero_node,
15299         double_zero_node, integer_zero_node upon direct matching.
15300         * parse.y (purify_type_name): Added function prototype.
15301         (duplicate_declaration_error_p): Consider new_type as potentially
15302         being a incomplete type. Use purify_type_name on type string.
15303         (method_header): saved_type: unused variable removed. Don't figure
15304         return type if method name is invalid.
15305         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
15306         processed by patch_unaryop.
15307         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
15308         increment/decrement node into its original type after binary
15309         numeric promotion on its operands.
15310
15311 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15312
15313         * parse.y (array_initializer:): Array init operand is NULL_TREE
15314         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
15315         now an error. Fixed indentation problems.
15316         (patch_string): Handle error_mark_node as an argument.
15317         (patch_new_array_init): Fixed indentation problems.
15318         (array_constructor_check_entry): Removed check on null wfl_value.
15319         Return an error if wfl_value's walk returns an error.
15320
15321 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15322
15323         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
15324         * lex.c (java_lex): Remember column position before advancing one
15325         token. Retain location information on OCB_TK.
15326         * lex.h (typedef struct java_lc): Added new field.
15327         * parse.h (GET_SKIP_TYPE): New macro.
15328         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
15329         * parse.y (build_new_array_init, patch_new_array_init,
15330         patch_array_constructor, maybe_build_array_element_wfl,
15331         array_constructor_check_entry): New function prototypes.
15332         (switch_block:): Tagged <node>.
15333         (OCB_TK): Tagged <operator>.
15334         (array_initializer:): Installed actions.
15335         (variable_initializer): Build location information on element if
15336         necessary.
15337         (switch_statement:): Fixed indentation typo.
15338         (switch_block:): Redefined default action.
15339         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
15340         (patch_assignment): Removed duplicate code.
15341         (maybe_build_array_element_wfl, build_new_array_init,
15342         patch_new_array_init, patch_array_constructor,
15343         array_constructor_check_entry): New functions.
15344
15345 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15346
15347         * parse.y (array_initializer): Tagged <node>.
15348         (variable_initializer:): Use default rule.
15349         (array_initializer:): Defined actions.
15350         (variable_initializers:): Likewise.
15351         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
15352         non-static field accesses.
15353         (patch_invoke): Fixed indentation typo.
15354         (java_complete_tree): Likewise.
15355         (build_labeled_block): Changed leading comment. Generate an error
15356         in case of duplicate loop labels.
15357         (patch_conditional_expr): Patch results of string concatenation
15358         operations.
15359
15360 1998-12-06  Per Bothner  <bothner@cygnus.com>
15361
15362         * constants.c (find_methodref_index):  When the class is an interface,
15363         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
15364
15365         * decl.c (finit_identifier_node):  Use "$finit$", rather than
15366         "<finit>" (which Sun's verifier rejects).
15367         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
15368         (generate_field_initialization_code):  Removed.
15369         (fix_constructors)  Don't add call to $finit$ here (wrong order).
15370         (patch_method_invocation):  Add $finit$ call here.
15371
15372         * java-tree.h (CALL_USING_SUPER):  New macro.
15373         * parse.y (patch_invoke):  Remove im local variable.
15374         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
15375         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
15376         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
15377
15378         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
15379
15380         * parse.y (java_complete_tree):  Don't complain about unreachable
15381         statement if it is empty_stmt_node.
15382
15383         * jcf-write.c (find_constant_wide):  New function.
15384         (push_long_const):  Use find_constant_wide.
15385
15386         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
15387         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
15388         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
15389         Emit invokeinterface when calling an interface method.
15390         Emit invokespecial also when calling super or private methods.
15391
15392         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
15393
15394 1998-12-06  Per Bothner  <bothner@cygnus.com>
15395
15396         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
15397
15398 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15399
15400         * java-tree.h (java_layout_seen_class_methods): New function
15401         prototype.
15402         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
15403         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
15404         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
15405         * parse.y (method_declarator:): Defined action.
15406         (issue_warning_error_from_context): input_filename saved, set to
15407         the appropriate value and restored after java_error is called.
15408         (build_unresolved_array_type): Fixed comment.
15409         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
15410         (method_header): Deal with return type the same way type are
15411         handled for fields and method's parameters and local variables
15412         types are handled.
15413         (check_method_redefinition): Removed extra CR.
15414         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
15415         (java_layout_seen_class_methods): New function.
15416         (java_layout_classes): Call java_layout_seen_class_methods.
15417
15418 1998-12-03  Per Bothner  <bothner@cygnus.com>
15419
15420         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
15421
15422 1998-12-03  Per Bothner  <bothner@cygnus.com>
15423
15424         * jcf-dump.c (main):  Fix error message.
15425         * jcf-path.c (add_entry):  Style fix.
15426
15427 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15428
15429         * class.c (layout_class_method): Call build_java_argument_signature
15430         on constructors too.
15431         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
15432         (patch_method_invocation): Define a primary when resolving an
15433         expression name. Augmented comment on code checking illegal `this'
15434         usage. Loosened it test by accepting NEW_CLASS_EXPR.
15435
15436 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15437
15438         * class.c (layout_class_method): Don't report error on non-static
15439         overriding static if the method is private.
15440         * java-tree.h (finish_class): Prototype added.
15441         * lex.c (java_get_line_col): Handle col argument -2 value.
15442         * parse.h: All static method declarations moved to parse.y.
15443         * parse.y: Now contains all static method declarations previously
15444         found in parse.h.
15445         (find_expr_with_wfl, missing_return_error,
15446         unreachable_stmt_error): New functions.
15447         (java_get_real_method_name): Identify constructors bearing class
15448         names in source code compiled classes only.
15449         (java_complete_expand_methods): Call missing_return_error.
15450         (invocation_mode): Private methods invoked as static methods.
15451         (java_complete_tree): Call unreachable_stmt_error.
15452
15453 1998-12-01  Tom Tromey  <tromey@cygnus.com>
15454
15455         * Makefile.in (+target): Removed.
15456         (+xmake_file): Likewise.
15457         (+tmake_file): Likewise.
15458         (.NOEXPORT): Removed duplicate.
15459
15460 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15461
15462         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
15463
15464         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
15465
15466         * jvgenmain.c: Remove the xmalloc prototype, we get it from
15467         libiberty.h.  Provide an xmalloc definition.
15468
15469         * jvspec.c: Remove the xmalloc prototype.
15470
15471         * parse-scan.y: Include config.h and system.h.  Don't include
15472         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
15473         Provide an xstrdup definition.
15474
15475 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
15476
15477         * jcf-path.c (add_entry): Recognize ".jar" too.
15478         * lang-specs.h: Likewise.
15479
15480 1998-11-26  Per Bothner  <bothner@cygnus.com>
15481
15482         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
15483         soft_monitorenter_node, soft_monitorexit_node, throw_node.
15484
15485         * jcf-write.c (generate_bytecode_insns):
15486         Handle pre/post-increment/decrement of long.
15487
15488         * jcf-write.c (generate_bytecode_insns):
15489         Handle missing exception handler (finally for synchronized).
15490
15491 1998-11-25  Per Bothner  <bothner@cygnus.com>
15492
15493         * java-tree.h (end_params_node):  Declare global.
15494         * decl.c (end_params_node):  New global.
15495         (init_decl_processing, start_java_method):  Use end_params_node for
15496         end of list of parameter types.  Follows correct gcc conventions.
15497         * expr.c (pop_argument_types, pop_arguments):  Likewise.
15498         * lang.c (put_decl_node):  Likewise.
15499         * typeck.c (various places):  Likewise.
15500         * class.y (various places):  Likewise.
15501         * parse.y (various places):  Likewise.
15502
15503         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
15504         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
15505
15506         * class.c:  Add #include flags.h, remove no-longer needed declaration.
15507
15508         * class.c (layout_class_method):  Remove commented-out code, re-format.
15509         Don't add vtable entry (or index) for private methods.
15510         * expr.c (expand_invoke):  A private method is implicitly final.
15511         * class.c (make_class_data):  If inlining or optimizing,
15512         skip private methods.
15513
15514         * class.c (finish_class):  New function.  Calls existing methods,
15515         but alls emits deferred inline functions.
15516         * jcf-parse.c (parse_class_file):  Call finish_class.
15517         * parse.y (java_complete_expand_methods):  Likewise.
15518
15519         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
15520
15521         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
15522
15523 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
15524
15525         * jcf-write.c (generate_bytecode_conditional): Fix typo.
15526
15527 1998-11-24  Per Bothner  <bothner@cygnus.com>
15528
15529         * (generate_classfile): Always write class access flag with
15530         ACC_SUPER set.
15531
15532 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15533
15534         * class.c (maybe_layout_super_class): New function.
15535         (layout_class): Reorganized. Loop on class methods dispatched into
15536         a new function. Call maybe_layout_super_class.
15537         (layout_class_methods, layout_class_method): New functions.
15538         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
15539         class.
15540         (expand_invoke): Likewise.
15541         * java-tree.h (all_class_list): New global variable declared.
15542         (layout_class_methods, layout_class_method): New function
15543         prototypes.
15544         (LAYOUT_SEEN_CLASS_METHODS): New macro.
15545         * jcf-parse.c (all_class_list): New global variable.
15546         (load_class): Extended what class_or_name can be. Use parser
15547         context mechanism to save globals before calling jcf_parse.
15548         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
15549         is set on the file name.
15550         (jcf_parse): Layout class methods when Object is loaded, otherwise
15551         record class in all_class_list for delayed method layout.
15552         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
15553         * lang.c (put_decl_node): Decode <init> into the decl context
15554         class name.
15555         * lex.c (java_allocate_new_line): Use xmalloc.
15556         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
15557         pointers, not TREE_LIST elements.
15558         (struct parser_ctxt): Fixed comment indentations, added comments
15559         and reordered some fields.
15560         (java_check_methods): Function prototype removed.
15561         * parse.y (java_push_parser_context): Use xmalloc.
15562         (java_parser_context_restore_global): Pop extra pushed ctxp only
15563         when there's nothing next.
15564         (maybe_create_class_interface_decl): Fixed comment, add new
15565         created class decl to all_class_list.
15566         (method_header): Use GET_REAL_TYPE on argument's types.
15567         (method_declarator): Use GET_REAL_TYPE, change type to the real
15568         type in TREE_LIST dependency node. Build argument list with the
15569         real type.
15570         (create_jdep_list): Use xmalloc. Removed allocation error message.
15571         (obtain_incomplete_type): Fixed leading comment. Broadened
15572         incoming argument meaning.
15573         (register_incomplete_type): Use xmalloc. Removed allocation error
15574         message.
15575         (safe_layout_class): Fixed leading comment.
15576         (jdep_resolve_class): Reversed if statement condition and switch
15577         if and else bodies.
15578         (resolve_and_layout): Fixed leading comment. Broadened incoming
15579         argument meaning.
15580         (complete_class_report_errors): New local variable name, for
15581         clarity. purify_type_name used for all error cases.
15582         (java_get_real_method_name): Stricter check on constructors.
15583         (java_check_regular_methods): Reverse methods list only if not
15584         already laid out. Layout artificial constructor.
15585         (java_check_methods): Deleted.
15586         (source_start_java_method): Obtain incomplete type for patchable
15587         method arguments.
15588         (java_layout_classes): Fixed leading comment. Use
15589         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
15590         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
15591         before returning. Fixed comments.
15592         (java_expand_classes): Check for errors up front.
15593         (patch_method_invocation): Class to search is resolved and laid
15594         out.
15595
15596 1998-11-24  Per Bothner  <bothner@cygnus.com>
15597
15598         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
15599
15600         * javaop.h (int8):  Removed - not used.
15601         (jbyte):  Redefine portably with correct signedness.
15602
15603         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
15604
15605         * jcf-write.c (generate_bytecode_insns):  Fix typo
15606         OPCODE_getstatic to OPCODE_getfield.
15607
15608         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
15609         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
15610         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
15611
15612 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15613
15614         * jcf-parse.c (jcf_parse_source): Function returned type is
15615         void. Added prototype.
15616         (jcf_parse): Function returned type is void.
15617         (yyparse): Remove call to fclose on the last parsed file.
15618
15619         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
15620
15621 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15622
15623         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
15624         (layout_class): Cope with methods featuring WFL in decl names.
15625         * decl.c (unqualified_object_id_node): New global variable,
15626         initialized.
15627         (build_decl_no_layout): Removed.
15628         * expr.c (build_primtype_type_ref): Handle Double.
15629         (java_lang_expand_expr): Fixed indentations.
15630         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
15631         (flag_wall, flag_redundant, flag_not_overriding,
15632         flag_static_local_jdk1_1, unqualified_object_id_node): Global
15633         variable declarations.
15634         (build_decl_no_layout): Removed prototype.
15635         (java_get_real_method_name): Added prototype.
15636         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
15637         (java_parse_abort_on_error): Macro now just returns.
15638         * jcf-parse.c (jcf_parse_source): Check fclose returned
15639         value. Call emit_register_classes if java_report_errors returns
15640         zero.
15641         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
15642         flag_static_local_jdk1_1): New integer flags.
15643         (lang_decode_option): New flags set here.
15644         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
15645         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
15646         the flag_redundant variable.
15647         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
15648         when parsing java.lang.Object class.
15649         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
15650         NULL_TREE to build.
15651         (resolve_qualified_expression_name): Fixed indentation.
15652         (patch_array_ref): Changed prototype.
15653         (not_initialized_as_it_should_p): Prototype removed.
15654         (java_report_errors): Added function prototype.
15655         * parse.y (formal_parameter:): Changed error message for not yet
15656         supported final parameters.
15657         (class_type_list:): Set both PURPOSE and VALUE of created
15658         TREE_LIST to be class_type.
15659         (primary_no_new_array:): Handle class literals on primitive types.
15660         (parse_warning_context): Reinstalled correct force_error and
15661         do_warning flags setups.
15662         (java_report_errors): Changed prototype. Return java_error_count
15663         value.
15664         (variable_redefinition_error): Consider treating variable type as
15665         a fake pointer.
15666         (create_interface): Warn about redundant abstract modifier if
15667         flag_redundant is set. Changed error message.
15668         (lookup_field_wrapper): Save/restore globals before/after looking
15669         up field.
15670         (duplicate_declaration_error_p): Consider treating declaration
15671         type as a fake pointer.
15672         (register_fields): Extract real type from dependency node. Check
15673         for duplicate field declaration after type adjustment. Use
15674         DECL_INITIAL to store static final initialized values.
15675         (method_header): Extract real function type from dependency node.
15676         (check_abstract_method_header): Use GET_METHOD_NAME.
15677         (obtain_incomplete_type): Layout fake pointer type.
15678         (safe_layout_class): Don't try to check for methods before layout.
15679         (java_complete_class): Don't check for correct throws clause
15680         elements inheritance here.
15681         (resolve_and_layout): Broadened name parameter meaning.
15682         (reset_method_name): Use GET_METHOD_NAME.
15683         (java_get_real_method_name): New function.
15684         (java_check_regular_methods): Don't check methods in
15685         java.lang.Object.  Verify lineage of throws clause elements. Use
15686         flag_no_overriding in warning report.
15687         (check_throws_clauses): Don't check if class was from
15688         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
15689         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
15690         (declare_local_variables): Use flag_static_local_jdk1_1 to report
15691         warning on unsupported final local variables. Use build_decl
15692         instead of build_decl_no_layout. Get real local variable type from
15693         dependency node.
15694         (source_start_java_method): Get real parameter type from
15695         dependency node. Call build_decl instead of build_decl_no_layout.
15696         (java_layout_classes): Reverse tree and layout type and class as
15697         required. Mark class as loaded when done.
15698         (resolve_field_access): Fixed indentation. Restricted condition
15699         leading to static field access code generation. Set field_type
15700         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
15701         (resolve_qualified_expression_name): Initialize type_found to
15702         null. Handle static field resolved during qualification. Fixed
15703         layout on non primitive field decl types.
15704         (not_accessible_p): Fixed typo in comment.
15705         (patch_method_invocation): Resolve and layout class to search from
15706         type.
15707         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
15708         layout non primitive type, if necessary. Make method node only to
15709         report errors.
15710         (find_applicable_accessible_methods_list): Consider WFL'ed method
15711         decl names. Fixed indentation.
15712         (argument_types_convertible): Resolve and layout target type if
15713         necessary.
15714         (java_complete_tree): Fixed indentation problems. Rewrote
15715         CALL_EXPR thrown exceptions check. Re-installed further processing
15716         of the assignment in certain cases.
15717         (patch_assignment): Call maybe_build_primttype_type_ref to perform
15718         inlining on class literals.
15719         (valid_builtin_assignconv_identity_widening_p): Cope with constant
15720         0 literal.
15721         (valid_method_invocation_conversion_p): Likewise.
15722         (patch_string): Temporary disable forbidden use of `this' in
15723         explicit constructor invocations when doing string concatenation
15724         within their scope.
15725         (patch_unaryop): Added comment. Reinstalled code to disable
15726         further check on assignment operation with cast expression RHS.
15727         (patch_switch_statement): Fixed indentation.
15728         (build_try_statement): Call build_decl instead of
15729         build_decl_no_layout.
15730         (patch_synchronized_statement): Likewise.
15731         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
15732         IS_UNCHECKED_EXPRESSION_P.
15733         (check_thrown_exceptions_do): Changed leading comment. Resolve and
15734         layout argument exception type.
15735         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
15736         of IS_UNCHECKED_EXPRESSION_P.
15737
15738 1998-11-18  Anthony Green  <green@cygnus.com>
15739
15740         * jcf-parse.c (yyparse): Open class file in binary mode.
15741
15742 1998-11-15  Per Bothner  <bothner@cygnus.com>
15743
15744         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
15745
15746         * jcf-write.c (perform_relocations):  Move check out one loop.
15747
15748 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
15749
15750         * Make-lang.in: Fix reference to srcdir.
15751         * jv-scan.c: Add missing xmalloc prototype.
15752         * jvgenmain.c: Ditto.
15753
15754 1998-11-15  Per Bothner  <bothner@cygnus.com>
15755
15756         * decl.c (error_mark_node), java-tree.h:  New global.
15757         * parse.y:  Use empty_stmt_node instead of size_zero_node.
15758         (build_if_else_statement):  If missing else, use empty_stmt_node.
15759
15760         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
15761         (java_complete_expand_method):  Complain if return is missing.
15762         (java_check_regular_methods):  Comment out incorrect error check.
15763         (not_accessible_p):  Fix incorrect handling of protected methods.
15764         (patch_method_invocation):  Pass correct context to not_accessible_p.
15765         (find_applicable_accessible_methods_list):  Likewise.
15766         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
15767         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
15768         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
15769         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
15770
15771         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
15772         (push_int_const):  Remove reundant NOTE_PUSH.
15773         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
15774         (- case SWITCH_EXPR):  Fix code generation bug.
15775         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
15776         (generate_classfile):  More robust for abstract methods.
15777
15778 1998-11-15  Anthony Green  <green@cygnus.com>
15779
15780         * Makefile.in: jv-scan and jvgenmain all require libiberty.
15781         * Make-lang.in: Ditto.
15782
15783         * jv-scan.c: Remove xmalloc and xstrdup definitions.
15784         * jvgenmain: Ditto.
15785
15786 1998-11-15  Per Bothner  <bothner@cygnus.com>
15787
15788         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
15789
15790         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
15791
15792 1998-11-14  Per Bothner  <bothner@cygnus.com>
15793
15794         Allow uses of interface types to verify.  This is not really
15795         type-safe, but it matches what Sun does, and is OK as long as
15796         there are appropriate run-time checks.
15797         * verify.c (merge_types):  If merging two interface types,
15798         just set the result to java.lang.Object.
15799         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
15800
15801 1998-11-13  Tom Tromey  <tromey@cygnus.com>
15802
15803         * gjavah.c (main): Handle --output-class-directory argument.
15804         * jvspec.c (lang_specific_driver): Translate `-d' into
15805         -foutput-class-dir.
15806         * jcf.h (jcf_write_base_directory): Declare.
15807         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
15808         * lang-options.h: Mention -foutput-class-dir.
15809         * jcf-write.c (jcf_write_base_directory): New global.
15810         (make_class_file_name): Put generated .class file into `-d'
15811         directory, or into source directory if -d not given.  Function now
15812         static.
15813         (write_classfile): Free class file name.  Handle case where class
15814         file name is NULL.
15815         (DIR_SEPARATOR): New macro.
15816         Include <sys/stat.h>
15817
15818         * Makefile.in (prefix): New macro.
15819
15820 1998-11-12  Per Bothner  <bothner@cygnus.com>
15821
15822         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
15823         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
15824         here (done in patch_invoke instead).
15825         (case_identity):  Moved here from parse.y.
15826
15827         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
15828         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
15829         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
15830         so they can be efficiently scanned without recursion.
15831         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
15832         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
15833         in BLOCK iteratively, rather than recursively.
15834
15835         * parse.y (do_unary_numeric_promotion):  New function.
15836         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
15837
15838         * parse.y (patch_newarray):  Various fixes.
15839
15840         Re-do handling of switch statements (for proper block scoping).
15841         * parse.y:  Add just a single block for the enture switch block,
15842         but don't create any "case blocks".
15843         (group_of_labels):  Rmeoved unneeded non-terminal.
15844         CASE_EXPR and DEFAULT_EXPR are added to current block.
15845         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
15846         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
15847         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
15848         * parse.y (wfl_operator, print_int_node): Make non-static.
15849         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
15850         as part of recursive scan of block.
15851         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
15852         (patch_switch_statement):  Most tests move dinto java_complete_tree.
15853
15854         * parse.y:  Make various production be non-typed (void).
15855         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
15856         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
15857         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
15858
15859         * jcf-write.c (struct jcf_handler):  New type.
15860         (struct jcf_switch_state):  New type.
15861         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
15862         (alloc_handler, emit_unop, emit_reloc):  New functions.
15863         (adjust_typed_op):  Add extra parameter ("max type" offset).
15864         (emit_switch_reloc, emit_case-reloc):  New function.
15865         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
15866         (generate_bytecode_insns):  Support REAL_CST, switch statements,
15867         exception handling, method calls, object/array creation, and more.
15868
15869         * class.c:  Remove some unused variables.
15870         * constants.c (find_string_constant):  New function.
15871         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
15872         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
15873         if flag_emit_class_files.
15874
15875 1998-11-12  Tom Tromey  <tromey@cygnus.com>
15876
15877         * jcf-io.c (find_class): Added explanatory comment.
15878
15879         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
15880         trailing slash to `.zip' entries.
15881
15882         * jvspec.c (lang_specific_driver): Correctly handle case where
15883         GC_NAME not defined.
15884
15885 1998-11-11  Tom Tromey  <tromey@cygnus.com>
15886
15887         * jvspec.c (GC_NAME): New define.
15888         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
15889         if required.
15890         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
15891
15892 1998-11-11  Per Bothner  <bothner@cygnus.com>
15893
15894         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
15895
15896 1998-11-11  Tom Tromey  <tromey@cygnus.com>
15897
15898         * jcf-dump.c (main): Correctly recognize `--'-style long options.
15899
15900 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15901
15902         * class.c (is_compiled_class): Call safe_layout_class for class
15903         compiled from source.
15904         * conver.h (convert_to_integer, convert_to_real,
15905         convert_to_pointer): Added prototypes.
15906         * decl.c (init_decl_processing): Non longer push the decls of
15907         `methodtable', `constants', `Class', `Field', `dispatchTable'
15908         `jexception' and `Method'.
15909         * expr.c (build_invokeinterface): New function.
15910         (expand_invoke): static variable CLASS_IDENT now in
15911         build_invokeinterface. Use build_invokeinterface.
15912         (expand_java_field_op): Moved code to inline
15913         java.lang.PRIMTYPE.TYPE into a function.
15914         (build_primtype_type_ref): New function.
15915         * java-tree.def (INSTANCEOF_EXPR): New tree code.
15916         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
15917         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
15918         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
15919         (DECL_LOCAL_STATIC_VALUE): New macro.
15920         (build_invokeinterface, build_primtype_type_ref): New function
15921         prototypes.
15922         (java_parse_abort_on_error): Macro rewritten.
15923         * jcf-parse.c (current_method): Add comment to declaration.
15924         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
15925         Function prototypes fixed.
15926         (jcf_parse_source): push/pop parser context. save/restore global.
15927         (parse_source_file): Fixed leading comment. Now take a
15928         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
15929         classes and pop the parser context anymore.
15930         (yyparse): Push parser context, save globals, parse the source
15931         file, restore globals and pop the parser context when processing a
15932         source file.
15933         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
15934         * lex.c (java_parse_doc_section): New function.
15935         (java_lex): Call java_parse_doc_section when appropriate. Build an
15936         operator around INSTANCEOF_TK.
15937         * lex.h (java_lineterminator, java_sprint_unicode,
15938         java_unicode_2_utf8, java_lex_error, java_store_unicode):
15939         Prototypes rewritten.
15940         (java_parse_escape_sequence, java_letter_or_digit_p,
15941         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
15942         java_read_unicode, java_store_unicode, java_read_char,
15943         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
15944         Added function prototypes.
15945         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
15946         define.
15947         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
15948         New macros
15949         (struct parser_ctxt): New fields: deprecated,
15950         current_parsed_class_un, gclass_list.
15951         (fix_method_argument_names, issue_warning_error_from_context,
15952         resolve_package, lookup_package_type): New function prototypes.
15953         (resolve_expression_name): Fixed function prototype.
15954         (find_applicable_accessible_methods_list): Fixed indentation, added
15955         extra argument in prototype.
15956         (check_final_assignment, build_null_of_type, check_deprecation,
15957         check_method_redefinition, reset_method_name,
15958         java_check_regular_methods, java_check_abstract_methods,
15959         maybe_build_primttype_type_ref): New function prototype.
15960         * parse.y (conver.h): Include.
15961         (INSTANCEOF_TK): Tagged <operator>.
15962         (single_type_import_declaration): Use REGISTER_IMPORT macro.
15963         (relational_expression:): Build binop for instanceof.
15964         (java_push_parser_context): Remember ctxp->gclass_list across
15965         contexts.
15966         (java_pop_parser_context): Simply return if no context
15967         exists. Remember gclass_list across contexts.
15968         (issue_warning_error_from_context): New function.
15969         (parse_error_context): Don't setup ctxp->elc here. Call
15970         issue_warning_error_from_context instead.
15971         (parse_warning_context): Likewise.
15972         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
15973         setup. Link new class/interface to ctxp->gclass_list.
15974         (add_superinterfaces): Register interface as incomplete if not
15975         loaded.
15976         (create_class): Remember class unqualified name in
15977         ctxp->current_parsed_class_un. Check class deprecation.
15978         (register_fields): Check field deprecation. Remember static final
15979         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
15980         processing INIT.
15981         (method_header): New local variable ORIG_ARG. Use unqualified
15982         current class name for check on constructor errors. Promote return
15983         type if of record type. Argument list fix moved in
15984         fix_method_argument_names, called here. Check method deprecation.
15985         (fix_method_argument_names): New function.
15986         (method_declarator): Promote record typed arguments.
15987         (safe_layout_class): Check class methods before layout.
15988         (java_complete_class): Compute field layout when patched.
15989         (do_resolve_class): Try to load class after having it renamed
15990         after the package name.
15991         (get_printable_method_name): Use DECL_CONTEXT.
15992         (reset_method_name): New function.
15993         (check_method_redefinition): Use reset_method_name.
15994         (java_check_regular_methods): New local variable
15995         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
15996         names for error report. Check for compile-time error when method
15997         found has default (package) access.
15998         (java_check_abstract_methods): Now takes an interface DECL node as
15999         an argument. Also reinstall real name on unchecked
16000         overriding/hiding methods for error report.
16001         (java_check_methods): Fixed leading comment. Get classes to verify
16002         from ctxp->gclass_list. Use CHECK_METHODS macro and set
16003         CLASS_METHOD_CHECKED_P on class verification.
16004         (lookup_java_method2): Get real method name if necessary.
16005         (find_in_imports): Don't check package class access here.
16006         (resolve_package, lookup_package_type): New functions.
16007         (java_layout_classes): Fixed leading comment. Take classes to be
16008         laid out from ctxp->gclass_list.
16009         (java_complete_expand_methods): Don't expand native and abstract
16010         methods.
16011         (java_expand_classes): New function.
16012         (resolve_expression_name): Use additional argument ORIG.  Retrieve
16013         values of static final field of primitive types.
16014         (resolve_field_access): Handles static final field of promotive
16015         type.
16016         (resolve_qualified_expression_name): Handle STRING_CST as
16017         primaries and package name resolution. Check deprecation on found
16018         decls. Set where_found and type_found on non static field resolved
16019         during qualification. Layout non primitive field decl types.
16020         (check_deprecation): New function.
16021         (maybe_access_field): Simplified.
16022         (patch_method_invocation_stmt): Local variable CLASS_TYPE
16023         removed. Reverse method's argument when primary is a type. Don't
16024         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
16025         instead. Include abstract class in the list of class searchable
16026         for constructors. Use DECL_CONTEXT of found method for access
16027         checks. Check method deprecation.
16028         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
16029         converting arguments. Handle INVOKE_INTERFACE.
16030         (lookup_method_invoke): Search constructor using existing
16031         infrastructure (don't rely on lookup_java_constructor anymore).
16032         (find_applicable_accessible_methods_list): Extra argument flag
16033         LC. Now include constructor in the search.
16034         (qualify_ambiguous_name): Conditional expression are primaries.
16035         (not_initialized_as_it_should_p): static final are always
16036         initialized.
16037         (java_complete_tree): Pass extra NULL argument to
16038         resolve_expression_name. Stricter test to carry on patching
16039         assignments. New case for INSTANCEOF_EXPR.
16040         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
16041         (check_final_assignment, maybe_build_primttype_type_ref): New
16042         functions.
16043         (patch_assignment): Detect resolved static finals and carry normal
16044         assignment error check on them. Inline PRIMTYPE.TYPE read access.
16045         (try_builtin_assignconv): Access constant 0 on all primitive
16046         types.
16047         (valid_builtin_assignconv_identity_widening_p): Accept identical
16048         types. Accept all promoted type on int type.
16049         (valid_ref_assignconv_cast_p): Accept a null pointer to be
16050         assigned to a reference.
16051         (valid_method_invocation_conversion_p): Accept to check null
16052         pointers.
16053         (build_binop): Merge declaration and initialization of local
16054         variable BINOP.
16055         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
16056         numeric types. Improved validity test for qualify operators on
16057         references.
16058         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
16059         and PREINCREMENT_EXPR. Also detect resolved static finals of a
16060         primitive type and issue the appropriate error message.
16061         (resolve_type_during_patch): Mark class loaded when resolved.
16062         (patch_cast): Allow null to be cased to reference types.
16063         (build_null_of_type): New function.
16064         (patch_array_ref): Handle array on references correctly.
16065         (patch_return): Removed unused local variable MODIFY. Force
16066         boolean to be returned as integers. Allows null to be returned by
16067         a function returning a reference.
16068         * typeck.c (convert_to_integer, convert_to_real,
16069         convert_to_pointer): Prototypes moved to convert.h
16070         (lookup_argument_method): Use method real name, if necessary.
16071
16072 1998-10-30  Tom Tromey  <tromey@cygnus.com>
16073
16074         * class.c (build_class_ref): Changed name of primitive classes to
16075         start with `_Jv_'.
16076
16077         * class.c (make_class_data): Renamed fields: nmethods to
16078         method_count, method_count to dtable_method_count.  Always set
16079         `state' field to 0.
16080         * decl.c (init_decl_processing): Likewise.
16081
16082 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16083
16084         * class.c (layout_class): Don't mangle <finit>, produce
16085         __finit<class> instead. Don't verify artificial methods.
16086         * decl.c (finit_identifier_node): New declared global.
16087         (init_decl_processing): finit_identifier_node initialized.
16088         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
16089         * java-tree.h (finit_identifier_node): Declared as extern.
16090         (struct lang_decl): New field called_constructor.
16091         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
16092         (CLASS_HAS_FINIT_P): New macro.
16093         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
16094         explicit constructor invocation.
16095         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
16096         CALL_SUPER_CONSTRUCTOR_P): New macros.
16097         (write_classfile): Added prototype.
16098         * jcf-parse.c (jcf_parse_source): Parse and remember for
16099         generation if the file was seen on the command line.
16100         (parse_source_file): Don't write the class file here.
16101         (yyparse): Loop on files rewritten. Set current_jcf.
16102         (parse_zip_file_entries): Parse class file only if it was found.
16103         * lang.c (init_parse): Don't open command line provided filename
16104         here.
16105         (lang_parse): Don't set main_jcf anymore.
16106         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
16107         (JCONSTRUCTOR_CHECK): New macro.
16108         (JBSC_TYPE_P): New macro.
16109         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
16110         (COMPLETE_CHECK_OP_2): New macro.
16111         (struct parse_ctxt): New field explicit_constructor_p.
16112         (check_class_interface_creation): Fixed prototype indentation.
16113         (patch_method_invocation_stmt): Prototype reflects added argument.
16114         (patch_invoke): Likewise.
16115         (complete_method_declaration, build_super_invocation,
16116         verify_constructor_circularity,
16117         build_this_super_qualified_invocation, get_printable_method_name,
16118         patch_conditional_expr, maybe_generate_finit, fix_constructors,
16119         verify_constructor_super, create_artificial_method,
16120         start_artificial_method_body, end_artificial_method_body,
16121         generate_field_initialization_code): New function prototypes.
16122         * parse.y: Fixed leading comment
16123         (constructor_header:, constructor_body:, block_end:): Rules tagged
16124         <node>.
16125         (type_declaration:): Call maybe_generate_finit.
16126         (method_declaration:): Action for method_body: placed in new
16127         function complete_method_declaration, called here.
16128         (constructor_declaration:): Defined actions. Removed leading
16129         FIXME.
16130         (constructor_header:): New rule with action.
16131         (constructor_body:): Rule rewritten using block_begin: and
16132         block_end:. Defined actions.
16133         (constructor_declarator:, explicit_constructor_invocation:):
16134         Defined actions.
16135         (block:): Use new rules block_begin: block_end:.
16136         (block_begin:, block_end:): New rules and actions.
16137         (block_statements:): Fixed error message for explicit
16138         constructors.
16139         (method_invocation:): Call build_this_super_qualified_invocation
16140         if primary is `this' or `super' was seen.
16141         (conditional_expression:): Action defined.
16142         (extra_ctxp_pushed_p): New static global flag.
16143         (java_parser_context_save_global): Create parser context if
16144         necessary. Use extra_ctxp_pushed_p to remember it.
16145         (java_parser_context_restore_global): Pop extra parser context if
16146         one exists.
16147         (build_array_from_name): Array on primitive types are marked
16148         loaded.
16149         (register_fields): Restore new name in field initializer
16150         expression if type was altered. Non static fields initialized upon
16151         declaration marked initialized.
16152         (maybe_generate_finit): New function.
16153         (maybe_generate_clinit): Use create_artificial_method,
16154         start_artificial_method_body, end_artificial_method_body. Generate
16155         debug info for enclosed initialization statements.
16156         (method_header): Fixed leading comment. Check constructor
16157         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
16158         accordingly.
16159         (complete_method_declaration, constructor_circularity_msg,
16160         verify_constructor_circularity): New functions.
16161         (get_printable_method_name): New function.
16162         (check_method_redefinition): Don't rename <finit> methods. Fix
16163         declared constructor names. Error message for
16164         constructors modified.
16165         (java_check_regular_methods): Local variable seen_constructor
16166         renamed saw_constructor. Skip verification on constructors. Create
16167         default constructor with create_artificial_method.
16168         (java_check_methods): Removed unnecessary empty line.
16169         (create_artificial_method, start_artificial_method_body,
16170         end_artificial_method_body): New functions.
16171         (java_layout_classes): Changed leading comment. Reverse fields
16172         list if necessary. Always layout java.lang.Object if being
16173         defined.
16174         (java_complete_expand_methods): Verify constructor circularity.
16175         (java_complete_expand_method): Call fix_constructor on
16176         constructors.  Local variable no_ac_found removed. Restore
16177         bindings if method body expansion failed.
16178         (fix_constructors, verify_constructor_super,
16179         generate_field_initialization_code): New function.
16180         (java_expand_classes): Fixed leading comment. Write class file
16181         here.
16182         (resolve_expression_name): Check for illegal instance variable
16183         usage within the argument scope of an explicit constructor
16184         invocation.
16185         (resolve_qualified_expression_name): Pass extra from_super flag
16186         when invoking patch_method_invocation_stmt. New case for
16187         conditional expression when used as a primary. Check for error
16188         when acquiring super.
16189         (patch_method_invocation_stmt): Added extra argument super. New
16190         local variable is_static_flag. Set class_to_search according to
16191         the nature of the constructor invocation. Don't add `this'
16192         argument when expanding NEW_CLASS_EXPR. Check for illegal method
16193         invocation within the argument scope of explicit constructor
16194         invocation. Set is_static according to is_static_flag. Provide
16195         extra `super' argument to patch_invoke invocation.
16196         (patch_invoke): New argument from_super. Loop on arguments
16197         indentation fixed. Pass from_super to invocation_mode. New switch
16198         case INVOKE_SUPER. Fixed error message in switch default case.
16199         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
16200         value.
16201         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
16202         (lookup_method_invoke): Fixed prototypes in candidates list. Error
16203         message takes constructors into account.
16204         (find_applicable_accessible_methods_list): Fixed indentation.
16205         (qualify_ambiguous_name): Take explicit constructor invocation
16206         into account. Deal with a conditional expression as a primary to
16207         a method call.
16208         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
16209         case. Added extra argument to patch_method_invocation_stmt.
16210         Register calls made to explicit constructor `this'. Don't call
16211         save_expr in ARRAY_REF case when emitting class files. Check for
16212         illegal use of this when expanding explicit constructor invocation
16213         arguments.
16214         (complete_function_arguments): Set and reset parser context
16215         explicit_constructor_p field value when appropriate.
16216         (build_super_invocation, build_this_super_qualified_invocation):
16217         New functions.
16218         (patch_assignment): Fixed typo.
16219         (patch_unaryop): Check on final fields occurs only when a decl
16220         exits.
16221         (patch_return): Take constructors into account.
16222         (patch_conditional_expr): New function.
16223         * typeck.c (build_java_signature): Removed unnecessary empty line.
16224
16225 1998-10-28  Jeffrey A Law  (law@cygnus.com)
16226
16227         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
16228
16229 1998-10-28  Tom Tromey  <tromey@cygnus.com>
16230
16231         * decl.c (init_decl_processing): Renamed fields.
16232         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
16233         interface_len, msize fields.
16234
16235         * class.c (make_class_data): Removed subclass_head and
16236         subclass_next fields.
16237         * decl.c (init_decl_processing): Removed subclass_head and
16238         subclass_next fields.
16239
16240 1998-10-28  Jeffrey A Law  (law@cygnus.com)
16241
16242         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
16243         * mangle.c (emit_unicode_mangled_name): Similarly.
16244
16245 1998-10-26  Nick Clifton  <nickc@cygnus.com>
16246
16247         * jcf-parse.c (get_constant): Place braces around code to compute
16248         'd' when REAL_ARITHMETIC is not defined.
16249
16250 1998-10-25  H.J. Lu  (hjl@gnu.org)
16251
16252         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
16253         dependency.
16254
16255 1998-10-23  Tom Tromey  <tromey@cygnus.com>
16256
16257         * lang-specs.h: `.zip' files are input to jc1.
16258
16259 1998-10-22  Per Bothner  <bothner@cygnus.com>
16260
16261         * jvspecs.c:  Add (but don't enable) support for combining multiple
16262         .class and .java input filenames to a single jc1 invocation.
16263         Add support for -C flag (copile to .class files).
16264         Translate -classpath and -CLASSPATH arguments.
16265         * lang-specs.h:  Don't set %2 spec.
16266
16267 1998-10-22  Tom Tromey  <tromey@cygnus.com>
16268
16269         * jcf-path.c (add_entry): Don't add trailing separator if entry is
16270         a .zip file.
16271         (add_path): Don't add trailing separator to non-empty path
16272         elements.
16273
16274         * lang.c (lang_decode_option): Check for -fclasspath and
16275         -fCLASSPATH before examining other `-f' options.
16276
16277         * java-tree.h (finalize_identifier_node): Don't declare.
16278         * class.c (make_class_data): Don't push "final" field.
16279         * decl.c (init_decl_processing): Don't push "final" field.
16280         (finalize_identifier_node): Removed.
16281         (init_decl_processing): Don't set finalize_identifier_node.
16282
16283         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
16284
16285 1998-10-11  Anthony Green  <green@cygnus.com>
16286
16287         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
16288         (JV_SCAN_SOURCES): New macro.
16289         (JCF_DUMP_SOURCES): Likewise.
16290         (jcf-dump$(exeext)): New target.
16291         (jv-scan$(exeext)): New target.
16292
16293 1998-10-22  Tom Tromey  <tromey@cygnus.com>
16294
16295         * Makefile.in (LEX): Removed.
16296         (LEXFLAGS): Likewise.
16297         (SET_BISON): New macro.
16298         (BISON): Removed.
16299         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
16300         spurious diffs in parse.c.
16301         ($(PARSE_SCAN_C)): Likewise.
16302         (PARSE_DIR): New macro.
16303         (PARSE_C): Use it.
16304         (PARSE_SCAN_C): Likewise.
16305         (PARSE_RELDIR): New macro.
16306
16307         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
16308
16309         * jcf-io.c (find_class): Use saw_java_source to determine when to
16310         look for `.java' file.
16311         * jcf-parse.c (saw_java_source): New global.
16312         (yyparse): Set it if `.java' file seen.
16313
16314         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
16315         (GCJH_SOURCES): Likewise.
16316         * Makefile.in (datadir): New macro.
16317         (libjava_zip): Likewise.
16318         (JAVA_OBJS): Added jcf-path.o.
16319         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
16320         (../gcjh$(exeext)): Likewise.
16321         (jcf-path.o): New target.
16322         * java-tree.h (fix_classpath): Removed decl.
16323         * jcf-parse.c (fix_classpath): Removed.
16324         (load_class): Don't call fix_classpath.
16325         * parse.y (read_import_dir): Don't call fix_classpath.
16326         * lex.h: Don't mention classpath.
16327         * lex.c (java_init_lex): Don't initialize classpath.
16328         * jcf-io.c (classpath): Removed global.
16329         (find_class): Use jcf_path iteration functions.  Correctly search
16330         class path for .java file.
16331         (open_in_zip): New argument `is_system'.
16332         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
16333         classpath-related options.
16334         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
16335         and -I.
16336         (lang_init): Call jcf_path_init.
16337         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
16338         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
16339         Correctly put braces around second string in each entry.
16340         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
16341         classpath-related options.
16342         (help): Updated for new options.
16343         * jcf.h: Declare functions from jcf-path.c.  Don't mention
16344         `classpath' global.
16345         * jcf-path.c: New file.
16346
16347         * jcf-depend.c: Include jcf.h.
16348
16349         * jcf-write.c (localvar_alloc): Returns `void'.
16350         (localvar_free): Removed unused variable.
16351
16352         * lang.c (OBJECT_SUFFIX): Define if not already defined.
16353         (init_parse): Use OBJECT_SUFFIX, not ".o".
16354
16355 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16356
16357         * class.c (emit_register_classes): Renamed from
16358         emit_register_class.
16359         * java-tree.h (emit_register_classes): Prototype renamed from
16360         emit_register_class.
16361         * jcf-parse.c (yyparse): Call emit_register_classes once before
16362         returning.
16363         * parse.y (java_expand_classes): No longer register classes.
16364
16365 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16366
16367         * class.c (is_compiled_class): New local variable
16368         seen_in_zip. Identify classes found in currently compiled source
16369         file(s).
16370         * decl.c (complete_start_java_method): Fixed typo.
16371         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
16372         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
16373         (CLASS_P): Moved around.
16374         (java_parse_abort_on_error): Macro moved from jcf-parse.c
16375         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
16376         java-tree.h
16377         (jcf_parse_source): Changed leading comment. Removed unnecessary
16378         fclose and CLASS_FROM_SOURCE_P marking.
16379         (parse_source_file): New local variables remember_for_generation
16380         and filename. Mark parsed file name identifier node. Removed block
16381         executed when parse_only was null. Set remember_for_generation.
16382         Use it as an argument to java_pop_parser_context.
16383         (yyparse): New local variables several_files, list, next node and
16384         current_file_list. Split ampersand separated file names into
16385         current_file_list. Iterate through the list and parse accordingly.
16386         * parse.h (java_pop_parser_context): New function prototype.
16387         * parse.y (ctxp_for_generation): New static global variable.
16388         (java_pop_parser_context): New argument generate. Link popped ctxp
16389         to ctxp_for_generation list accordingly.
16390         (java_complete_expand_methods): Fixed indentation.
16391         (java_expand_classes): New function.
16392
16393 1998-10-17  Per Bothner  <bothner@cygnus.com>
16394
16395         * Makefile.in:  Link with libiberty.a instead of memmove.o.
16396
16397 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16398
16399         * lex.c (setjmp.h): No longer included.
16400         * lex.h (setjmp.h): Included.
16401         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
16402         (duplicate_declaration_error_p): Renamed from
16403         duplicate_declaration_error.
16404         (build_array_from_name): New function prototype.
16405         * parse.y (setjmp.h): No longer included.
16406         (variable_declarator_id): Define action.
16407         (build_array_from_name): New function.
16408         (duplicate_declaration_error_p): Renamed from
16409         duplicate_declaration_error.  Fixed leading comment.
16410         (register_fields): Main `for' loop reorganized. Uses
16411         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
16412         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
16413         build_array_from_name.
16414         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
16415         types.
16416         (read_import_dir): Don't try to skip `.' and `..'.
16417         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
16418         build_array_from_name. Main `for' loop reorganized.
16419         (resolve_qualified_expression_name): When building access to a
16420         field, use the type where the field was found, not its own type.
16421         (maybe_access_field): Use field DECL_CONTEXT if the type where the
16422         field was found is null.
16423         (qualify_ambiguous_name): Sweep through all successive array
16424         dimensions.
16425
16426 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16427
16428         * java-tree.h (pop_labeled_block, lang_printable_name,
16429         maybe_add_interface, set_super_info, get_access_flags_from_decl,
16430         interface_of_p, inherits_from_p, fix_classpath,
16431         complete_start_java_method, emit_handlers, init_outgoing_cpool,
16432         make_class_data, register_class, alloc_name_constant): New
16433         function prototypes.
16434         * lang.c (lang_decode_option): Set argc argument unused. Fixed
16435         indentation. Added cast to remove warning.
16436         (lang_printable_name): Set v argument unused.
16437         (lang_print_error): Added argument to lang_printable_name call.
16438         (java_dummy_print, print_lang_decl, print_lang_type,
16439         print_lang_identifier, lang_print_xnode): All argument marked
16440         unused.
16441         * lex.c (java_unget_unicode): Removed unnecessary argument.
16442         (java_allocate_new_line): Unused local variable is gone.
16443         (java_read_char): Added parenthesis in expressions to remove
16444         warnings.  Added final return statement.
16445         (java_read_unicode): Added parenthesis in expression to remove
16446         warning.
16447         (java_parse_end_comment): Fixed java_unget_unicode invocation.
16448         (java_parse_escape_sequence): Likewise.
16449         (java_lex): Unused local variables are gone. Fixed
16450         java_unget_unicode invocation.
16451         * lex.h (set_float_handler): Prototype added when JC1_LITE not
16452         defined.
16453         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
16454         lang_printable_name invocation in macro.
16455         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
16456         Likewise.
16457         (duplicate_declaration_error): Suppressed unused argument in
16458         prototype.
16459         (identical_subpath_p): Function declaration is gone.
16460         (patch_invoke): Suppressed unused argument in prototype.
16461         (patch_cast, build_labeled_block, check_thrown_exceptions):
16462         Likewise.
16463         * parse.y (setjmp.h): Included
16464         (toplev.h): Likewise.
16465         (field_declaration:): Suppressed unused local
16466         (label_decl:): Fixed build_labeled_block invocation.
16467         (java_pop_parser_context): Put extra parenthesis around assignment
16468         in if.
16469         (yyerror): Suppressed unused local variables.
16470         (variable_redefinition_error): Fixed lang_printable_name
16471         invocation.
16472         (create_interface): Suppressed unused local variables.
16473         (create_class): Likewise.
16474         (duplicate_declaration_error): Suppressed unused argument. Fixed
16475         lang_printable_name invocation.
16476         (register_fields): Suppressed unused local variable. Fixed
16477         duplicate_declaration_error invocation.
16478         (method_header): Suppressed unused local variable.
16479         (method_declarator, parser_check_super): Likewise.
16480         (java_complete_class): Suppressed unused local variable. Fixed
16481         fatal error message.
16482         (complete_class_report_errors): Added default: in switch.
16483         (java_check_regular_methods): Fixed lang_printable_name
16484         invocations.
16485         (check_throws_clauses): Likewise.
16486         (java_check_abstract_methods): Suppressed unused local
16487         variable. Fixed lang_printable_name invocation.
16488         (read_import_entry): Added supplemental return statement.
16489         (read_import_dir): Suppressed unused local variables.
16490         (check_pkg_class_access, declare_local_variables): Likewise.
16491         (source_start_java_method): Suppressed unused extern variable
16492         declarations
16493         (expand_start_java_method): Suppressed unused extern and local
16494         variable declarations.
16495         (java_complete_expand_methods): Likewise.
16496         (java_complete_expand_method): Suppressed unused local variables.
16497         (make_qualified_name): Likewise.
16498         (resolve_qualified_expression_name): Added default: in
16499         switch. Fixed lang_printable_name invocation.
16500         (class_instance_creation_expression): Added parenthesis around
16501         expressions.
16502         (patch_method_invocation_stmt): Fixed lang_printable_name and
16503         patch_invoke invocations.
16504         (check_for_static_method_reference): Fixed lang_printable_name
16505         invocation.
16506         (patch_invoke): Suppressed unused arguments and local variables.
16507         (lookup_method_invoke): Suppressed unused local variables.
16508         (qualify_ambiguous_name): Added default: in switch.
16509         (identical_subpath_p): Function removed.
16510         (patch_assignment): Suppressed unused local variables. Suppressed
16511         unnecessary if statement. Fixed lang_printable_name invocations.
16512         (try_builtin_assignconv): Fixed lang_printable_name invocations.
16513         (valid_ref_assignconv_cast_p): Parenthesis around
16514         expression. Suppressed unused local variables.
16515         (build_binop): Suppressed unused local variables. fixed
16516         lang_printable_name invocations.
16517         (string_constant_concatenation): Suppressed unused local
16518         variables.
16519         (patch_unaryop): Fixed lang_printable_name invocation.
16520         (patch_cast): Suppressed unnecessary argument. Fixed
16521         lang_printable_name invocation.
16522         (patch_array_ref): Fixed lang_printable_name invocation.
16523         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
16524         (build_labeled_block): Suppressed unused argument.
16525         (generate_labeled_block): Fixed build_labeled_block invocation.
16526         (build_loop_body): Suppressed unused local variables.
16527         (patch_loop_statement): Likewise.
16528         (patch_exit): Fixed lang_printable_name invocation.
16529         (patch_switch_statement): Likewise.
16530         (case_identity): First argument marked unused.
16531         (patch_try_statement): Fixed lang_printable_name invocations.
16532         (patch_synchronized_statement, patch_throw_statement): Likewise.
16533         (check_thrown_exceptions): Fixed check_thrown_exceptions and
16534         lang_printable_name invocations.
16535         (check_thrown_exceptions_do): Suppressed unused argument.
16536
16537 1998-10-14  Tom Tromey  <tromey@cygnus.com>
16538
16539         * jcf-write.c (write_classfile): Add output class file as target.
16540         * lang-options.h: Added -MD, -MMD, -M, and -MM.
16541         * jcf.h: Added declarations for dependency-tracking functions.
16542         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
16543         * lang.c (lang_decode_option): Recognize -MD and -MMD.
16544         (finish_parse): Call jcf_dependency_write.
16545         (dependency_tracking): New global.
16546         (DEPEND_SET_FILE): New define.
16547         (DEPEND_ENABLE): New define.
16548         (init_parse): Enable dependency tracking if required.
16549         Include "flags.h".
16550         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
16551         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
16552         (../gcjh$(exeext)): Likewise.
16553         (jcf-depend.o): New target.
16554         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
16555         (GCJH_SOURCES): Likewise.
16556         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
16557         dep_name argument.
16558         (find_classfile): Added dep_name argument.
16559         (find_class): Compute name of dependency.
16560         (open_in_zip): Call jcf_dependency_add_file.
16561         * gjavah.c (output_file): No longer global.
16562         (usage): Don't mention "gjavah".
16563         (help): Likewise.
16564         (java_no_argument): Likewise.
16565         (version): Likewise.
16566         (main): Recognize and handle -M family of options.
16567         (print_mangled_classname): Return is void.
16568         (process_file): Handle case where output is suppressed.
16569         (HANDLE_END_FIELD): Likewise.
16570         (HANDLE_METHOD): Likewise.
16571         * jcf-depend.c: New file.
16572
16573 1998-10-13  Jeffrey A Law  (law@cygnus.com)
16574
16575         * java-tree.def: Add missing newline at EOF.
16576
16577 1998-10-13  Tom Tromey  <tromey@cygnus.com>
16578
16579         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
16580         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
16581         function.
16582         Include <config.h> and "system.h".
16583         (disassemble_method): Undefine RET to avoid clash with
16584         config/i386/i386.h.
16585
16586 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16587
16588         * decl.c (runtime_exception_type_node, error_exception_type_node):
16589         New global variables.
16590         (init_decl_processing): Initialized.
16591         * expr.c (java_lang_expand_expr): Set caught exception type to
16592         null if catch handler argument doesn't exit.
16593         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
16594         tree codes.
16595         * java-tree.h (runtime_exception_type_node,
16596         error_exception_type_node): Global variables declared.
16597         (DECL_FUNCTION_THROWS): New macro.
16598         (DECL_FUNCTION_BODY): Modified comment.
16599         (DECL_SPECIFIC_COUNT): Likewise.
16600         (struct lang_decl): New field throws_list.
16601         (IS_UNCHECKED_EXPRESSION_P): New macro.
16602         * lex.c (java_lex): Generate location information for THROW_TK.
16603         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
16604         EXCEPTIONS_P): New macros.
16605         (enum jdep_code): New value JDEP_EXCEPTION.
16606         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
16607         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
16608         PATCH_METHOD_RETURN_ERROR): New macros.
16609         (patch_method_invocation_stmt): Added new argument to prototype.
16610         (patch_synchronized_statement, patch_throw_statement,
16611         check_thrown_exceptions, check_thrown_exceptions_do,
16612         purge_unchecked_exceptions, check_throws_clauses): New function
16613         prototypes.
16614         * parse.y Fixed typo in keyword section.
16615         (throw:): Rule tagged <node>.
16616         (THROW_TK): Keyword tagged <operator>.
16617         (method_header:): Last argument to call to method_header passed
16618         from throws: rule.
16619         (throws:, class_type_list:, throw_statement:,
16620         synchronized_statement:, synchronized:): Defined actions.
16621         (method_header): New local variable current. Register exceptions
16622         from throws clause.
16623         (java_complete_tree): Complete and verify exceptions from throws
16624         clause.
16625         (complete_class_report_errors): Error message on exceptions not
16626         found
16627         (java_check_regular_methods): Fixed typo. Shortcut on private
16628         overriding methods. Changed error message on method
16629         redefinition. Check for throws clause compatibility.
16630         (check_throws_clauses): New function.
16631         (java_check_abstract_methods): Use DECL_NAME for wfl or current
16632         method. Changed error message on method redefinition.
16633         (currently_caught_type_list): New static variable.
16634         (java_complete_expand_methods): Purge unchecked exceptions from
16635         throws clause list. Call PUSH_EXCEPTIONS before walk and
16636         POP_EXCEPTIONS after.
16637         (resolve_qualified_expression_name): Pass new argument as NULL to
16638         patch_method_invocation_stmt.
16639         (patch_method_invocation_stmt): New argument ref_decl. Invoke
16640         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
16641         argument list when appropriate. Use new argument if non null to
16642         store selected method decl.
16643         (patch_invoke): Convert if necessary args of builtin types before
16644         forming CALL_EXPR. Argument list no longer reversed here.
16645         (invocation_mode): Treat final methods as static methods.
16646         (java_complete_tree): New cases for THROW_EXPR: and
16647         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
16648         function call.
16649         (complete_function_arguments): No more RECORD_TYPE
16650         conversion. Function parameter nodes no longer saved.
16651         (valid_ref_assignconv_cast_p): Avoid handling null type.
16652         (patch_binop): Fixed null constant reference handling.
16653         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
16654         BUILD_THROW macros.
16655         (patch_try_statement): Fixed comments. Record caught types in
16656         list, push the list, expand try block and pop the list.
16657         (patch_synchronized_statement, patch_throw_statement,
16658         check_thrown_exceptions, check_thrown_exceptions_do,
16659         purge_unchecked_exceptions): New functions.
16660         * typeck.c (lookup_argument_method): Allow WFL in place of method
16661         DECL_NAME during method definition check
16662
16663 1998-10-09  Tom Tromey  <tromey@cygnus.com>
16664
16665         * gjavah.c (decode_signature_piece): New function.
16666         (print_c_decl): Use it.  Added `name_override' argument.
16667         (print_method_info): Use name_override argument to print_c_decl.
16668         (seen_fields): Removed.
16669         (print_field_info): Don't update seen_fields.
16670         (struct method_name): New structure.
16671         (method_name_list): New global.
16672         (print_method_info): Add new method to list of methods.
16673         (name_is_method_p): New function.
16674         (print_field_info): If field name has same name as method, then
16675         change field name.
16676         (process_file): Parse methods before fields.
16677         (field_pass): New global.
16678         (HANDLE_END_FIELD): Take field_pass into account.
16679
16680 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16681
16682         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
16683         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
16684
16685 1998-10-03  Anthony Green  <green@cygnus.com>
16686
16687         * jvspec.c: Fix bug in jvgenmain_spec patch.
16688
16689 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16690
16691         * Makefile.in (lang.o:): Install dependency on java-tree.def.
16692         * decl.c (soft_exceptioninfo_call_node): New global variable.
16693         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
16694         takes extra integer argument. soft_exceptioninfo_call_node
16695         initialized.
16696         * except.c (java_set_exception_lang_code): New function
16697         (method_init_exceptions): Called here.
16698         (prepare_eh_table_type): New function.
16699         (expand_end_java_handler): Called here.
16700         * expr.c (build_java_throw_out_of_bounds_exception): Now features
16701         one argument. Modified generation of call to
16702         soft_badarrayindex_node to use new argument.
16703         (build_java_arrayaccess): Pass faulty index value to
16704         build_java_throw_out_of_bounds_exception.
16705         (generate_name): New function.
16706         (java_lang_expand_expr): New local variables node, current,
16707         has_finally_p. Expand TRY_EXPR node.
16708         (process_jvm_instruction): Replace top of the stack with thrown
16709         object reference when entering exception handler.
16710         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
16711         specific tree codes.
16712         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
16713         global.
16714         (DECL_SPECIFIC_COUNT): New macro.
16715         (prepare_eh_table_type, java_set_exception_lang_code,
16716         generate_name): New function declarations.
16717         (match_java_method): Declaration deleted.
16718         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
16719         macros.
16720         * lex.c (TRY_TK, CATCH_TK): Generate location information.
16721         * parse.h (redefinition_error, refine_accessible_methods_list,
16722         can_cast_to_p): Function declaration removed.
16723         (classitf_redefinition_error, variable_redefinition_error,
16724         parse_jdk1_1_error, find_applicable_accessible_methods_list,
16725         find_most_specific_methods_list, argument_types_convertible,
16726         enter_a_block, valid_builtin_assignconv_identity_widening_p,
16727         valid_cast_to_p, valid_method_invocation_conversion_p,
16728         try_reference_assignconv, add_stmt_to_compound,
16729         build_jump_to_finally, build_tree_list, patch_try_statement,
16730         java_get_catch_block): New function declarations.
16731         * parse.y (string_buffer_type): Global variable deleted.
16732         (group_of_labels, catches, catch_clause, catch_clause_parameter,
16733         finally): Rules tagged <node>.
16734         (TRY_TK, CATCH_TK): Token tagged <operator>.
16735         (class_body_declaration:, class_member_declaration:,
16736         formal_parameter:, explicit_constructor_invocation:,
16737         interface_member_declaration:, constant_declaration:,
16738         primary_no_new_array:, class_instance_creation_expression:,
16739         array_creation_expression:): Issue error on unsuported JDK1.1
16740         features.
16741         (try_statement:, catches:, finally:): Define actions.
16742         (catch_clause_parameter): New rule.
16743         (catch_clause:): Use new rule catch_clause_parameter.
16744         (parse_jdk1_1_error): New function.
16745         (redefinition_error): Renamed classitf_redefinition_error.
16746         (variable_redefinition_error): New function.
16747         (check_class_interface_creation): Call
16748         classitf_redefinition_error.
16749         (java_complete_tree): Added error message on JDEP_TYPE: case.
16750         (complete_class_report_errors): Fixed indentation.
16751         (declare_local_variables): Call variable_redefinition_error.
16752         (source_end_java_method): Call java_set_exception_lang_code and
16753         emit_handlers where appropriate.
16754         (java_method_add_stmt): Call add_stmt_to_block.
16755         (add_stmt_to_block): New function.
16756         (lookup_method_invoke): Fixed outside comment. new local variable
16757         candicates.  Call find_applicable_accessible_methods_list and
16758         find_most_specific_methods_list when searching for a
16759         method. Modified error report to list possible candidates when
16760         applicable.
16761         (find_applicable_accessible_methods_list,
16762         find_most_specific_methods_list, argument_types_convertible): New
16763         function.
16764         (refine_accessible_methods_list): Function deleted.
16765         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
16766         expr (if applicable) before calling patch_array_ref.
16767         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
16768         (enter_block): Fixed comment.
16769         (enter_a_block): New function.
16770         (patch_assignment): Reorganized. Call try_reference_assignconv for
16771         references. Call valid_cast_to_p instead of can_cast_to_p.
16772         (try_reference_assignconv,
16773         valid_builtin_assignconv_identity_widening_p): New functions.
16774         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
16775         (valid_cast_to_p, valid_method_invocation_conversion_p): New
16776         functions.
16777         (build_string_concatenation): Don't resolve StringBuffer.
16778         (patch_cast): Fixed inverted arguments.
16779         (patch_array_ref): Code to save array expr deleted. Call
16780         valid_cast_to_p instead of can_cast_to_p.
16781         (generate_labeled_block): Call generate_name.
16782         (build_jump_to_finally, build_try_statement, java_get_catch_block,
16783         patch_try_statement): New functions.
16784         * typeck.c (match_java_method): Function deleted.
16785
16786 1998-10-02  Anthony Green  <green@cygnus.com>
16787
16788         * jvspec.c: jvgenmain_spec uses different temporary file names.
16789
16790 1998-10-02  Anthony Green  <green@cygnus.com>
16791
16792         * jvspec.c (lang_specific_driver): Fail if user specifies
16793         --main= when not linking.
16794
16795 1998-09-28  Tom Tromey  <tromey@cygnus.com>
16796
16797         * class.c (make_class_data): Push value for `thread' field.
16798         * decl.c (init_decl_processing): Added `thread' field to class.
16799
16800         * class.c (add_field): Always make static fields externally
16801         visible.
16802
16803 1998-09-26  Anthony Green  <green@cygnus.com>
16804
16805         * expr.c (build_java_athrow,
16806         build_java_throw_out_of_bounds_exception, expand_invoke,
16807         build_newarray, expand_java_multianewarray, build_java_monitor):
16808         Update comments to reflect _Jv_* function names.
16809
16810 1998-09-25  Per Bothner  <bothner@cygnus.com>
16811
16812         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
16813         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
16814         * parse.y (expand_start_java_method):  Likewise.
16815
16816 1998-09-24  Per Bothner  <bothner@cygnus.com>
16817
16818         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
16819
16820         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
16821         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
16822         * expr.c:  Remove no-longer-needed calls to promote_type.
16823         * decl.c (give_name_to_locals):  Liekwise.
16824         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
16825         * parse.y:  Add/remove promote_type calls as appropriate.
16826         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
16827         (parse_signature_string):  Likewise.
16828         (build_java_array_type):  Fix for now signature convenions.
16829
16830         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
16831
16832 1998-09-23  Tom Tromey  <tromey@cygnus.com>
16833
16834         * class.c (init_class_processing): libjava function renamed to
16835         _Jv_RegisterClass.
16836
16837 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16838
16839         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
16840         * java-tree.def: Fixed DEFTREECODE third argument.
16841         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
16842         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
16843         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
16844         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16845         JAVA_THIS_EXPR): Now replaced by tree code definitions.
16846         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
16847         * lang.c (java_tree_code_type, java_tree_code_length,
16848         java_tree_code_name): New arrays.
16849         (lang_init): Append Java tree node definitions to Gcc ones.
16850         * lex.c (expression_obstack): Declared as extern when JC1_LITE
16851         defined.
16852         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
16853         wfl_to_string.
16854         (java_lex): Allow declaration of empty string constants. Retain
16855         location information on CASE_TK and DEFAULT_TK.
16856         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
16857         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
16858         Modified to be more robust.
16859         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
16860         (build_new_invocation, try_builtin_assignconv,
16861         patch_switch_statement, string_constant_concatenation,
16862         build_string_concatenation, patch_string_cst, patch_string,
16863         java_expand_switch): New function declarations.
16864         * parse.y: Rules related to switch and EH tagged <node>.
16865         (label_id): Set to NULL_TREE
16866         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
16867         tree nodes.
16868         (this_or_super:): Fixed indentation.
16869         (statement:, statement_nsi:, statement_without_trailing_substatement:,
16870         statement_expression:): Removed call to RULE on all sub-rules.
16871         (switch_expression:, switch_labels:): New rules.
16872         (switch_statement:, switch_block:, switch_block_statement_groups:,
16873         switch_block_statement_group:, switch_labels:, switch_label:):
16874         Defined actions.
16875         (throw_statement:, synchronized_statement:, try_statement:):
16876         Defined temporary actions.
16877         (class_instance_creation_expression:): Call
16878         build_new_invocation. Fixed indentation.
16879         (field_access): Fixed indentation.
16880         (method_invocation): Likewise.
16881         (make_qualified_primary): Use THIS_EXPR.
16882         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
16883         resolving from SUPER, set *type_found.
16884         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
16885         (java_complete_tree): Removed unused local variable `location'. Case
16886         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
16887         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
16888         on MODIFY_EXPR: and all binary operator tree code cases. Removed
16889         STRING_CST: case. default: checks for patchable strings.
16890         (complete_function_arguments): Transform string constant or
16891         crafted StringBuffer if necessary.
16892         (build_method_invocation): Fixed comments.
16893         (build_new_invocation): New function.
16894         (patch_assignment): Call try_builtin_assignconv to figure a valid
16895         assignment conversion between builtin types.
16896         (try_builtin_assignconv): New function.
16897         (build_binop): Use URSHIFT_EXPR directly to call build.
16898         (operator_string): Use UNARY_PLUS_EXPR.
16899         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
16900         operator.
16901         (do_merge_string_cste, merge_string_cste,
16902         string_constant_concatenation, build_string_concatenation,
16903         patch_string, patch_string_cst): New function.
16904         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
16905         (patch_unaryop): Likewise. New test of valid ++/-- operands.
16906         (build_newarray_node): Use NEW_ARRAY_EXPR.
16907         (build_this): Use THIS_EXPR.
16908         (build_return): Enable debug information on return statement.
16909         (build_if_else_statement): Likewise.
16910         (complete_labeled_statement): Fixed related comment.
16911         (build_loop_body): Fixed comment.
16912         (build_bc_statement): Enable debug information on break/continue
16913         statements.
16914         (patch_bc_statement): Fixed typos. Handle SWITCH statement
16915         context.
16916         (patch_switch_statement, case_identity, java_expand_switch): New
16917         functions.
16918
16919 1998-09-21  Per Bothner  <bothner@cygnus.com>
16920
16921         * buffer.h (BUFFER_INIT):  New macro.
16922         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
16923         Pass (struct jcf_partial *state) to most functions.
16924         (jcf_block, jcf_relocation):  New types.
16925         Support labels, branches, conditionals, loops.
16926
16927 1998-09-21  Tom Tromey  <tromey@cygnus.com>
16928
16929         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
16930
16931 1998-09-21  Per Bothner  <bothner@cygnus.com>
16932
16933         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
16934         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
16935         not integer_type_node (INT_TYPE_SIZ bits).
16936
16937         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
16938
16939         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
16940         * jcf-dump.c (print_exception_table):  New function.
16941         (disassemble_method):  Better handling of wide instructions.
16942         Make more robust for bad input.
16943
16944 1998-09-30  Jeffrey A Law  (law@cygnus.com)
16945
16946         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
16947         FreeBSD.
16948
16949 1998-09-17  Jeffrey A Law  (law@cygnus.com)
16950
16951         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
16952
16953 1998-09-17  Tom Tromey  <tromey@cygnus.com>
16954
16955         * Makefile.in ($(PARSE_H)): Removed target.
16956
16957 1998-09-17  Jeffrey A Law  (law@cygnus.com)
16958
16959         * Makefile.in (JAVA_OBJS): Add memmove.o
16960         (memmove.o): New target & rules.
16961
16962 1998-09-15  Tom Tromey  <tromey@cygnus.com>
16963
16964         * expr.c (expand_invoke): Don't generate a call to the class init
16965         code.
16966
16967 1998-09-14  Jeffrey A Law  (law@cygnus.com)
16968
16969         * Makefile.in: Add many missing dependencies.
16970         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
16971         as appropriate.
16972         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
16973         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
16974
16975 1998-09-11  Per Bothner  <bothner@cygnus.com>
16976
16977         * decl.c (complete_start_java_method):  If method is static (and
16978         not private) call _Jv_InitClass.
16979         * expr.c (expand_invoke):  Don't call build_class_init.
16980
16981         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
16982
16983 1998-09-10  Jeffrey A Law  (law@cygnus.com)
16984
16985         * Make-lang.in (GCJ): Define before using.
16986
16987 1998-09-09  Jeffrey A Law  (law@cygnus.com)
16988
16989         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
16990         losing due to namespace pollution in GNU getopt.h
16991
16992 1998-09-09  Tom Tromey  <tromey@cygnus.com>
16993
16994         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
16995         (java.all.cross): Likewise.
16996         (java.rest.encap): Likewise.
16997
16998 1998-09-08  Jeffrey A Law  (law@cygnus.com)
16999
17000         * gjavah.c (print_class_decls): Fix thinko in arglist
17001         * jcv-io.c (find_classfile): Similarly.
17002
17003 1998-09-07  Jeffrey A Law  (law@cygnus.com)
17004
17005         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
17006
17007 1998-09-05  Tom Tromey  <tromey@cygnus.com>
17008
17009         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
17010         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
17011         * Makefile.in (PARSE_C): New macro.
17012         (PARSE_H): Likewise.
17013         (PARSE_SCAN_C): Likewise.
17014         ($(PARSE_C)): Target renamed from parse.c.
17015         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
17016         (clean): Remove parse-scan.c as well.
17017         (parse.o): Depend on $(PARSE_C).
17018
17019 1998-09-05  Anthony Green  <green@cygnus.com>
17020
17021         * README, license.terms: Removed.
17022
17023         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
17024         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
17025         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
17026         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
17027         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
17028         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
17029         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
17030         and Java trademark attribution.
17031
17032 1998-09-04  Tom Tromey  <tromey@cygnus.com>
17033
17034         * Makefile.in: Use gcjh, not gjavah.
17035         * config-lang.in (stagestuff): Use gcjh, not gjavah.
17036         * Make-lang.in: Changed gjavah to gcjh everywhere.
17037
17038 1998-09-03  Per Bothner  <bothner@cygnus.com>
17039
17040         * gjavah.c:  Support new -prepend -add -append flags.
17041         (print_method_info):  Method is not virtual if class is final.
17042
17043 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17044
17045         * jv-scan.c: Fixed copyright assignment.
17046         * keyword.gperf: Likewise.
17047         * keyword.h: Likewise.
17048         * lex.c: Fixed copyright assignment.
17049         (java_lex): Push unicode back when parsing '<'.
17050         * lex.h: Fixed copyright assignment.
17051         * parse-scan.y: Likewise.
17052         * parse.h: Fixed copyright assignment.
17053         (build_debugable_stmt, complete_for_loop): New function prototypes.
17054         * parse.y: Fixed copyright assignment.
17055         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
17056         size_zero_node when completing a loop with no exit condition.
17057         (for_statement_nsi:): Define action.
17058         (for_init:, for_update:): Return size_zero_node when empty.
17059         (declare_local_variables): Call build_debugable_stmt.
17060         (build_debugable_stmt): New function.
17061         (build_loop_body): Build debugable statement around loop
17062         condition part.
17063         (complete_loop_body): Take into account the debugable statement
17064         around the EXIT_EXPR.
17065         (complete_loop_body): New function.
17066         (patch_exit_expr): Fixed condition inversion.
17067
17068 1998-09-02  Tom Tromey  <tromey@cygnus.com>
17069
17070         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
17071         name of thread define.
17072         * jvspec.c (THREAD_NAME): New macro.
17073         (GCLIB): Likewise.
17074         (THREADLIB): Likewise.
17075         (lang_specific_driver): Recognize attempt to link with thread
17076         library or gc library.  Recognize -ljava on command line so it
17077         isn't linked against more than once.
17078
17079 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17080
17081         * parse-scan.y (report_main_declaration): Name of the class
17082         containing `main' can be a qualified name.
17083
17084 1998-08-31  Tom Tromey  <tromey@cygnus.com>
17085
17086         * config-lang.in: Changed gjavac to gjc everywhere.
17087         * Make-lang.in: Changed gjavac to gjc everywhere.
17088
17089 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17090
17091         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
17092         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
17093         and install the files.
17094         * Makefile.in (JAVA_OBJS_LITE): New variable.
17095         (compiler:): Now include jv-scan as a dependency.
17096         (../jv-scan$(exeext), parse-scan.c): New targets.
17097         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
17098         * config-lang.in (compilers): Removed gcj, gjavah from the list.
17099         * jcf-parse.c (parse_source_file): Call java_layout_classes and
17100         check for errors even if parse_only.
17101         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
17102         defined.
17103         (yylex): New function. Uses java_lex body.
17104         (java_lex): Removed commented out statement. Remove local variable
17105         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
17106         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
17107         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
17108         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
17109         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
17110         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
17111         where appropriate.
17112         (java_lex_error): Empty if JC1_LITE is defined.
17113         (java_get_line_col): Return 0 if JC1_LITE is defined.
17114         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
17115         SET_MODIFIER_CTX): Moved into the section containing the macros
17116         conditionally defined by JC1_LITE.
17117         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
17118         argument if JC1_LITE is defined.
17119         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
17120         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
17121         is defined.
17122         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
17123         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
17124         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
17125         to different values according to JC1_LITE.
17126         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
17127         declared if JC1_LITE set.
17128         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
17129         defined if JC1_LITE not set.
17130         (struct parser_ctx): Reorganized and skip the jc1 front end part
17131         if JC1_LITE set.
17132         (java_layout_classes): New function definition.
17133         (java_push_parser_context, java_init_lex, yyparse, yylex,
17134         yyerror): Prototype always declared. All other static function
17135         prototypes declared only if JC1_LITE is not set.
17136         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
17137         declared in parse.h.
17138         (java_layout_classes): New function.
17139         (java_complete_expand_methods): No longer layout the class here.
17140         * parse-scan.y: New file.
17141         * jv-scan.c: New file.
17142
17143 1998-08-25  Tom Tromey  <tromey@cygnus.com>
17144
17145         * gjavah.c (main): Handle -friend option.
17146         (friend_specs): New global.
17147         (generate_access): Handle friend_specs.
17148         (process_file): Likewise.
17149         (MAX_FRIENDS): New macro.
17150         (friend_count): New global.
17151         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
17152         Changed all callers.
17153
17154 1998-08-24  Per Bothner  <bothner@cygnus.com>
17155
17156         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
17157         (main):  Handle processing all the entries of a named .zip archive.
17158         * jcf-io.c (jcf_trim_old_input):  New function.
17159         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
17160
17161 1998-08-24  Per Bothner  <bothner@cygnus.com>
17162
17163         * lang.c (flag_assume_compiled):  Make default be on.
17164
17165 1998-08-21  Per Bothner  <bothner@cygnus.com>
17166
17167         * jcf-dump.c:  Add bunches of flags to control output more.
17168         (process_class):  New function;  support printing more than one class.
17169         (main): Support new --print-main and --javap flags.
17170         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
17171         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
17172
17173 1998-08-20  Per Bothner  <bothner@cygnus.com>
17174
17175         Change mangling of dispatch table to match C++ vtable (w/thunks).
17176         * class.c (build_dtable_decl), java-tree.h:  New function.
17177         (make_class_data):  Call it.
17178         * decl.c (init_decl_processing):  Likewise.
17179
17180 1998-08-19  Warren Levy  <warrenl@cygnus.com>
17181
17182         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
17183         soft_anewarray; adjust args passed.
17184         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
17185         match _Jv_NewObjectArray.
17186
17187 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17188
17189         * decl.c (push_labeled_block, pop_labeled_block): New functions.
17190         * expr.c (loopup_label): Call create_label_decl.
17191         (create_label_decl): New function.
17192         (java_lang_expand_expr): Call expand_start_bindings with argument
17193         set to zero.
17194         * java-tree.h Added space after PROTO in function declarations
17195         when necessary.
17196         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
17197         (create_label_decl, push_labeled_block): New function
17198         declarations.
17199         * lex.c (label_id): Initialize.
17200         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
17201         switch.
17202         * parse.h Added space after PROTO in function declarations when
17203         necessary.
17204         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
17205         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
17206         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
17207         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
17208         macros.
17209         (struct parser_ctxt): New fields current_loop,
17210         current_labeled_block.
17211         (build_if_else_statement, patch_if_else_statement,
17212         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
17213         generate_labeled_block, complete_labeled_statement,
17214         build_bc_statement, patch_bc_statement, patch_loop_statement,
17215         build_new_loop, build_loop_body, complete_loop_body): New function
17216         declarations.
17217         * parse.y (java_warning_count): New global variable.
17218         (label_id): New static variable.
17219         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
17220         (block:): Return size_zero_node when block is empty.
17221         (empty_statement:): Return size_zero_node.
17222         (statement:): Implement supplemental action when for_statement: is
17223         reduced.
17224         (label_decl:): New rule.
17225         (labeled_statement:): Rewritten using label_decl. Actions
17226         implemented.
17227         (labeled_statement_nsi:): Likewise.
17228         (if_then_statement): Actions implemented.
17229         (while_expression): New rule.
17230         (while_statement:): Rewritten using while_expression. Actions
17231         implemented.
17232         (while_statement_nsi:): Likewise.
17233         (do_statement_begin:): New rule.
17234         (do_statement:): Rewritten using do_statement_begin. Actions
17235         implemented.
17236         (for_statement:): Rewritten using for_begin. Actions implemented.
17237         (for_statement_nsi:): Likewise.
17238         (for_header:, for_begin:): New rules.
17239         (for_init:): Actions implemented.
17240         (statement_expression_list:, break_statement:,
17241         continue_statement:): Likewise.
17242         (yyerror): Count number of issued warning(s).
17243         (java_report_errors): Report error(s) and/or warning(s).
17244         (java_complete_class): Use build_java_argument_signature to
17245         recompute completed method signature.
17246         (java_check_regular_methods): New locals method_wfl and aflags.
17247         Use method_wfl instead of lookup_cl during error reports. Fixed
17248         indentation and modified some error messages. Use
17249         lang_printable_name in method instead of the DECL_NAME. New code
17250         to issue warnings on methods not overriding corresponding methods
17251         private to a different package.
17252         (java_method_add_stmt): Call add_stmt_to_compound.
17253         (add_stmt_to_compound): New function.
17254         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
17255         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
17256         (build_if_else_statement, patch_if_else_statement,
17257         build_labeled_block, generate_labeled_block,
17258         complete_labeled_statement, build_new_loop, build_loop_body,
17259         complete_loop_body, patch_loop_statement, build_bc_statement,
17260         patch_bc_statement, patch_exit_expr): New functions.
17261         * typeck.c (build_java_signature): Build argument signature before
17262         enclosing it in between parenthesis.
17263
17264 1998-08-17  Warren Levy  <warrenl@cygnus.com>
17265
17266         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
17267         (JAVA_OBJS): Added reminder comment
17268
17269 1998-08-13  Nick Clifton  <nickc@cygnus.com>
17270
17271         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
17272         be interpreted as a long long.
17273
17274 1998-08-13  Warren Levy  <warrenl@cygnus.com>
17275
17276         * decl.c (init_decl_processing): Use _Jv_InitClass, not
17277         soft_initialise_class.  Use _Jv_NewMultiArray, not
17278         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
17279         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
17280         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
17281         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
17282
17283 1998-08-12  Per Bothner  <bothner@cygnus.com>
17284
17285         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
17286         length_identifier_node):  New global tree node constants.
17287         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
17288         Replace uses by super_identifier_node etc.
17289         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
17290
17291         * parse.y (resolve_field_access):  Don't special-case ".length" if
17292         flag_emit_class_files.
17293         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
17294         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
17295         and ARRAY.length.
17296
17297 1998-08-11  Per Bothner  <bothner@cygnus.com>
17298
17299         * decl.c (init_decl_processing): Remove unused method_type_node fields.
17300         * class.c (make_method_value):  Remove init for removed fields.
17301
17302         * class.c (layout_class):  Use build_java_argument_signature.
17303         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
17304
17305         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
17306         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
17307         (build_java_signature):  Don't use push_java_argument_signature.
17308
17309         * typeck.c (lookup_argument_method):  New function.
17310         * parse.y (java_check_regular_methods):  Use lookup_argument_method
17311         instead of lookup_java_method2 followed by lookup_java_method.
17312
17313         * parse.y (check_method_redefinition):  Minor optimization.
17314
17315         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
17316         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
17317
17318 1998-08-10  Tom Tromey  <tromey@cygnus.com>
17319
17320         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
17321         c-pragma.o.
17322
17323         * gjavah.c (java_float_finite): Use K&R-style definition.
17324         (java_double_finite): Likewise.
17325         (generate_access): Now returns void.  Changed all callers.
17326         (last_access_generated): Removed.
17327         (process_file): Only make a single pass over the .class file.
17328
17329 1998-07-29  Per Bothner  <bothner@cygnus.com>
17330
17331         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
17332         for compatibility for G++ (with -fvtable-thunks).
17333         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
17334
17335         * gjavah.c (process_file):  Use public inheritance for super-class.
17336
17337 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17338
17339         * lex.c (java_init_lex): Initialize ctxp->package.
17340         * parse.h (struct parser_ctxt): package and package_len replaced
17341         by tree package, an identifier node. Field method_decl_list is
17342         gone. Fixed comments.
17343         (lookup_field_wrapper, merge_qualified_name, not_accessible,
17344         class_in_current_package): New function prototypes.
17345         * parse.y (array_type:): Set class loaded flag on primitive type
17346         arrays.
17347         (package_declaration:): Assign ctxp->package to the
17348         identifier node.
17349         (method_invocation:): Handle invocation of method qualified by
17350         `super'.
17351         (single_type_import_declaration:): Removed ambiguity check.
17352         (java_pop_parser_context): New local variable `next'. Reset and
17353         set IMPORT_CLASSFILE_NAME flags on current and previous import
17354         list.
17355         (java_accstring_lookup): Use new local macro COPY_RETURN.
17356         (lookup_field_wrapper): New function.
17357         (parser_qualified_classname): Use merge_qualified_name.
17358         (parser_check_super_interface): Broaden error message.
17359         (do_resolve_class): Check for qualified class name in the current
17360         compilation unit if appropriate.
17361         (process_imports): Check for already defined classes.
17362         (check_pkg_class_access): Got rid of call to
17363         get_access_flags_from_decl.
17364         (java_complete_expand_methods): Call safe_layout_class based on
17365         the current class size.
17366         (make_qualified_primary): Build a WFL qualification on primary if
17367         none exists.
17368         (merge_qualified_name): New function.
17369         (make_qualified_name): Use merge_qualified_name.
17370         (resolve_expression_name): Use safe_lookup_field.
17371         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
17372         (resolve_qualified_expression_name): Likewise. Check on resolved
17373         element accessibility.
17374         (not_accessible_p, class_in_current_package): New functions.
17375         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
17376         (patch_method_invocation_stmt): Merged common pieces. Check
17377         accessibility of invoked method.
17378         (check_for_static_method_reference): Add returned type in error
17379         message.
17380         (invocation_mode): Get rid of bogus check on PRIVATE methods.
17381         (refine_accessible_methods_list): Merged two conditions in test.
17382         (java_complete_class): Sanity check on stabilize_ref gone.
17383         * zextract.c (read_zip_archive): Cast lseek second argument to long.
17384
17385 1998-07-28  Per Bothner  <bothner@cygnus.com>
17386
17387         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
17388
17389 1998-07-24  Tom Tromey  <tromey@cygnus.com>
17390
17391         * gjavah.c (F_NAN): Removed.
17392         (F_NAN_MASK): New macro.
17393         (F_POSITIVE_INFINITY): Removed.
17394         (F_NEGATIVE_INFINITY): Likewise.
17395         (java_float_finite): Rewrote.
17396         (D_NAN_MASK): Renamed.
17397         (java_double_finite): Rewrote.
17398         (D_POSITIVE_INFINITY): Removed.
17399         (D_NEGATIVE_INFINITY): Likewise.
17400
17401         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
17402         If verbose, print underlying representation of value in hex.
17403
17404 1998-07-24  Per Bothner  <bothner@cygnus.com>
17405
17406         * buffer.h, buffer.c:  New files.
17407         * Makefile.in (JAVA_OBJS):  Add buffer.o.
17408
17409         Support locals variables and writing their debug entries to .class.
17410         * jcf-write.c:  Simplify some by user new buffer type.
17411         (vode_buffer_grow):  Removed.
17412         (struct localvar_info):  New type.
17413         (localsvars, localvartable):  New buffers.
17414         (localvar_alloc, localvar_free):  New functions.
17415         (generate_bytecode_insns):  Handle local variables.
17416         (generate_classfile):  Write LocalVariableTable attribute.
17417
17418 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17419
17420         * jcf-io.c (open_in_zip): Check the zipfile magic number.
17421         * zipfile.h (ZIPMAGIC): New macro.
17422
17423 1998-07-24  Tom Tromey  <tromey@cygnus.com>
17424
17425         * Makefile.in (gjavah.o): Updated dependencies.
17426         (jcf-dump.o): Likewise.
17427         (all.indirect): Use ../gjavah.
17428         (../gjavah$(exeext)): Likewise.
17429         (clean): Don't remove gjavah.
17430         (clean): Remove parse.c, not java/parse.c.
17431         * Make-lang.in (java): Added gjavah.
17432         (gjavah$(exeext)): New target.
17433         (GJAVAH_SOURCES): New macro.
17434         (java.all.build): Added gjavah.
17435         (java.all.cross): Likewise.
17436         (java.rest.encap): Likewise.
17437         * config-lang.in (compilers, stagestuff): Added gjavah.
17438
17439 1998-07-23  Tom Tromey  <tromey@cygnus.com>
17440
17441         * gjavah.c (java_float_finite): New function.
17442         (java_double_finite): Likewise.
17443         (F_POSITIVE_INFINITY): New macro.
17444         (F_NEGATIVE_INFINITY): Likewise.
17445         (F_NAN): Likewise.
17446         (D_POSITIVE_INFINITY): Likewise.
17447         (D_NEGATIVE_INFINITY): Likewise.
17448         (D_NAN): Likewise.
17449         (print_field_info): Use java_float_finite and java_double_finite.
17450
17451 1998-07-23  Per Bothner  <bothner@cygnus.com>
17452
17453         * parse.y (method_header):  Name "this" implicit argument.
17454
17455 1998-07-22  Per Bothner  <bothner@cygnus.com>
17456
17457         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
17458         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
17459         (put_linenumber):  New function.
17460         (generate_bytecode_insns, generate_classfile):  Write line numbers.
17461
17462 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17463
17464         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
17465         (lookup_name, build_known_method_ref, build_class_init,
17466         build_invokevirtual, invoke_build_dtable, match_java_method,
17467         build_field_ref, pushdecl_force_head, build_java_binop,
17468         binary_numeric_promotion, build_decl_no_layout,
17469         build_java_arrayaccess, build_newarray, build_anewarray,
17470         build_java_array_length_access, build_java_arraynull_check): New
17471         extern function prototypes.
17472         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17473         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
17474         java-tree.h.
17475         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
17476         to NULL
17477         * jcf.h (jcf_out_of_synch): New extern function prototype.
17478         * parse.h: Static/global function implemented in parse.y
17479         prototyped and declarations moved at the end of the file.
17480         (DECL_P): Check that the argument isn't null.
17481         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17482         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
17483         (QUAL_DECL_TYPE): New macro.
17484         (PARAMS): Macro definition removed.
17485         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
17486         (return_statement:): Call build_return.
17487         (field_access:): Call make_qualified_primary in sub rule.
17488         (method_invocation:): Build method invocation and call
17489         make_qualified_primary when processing primaries.
17490         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
17491         get_type_from_signature.
17492         (java_check_regular_method): Extra integer 0 argument when calling
17493         lookup_java_method2.
17494         (lookup_java_interface_method2): Extra method DECL argument when
17495         calling lookup_java_interface_method2.
17496         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
17497         COMPOUND_EXPR node.
17498         (java_complete_expand_method): Layout current class iff not
17499         already done. Don't process interface's methods.
17500         (java_complete_expand_method): Use super class only if it
17501         exists. Use current class otherwise.
17502         (make_qualified_primary): New function.
17503         (resolve_expression_name): Process qualified expression or
17504         expression from primary the same way.
17505         (resolve_expression_name): Two last arguments to
17506         resolve_field_access are now NULL_TREEs.
17507         (resolve_field_access): New variable is_static. Local field must
17508         be DECLs. is_static computed on field DECLs only. Append code in
17509         where_found to the field access if necessary. Use QUAL_DECL_TYPE
17510         to initialize field_type.
17511         (resolve_qualified_expression_name): New local variable,
17512         previous_call_static and is_static. Handle primaries with function
17513         calls, casts, array references and `this'. `super' now handled as
17514         `(super_class)this'. Use is_static to clarify boolean expressions.
17515         Added code to handle case where a proper handle is required to
17516         access a field. Use QUAL_DECL_TYPE where applicable.
17517         (maybe_access_field): New function.
17518         (patch_method_invocation_stmt): New arguments primary, where,
17519         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
17520         deleted. Use `where' as a type to search from if specified. Check
17521         for static method reference where forbidden. Append primary or
17522         current_this to the argument list if not calling constructor nor
17523         static methods.
17524         (check_for_static_method_reference): New function.
17525         (patch_invoke): Layout the class on which new is done if
17526         necessary.
17527         (lookup_method_invoke): Changed format to report errors on
17528         methods.
17529         (qualify_ambiguous_name): New local variable this_found. Now
17530         handle things from primaries. Method call are considered
17531         expression names.
17532         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
17533         changed into NULLs.
17534         (not_initialized_as_it_should_p): Comply with the new DECL_P.
17535         (java_complete_tree): New case fo RETURN_EXPR. Process function
17536         call arguments in separate function.
17537         (complete_function_arguments): New function.
17538         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
17539         anymore.
17540         (patch_assignment): Take the return function slot into account as
17541         a RHS. Distinguish assignment from a return.
17542         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
17543         when checking methods in interfaces.
17544         (resolve_type_during_patch): NULL argument to unresolve_type_p
17545         instead of NULL_TREE.
17546         (patch_newarray): Fixed typo in comment.
17547         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
17548         (build_return, patch_return): New functions.
17549         * typeck.c (lookup_java_constructor): Fixed typo in comment.
17550
17551 1998-07-21  Per Bothner  <bothner@cygnus.com>
17552
17553         * constants.c (find_name_and_type_constant, find_fieldref_index,
17554         find_methodref_index):  New methods.
17555         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
17556         just return given method.  Also, rename to build_known_method_ref.
17557         (expand_invoke):  Rename call to build_invoke_non_interface.
17558         * java-tree.h, parse.h:  Update prototype.
17559         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
17560         (such as expand_expr_stmt) if flag_emit_class_files.
17561         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
17562         STACK_TARGET, IGNORE_TARGET):  New macros.
17563         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
17564         (generate_bytecode_insn):  New function to generate method's bytecode.
17565         (generate_classfile):  Node generate Code attribute for a method.
17566         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
17567         push_long_const, field_op, adjust_typed_op, maybe_wide):
17568         New functions used by generate_bytecode_insn.
17569
17570         * typeck.c (signature_include_return):  Remove variable.
17571         (push_java_argument_signature, build_java_argument_signature):  New.
17572         (build_java_signature):  Use push_java_argument_signature.
17573         * parse.y:  Use build_java_argument_signature instead of fiddling
17574         with signature_include_return.
17575
17576 1998-07-17  Tom Tromey  <tromey@cygnus.com>
17577
17578         * gjavah.c (print_c_decl): Always generate JArray<>* for array
17579         types.
17580
17581         * Makefile.in (all.indirect): Added gjavah$(exeext).
17582         (gjavah$(exeext)): Added $(exeext).
17583         (clean): Likewise.
17584
17585 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17586
17587         * class.c (layout_class): Call to java_layout_parsed_class replace
17588         by safe_layout_class.
17589         * expr.c (build_java_array_length_access): Removed static storage
17590         class in the function definition.
17591         (build_java_arraynull_check): Likewise.
17592         Also fixed typos in two comments.
17593         * lex.c (java_init_lex): Initialize static global kw_length.
17594         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
17595         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
17596         java_lex_error.
17597         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
17598         * parse.h (resolve_no_layout): New static function declaration.
17599         (get_identifier_in_static): Declaration removed.
17600         (java_layout_parsed_class): Function name declaration changed to
17601         safe_layout_class.
17602         (build_newarray_node, patch_newarray, resolve_type_during_patch,
17603         not_initialized_as_it_should_p, build_this): New static function
17604         declarations.
17605         (pushdecl_force_head, build_java_binop, int_fits_type_p,
17606         binary_numeric_promotion, stabilize_reference,
17607         build_decl_no_layout, build_java_arrayaccess): Extern function
17608         declarations moved into their own section.
17609         (build_newarray, build_anewarray, build_java_array_length_access,
17610         build_java_arraynull_check): New extern function declarations.
17611         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
17612         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
17613         fake tree codes.
17614         (CALL_CONSTRUCTOR_P): New macro.
17615         * parse.y (kw_length): New static global tree node.
17616         (return_statement): Tagged <node>.
17617         (RETURN_TK): Tagged <operator>.
17618         (variable_declarator_id:): Build variable declaration with an
17619         empty initialization value if a syntax error was found in the
17620         initialization part of the variable declaration.
17621         (statement_without_trailing_substatement:): return_statement: now
17622         uses the default rule.
17623         (return_statement:): Temporarily fixed to return NULL_TREE.
17624         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
17625         (class_instance_creation_expression:): Class creation rules now
17626         call build_method_invocation upon reduction.
17627         (array_creation_expression:): Rules call build_newarray_node upon
17628         reduction.
17629         (dim_exprs:): Build a list of dimension expressions.
17630         (dim_expr:): Store location of the OSB_TK in the dimension
17631         expression node.
17632         (method_invocation:): Added a new error rule.
17633         (build_unresolved_array_type): WFL argument may also be an array
17634         on a primitive type. Name of the argument changed to reflect this.
17635         (method_declarator): Insert argument type at the beginning of the
17636         argument type list and later reverse the list.
17637         (unresolved_type_p): Argument 'returned' may be optionally
17638         NULL_TREE.
17639         (java_layout_class_from_source): Function renamed
17640         safe_layout_class.
17641         (resolve_and_layout): Now call resolve_no_layout and
17642         safe_layout_class.
17643         (resolve_no_layout): New function.
17644         (purify_type_name): New function.
17645         (complete_class_report_errors): Call purify_type_name during error
17646         report on a type not found.
17647         (process_imports): error_found local variable doesn't need to be
17648         initialized to zero.
17649         (declare_local_variables): New local type_wfl. Fixed typo in error
17650         message. type_wfl assigned to unresolved type and used to register
17651         incomplete type. Build a WFL around the variable initialization
17652         statement so that debug info can be generated on it.
17653         (source_start_java_method): Reverse argument list after they've
17654         been processed.
17655         (current_this): New static global variable.
17656         (java_complete_expand_methods): Set current_this when appropriate.
17657         (resolve_expression_name): Build correct static and non static
17658         field access bearing a simple name.
17659         (resolve_field_access): Resolve the length field of arrays. Handle
17660         f.m() cases.
17661         (patch_method_invocation_stmt): Set the type of the method
17662         invocation to error_mark_node. This value is later overridden by a
17663         valid type, if any. Don't handle qualified constructor invocation
17664         as qualified method invocation. Call lookup_method_invoke with its
17665         new flag. It's no longer necessary to access the selected method
17666         as the value of a tree list. Handle constructor invocation.
17667         (patch_invoke): Reverse argument list when invoking non interface
17668         methods. Insert call to new as the first argument of the
17669         constructor.
17670         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
17671         defined within a final class. Return INVOKE_STATIC if the invoked
17672         method is a constructor.
17673         (lookup_method_invoke): New lc argument is a flag to indicate a
17674         constructor lookup. Now handle constructor lookup. Choose the most
17675         specific method in case several were matching the invocation
17676         requirements. Return a method decl instead of a tree list featuring
17677         one single method decl element.
17678         (refine_accessible_methods_list): New lc flag argument to
17679         indicate that a constructor is being looked up.
17680         (not_initialized_as_it_should_p): New function.
17681         (java_complete_tree): Now process fake tree codes
17682         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
17683         save_expr on resolved function call arguments. Case on
17684         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
17685         (patch_assignment): LHS can be a field access expression. When
17686         dealing with reference, lhs_type is the promoted type of the
17687         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
17688         applicable.
17689         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17690         (patch_binop): Use not_initialized_as_it_should_p where
17691         applicable.
17692         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17693         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
17694         where applicable.
17695         (resolve_type_during_patch): New function.
17696         (patch_cast): Call resolve_type_during_patch to resolve type and
17697         report error accordingly.
17698         (patch_array_ref): Use not_initialized_as_it_should_p where
17699         applicable. Array base expression is saved before being
17700         used. Promote the type of an array elements if it contains non
17701         builtin types.
17702         (build_newarray_node, patch_newarray, build_this): New functions.
17703
17704 1998-07-16  Tom Tromey  <tromey@cygnus.com>
17705
17706         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
17707         increment it in `for' statement.
17708         (print_field_info): If number is inf or nan, don't print it.
17709         (print_method_info): If method name is `delete', just ignore it.
17710         (print_c_decl): Special-case jstringArray.
17711
17712         * gjavah.c (help): New function.
17713         (no_argument): New function.
17714         (usage): Changed text.
17715         (main): Rewrote argument handling.  Now handles -v, --help,
17716         --version.
17717         (version): New function.
17718         (found_error): New global.
17719         (main): Return found_error.
17720         (generate_access): Set found_error.
17721         (print_c_decl): Likewise.
17722
17723 1998-07-15  Tom Tromey  <tromey@cygnus.com>
17724
17725         * gjavah.c (print_c_decl): Don't print "," when examining field.
17726         Skip type name when looking at "[L" types.
17727         (process_file): Now static.
17728         (generate_access): Now returns int.
17729         (last_access_generated): New global.
17730         (process_file): Clear last_access_generated; make multiple passes
17731         over the class.
17732         (print_field_info): Just return if generate_access returns true.
17733         (print_method_info): Likewise.  Also, allow <init> functions to
17734         pass through.
17735         (print_c_decl): Added is_init argument.  Print constructors
17736         properly.
17737         (print_cxx_classname): Use UTF8_GET to extract characters from
17738         string.
17739         (print_base_classname): New function.
17740         (print_class_decls): New function.
17741         (process_file): Use it.
17742         (utf8_cmp): New function.
17743
17744 1998-07-13  Nick Clifton  <nickc@cygnus.com>
17745
17746         * lang-options.h: Format changed to match changes in gcc/toplev.c
17747         to implement a --help option.
17748
17749 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
17750
17751         * decl.c (init_decl_processing): Revert change to dtable_type.
17752
17753 1998-07-09  Per Bothner  <bothner@cygnus.com>
17754
17755         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
17756
17757 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
17758
17759         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
17760
17761         * lang.c (lang_init): Default flag_exceptions to 1, without
17762         checking to see if it's 2 first.
17763
17764 1998-07-08  Jeffrey A Law  (law@cygnus.com)
17765
17766         * constants.c: Include "system.h".
17767         * decl.c: Likewise.
17768         * lang.c (flag_new_exceptions): Get via extern now.
17769         (lang_init_options): New functions.  Turn on flag_new_exceptions.
17770
17771 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17772
17773         * lex.c (java_lex): Return 0 when we see an invalid character in
17774         the input.
17775
17776         * lex.c (java_read_char): Specify extra argument when calling
17777         java_lex_error.
17778         (java_read_unicode, java_parse_end_comment,
17779         java_parse_escape_sequence): Likewise,
17780         (java_lex): Specify extra argument when calling
17781         java_lex_error. Test that IDs are beginning with a legal character
17782         for IDs. Handle invalid characters with an error message and a
17783         call to java_lex_error.
17784         (java_lex_error): Adjust column position by new argument
17785         `forward'. Issue an error even if in the middle of reporting an
17786         other error.
17787
17788 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
17789
17790         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
17791         we don't explicitly put a null pointer when we're copying it.
17792
17793 1998-07-07  Tom Tromey  <tromey@cygnus.com>
17794
17795         * gjavah.c (print_cxx_classname): New function.
17796         (super_class_name): Likewise.
17797         (print_super_fields): Removed.
17798         (in_super): Removed.
17799         (print_field_info): Never generate #defines.
17800         (print_c_decl): Changed generated types to match JNI.  No longer
17801         print class name before method name.
17802         (print_method_info): Print "static" before static methods.
17803         Print "virtual" before non-final methods.
17804         (usage): Use exit(1), not exit(-1).
17805         (main): Likewise.
17806         (print_field_info): Use %.17g to print a double.
17807         (last_access): New globals.
17808         (process_file): Initialize last_access.
17809         (usage): Now static.
17810         (ACC_VISIBILITY): New define.
17811         (generate_access): New function.
17812         (print_field_info): Call it.
17813         (print_method_info): Likewise.  Also, generate information for all
17814         methods, not just native methods.  Return void.
17815         (print_c_decl): Return void.
17816         (print_field_info): Return void.
17817
17818 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17819
17820         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
17821         processing the jc1 grammar file. Prefix bison functions and
17822         variables with java_.
17823         (parse.c): Dependencies on parse.h and lex.h
17824         * expr.c (build_java_arrayaccess): Function now global.
17825         * java-tree.h: Comment reorganized to carry on previous
17826         classification effort.
17827         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
17828         RESOLVE_TYPE_NAME_P): New flags on WFLs.
17829         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
17830         java_parse (new prefix java_ generated by bison).
17831         (java_layout_parsed_class, java_register_parsed_class): Function
17832         call removed.
17833         (yyparse): Removed unnecessary call to init_outgoing_cpool.
17834         * lex.c (static tree wfl_op): Variable deleted.
17835         (java_init_lex): Initialize kw_super and kw_this. Initialize more
17836         ctxp fields to NULL_TREE.
17837         (java_lex): No longer create WFL for operators. Filename caching
17838         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
17839         created as STRING_CST and later expanded. Removed extra argument
17840         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
17841         and SUPER.
17842         (build_wfl_node): Removed code in comments.
17843         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
17844         store token and location data in the current bison token.
17845         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
17846         static/extern function declaration at the beginning of the file.
17847         (struct qualification): Data structure definition deleted.
17848         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
17849         (qualify_ambiguous_name): Function declaration modified. Function
17850         now returns nothing.
17851         (build_array_ref, patch_array_ref, make_qualified_name,
17852         resolve_qualified_expression_name, maybe_generate_clinit,
17853         resolve_field_access): New static function declarations.
17854         (build_java_arrayaccess): New extern function declaration.
17855         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
17856         (CALL_EXPR_PRIMARY): Macro deleted.
17857         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
17858         (struct parser_ctxt): Field initialized_final
17859         removed. non_static_initialized, static_initialized: New fields.
17860         * parse.y (static tree kw_super, static tree kw_this): New global
17861         static.
17862         (%union): tree wfl field of operator member replaced by int
17863         location. WFLs are non longer created for operators.
17864         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
17865         (qualified_name:): Now calls make_qualified_name to build the
17866         identifier.
17867         (type_declaration:): Consider generating <clinit> when class
17868         parsing completed.
17869         (variable_declarator:): Directly build an assignment node when the
17870         variable is initialized when declared.
17871         (this_or_super:): Build a WFL and set current location when THIS
17872         or SUPER are parsed.
17873         (expression_statement:): Wrap statement around a WFL.
17874         (primary_no_new_array:): Fixed typo. Changed value returned by
17875         THIS_TK because of its new type (temporary).
17876         (dim_exprs:): Temporary fix because of OSB_TK's new type.
17877         (field_access:): Build qualified name with SUPER.
17878         (method_invocation:): Fixed returned value because of SUPER's new
17879         type.
17880         (array_access:): Use OSB_TK location information.
17881         (post_increment_expression:, post_decrement_expression:,
17882         unary_expression:, pre_increment_expression:,
17883         pre_decrement_expression:, unary_expression_not_plus_minus:,
17884         cast_expression:, multiplicative_expression:,
17885         additive_expression:, shift_expression:, relational_expression:,
17886         equality_expression:, and_expression:, exclusive_or_expression:,
17887         inclusive_or_expression:, conditional_and_expression:,
17888         conditional_or_expression:, assignment:): Use new location/token
17889         information available on operators.
17890         (create_class): Set super_decl_type to NULL_TREE when processing
17891         java.lang.Object.
17892         (register_fields): Field initialization is now a MODIFY_EXPR
17893         node. Chain initialization code to the matching lists (according
17894         to the field declaration modifiers).
17895         (maybe_generate_clinit): New function.
17896         (method_header): Don't set method's DECL_NAME to a WFL when adding
17897         methods to java.lang.Object.
17898         (resolve_and_layout): Now can return NULL_TREE if the type
17899         resolution fails. Otherwise, return the class DECL instead of its
17900         TYPE.
17901         (check_method_redefinition): Don't patch method DECL_NAME if it
17902         belongs to java.lang.Object.
17903         (process_imports): Simply assign error_found to the value returned
17904         by check_pkg_class_access.
17905         (declare_local_variables): Don't use their init statements (if
17906         any) when parsing error were previously found. Reuse MODIFY_EXPR
17907         build during parsing as an init statement.
17908         (java_method_add_stmt): Now return the current method body.
17909         (java_layout_parsed_class, java_register_parsed_class): Functions
17910         removed.
17911         (java_complete_expand_methods): Initialize the constant pool on a
17912         per class basis. Layout the classes before expanding their method
17913         bodies. Don't try expand artificial constructor code if error were
17914         found. Make the classes data and register them if no error were
17915         found.
17916         (java_complete_expand_method): Retrieve an artificial constructor
17917         argument list before entering its body. Assign the top block to
17918         the artificial constructor function body and set types of declared
17919         blocks and compound statements to void. Walk method body if not an
17920         artificial constructor.
17921         (make_qualified_name, cut_identifier_in_qualified): New functions.
17922         (resolve_expression_name): Fixed comments. Save/restore the
17923         current class CLASS_LOADED_P flag value. Build non qualified
17924         static field access and handle qualified expression names.
17925         (resolve_field_access, resolve_qualified_expression_name): New
17926         functions.
17927         (patch_method_invocation_stmt): Use the new expression resolution
17928         scheme, calling resolve_field_access when the function call is
17929         resolved as an expression.
17930         (qualify_ambiguous_name): Function rewritten to work on qualified
17931         expression produced by make_qualified_name.
17932         (java_complete_tree): Promote type when function's argument are
17933         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
17934         the assignment to discover further errors if RHS is a expression
17935         name that fails to evaluate. Declare LHS initialized even though
17936         the assignment failed. Don't use the location variable and removed
17937         extra argument in patch function calls. Now handle the ARRAY_REF
17938         case and build internal string representation when STRING_CSTs are
17939         walked.
17940         (build_method_invocation): Don't wrap function call around a WFL.
17941         (build_assignment): Likewise. Use the operator location
17942         information.
17943         (patch_assignment): Handle array access LHSs. Handle error
17944         provenance, resulting in a better error report.
17945         (build_binop): Use op_location from operator as binop location
17946         information.
17947         (build_unaryop, build_incdec, build_cast): Likewise.
17948         (patch_binop): Extract location information from the node. Fixed
17949         typo in error message.
17950         (patch_unary_op): Extract location information from the node.
17951         (build_array_ref, patch_array_ref): New functions.
17952
17953 1998-07-01  Tom Tromey  <tromey@cygnus.com>
17954
17955         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
17956         match _Jv_IsInstanceOf.
17957         * decl.c (init_decl_processing): Use _Jv_NewArray, not
17958         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
17959
17960 1998-06-30  Tom Tromey  <tromey@cygnus.com>
17961
17962         * decl.c (init_decl_processing): Functions are now named
17963         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
17964
17965 1998-06-29  Per Bothner  <bothner@cygnus.com>
17966
17967         * java-tree.h (load_class):  Add prototype.
17968         * class.c (is_compiled_class):  Add missing arg to load_class.
17969         * expr.c (expand_java_NEW):  Call load_class.
17970         * parse.y (process_import):  Removed bogus use of void return value.
17971
17972 1998-06-25  Per Bothner  <bothner@cygnus.com>
17973
17974         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
17975         Function name is "_Jv_Throw" instead of "soft_athrow".
17976         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
17977         Function name is "_Jv_AllocObject" instead of "soft_new".
17978         Takes an extra parameter (object size).
17979         * expr.c:  Update calls.
17980
17981 1998-06-24  Per Bothner  <bothner@cygnus.com>
17982
17983         * lex.c (java_get_line_col):  Handle end-of-file.
17984         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
17985
17986 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
17987
17988         * lang.c (lang_init): Make -fexceptions the default.
17989         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
17990         exception handling is not turned on.
17991
17992 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
17993
17994         * lang.c (flag_new_exceptions): Make this this default.
17995         * decl.c (end_java_method): Call emit_handlers.
17996         * except.c (method_init_exceptions): Set language code and version.
17997         (expand_start_java_handler): Enable exception, and call
17998         expand_eh_region_start.
17999         (expand_end_java_handler): Enable exception, and set up catch blocks.
18000         (emit_handlers): New routine to generate the saved handlers.
18001         * java-except.h (emit_handlers): Add prototype.
18002
18003 1998-06-12  Per Bothner  <bothner@cygnus.com>
18004
18005         We used to have three different representations of the constant pool:
18006         the CPool structure, the tree_constant_pool, and the constructures
18007         used to build the Class object (which may need class and string
18008         constants) in compiled code.  None were appropriate for compiling
18009         to .class files, so I did a major overhaul.
18010
18011         First, the tree_constant_pool array was removed.  Things were
18012         modified to the CPool structure in the JCF could be used.
18013         Second, a "capacity" field was added to the CPool, and functions
18014         written to search for a matching constant, adding one if not found.
18015         The code that generated the Class object was changed to use a CPool.
18016         The actual TREE_LISTs used to build the CONSTRUCTORs used for
18017         the static Class object are now only in build_constants_constructor.
18018         Finally, I wrote code which can generate a .class file (including its
18019         constant pool) from the RECORD_TYPE of a class.  This is a big step
18020         on the way to compiling Java source into .class files.
18021
18022         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
18023         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
18024
18025         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
18026         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
18027         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
18028         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
18029         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
18030         (lang_type):  Removed constant_pool field.
18031         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
18032         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
18033         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
18034         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
18035
18036         * constants.c (current_constant_pool_tags, current_constant_pool_data,
18037         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
18038         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
18039         (set_constant_entry, find_constant1, find_constant2,
18040         find_class_constant, count_constant_pool_bytes, write_constant_pool,
18041         find_utf8_constant, find_class_or_string_constant):  New functions.
18042
18043         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
18044         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
18045         (give_name_to_class, get_class_constant):  Likewise.
18046         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
18047         (get_name_and_type_constant, get_ref_constant):  Removed.
18048         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
18049         * parse.y:  Don't save/restore tree_constant_pool.
18050         * verify.c (verify_jvm_instructions):  Update for new approach.
18051         * expr.c (expand_invoke, expand_java_field_op): Likewise.
18052
18053         * lang-options.h:  Added -femit-class-file, -femit-class-files.
18054         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
18055         (lang_f_options):  Added "emit-class-file(s)".
18056
18057         * expr.c (build_java_arrayaccess):  Generate more efficient array
18058         bounds checking, by using unsigned compare.
18059
18060         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
18061
18062 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18063
18064         * parse.h: New comment on the handling of unresolved type
18065         identifiers. JDEPs are now part of the jdep_code enum.
18066         (typedef struct jdep): Now use enum jdep_code or int, depending on
18067         availability. Both are narrowed down to an 8 bits bitfield.
18068         (CALL_EXPR_PRIMARY): Fixed comment.
18069
18070 1998-06-10  Tom Tromey  <tromey@cygnus.com>
18071
18072         * Make-lang.in (java): Added gjavac and jvgenmain.
18073         (java.start.encap): Depend on gjavac.
18074         (java.rest.encap): Depend on jvgenmain.
18075
18076         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
18077         (JAVA_CROSS_NAME): Likewise.
18078         (java.all.build): Depend on jvgenmain and gjavac.
18079         (java.all.cross): Depend on jvgenmain and gjavac-cross.
18080         (jvgenmain$(exeext)): New target.
18081         (java.install-common): Wrote.
18082         * config-lang.in (compilers, stagestuff): Added gjavac and
18083         jvgenmain.
18084
18085 1998-06-10  Dave Brolley  <brolley@cygnus.com>
18086
18087         * lang.c (lang_decode_option): New argc/argv interface.
18088
18089 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18090
18091         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
18092         * decl.c (build_decl_no_layout): New function.
18093         * expr.c (java_lang_expand_expr): Layout declarations found in
18094         blocks before they're pushed.
18095         * jcf-parse.c (load_class): Save current line when parsing class
18096         file.
18097         (parse_source_file): Register class before expanding their
18098         methods.
18099         * lang.c (put_decl_node): Produce `null' when `void *' is
18100         processed.
18101         * lex.c (static tree wfl_op): New static global, for error report
18102         on casts.
18103         (java_init_lex): wfl_operator and wfl_op initialized
18104         here. Filename caching added for wfl_op. Return wfl_op when `(' is
18105         parsed.
18106         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
18107         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
18108         build_unresolved_array_type): New static function definitions.
18109         (build_decl_no_layout): New extern function declared.
18110         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
18111         faulty modifier exists.
18112         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
18113         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
18114         (UNARY_PLUS_EXPR): New fake operator.
18115         (struct parser_ctxt): New field osb_number.
18116         * parse.y (static tree wfl_operator): New static WFL for operator
18117         bound error messages.
18118         (DECR_TK, INCR_TK): Moved.
18119         (OP_TK): Tagged <operator>.
18120         (array_type:): Now call build_unresolved_array_type.
18121         (dim_expr:): Count the number of '[' seen.
18122         (post_increment_expression, post_decrement_expression,
18123         pre_increment_expression, pre_decrement_expression,
18124         unary_expression_not_plus_minus, unary_expression:): Actions are
18125         now building the corresponding unary expressions.
18126         (cast_expression:): Actions are now building cast expressions.
18127         (build_unresolved_array_type): New function.
18128         (create_interface): Reset the number of declared interfaces.
18129         (create_class): Likewise.
18130         (method_header): Methods declared within the scope of an interface
18131         are now implicitly set public and abstract.
18132         (java_complete_class): Variable's and parameter's type are patched
18133         with a promoted type.
18134         (declare_local_variables): Resolved non builtin types are promoted
18135         before being used to build a variable decl. Removed type patch
18136         posted on variable initialization statement.
18137         (source_start_java_method): Use build_decl_no_layout to build the
18138         decl of a parameter of incomplete type.
18139         (java_register_parsed_class): Process interfaces too. Call
18140         rest_of_decl_compilation on each processed class declarations.
18141         (java_complete_expand_methods): Don't attempt to expand things in
18142         interfaces.
18143         (java_complete_tree): Process CONVERT_EXPR, even though it always
18144         has a type. Propagate error_mark_node to node's type too. Promote
18145         method's call argument type and return error_mark_node if
18146         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
18147         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
18148         handle unary operator nodes.
18149         (build_assignment): Added comment.
18150         (print_int_node): New function.
18151         (patch_assignment): New second argument. New error handling. Use
18152         print_int_node. Handle references. Use can_cast_to_p to issue
18153         different error message according to the context and check upon
18154         the initialization of the RHS.
18155         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
18156         (operator_string): Handle more operators.
18157         (patch_binop): No longer use a function static
18158         wfl_operator. Improved error message on shift distance.
18159         (build_unaryop, build_incdec, build_cast, patch_unaryop,
18160         patch_cast): New functions.
18161
18162 1998-06-05  Per Bothner  <bothner@cygnus.com>
18163
18164         * jvspec.c:  New file.
18165         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
18166
18167         * java-tree.h (identifier_subst):  Add declaration.
18168
18169 1998-06-04  Tom Tromey  <tromey@cygnus.com>
18170
18171         * jvgenmain.c (main): Generate call to JvRunMain.
18172
18173         * class.c (make_class_data): Push value for "sync_info" field.
18174         * decl.c (init_decl_processing): Push "sync_info" field.
18175
18176 1998-06-03  Per Bothner  <bothner@cygnus.com>
18177
18178         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
18179         Java (source) name, not signature.
18180         Set TYPE_ALIGN to (at least) that of element_type.
18181
18182 1998-06-02  Per Bothner  <bothner@cygnus.com>
18183
18184         * class.c:  Moved classname-mangling-rekated code to ...
18185         * mangle.c:  ... this new file.
18186         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
18187         * Makefile.in:  Update for above changes.
18188
18189 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18190
18191         * expr.c (truthvalue_conversion): Convert integer and floating
18192         point value to their truth value.
18193         * lex.c (java_lex): Handle the `null' literal.
18194         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
18195         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
18196         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
18197         New macros.
18198
18199         * parse.y: Reorganization/documentation on token declaration.
18200         (binop_lookup[]): New added new tree codes.
18201         (relational_expression): Build corresponding binary operators.
18202         (equality_expression, conditional_and_expression,
18203         conditional_or_expression): Likewise.
18204         (java_complete_class): Fix crash in debug message.
18205         (java_complete_tree): Check initialization of method call
18206         arguments. Further bogus node evaluation to detect more error
18207         during assignments. Handles more binary operators.
18208         (patch_assignment): Use DECL_P.
18209         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
18210         code.
18211         (operator_string): Handle more case. Compacted source.
18212         (patch_binop): Changed function comment. Checking for
18213         uninitialized first operand takes the compound assignment into
18214         account and uses DECL_P. Checking for uninitialized second operand
18215         delayed to routine's end. Use macros to issue type bound error
18216         messages and issue messages on both operands if their types are
18217         different. Force fixed type into node. Handle all binary
18218         operators.
18219
18220 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18221
18222         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
18223         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
18224         build operator node and return tokens.
18225         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
18226         * parse.h (java_complete_tree): Changed returned type in prototype.
18227         (build_method_invocation, build_assignment, patch_assignment,
18228         patch_binop): New static function declarations.
18229         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
18230         BUILD_EXPR_WFL): New macros.
18231         * parse.y (enum tree_code binop_lookup[]): New static for token to
18232         TREE_CODE lookup.
18233         (%union): Parser union has new sub-structure `operator'.
18234         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
18235         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
18236         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
18237         ASSIGN_ANY_TK): Tokens tagged `operator'.
18238         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
18239         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
18240         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
18241         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
18242         (assignment_operator:): Rule tagged `operator'.
18243         (expression_statement:): Re-installed default rule.
18244         (method_invocation:): Sub rules call build_method_invocation.
18245         (postfix_expression:): Don't attempt to resolve name here. Just
18246         return an ID.
18247         (multiplicative_expression:): Sub-rules build corresponding binop
18248         expression node.
18249         (additive_expression:, shift_expression:, and_expression:,
18250         exclusive_or_expression:, inclusive_or_expression:): Likewise.
18251         (assignment:): Sub rule invoke build_assignment.
18252         (assignment_operator:): Default rules on sub rules.
18253         (force_error): Added documentation on this variable.
18254         (declare_local_variables): Build initialization calling
18255         build_assignment.
18256         (expand_start_java_method): Removed unused rtx declaration. Mark
18257         arguments as already initialized.
18258         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
18259         (java_complete_expand_methods): Don't process next method if
18260         completion of the previous one triggered errors.
18261         (java_complete_expand_method): Call source_end_java_method if no
18262         error were found during completion.
18263         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
18264         locals declaratilon. Handle names found within a class. Return
18265         error_mark_node when things aren't found.
18266         (patch_method_invocation_stmt): Return error_mark_node on failures.
18267         (patch_invoke): Removed unused local. Return the correct node.
18268         (java_complete_tree): Now returns a value. The BLOCK section binds
18269         local identifiers and the type of a BLOCK is now void. Assign the
18270         result of operand completion on COMPOUND_EXPR. Assign the
18271         encapsulated node of a WFL to the result of its completion, except
18272         when the node is an identifier. Now handle MODIFY_EXPR and several
18273         binary operators. Return error_mark_node on errors.
18274         (build_method_invocation, build_assignment, patch_assignment,
18275         build_binop, operator_string, patch_binop): New functions.
18276         * typeck.c (binary_numeric_promotion): New function.
18277
18278 1998-05-21  Per Bothner  <bothner@cygnus.com>
18279
18280         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
18281         Replace most uses of ident_subst by identifier_subst.
18282
18283         * class.c (push_class_static_dummy_field):  Removed function.
18284         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
18285         instead of looking got "class" static field.  Create that decl here.
18286         (class_identifier_node):  Removed;  no longer needed.
18287         (init_class_processing):  Don't init class_identifier_node.
18288         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
18289         Do nreverse 0 times (instead of twice) for Object and Class.
18290         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
18291
18292 1998-05-20  Per Bothner  <bothner@cygnus.com>
18293
18294         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
18295         while initializing linenumber_count and linenumber_table.
18296         Do it before init_function_start (which calls emit_line_note).
18297         * expr.c (expand_byte_code):  Don't need to clear lineno here.
18298
18299 1998-05-18  Tom Tromey  <tromey@cygnus.com>
18300
18301         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
18302         then mangle number as _N_.
18303
18304         * class.c (mangle_class_field): New function.
18305         (build_class_ref): Set assembler name of class reference using
18306         mangle_class_field.
18307         (push_class_static_dummy_field): Likewise.
18308
18309 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
18310
18311         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
18312         of assigning to TREE_CODE.  The latter method exploits a feature
18313         of GCC that is not ANSI compliant.
18314
18315 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18316
18317         * decl.c (pushdecl_force_head): New function.
18318         (pushlevel): Removed conditional printf.
18319         (complete_start_java_method): Don't enter local variable scope if
18320         function is compiled from source code.
18321         * expr.c: parse.h now included
18322         (java_lang_expand_expr): New function.
18323         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
18324         printf. Terminate buffer when doing directories.
18325         * jcf-parse.c (parse_source_file): Call lang_init_source before
18326         parsing and before code generation.
18327         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
18328         use printf if the macro is defined.
18329         * lang.c (lang_init): Install lang_expand_expr hook on
18330         java_lang_expand_expr.
18331         (java_dummy_print): New function.
18332         (lang_init_source): New function.
18333         * lex.c (java_lex): Remember location of an opening brace at the
18334         second nesting level.
18335         (java_is_eol): Unget character seen after a CR if it is EOF.
18336         * parse.h: Now includes lex.h
18337         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
18338         printf if the macro is defined.
18339         (expand_start_java_method, build_expr_block, enter_block,
18340         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
18341         New static function declarations.
18342         (pushdecl_force_head): New extern function declaration.
18343         (INCOMPLETE_TYPE_P): New macro.
18344         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
18345         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
18346         BLOCK_EXPR_ORIGIN): New macros.
18347         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
18348         DECL_SOURCE_LINE_LAST): New macros.
18349         (struct parser_ctxt): Removed field current_method_decl, redundant
18350         with the field current_function_decl. Added fields
18351         first_ccb_indent1 and pending_block.
18352         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
18353         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
18354         tagged <node>
18355         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
18356         (compilation_unit:): Cosmetic on sub rule.
18357         (type_declaration:): Cosmetic on sub rules. Added an error rule.
18358         (variable_initializer:): Installed default rule on expression:.
18359         (method_declaration:): method_header: starts a new
18360         method. method_body: installs the function body, absorbs blocks
18361         emitted for temporary variable scopings, pops function's body block
18362         and merges function's last statement lineno in DECL_SOURCE_LINE.
18363         (method_body:): Installed default rules.
18364         (block:): Call enter_block when an opening brace is seen.  Absorb
18365         scoping blocks and call exit_block when a closing brace is seen.
18366         (block_statement:): Cosmetic changes.
18367         (method_invocation:): Create WFL around CALL_EXPR node.
18368         (patch_stage): Added comment around definition.
18369         (method_header): Try to use first_ccb_indent1 as the first line of
18370         the method, so BP debug info are emitted at the first opening
18371         brace of the function. If the function has no body, use the
18372         location of the function's name. Override currently defined method
18373         name with the matching WFL so we can point redefinition errors
18374         using the location where the function's name was declared.
18375         (check_abstract_method_header): Interprets DECL_NAME as an
18376         identifier or as a WFL, accordingly.
18377         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
18378         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
18379         location and name information out of it and reinstall DECL_NAME to
18380         its original identifier node value.
18381         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
18382         function's source code).
18383         (read_import_dir): Test the value returned by find_class and issue
18384         a fatal accordingly.
18385         (declare_local_variables): Push a new block for the scope of the
18386         new variable(s) if code has been already generated at that nesting
18387         level. Pinpoint redefinition errors using the variable id
18388         WFLs. Generate initialization code if necessary. If the variable
18389         type is incomplete, register a patch on its decl.
18390         (source_start_java_method): Rewritten. Define a new block for the
18391         function's parameters. Build parameter decl out of function's
18392         arguments and register them for a patch if their types are
18393         incomplete.
18394         (expand_start_java_method): Includes the part of
18395         source_start_java_method that was pushing the parameter decls and
18396         completing the method start code.
18397         (source_end_java_method): Removed call the expand_end_bindings and
18398         poplevel (already taken care of). Reinstall function's arguments
18399         and get function's last line of code before calling
18400         expand_function_end.
18401         (java_method_add_stmt): New comment before the function's
18402         code. Complement the second operand of the current COMPOUND_EXPR
18403         if necessary.
18404         (java_complete_expand_methods): Don't generate debug info on line
18405         zero when expanding a generated constructor.
18406         (java_complete_expand_method): Set start and end line numbers for
18407         a artificially generated constructor to one and manually call
18408         enter_block and exit_block when defining it. For all methods:
18409         expand function's start calling the new expand_start_java_method
18410         and invoke java_complete_tree on the effective method's body, if
18411         any.
18412         (resolve_expression_name): Now use lookup_name_in_blocks to search
18413         local variable decls and print out an error when variables are
18414         undefined.
18415         (patch_method_invocation_stmt): Inserted comment before the
18416         function's code.
18417         (lookup_method_invoke): Chain method's arguments using chainon
18418         with the current arg list as a second argument. Inserted missing
18419         IDENTIFIER_POINTER when reporting an error on methods not found.
18420         (refine_accessible_methods_list): Don't retain constructors.
18421         (patch_arguments): Function removed.
18422         (java_complete_tree): Inserted comment before the function's
18423         code. New case for BLOCKs. Moved the WFL case a bit
18424         further. Complete function's arguments.
18425         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
18426         maybe_absorb_scoping_blocks): New functions.
18427
18428 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18429
18430         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
18431         previously set.
18432         * jcf-parse.c (parse_source_file, java_error_count): New forward
18433         and extern declarations.
18434         (java_parse_abort_on_error): Macro moved.
18435         (jcf_parse_source): fatal called if fopen fails. Now calls
18436         parse_source_file.
18437         (parse_source_file): New parse_only parameter. Reflects the
18438         elimination of the second pass.
18439         (yyparse): parse_source_file called with argument set to 0.
18440         * jcf.h (JCF_ZERO): Sets java_source to zero.
18441         * lex.c (java_init_lex): pass argument is gone. Function modified
18442         to be called once during the analysis of a file.
18443         (java_unget_unicode): Fixed typo in fatal message.
18444         (java_get_line_col): Likewise.
18445         (java_lval): Likewise. String literals no longer built during
18446         second pass.
18447         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
18448         account.
18449         * parse.h (MODIFIER_WFL): New macro.
18450         (parse_check_super, parser_check_super_interface): Now return int.
18451         (parser_chain_incomplete_item, not_builtin_p,
18452         complete_method_decl): Declarations removed.
18453         (build_method_invocation_stmt, build_invoke): Renamed using the
18454         `patch' instead of `build'
18455         (register-incomplete_type, obtain_incomplete_type,
18456         java_complete_tree, java_complete_expand_method,
18457         unresolved_type_p, create_jdep_list): New function declarations.
18458         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
18459         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
18460         (jdep): New typedef on new struct _jdep.
18461         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
18462         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
18463         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
18464         JDEP_RESOLVED_P): New macros.
18465         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
18466         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
18467         JDEP_VARIABLE): New enum values and jdep kinds.
18468         (jdeplist): New typedef on struct _jdeplist.
18469         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
18470         macros.
18471         (CALL_EXPR_PRIMARY): New macro.
18472         (struct parser_ctxt): Fields java_pass, current_method_decl,
18473         method_decl_list deleted. New field jdeplist.
18474         (INCOMPLETE_P): Macro deleted.
18475         * parse.y (single_type_import_declaration:): Removed pass switch.
18476         (type_import_on_demand_declaration): Likewise.
18477         (field_declaration:): Removed pass switch on all sub rules.
18478         (class_declaration:): Call the complete_class_decl removed on
18479         class_body rules.
18480         (method_declaration:): Removed second pass switch. No longer chain
18481         methods decl when method_header reduced.
18482         (method_header:): Sub rules no longer depend on pass switch.
18483         (method_declarator:): Likewise.
18484         (method_body:): Likewise.
18485         (abstract_method_declaration:): Likewise.
18486         (block_statement:): Likewise.
18487         (local_variable_declaration:): Likewise.
18488         (argument_list:): Likewise.
18489         (method_invocation:): Likewise. Call to build_method_invocation_stmt
18490         removed. Partial CLASS_EXPR tree node built instead.
18491         (postfix_expression:): Removed pass switch on all sub rules.
18492         (java_pop_parser_context): Free classd_list content.
18493         (yyerror): Call obstrack_grow0 to finalize error message.
18494         (check_class_interface_creation): Comment modified to reflect new
18495         returned value meaning. Removed second pass switch. Return 1 if an
18496         error was found, 0 otherwise. Adjust pointer on filename if a
18497         leading path separator was found.
18498         (maybe_create_class_interface_decl): Removed first pass switch
18499         when linking the class decl to the class_list. Install a new
18500         jdep_list for the class.
18501         (add_superinterfaces): List of unresolved interfaces is
18502         gone. Unresolved interfaces are directly added to the current
18503         dependencies list.
18504         (create_interface): Second pass shortcut removed.
18505         ctpx->modifier_ctx access through MODIFIER_WFL.
18506         (create_class): Second pass shortcut removed. Call to
18507         register_incomplete_type replaces the call to
18508         parser_chain_incomplete_item.
18509         (complete_class_decl): Function removed.
18510         (duplicate_declaration_error): New way of retrieving redeclared
18511         item type.
18512         (register_fields): Call to lookup_modifier_cl replaced by
18513         MODIFIER_WFL. New way of handling unresolved type, using
18514         unresolved_type_p and obtain_incomplete_type.
18515         register_incomplete_type replaces call to parser_chain_incomplete_item.
18516         (patch_stage): New static global variable.
18517         (method_header): New way of handling unresolved type, using
18518         unresolved_type_p and obtain_incomplete_type. patch_stage used to
18519         indicates that the method decl needs to be patched.
18520         (check_abstract_method_header): Call to lookup_modifier_cl
18521         replaced by MODIFIER_WFL.
18522         (method_declarator): Incomplete argument type are registered
18523         calling register_incomplete_type. Patch on the declared method is
18524         issued in that case.
18525         (unresolved_type_p): New function.
18526         (parser_check_super_interface): New comment to reflect function's
18527         modified returned type (int). Function and has a new argument
18528         this_wfl. Call to parse_error_context uses this_wfl instead of
18529         relying on lookup_cl.
18530         (parser_check_super): Comment reflects function's new returned
18531         type (int). Function returns nonzero value on error.
18532         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
18533         register_incomplete_type, jdep_resolve_class): New functions to
18534         handle incomplete types in declarations.
18535         (java_complete_class): Rewritten to work with the new incomplete
18536         type handling scheme.
18537         (complete_class_report_errors): Likewise.
18538         (complete_method_decl): Removed: it jobs is now handled by
18539         java_complete_class.
18540         (do_resolve_class): Class loaded in not already loaded and not
18541         found in Java source code.
18542         (java_check_regular_methods, java_check_abstract_methods): Don't
18543         call complete_method_decl anymore.
18544         (lookup_modifier_cl, not_builtin_p): Functions deleted.
18545         (read_import_dir): Got rid of the pass number dependency.
18546         (declare_local_variables): New handling of unresolved types (patch
18547         issued).
18548         (source_start_java_method): New parameter level. Function called
18549         with level set to 1 when argument types are potentially
18550         unresolved.  Called to complete the job with level set to 2 once
18551         types are complete.
18552         (source_end_java_method): Call to permanent_allocation
18553         removed. Waiting to be replaced by a more suitable obstack
18554         management.
18555         (java_complete_expand_methods, java_complete_expand_method,
18556         java_expand_finals): New functions.
18557         (build_method_invocation_stmt): Renamed
18558         patch_method_invocation_stmt. Extracts function call expression
18559         (wfl) and arguments (args) from CALL_EXPR tree operands.
18560         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
18561         call. Patch the function and argument operand of the CALL_EXPR
18562         tree argument.
18563         (patch_argument, java_complete_tree): New functions.
18564
18565 1998-04-20  Per Bothner  <bothner@cygnus.com>
18566
18567         Recover from missing fields and methods (i.e. error instead of fatal).
18568         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
18569         * expr.c (expand_invoke):  Recover from missing method.
18570         (expand_java_field_op):  Recover from missing field.
18571         Inline references to java.lang.{Integer,Char,...}.TYPE.
18572         * typeck.c (get_type_from_signature), java-tree.h:  New function.
18573         * class.c (add_method):  Use get_type_from_signature.
18574         (build_class_ref):  Handle a class that was not found.
18575         * typeck.c (convert):  Handle conversion to pointers (for convenience).
18576         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
18577         instead of lookup_field to handle missing fields.
18578
18579         * jcf-parse.c (process_zip_dir):  Set java_source.
18580
18581 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
18582
18583         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
18584
18585 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18586
18587         * jcf-parse.c (load_class): Don't change input_filename before
18588         calling jcf_parse_source (but still do it before calling
18589         jcf_parse).
18590         (jcf_parse_source): Assign input_filename after having saved the
18591         parser context.
18592         * lex.c (java_init_lex): Chain a WFL node to the import on demand
18593         list. ctxp->modifier_ctx zeroed according to its new
18594         definition. ctxp->filename initialized. Removed
18595         JAVA_MODIFIER_CTX_UNMARK.
18596         (java_unget_unicode): Update the character based column position.
18597         (java_allocate_new_line): ref_count not used anymore. Always free
18598         ctxp->p_line. Initialize c_line->char_col to 0.
18599         (java_get_unicode): Update the character based column position.
18600         (java_lex): Use ctxp->elc to store current position in source
18601         file, at the beginning of the parsed token. Set modifier_ctx entry
18602         corresponding to the parse modifier to a WFL node. Return a WFL
18603         node when an identifier is parsed.
18604         (java_lex_error): Now uses ctxp->elc to store current position in
18605         source.
18606         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
18607         * lex.h (build_wfl_node): New function definitions.
18608         (struct java_line): ref_count and next fields are gone. New field
18609         char_col.
18610         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
18611         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
18612         (JAVA_COLUMN_DELTA): New macro.
18613         (java_lc): New typedef on new struct _java_lc.
18614         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
18615         (parse_error_context, parse_warning_context): Changed prototypes.
18616         (java_get_line_col): Added as an available global function.
18617         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
18618         (IC_DECL): Replaced by macro IC_TYPE
18619         (DEPEND_WFL): New macro.
18620         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
18621         wrong modifier.
18622         (exit_java_complete_class): Removed a commented out statement.
18623         (struct parser_ctxt): Added comments on fields. modifier_ctx is
18624         now an array of tree nodes. Deleted fields line_list and
18625         e_line. New field elc, to replace e_line.
18626         * parse.y (array_type:): Build WFL node.
18627         (qualified_name:): Build a single WFL node out of two. Retain
18628         the location information of the first node in the resulting node.
18629         (package_declaration:): Use package name as a WFL node
18630         (single_type_import_declaration:): Use imported name as a WFL node.
18631         (type_import_on_demand_declaration:): Use root of the imported
18632         packages as a WFL node.
18633         (field_declaration:): Removed unused local variable cl.
18634         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
18635         (yyerror): New static elc. Removed static error_line, error_pos.
18636         New local code_from_source. Save ctxp->elc into elc at the first
18637         pass. Call java_get_line_col to get a string of the line where
18638         the error occurred.
18639         (debug_line): Removed static function.
18640         (parse_error_context, parse_warning_context): Parameter cl is now
18641         a WFL node. Use its value to initialize ctxp->elc.
18642         (redefinition_error): Parameter cl is now a WFL node.
18643         (parse_add_interface): New parameter wfl. No longer call
18644         lookup_cl, use wfl instead.
18645         (check_class_interface_creation): Parameter cl is now a WFL node.
18646         (maybe_create_class_interface_decl): Likewise.
18647         (add_superinterfaces): New function.
18648         (create_interface): Removed local cl, node, super_decl,
18649         super_decl_type.  Function now uses id as a WFL node. Better
18650         warning/error report on obsolete or forbidden mix of
18651         modifiers. Now calls add_superinterfaces to register interfaces.
18652         (create_class): Removed local cl, node. Local variable id is used
18653         as a WFL node. Better error report on forbidden modifier
18654         mix. Uses add_superinterfaces to register interfaces.
18655         (find_field): Argument cl is now a WFL node. Now store the WFL
18656         node of a fields that needs to be checked for their
18657         initialization.
18658         (method_header): Local variable node non longer used. Local
18659         variable id replaces cl.
18660         (check_modifiers_consistency): Local variable cl is now a WFL
18661         node.
18662         (method_declarator): Local variable cl replaced by parameter id.
18663         (parser_qualified_name): Now uses parameter name as a WFL node.
18664         (parser_check_super_interface): New parameter wfl, for achieve
18665         greater accuracy during error reports.
18666         (parser_chain_incomplete_item): New parameter named location. Used,
18667         along the decl, to construct the incomplete item node.
18668         (java_complete_class): resolve_class now uses WFL node extracted
18669         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
18670         where appropriate.
18671         (complete_method_decl): Unresolved function's argument types are WFL.
18672         (resolve_class): Parameter cl is now a WFL node.
18673         (resolve_and_layout): Likewise.
18674         (do_resolve_class): Likewise. Try first to use cl and then do the
18675         lookup on the decl when calling check_pkg_class_access.
18676         (complete_class_report_errors): Use IC_TYPE in place of
18677         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
18678         instead of doing a lookup over the decl.
18679         (java_check_final): Use WFL info from field tree list.
18680         (lookup_cl): Rewritten and returns a statically defined WFL node.
18681         (lookup_modifier_cl): Now uses information from WFL nodes.
18682         (process_imports): Likewise.
18683         (read_import_dir): name and cl arguments replaced by a single WFL
18684         node. Function modified accordingly.
18685         (find_in_imports_on_demand): Now uses WFL node.
18686         (check_pkg_class_access): cl argument is now a WFL node.
18687         (declare_local_variables): Fixed to use WFL nodes.
18688         (resolve_expression_name): Likewise.
18689         (build_method_invocation_stmt): name_combo argument renamed
18690         wfl. Function modified to use WFL nodes.
18691         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
18692         (lookup_method_invoke): cl is now a WFL node. Added missing
18693         IDENTIFIER_POINTER to class type decl name.
18694
18695 1998-04-14  Dave Brolley  <brolley@cygnus.com>
18696
18697         * lang.c (init_parse): Now returns char* containing the filename.
18698
18699 1998-04-10  Per Bothner  <bothner@cygnus.com>
18700
18701         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
18702
18703         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
18704         * class.c (make_class_data):  If flag_assume_compiled, initial class
18705         state is CSTATE_PREPARED; make superclass and interfaces direct
18706         references, rather than constant pool indexes.
18707
18708 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18709
18710         * parser.y: Include flags.h. Removed debug variable pl.
18711         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
18712         (block:): Likewise.
18713         (labeled_statement_nsi:): Generate debug info when reducing
18714         expression_statement:.
18715         (check_pkg_class_access): get_access_flags_from_decl invocation
18716         fixed for new CLASS_* flags location.
18717         (source_end_java_method): Save/restore parser context when
18718         entering/leaving this routine. Restore lineno to its right value
18719         before calling expand_end_bindings.
18720         (build_method_invocation_stmt): build_invoke called with the
18721         current line information.
18722         (build_invoke): New argument cl. Wrap the function call around a
18723         wfl node.
18724         (refine_accessible_methods_list): Changed comment, removed
18725         unnecessary code.
18726         * parse.h: Fixed typo in comments.
18727         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
18728         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
18729         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
18730         parser_ccb_indent.
18731         * lex.c (java_lex): Record the last closing curly bracket of a
18732         function.
18733         * jcf-parse.c (jcf_parse_source): Now calls
18734         java_check_methods. Clarified comment, fixed typo.
18735
18736 1998-04-09  Dave Brolley  <brolley@cygnus.com>
18737
18738         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
18739         (finish_parse): Expose for non USE_CPPLIB builds.
18740
18741 1998-04-08  Jeffrey A Law  (law@cygnus.com)
18742
18743         * lang.c (lang_print_xnode): New function.
18744
18745 1998-04-03  Per Bothner  <bothner@cygnus.com>
18746
18747         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
18748         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
18749         used to build a class's dispatch table.
18750         (make_class_data):  Generate dispatch table if flag_assume_compiled.
18751         Set dtable of class object to address of class_dtable_decl.
18752
18753         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
18754         be volatile and have side effects - generates better code.
18755
18756         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
18757         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
18758
18759         * expr.c (expand_invoke):  If class is final, method is
18760         effectively final, so can call it directly.
18761
18762         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
18763
18764         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
18765
18766 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18767
18768         * parse.y (build_method_invocation_stmt): Removed extra argument
18769         to build_invoke.
18770
18771 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18772
18773         * expr.c (dtable_indent): Now static global.
18774         (expand_invoke): Now call invoke_build_dtable and
18775         build_invokevirtual.
18776         (invoke_build_dtable, build_invokevirtual): New functions.
18777         * jcf-io.c (find_class): Defer issuing a warning by setting
18778         jcf->outofsynch to 1.
18779         * jcf-parse.c (jcf_out_of_synch): New function.
18780         (load_class): Test this_jcf.outofsynch flag and call
18781         jcf_out_of_synch accordingly.
18782         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
18783         comment indentation.
18784         * lex.c (java_get_unicode): Fixed code indentation.
18785         (java_lex): Create string literal. Fixed typo. Removed several
18786         premature obstack_free.
18787         * parse.h: New enums for name resolution and invocation mode.
18788         (struct qualification): New data structure.
18789         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
18790         (do_resolve_class, build_method_invocation_stmt,
18791         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
18792         debug_line, identical_subpath_p, invocation_mode,
18793         refine_accessible_methods_list, build_invoke,
18794         lookup_method_invoke): New functions declared.
18795         (build_invokevirtual, invoke_build_dtable, match_java_method,
18796         build_field_ref, jcf_out_of_synch): New references to external
18797         functions.
18798         (struct parse_ctxt): Removed artificial_constructor field.
18799         * parse.y: (array_type:): Type defined for this rule.
18800         (class_type:): Installed default rule for interface_type:.
18801         (array_type:): Now build Java array type.
18802         (qualified_name:): Now use obstack_grow0.
18803         (method_declaration:): Skip the artificial constructor added to
18804         the list, if any.
18805         (abstract_method_declaration:): Execute the code only during pass 1.
18806         (block:): Installed default rule in block_statements:.
18807         (block_statement:): Add the statement to the method during pass 2.
18808         (statement_expression): Installed default rule for
18809         method_invocation:.
18810         (argument_list:): Added code to build the argument list.
18811         (method_invocation:): Added call to create the method invocation
18812         node.
18813         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
18814         (debug_line): New function for debug.
18815         (complete_class_decl): No longer do something during pass 1.
18816         (method_header): Use BUILD_PTR_FROM_NAME.
18817         (parser_qualified_classname): Use obstack_grow0. Removed bogus
18818         obstack_free.
18819         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
18820         function's main comment.
18821         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
18822         classes.
18823         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
18824         (resolve_class): Now works with arrays.
18825         (do_resolve_class, resolve_and_layout): New functions.
18826         (java_check_regular_methods): Reverse method list before and after
18827         having processed it. No longer set ctxp->artificial_constructor.
18828         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
18829         accordingly. Fixed typo in issued error message. Now use
18830         obstack_grow0.
18831         (find_in_imports_on_demand): Now use obstack_grow0.
18832         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
18833         (source_end_java_method): Call expand_expr_stmt instead of
18834         expand_expr. Calls it before calling expand_function_end.
18835         (java_method_add_stmt): Do nothing if errors were found during
18836         parsing.
18837         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
18838         (build_method_invocation_stmt, build_invoke, invocation_mode,
18839         lookup_method_invoke, refine_accessible_methods_list,
18840         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
18841         New functions.
18842         * typeck.c (build_java_signature): Properly end method signature
18843         if return type skipped.
18844         (match_java_method): New function.
18845
18846 1998-03-16  Per Bothner  <bothner@cygnus.com>
18847
18848         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
18849
18850 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18851
18852         * expr.c (build_invoke_non_interface): New function.
18853         (methods_ident, ncode_ident): Now static globals.
18854         (expand_invoke): Use build_invoke_non_interface.
18855         * java-tree.h (struct lang_decl): New field function_decl_body.
18856         (DECL_FUNCTION_BODY): New macro.
18857         * jcf-parse.c (jcf_parse_source): Deeper check before setting
18858         CLASS_FROM_SOURCE_P.
18859         (parse_source_file): Fixed typos. Call java_layout_parsed_class
18860         before starting pass 2. Call to java_generate_parsed_class replaced
18861         by java_register_parsed_class.
18862         * lex.c: Fixed typo in header. Some line width related formating.
18863         * lex.h: Some line width related formating.
18864         * parse.h (source_end_java_method, resolve_expression_name,
18865         complete_class_decl, maybe_create_class_interface_decl,
18866         check_class_interface_creation): New static function declarations.
18867         (java_layout_parsed_class, java_method_add_stmt): New function
18868         declarations.
18869         (struct parser_ctxt): Field mark_class_generate removed. New
18870         fields class_list and artificial_constructor.
18871         * parse.y: Fixed typo in header.
18872         (class_declaration:): Call complete_class_decl when class body
18873         parsed.
18874         (method_declaration:): Call source_end_java_method in pass 2 when
18875         the method body is defined.
18876         (postfix_expression:): Do expression name resolution on sub-rule
18877         name during pass 2.
18878         (create_class, create_interface): Merged common pieces.
18879         (check_class_interface_creation, maybe_create_class_interface_decl):
18880         New functions.
18881         (complete_class_decl): New function.
18882         (register_fields): Fixed line width related typo.
18883         (method_header): Correctly skip first argument when fixing
18884         argument line. Changed the loop.
18885         (java_check_circular_reference): Now use ctxp->class_list.
18886         (java_complete_class): Removed start/stop marking.
18887         (java_check_regular_methods): Now takes a class decl as an
18888         argument.  Add default constructor if none were encountered.
18889         (java_check_methods): Now use ctxp->class_list. Changed call to
18890         java_check_regular_methods.
18891         (source_start_java_method): Set DECL_ARG_TYPE for each function
18892         arguments.
18893         (source_end_java_method, java_method_add_stmt): New functions.
18894         (java_generate_parsed_class): No longer exists.
18895         (java_layout_parsed_class, java_register_parsed_class): New functions.
18896         (resolve_expression_name): New function.
18897
18898 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18899
18900         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
18901         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
18902         until pass initializations are done. Call read_import_dir with
18903         pass set to 0.
18904         * parse.h: (lookup_modifier_cl): New function declared.
18905         (INTERFACE_FIELD_MODIFIERS): New macro.
18906         (OBSOLETE_MODIFIER_WARNING): New macro.
18907         * parse.y: (register_fields): Class type and current field name in
18908         local variables. Check modifier(s) if adding field(s) to an interface.
18909         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
18910         and report errors using the faulty modifier line context.
18911         (lookup_modifier_cl): New function.
18912         (read_import_dir): Detect and report default import processing
18913         failure.
18914
18915 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
18916
18917         Add a pair of -fassume-compiled/-fno-assume-compiled options.
18918         * class.c (is_compiled_class): Return 1 after making sure it
18919         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
18920         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
18921         * java-tree.h (flag_assume_compiled): Add decl.
18922         * lang.c (lang_f_options): Add the flag.
18923         (flag_assume_compiled): Add decl, default to 0.
18924
18925 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18926
18927         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
18928         (is_compiled_class): Likewise.
18929         (layout_class): Likewise.
18930         (layout_class): Detect and lay out classes defined in source code.
18931         (interface_of_p, add_interface_do, may_add_interface): New
18932         function.
18933         (add_interface): Now use add_interface_do.
18934         (add_method_1): New function.
18935         (add_method): Now use add_method_1.
18936         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
18937         (complete_start_java_method): New function.
18938         (start_java_mehod): Now call complete_start_java_method.
18939         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
18940         (expand_invoke): Likewise and fixed typo.
18941         *gjava.c: (print_super_field): Use new argument to find_class
18942         DO_CLASS_FILE.
18943         (main): Likewise.
18944         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
18945         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
18946         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
18947         IDENTIFIER_NODE.
18948         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
18949         (add_method_1, push_class): New prototypes.
18950         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
18951         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
18952         directory where the class was found.
18953         (find_class): New argument DO_CLASS_FILE. Function find_class
18954         modified accordingly.
18955         *jcf-parse.c: (fix_class_path): New function.
18956         (load_class): Use new VERBOSE argument. load_class now finds and
18957         loads/parses .class/.java files. Save read_state of current_jcf
18958         if necessary.
18959         (java_parser_abort_on_error): New macro.
18960         (jcf_parse_source, parse_source_file): New function.
18961         (jcf_parse): Fixed typo.
18962         (yyparse): Call parse_source_file () only.
18963         (process_zip_dir): Fixed typo, fix zdir->filename_length when
18964         writing the real class name back in the zip directory entry.
18965         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
18966         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
18967         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
18968         (find_class): Prototype fixed.
18969         *lex.c: Added 1998 time stamp.
18970         Removed all static global variables, moved into the parser
18971         context data structure.. Now include unistd.h if SEEK_SET not
18972         defined.
18973         (java_init_lex): Rewritten.
18974         (java_sneak_unicode): Modified current unicode access in current line.
18975         (java_unget_unicode): Likewise.
18976         (java_allocate_new_line): New allocation management.
18977         (java_read_char): Modified access and storage of unget_utf8_value.
18978         New way of processing current unicode.
18979         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
18980         (java_get_unicode): Now use the parser context.
18981         (java_lineterminator): Likewise.
18982         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
18983         of the reentrant parser implementation. Function now use the
18984         parser context data structure and java_lval. Fixed production of
18985         the float and double constant "out of range" error message. Fixed
18986         obstack use. Return integer value when hitting a modifier. Now
18987         return type for TRUE, FALSE and other predefined types. Return
18988         identifier as a TREE_LIST list containing the current line context
18989         as the TREE_VALUE sub-node.
18990         (java_unicode_2_utf8): Fixed typo in declaration.
18991         (java_lex_error): Now use the parser context data structure.
18992         *lex.h: Added 1998 time stamp.
18993         (struct java_line): New fields ref_count and next.
18994         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
18995         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
18996         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
18997         *parse.h: Added 1998 time stamp.
18998         (java_parse_source_file): Renamed from parse_source_file.
18999         (YYERROR_NOW, YYNOT_TWICE): Fixed.
19000         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
19001         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
19002         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
19003         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
19004         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
19005         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
19006         (struct parser_ctxt): New data structure to keep the parser context.
19007         *parse.y: Added 1998 time stamp, got rid of static global variables.
19008         (java_error_count, ctxp): New global variables.
19009         (%union): New value field.
19010         (numeric_type, integral_type): Rules removed.
19011         (primitive_type): Rule defined to handle integral, float, double and
19012         boolean types.
19013         (qualified_name, package_declaration,
19014         single_type_import_declaration, type_import_on_demand_declaration,
19015         modifiers, class_declaration, super, interfaces,
19016         interface_type_list, class_body, field_declaration,
19017         field_declaration, variable_declarators, variable_declarator,
19018         variable_declarator_id, method_declaration, method_header,
19019         formal_parameter_list, formal_parameter, method_body, block,
19020         static, interface_declaration, extends_interfaces,
19021         abstract_method_declaration, local_variable_declarators): Rules now
19022         define actions.
19023         (force_error, do_warning): New global statics.
19024         (push_parser_context, parser_context_save_global,
19025         parser_context_restore_global, pop_parser_context): New functions.
19026         (yyerror): Now uses the global parser context. Fixed use of obstack.
19027         (parse_error, parse_error_context, parse_warning_context,
19028         java_accstring_lookup, redefinition_error, check_modifiers,
19029         parser_add_interface, create_interface, create_class, find_field,
19030         duplicate_declaration_error, register_fields, method_header,
19031         check_modifiers_consistency, check_abstract_method_header,
19032         method_declarator, parser_qualified_classname,
19033         parser_check_super_interface, parser_check_super,
19034         parser_chain_incomplete_item, java_check_circular_reference,
19035         layout_class_from_source, java_complete_class,
19036         complete_method_decl, resolve_class, complete_class_report_errors,
19037         java_check_final, check_method_redefinition,
19038         java_check_regular_methods, java_check_abstract_methods,
19039         java_check_methods, lookup_java_interface_method2,
19040         lookup_java_method2, lookup_cl, find_name_in_single_imports,
19041         process_imports, find_in_imports, read_import_entry,
19042         read_import_dir, find_in_imports_on_demand,
19043         check_pkg_class_access, not_builtin_p, declare_local_variables,
19044         source_start_java_method, java_generate_parsed_class): New
19045         functions.
19046         *typeck.c: (signature_include_return): New global variable.
19047         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
19048         to add the function returned type in the signature.
19049
19050 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
19051
19052         * jcf-io.c (open_in_zip): Use strncmp and LEN.
19053
19054 1998-01-29  Dave Brolley  <brolley@cygnus.com>
19055
19056         * Make-lang.in (java.info): Added.
19057         (java.install-info): Added
19058
19059 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
19060
19061         * Makefile.in (clean): Also remove java/parse.c.
19062
19063 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
19064
19065         Add a pair of -fbounds-check/-fno-bounds-check options.
19066         * lang.c (lang_decode_option): Add code to grok arguments.
19067         (flag_bounds_check): Add decl.
19068         (lang_f_options): New array w/ the option in it.
19069         * java-tree.h (flag_bounds_check): Add decl.
19070         * lang-options.h: New file.
19071         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
19072         of a static macro value.
19073         (JAVA_ARRAY_EXCEPTION): Delete macro.
19074
19075 1998-01-23  Per Bothner  <bothner@cygnus.com>
19076
19077         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
19078         * expr.c (build_anewarray):  Add missing promote_type.
19079
19080 1998-01-22  Per Bothner  <bothner@cygnus.com>
19081
19082         Add array types with known length to optimize bounds checking.
19083         * typeck.c (build_java_array_type):  Take length parameter.
19084         (java_array_type_length, build_prim_array_type):  New functions.
19085         * java-tree.h:  Update for new functions.
19086         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
19087         * class.c:  Use build_prim_array_type.
19088         * expr.c (can_widen_reference_to):  Handle known-length array types.
19089         (verify_jvm_instructions):  Keep track of integer push instructions
19090         followed by newarray/anewarray, so we can build known-length arrays.
19091         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
19092         (java_array_data_offset):  New function.
19093         (build_java_array_length_access):  New function.  Optimize if constant.
19094         (build_java_arrayaccess):  Constant fold bounds check.
19095         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
19096         (build_newarray, build_anewarray):  New functions.
19097         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
19098         * verify.c (merge_types):  Handle known-lengh array types.
19099
19100 1998-01-19  Per Bothner  <bothner@cygnus.com>
19101
19102         * expr.c (expand_byte_code):  Fix performace bug, which caused
19103         searching linenumber_table to be linear rather than constant.
19104
19105 1997-12-12  Per Bothner  <bothner@cygnus.com>
19106
19107         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
19108
19109         * decl.c, java-tree.h (soft_fmod_node):  New global.
19110         * decl.c (init_decl_processing):  Define __builtin_fmod.
19111         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
19112         using __builtin_fmod.
19113
19114 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19115
19116         * keyword.h: New file, output of keyword.gperf as processed by
19117         gperf.
19118         * lex.c (java_lex_init): Initialize java_error_flag.
19119         * parse.c (YYERROR_NOW): Uses java_error_flag.
19120         * parse.y: New static java_error_flag. Useless definition of
19121         buffer_error gone.
19122         * parse.y (java_error): Portable error recovery using
19123         java_error_flag (not yet completely tuned).
19124
19125 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
19126
19127         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
19128
19129 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19130
19131         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
19132         (parse.c, lex.c, keyword.h): New rules for Java source code
19133         front-end.
19134         * parse.c: Renamed into jcf-parse.c.
19135         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
19136         * keyword.gperf: New file, Java keywords.
19137         * parse.y: New file, Java language grammar.
19138         * parse.h: New file, Java language grammar definitions.
19139         * lex.c: New file, Java language lexer.
19140         * lex.h: New file, Java language lexer definitions.
19141
19142 1997-12-03  Per Bothner  <bothner@cygnus.com>
19143
19144         * decl.c (clinit_identifier_node), java-tree.h:  New global.
19145         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
19146         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
19147         * expr.c (expand_java_field_op):  Check for invalid assignment
19148         to final field.
19149
19150         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
19151
19152 1997-10-27  Per Bothner  <bothner@cygnus.com>
19153
19154         * verify.c (verify_jvm_instructions):  When processing a handler,
19155         attempt to set the current_subr to the right value.
19156         (More complicated code combines Sep 17 and Oct 22 versions.)
19157
19158 1997-10-24  Per Bothner  <bothner@cygnus.com>
19159
19160         * class.c (push_class):  Figure out (guess) name of source file.
19161         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
19162         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
19163         (parse_class_file):  Change return type from int to void.
19164         Call debug_start_source_file/debug_end_source_file.
19165
19166         * expr.c (build_java_binop):  Fix masking 2nd operand.
19167         * decl.c (init_decl_processing):  Set sizetype first.
19168
19169 1997-10-22  Per Bothner  <bothner@cygnus.com>
19170
19171         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
19172         (Revert Sep 17 change.)
19173
19174 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19175
19176         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
19177         .class extension in their name and fix thing so we don't process
19178         them parse_zip_file_entries().
19179         (parse_zip_file_entries): Cleaned unused local variables.
19180
19181 1997-10-20  Per Bothner  <bothner@cygnus.com>
19182
19183         * expr.c (can_widen_reference_to):  Allows equal array element types.
19184         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
19185         * jcf-dump.c (RET):  Get (and print) index.
19186
19187         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
19188         Promote element type to POINTER_TYPE.
19189
19190 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19191
19192         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
19193         find_in_current_zip, jcf_figure_file_type): Moved from
19194         jcf-reader.c to parse.c.
19195         * zextract.c: (read_zip_archive): takes file_comment_length possible
19196         field into account.
19197
19198 1997-10-20  Per Bothner  <bothner@cygnus.com>
19199
19200         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
19201
19202         * verify.c (merge_types):  Handle array types even better ...
19203
19204 1997-10-17  Per Bothner  <bothner@cygnus.com>
19205
19206         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
19207
19208         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
19209         * class.c (make_class_data):  Don't build fields_decl if no fields.
19210         When building fields_decl, skip if DECL_ARTIFICIAL.
19211
19212         * expr.c (java_stack_swap):  Update stack_type_map.
19213         * verify.c (merge_types):  Handle array types better.
19214
19215 1997-10-15  Per Bothner  <bothner@cygnus.com>
19216
19217         * class.c (add_field):  Don't promote short integral fields to
19218         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
19219         * expr.c (push_value):  Promote and convert short integral values.
19220
19221         * decl.c, java-tree.h (integer_two_node):  New constant node.
19222         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
19223
19224 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19225
19226         * class.c (append_gpp_mangled_type): Use function argument
19227         unpromoted type to generate mangled name.
19228
19229 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19230
19231         * constants.c (build_constant_data_ref): Now uses current_class
19232         instead of main_class.
19233         (build_constants_constructor): Now uses current_class instead of
19234         main_class.
19235         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
19236         of the global variable SeepZipFiles done here.
19237         * zextract.c (read_zip_archive): extra_field optional field taken
19238         into account while computing the position of the class file in the
19239         archive.
19240         * verify.c (verify_jvm_instructions): Use current_jcf to search
19241         the constant pool.
19242         * parse.c (load_class): First search for the class to load in the
19243         current zip file. Saves current_jcf (restored before returning
19244         from that function). Don't call JCF_FINISH in the class was found
19245         in the current ZIP file.
19246         (jcf_parse): If the class was found in the current ZIP file, save
19247         its tree_constant_pool (for later reuse).
19248         (parse_class_file): New function. Process each method defined in
19249         the current class and record the class as to be later registered.
19250         (yyparse): Rewritten. Figure the type of the current file and switch
19251         accordingly.
19252         * lang.c: New global variable current_jcf.
19253         (lang_init): Removed compiling_from_source test (done later, in
19254         yyparse). Removed call the jcf_parse ().
19255         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
19256         (typedef struct JCF): New fields seen_in_zip (to mark a class found
19257         in the current ZIP file) and zip_offset (offset to the class data in
19258         the current zip file).
19259         * jcf-reader.c: zipfile.h included.
19260         localToFile: New ZipFileCache static global variable
19261         (parse_zip_file_entries): New function. Browse the current ZIP
19262         file directory and process each class found.
19263         (process_zip_dir): New function. Register each class found in the
19264         ZIP file directory. The class aren't parsed but a valid JCF is
19265         link to each of them.
19266         (find_in_current_zip): New function. Search for a class in the
19267         current ZIP file directory. If found, prepare the class so that it
19268         can be loaded.
19269         (jcf_figure_file_type): New function. Examine the file structure
19270         to figure a class file, a ZIP file. If none of these categories are
19271         matched, a source file is assumed.
19272         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
19273         SeenZipFile: New global variable.
19274         (open_in_zip): Use zipmember's length to accelerate the search for
19275         a member. If zipmember was NULL and zip file successfully read,
19276         return 0.
19277         * java-tree.h: New global variable current_jcf declared.  Added
19278         declaration for current_constant_pool_tags, current_constant_pool_data,
19279         current_constant_pool_length, current_constant_pool_data_ref.
19280         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
19281         store the JCF of classes seen in a zip file) and tree *constant_pool
19282         (to save a loaded class constant pool). current_class declared here.
19283         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
19284         retrieve method_ref_constant.
19285         (PUSHC): java_push_constant_from_pool now uses current_jcf.
19286         (OBJECT): get_class_constant now uses current_jcf.
19287         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
19288         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
19289         (expand_invoke): Now uses current_class instead of main_class
19290         (build_class_init): Now uses current_class instead of main_class
19291         * class.c: New static global variable registered_class.
19292         (register_class): New function.
19293         (emit_register_class): Modified to use registered_class instead of
19294         main_class
19295         (is_compiled_class): Now take into account class seen in the archive.
19296
19297 1997-10-06  Per Bothner  <bothner@cygnus.com>
19298
19299         * except.h:  Renamed to: java-except.h.
19300         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
19301         * except.c:  Add semi-working (commented out) implementation.
19302
19303         * expr.c (expand_iinc):  Add needed flush_quick_stack.
19304         * parse.c (set_source_filename):  New function.
19305         (give_name_to_class):  Set input_filename from package.classname.java.
19306
19307         * jcf-io.c (find_class):  Don't look first in ".".
19308
19309 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19310
19311         * zextract.c (read_zip_archive): Now takes into account the
19312         extra_field field.
19313         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
19314
19315 1997-09-20  Per Bothner  <bothner@cygnus.com>
19316
19317         * constants.c, java-tree.h (build_internal_class_name):  New function.
19318         (alloc_class_constant):  Re-implement using build_internal_class_name.
19319         * class.c (make_class_data):  Likewise.
19320         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
19321
19322 1997-09-17  Per Bothner  <bothner@cygnus.com>
19323
19324         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
19325         to NULL before pushing an exception handler target.
19326
19327         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
19328         (java_stack_swap, java_stack_dup):  Re-write to be safe from
19329         clobbering registers.
19330         (build_class_init):  New function.
19331
19332 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19333
19334         * typeck.c (build_java_array_type): Temporary use
19335         permanent_obstack to create the array 'length' field.
19336         * expr.c (lookup_label): Temporay use permanent_obstack to create
19337         label if not found.
19338         * class.c (push_super_field): Tempory use permanent_obstack.
19339
19340 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19341
19342         * typeck.c (type_for_mode): Now handles double_type_node and
19343         float_type_node.
19344         * verify.c (verify_jvm_instructions): The instruction following
19345         the wide bytecode is checked. OPCODE_ret added to the list of
19346         wide.
19347
19348 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19349
19350         * class.c (make_class): Temporary use permanent_obstack. Set the
19351         class CLASS_P field to 1.
19352         (push_class): Temporary use permanent_obstack.
19353         (set_super_info): Temporary use permanent_obstack.
19354         (add_method): Temporary use permanent_obstack, set
19355         METHOD_TRANSIENT().
19356         (add_field): Temporary use permanent_obstack. Sets
19357         FIELD_VOLATILE() and FIELD_TRANSIENT().
19358         (build_class_ref): Temporary use permanent_obstack if the class
19359         isn't compiled.
19360         (build_static_field_ref): Temporary use permanent_obstack when
19361         creating field's rtl.
19362         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
19363         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
19364         and fields. Function finalized, as far as flag handling.
19365         (push_class_static_dummy_field): Temporary use permanent_obstack.
19366         (emit_register_class): Force generation of class registration at
19367         -O3 or deeper.
19368         * decl.c (end_java_method): Call permanent_allocation() before
19369         returning.
19370         * expr.c (can_widen_reference_to): Added comment to interface
19371         handling, fixed typo.
19372         (lookup_field): Now uses CLASS_P() to correct FIXME
19373         (expand_invoke): Verification on public && !static &&
19374         !abstract moved into soft_lookupinterfacemethod (kaffe).
19375         Use Object class dtable if objectref is an array when expanding
19376         invokeinterface.
19377         (java_push_constant_from_pool): Temporary use permanent_obstack
19378         for CONSTANT_string
19379         * parse.c (get_ref_constant): Temporary use permanent_obstack to
19380         create constant references.
19381         (get_constant): Temporary use permanent_obstack to create constant.
19382         (load_class): Temporary use permanent_obstack to load class.
19383         (jcf_parse): Temporary use permanent_obstack to perform class
19384         layout.
19385         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
19386         (build_java_signature): Temporary use permanent_obstack.
19387         * verify.c: (verify_jvm_instruction): removed unnecessary verification
19388         on ACC_SUPER flag.
19389         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
19390         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
19391         (CLASS_P): Defined
19392
19393 1997-09-11  Per Bothner  <bothner@cygnus.com>
19394
19395         * class.c (append_gpp_mangled_type):  Fix typo.
19396         (emit_register_class):  Use main_class to get class object, rather
19397         than looking for no-longer-existing static decl starting with _CL.
19398         * typeck.c (parse_signature_type):  Promote array element type
19399         if it is a RECORD_TYPE.
19400
19401 1997-09-10  Per Bothner  <bothner@cygnus.com>
19402
19403         * class.c (push_class_static_dummy_field):  New function.
19404         (mangle_static_field):  New. Do G++-style mangling of static fields.
19405         (layout_class):  Mandle static fields here, not in add_field.
19406         (build_class_ref):  The class object is now a dummy static field.
19407         * decl.c (find_local_variable):  Look for best, instead of first match.
19408         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
19409         (build_java_athrow):  Don't check here if exception is Throwable.
19410         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
19411         (TYPE_USED):  Removed.  No longer used ...
19412         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
19413         * verify.c (push_pending_label):  New function.
19414         (push_pending_block):  Renamed to check_pending_block.
19415         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
19416         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
19417         re-checking possible handlers) after a store (less wasted work).
19418         Check for null handler (finally) before calling add_handler.
19419         Various changes to (finally?) correctly handle try/finally.
19420
19421 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
19422
19423         * class.c: Include stdio.h.
19424
19425 1997-09-04  Per Bothner  <bothner@cygnus.com>
19426
19427         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
19428         to make sure class is initialized before static/special invoke.
19429
19430         * verify.c (verify_jvm_instructions):  On a store instruction,
19431         call find_local_variable to force pre-allocation of decl and rtx.
19432         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
19433
19434 1997-09-03  Per Bothner  <bothner@cygnus.com>
19435
19436         * class.c (build_class_ref):   Strip off "promoted_" if need be.
19437         (make_field_value): Call build_java_signature when needed.
19438         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
19439         * expr.c (build_java_athrow):  Don't push_value of exception.
19440         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
19441         match specification of [fd]cmp[lg] for NaNs.
19442         (expand_byte_code):  Add support for exception handler ranges.
19443         * except.c:  Add skeleton for EH code-generation.
19444         * verify.c (merge_types):  Treat all promoted integral types as equal.
19445         * constants.c (build_constants_constructor):  To force creation of
19446         current_constant_pool_data_ref, call build_constant_data_ref.
19447
19448         * javaop.def (lload):  Fix typo.
19449         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
19450
19451 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
19452
19453         * parse.c: Don't include function.h.
19454
19455 1997-08-27  Per Bothner  <bothner@cygnus.com>
19456
19457         * except.[ch]:  New files.
19458         * Makefile.in (JAVA_OBJS):  Add except.o
19459         * expr.c:  Temporary warning about unimplemented exceptions.
19460         * verify.c:  Verify exception handlers.
19461
19462         * jcf-dump.c (disassemble_method):  Print exception table.
19463
19464 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19465
19466         * expr.c (verify_jvm_instructions): Started a thorough
19467         verification of invoke* bytecodes.
19468         (expand_byte_code): flush quick stack if PC is the target of a
19469         branch.  and undef RET (conflicting with config/i386/i386.h).
19470         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
19471         used.
19472         (expand_invoke): Now handles invokeinterface and do more
19473         verification according to the bytecode.
19474         (lookup_field): Don't try to load the class if processing
19475         dtable_type.
19476         (can_widen_reference_to): Now handles interfaces.
19477         * decl.c (init_decl_processing): New global variable
19478         soft_lookupinterfacemethod_node, declared in java-tree.h.
19479         Call set_super_info on string_type_node.
19480         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
19481         defined.
19482         * class.c (set_super_info): Fills the CLASS_* flags according to
19483         access_flags.
19484         (get_access_flags_from_decl): Handles all class flags.
19485
19486 1997-08-26  Per Bothner  <bothner@cygnus.com>
19487
19488         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
19489         * parse.c (yyparse):  Check for abstract method, and missing code.
19490         * expr.c (expand_byte_code):  Change interface.
19491         * lang.c (put_decl_node):  Print promoted types prettier.
19492         * verify.c (verify_jvm_instruction):  Change interface.
19493         Partial support for scanning exception table.
19494         For load instructions, handle promoted integral types.
19495
19496 1997-08-21  Per Bothner  <bothner@cygnus.com>
19497
19498         * verify.c:  New file, with contents moved from expr.c.
19499         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
19500         * typeck.c (is_array_type_p):  Moved here from expr.c.
19501         * java-tree.h:  Add some now-needed function declarations.
19502         * Makefile.in (JAVA_OBJS): Added verify.o.
19503
19504 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19505
19506         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
19507         METHOD_ABSTRACT flag.
19508
19509         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
19510         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
19511         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
19512
19513         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
19514         variables.
19515         (start_java_method): Hook for SYNCHRONIZED methods.
19516
19517         * expr.c (build_java_jsr, build_java_ret): New functions
19518         (JSR,PRE): New macros
19519         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
19520         (verify_jvm_instructions): tableswitch, lookupswitch,
19521         monitorenter, monitorexit, goto_w: verified.
19522         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
19523         (build_java_monitor): New function.
19524         (MONITOR_OPERATION): Modified to call build_java_monitor()
19525         (verify_jvm_instructions): Started a thorough verification of
19526         invoke* bytecodes.
19527
19528 1997-08-19  Per Bothner  <bothner@cygnus.com>
19529
19530         Support verification of jsr/ret subroutines (used for try/finally).
19531         * decl.c (return_address_type_node):  New type node.
19532         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
19533         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
19534         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
19535         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
19536         TYPE_USED):  New macros for special types in type_map.
19537
19538         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
19539         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
19540         BCODE_JUMP_TARGET.
19541         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
19542
19543         * expr.c (can_widen_reference_to):  New function.
19544         (pop_type):  Use it.
19545         (merge_type_state):  Support handling start of subroutine.
19546         (push_pending_block):  Return char* error message, instead of calling
19547         fatal on an error.  Also handle subroutines.
19548         (verify_jvm_instructions):  Handle errors from push_poending_block.
19549         Support jsr and ret instructions.
19550
19551 1997-08-19  Per Bothner  <bothner@cygnus.com>
19552
19553         * jcf-io.c (find_classfile):  Fix thinko.
19554         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
19555
19556 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
19557
19558         * Makefile.in (BISON): Remove.
19559
19560 1997-08-07  Per Bothner  <bothner@cygnus.com>
19561
19562         * Makefile.in:  Convert to autoconf.
19563         * config-lang.in (outputs):  Added java/Makefile.
19564
19565         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
19566         Rename cc1java to jc1.
19567
19568         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
19569         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
19570
19571         * class.c (class_depth):  Do load_class if needed.
19572
19573         Mostly better verification.
19574         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
19575         (init_decl_processing):  Change return type of soft_checkcast.
19576         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
19577         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
19578         lang_print_error):  New functions.
19579         (lang_init):  Set global hook print_error_function to lang_print_error.
19580         * expr.c:  In the type_map ptr_type_node is only used for null now.
19581         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
19582         (merge_types):  Dererence pointer to record types before comparing.
19583         (decode_newarray_type, merge_types):  On error just return NULL.
19584         (build_java_binop):  Add preliminary implementation (with warning)
19585         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
19586         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
19587         (expand_compare, expand_java_goto, expand_java_call):  Don't
19588         push_pending_block, since that only makes sense when verifying.
19589         (merge_type_state):  Different return codes.
19590         (push_pending_block):  A block may need to be verified more than once.
19591         (expand_byte_code):  Warn about unused code at code generation time.
19592         (verify_jvm_instruction):  Changed logic, since code may need to be
19593         re-verified if type-state has changed.  Also, better error handling.
19594         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
19595         Improve newarray, anewarray, ?aload, athrow,
19596         * java-tree.h (LABEL_CHANGED):  New macro.
19597
19598 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19599
19600         * decl.c (soft_athrow_node): New global variable initialized.
19601         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
19602         * typeck.c (convert): Added support for REAL_TYPE.
19603         (convert_to_char): New function.
19604         (convert): Handle CHAR_TYPE.
19605         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
19606         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
19607         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
19608         promoted type.
19609         (verify_jvm_instructions): Added break a the end of bogus unop: label.
19610         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
19611         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
19612         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
19613         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
19614         to Use The Right Things.
19615         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
19616         compatible with INT. BOOLEAN is made equivalent to BYTE.
19617         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
19618         OPCODE_ifnonnull): Now supported.
19619         (build_java_athrow): New function.
19620
19621 1997-08-04  Per Bothner  <bothner@cygnus.com>
19622
19623         Rename method name <init> to match G++ (and fix mangling).
19624         * class.c (layout_class):  Replace method name of <init> by class name.
19625         (make_method_value):  Do inverse renaming of constructor from <init>.
19626         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
19627         * typeck.c (lookup_java_constructor):  New function.
19628         * expr.c (expand_invoke):  If method_name is <init>, call
19629         lookup_java_constructor to find constructor.
19630
19631         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
19632
19633 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19634
19635         * parse.c (get_class_constant): Modified to handle array "classes"
19636         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
19637         wide type.
19638         (convert): Modified to handle real type.
19639         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
19640         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
19641         variables declared.
19642         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
19643         soft_multianewarray, soft_newarray_node, soft_throw_node): New
19644         global variables initialized.
19645         (find_local_variable): Handles the case of a pointer
19646         (end_java_method): Restore the use of one more scope
19647         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
19648         build_java_array_length_access, expand_java_arrayload,
19649         expand_java_arraystore, expand_java_array_length,
19650         expand_java_multianewarray, expand_java_anewarray,
19651         build_java_check_indexed_type, is_array_type_p,
19652         build_java_throw_out_of_bound_exception): New functions.
19653         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
19654         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
19655         OPCODE_<t>aload): Implemented code for verification.
19656         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
19657         ARRAY_NEW_MULTI): Macro defined.
19658         (CONVERT): Modified to invoke convert().
19659         (case OPCODE_aload2): Fixed index typo from 2 to 1.
19660
19661 1997-07-31  Per Bothner  <bothner@cygnus.com>
19662
19663         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
19664         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
19665         (make_class_data):  Field name needs '/' as package prefix.
19666         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
19667
19668 1997-07-25  Per Bothner  <bothner@cygnus.com>
19669
19670         Implement debug information for local variables.
19671         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
19672         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
19673         DECL_LOCAL_SLOT_CHAIN):  New macros.
19674         (struct lang_decl_var):  New type.
19675         * parse.c (give_name_to_locals):  Move to decl.c.
19676         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
19677         (start_java_method):  Re-write parameter handling.
19678         (pending_local_decls):  New global variable.
19679         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
19680         (find_local_variable):  Accept pc so we can skips decls not in range.
19681         (struct binding_level):  Add end_pc field.
19682         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
19683         (various):  Change so current pc gets passed to find_local_variable.
19684
19685         * decl.c (init_decl_processing):  Re-arrange fields in
19686         class_type_node and and method_type_node to match kaffe 0.9.1.
19687         * class.c (make_method_value, make_class_data):  Update
19688         initializations to match.
19689
19690 1997-07-16  Per Bothner  <bothner@cygnus.com>
19691
19692         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
19693         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
19694         (push_super_field):  New function.
19695         (make_class_data):  Handle inheritance of class static initializer.
19696         (layout_class):  New name mangling.
19697         * constants.c (build_constant_data_ref):  Init type of data array
19698         to a one-element array.
19699         (build_constants_constructor):  Set DECL_SIZE from complete array type.
19700         * decl.c:  Rename class_type, object_type etc to class_type_node,
19701         object_type_node etc.  Make former inherit from latter.
19702         * expr.c (expand_invoke):  Add cast of function address.
19703         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
19704         * parse.c (yyparse):  Don't call layout_class here.
19705         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
19706
19707 1997-06-14  Per Bothner  <bothner@cygnus.com>
19708
19709         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
19710         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
19711         (alloc_class_constant):  New.
19712         * expr.c (expand_invoke):  Make sure method's class is initialized.
19713         * class.c (interits_from_p, emit_register_class):  New functions.
19714         * parse.c (yyparse):  Call emit_register_class.
19715
19716 1997-06-09  Per Bothner  <bothner@cygnus.com>
19717
19718         * constants.c:  New file, to handle constant pool.
19719         * Makefile.in (JAVA_OBJS):  Add constants.o.
19720         * decl.c (init_decl_processing):  Update, fix, finish various structs.
19721         (pushdecl_top_level):  New.
19722         * parse.c (layout_class):  Moved to class.c.
19723         * expr.c (java_push_constant_from_pool):  New function.
19724         * class.c (build_class_ref):  Make work fully
19725         (make_class_data):  Emit super-class, constant pool, interface vector.
19726
19727 1997-06-03  Per Bothner  <bothner@cygnus.com>
19728
19729         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
19730         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
19731         * class.c (class_depth):  New function.
19732         (lookup_named_class):  Replaced by new function lookup_class.
19733         * decl.c (object_type_node, string_type_node):  New.
19734         Remove various types that we no longer need.
19735         * expr.c (verify_jvm_instructions):  New separate verifier pass.
19736         (push_type, pop_type):  New functions for verifier.
19737         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
19738         (expand_byte_code):  Simplify, since we assume already verified.
19739         (expand_invoke):  Now mostly works.
19740         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
19741         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
19742         * parse.c:  Wait to allocate class object until we know its name.
19743         (layout_class):  Calculate DECL_VINDEX for each virtual method.
19744         * typeck.c (get_array_type):  Rename to ...
19745         (build_java_array_type):  ... and provide working implementation.
19746         (build_java_signature):  New function - build Java signature of type.
19747         (set_java_signature):  New function - cache signature with type.
19748         (lookup_java_method):  New function.
19749
19750 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
19751
19752         * class.c (ident_subst):  Take extra SUFFIX parameter.
19753         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
19754         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
19755         (build_class_ref):  Actually implement.
19756         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
19757         * decl.c (builtin_function):  New.
19758         (init_decl_processing):  Update for current Kaffe.  Declare some
19759         builtin Kaffe functions.
19760         * expr.c (build_address_of):  New.
19761         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
19762         Renamed (from expand_java_new etc), and added working implementations.
19763         (build_field_ref):  Now also handle static fields.
19764         (expand_invoke):  Implement invokestatic, and start implement rest.
19765         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
19766         * javaop.def:  Rename invokevirt -> invokevirtual.
19767         * lang.c (use_handles):  Removed.
19768         * parse.c:  Add support for ConstantValue attribute.
19769         Handle nested loading of a class.  (JPOOL_UTF):  New.
19770
19771 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
19772
19773         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
19774
19775 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
19776
19777         * Make-lang.in (java.install-man):  New empty rule.
19778         * typeck.c (set_local_type):  New function.
19779         * expr.c (STORE_INTERNAL):  Call find_local_variable,
19780         not find_stack_slot.  Call set_local_type.
19781
19782 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
19783
19784         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
19785         and building RECORD_TYPE CONSTRUCTORs.
19786         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
19787
19788         * lang.c (use_handles):  Change the default to 0.
19789         * decl.c:  Define and build class_type, field_type, utf8const_type.
19790         * class.c (make_class_data, make_field_value,
19791         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
19792         hashUtf8String, strLengthUtf8, mangled_classname:
19793         Functions to build reflective data structures.
19794         * parse.c (yyparse):  Call make_class_data.
19795
19796         * jcf-io.c (open_class, find_classfile):  New functions.
19797         * jcf-dump.c:  Support reading classfile from explicitly-named
19798         class file (without CLASSPATH searching).
19799
19800 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19801
19802         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
19803         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
19804         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
19805         (get_constant):  Now trivial for CONSTANT_Utf8.
19806
19807         * jcf.h:  Make NEW_CPOOL the default.
19808         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
19809
19810 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19811
19812         New directory.