OSDN Git Service

2007-02-07 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2007-02-07  Andrew Haley  <aph@redhat.com>
2
3         * class.c (uncache_this_class_ref): New.
4         * expr.c (build_jni_stub): Initialize the class.
5         (expand_byte_code): Call uncache_this_class_ref after generating
6         code.
7
8 2007-02-06  Tom Tromey  <tromey@redhat.com>
9
10         PR java/30714:
11         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
12
13 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
14
15         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
16
17 2007-02-02  Andrew Haley  <aph@redhat.com>
18
19         * expr.c (expand_byte_code): Call cache_this_class_ref() and
20         cache_cpool_data_ref().
21         Set TYPE_CPOOL_DATA_REF.
22         (cache_cpool_data_ref): New function.
23         * constants.c (build_ref_from_constant_pool): Remove special-case
24         code for flag_indirect_classes.
25         (build_constant_data_ref): Move special-case code for
26         flag_indirect_classes here from build_ref_from_constant_pool.
27         * decl.c (finish_method): Move class initialization from here to
28         cache_this_class_ref.
29         * class.c (cache_this_class_ref): New function.
30         (build_class_ref): Use this_classdollar for the ouput class.
31
32 2007-02-02  David Daney  <ddaney@avtrex.com>
33
34         * class.c (is_compiled_class): Move check to avoid reloading
35         current class.
36         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
37         already set.
38
39 2007-02-01  Andrew Haley  <aph@redhat.com>
40
41         PR java/30641
42         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
43
44 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
45
46         * class.c, jcf-parse.c: Fix comment typos.
47
48 2007-01-30  Tom Tromey  <tromey@redhat.com>
49
50         * gcj.texi (Strings): Fix documentation for JvNewString.
51
52 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
53
54         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
55         typos.
56
57 2007-01-30  Ben Elliston  <bje@au.ibm.com>
58
59         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
60
61 2007-01-29  Tom Tromey  <tromey@redhat.com>
62
63         PR java/30607:
64         * jvspec.c (lang_specific_driver): Handle separate -I argument.
65         * lang.opt (-I): Add 'Separate'.
66
67 2007-01-29  Andrew Haley  <aph@redhat.com>
68
69         * class.c (add_method_1): Mark fndecl as external unless we are
70         compiling it into this object file.
71
72 2007-01-24  Andrew Haley  <aph@redhat.com>
73
74         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
75         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
76
77 2007-01-22  Andrew Haley  <aph@redhat.com>
78
79         * builtins.c (VMSupportsCS8_builtin): New function.
80
81 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
82
83         PR java/30454
84         * jcf-io.c (opendir_in_zip): Close the file
85         and free zipf before returning after an error.
86
87 2007-01-16  Tom Tromey  <tromey@redhat.com>
88
89         * java-tree.def: Added copyright header.
90
91 2007-01-15  Tom Tromey  <tromey@redhat.com>
92
93         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
94         case.
95         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
96         Removed case.
97         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
98         (EXPR_WFL_NODE): Likewise.
99         (EXPR_WFL_LINECOL): Likewise.
100         (EXPR_WFL_FILENAME): Likewise.
101         (EXPR_WFL_LINENO): Likewise.
102         (build_expr_wfl, expr_add_location): Don't declare.
103         (build_unknown_wfl): Removed.
104         (EXPR_WFL_FILENAME_NODE): Removed.
105         (EXPR_WFL_COLNO): Removed.
106         (EXPR_WFL_SET_LINECOL): Removed.
107         (DECL_FUNCTION_WFL): Removed.
108         (DECL_FIELD_FINAL_WFL): Removed.
109         (struct lang_decl_func) <wfl>: Removed field.
110         <called_constructor>: Likewise.
111         <inner_access>: Likewise.
112         (struct lang_decl_var) <wfl>: Removed field.
113         (DECL_CONSTRUCTOR_CALLS): Removed.
114         (DECL_FUNCTION_ACCESS_DECL): Likewise.
115         (DECL_FUNCTION_INNER_ACCESS): Likewise.
116         (DECL_SPECIFIC_COUNT): Likewise.
117         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
118         * expr.c (build_expr_wfl): Removed.
119         (expr_add_location): Likewise.
120
121 2007-01-12  Tom Tromey  <tromey@redhat.com>
122
123         * jcf-dump.c (main): Updated call to find_class.
124         * lang.c (java_init): Removed dead code.
125         * jcf-parse.c (read_class): Don't use java_source field.  Removed
126         dead code.
127         (parse_zip_file_entries): Don't use java_source field.
128         (process_zip_dir): Likewise.
129         (jcf_parse): Removed dead code.
130         (java_parse_file): Likewise.
131         (read_class): Updated call to find_class.
132         * jcf-io.c (find_class): Don't use java_source field.  Removed
133         'source_ok' argument, .java logic.
134         * jcf.h (JCF) <java_source>: Removed field.
135         (JCF_ZERO): Updated.    (find_class): Updated.
136         * decl.c: Removed dead code.
137         * class.c: Removed dead code.
138
139 2007-01-11  Tom Tromey  <tromey@redhat.com>
140
141         * typeck.c (convert): Don't use flag_emit_class_files.
142         * lang.c (java_post_options): Don't use flag_emit_class_files.
143         (java_handle_option): Don't use flag_extraneous_semicolon or
144         flag_redundant.
145         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
146         flag_emit_class_files.
147         (load_class): Likewise.
148         * java-tree.h (flag_emit_class_files): Don't declare.
149         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
150         (flag_extraneous_semicolon): Don't declare.
151         (flag_not_overriding): Likewise.
152         (flag_static_local_jdk1_1): Likewise.
153         (flag_redundant): Likewise.
154         * expr.c (build_newarray): Don't use flag_emit_class_files.
155         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
156         flag_emit_class_files.
157         (build_class_ref): Likewise.
158         * builtins.c (check_for_builtin): Don't use
159         flag_emit_class_files.
160
161 2007-01-10  Tom Tromey  <tromey@redhat.com>
162
163         * lang.c (java_can_use_bit_fields_p): Removed.
164         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
165
166 2007-01-09  Andrew Haley  <aph@redhat.com>
167
168         * expr.c (build_java_arrayaccess): Rewrite to generate array
169         access in canonical form.
170         (expand_java_arraystore): Use build_fold_addr_expr() on address of
171         array access.
172
173 2007-01-03  Andrew Haley  <aph@redhat.com>
174
175         PR java/28754
176         * expr.c (expand_java_field_op): If we're initializing a field's
177         declaring interface we should not also initialize the class
178         context in which it was referenced.
179
180 2007-01-02  Tom Tromey  <tromey@redhat.com>
181
182         * java-tree.h (compiling_from_source, current_encoding,
183         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
184         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
185         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
186         JTI_WFL_OPERATOR): Removed
187         (finit_identifier_node, instinit_identifier_node,
188         length_identifier_node, super_identifier_node,
189         continue_identifier_node, access0_identifier_node, wfl_operator):
190         Removed.
191         (cyclic_inheritance_report,
192         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
193         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
194         DECL_FIXED_CONSTRUCTOR_P): Removed.
195         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
196         Removed.
197         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
198         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
199         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
200         import_list, import_demand_list>: Removed.
201         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
202         cxx_keyword_p): Removed.
203         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
204         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
205         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
206         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
207         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
208         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
209         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
210         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
211         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
212         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
213         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
214         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
215         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
216         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
217         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
218         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
219         java_parse_abort_on_error, extract_field_decl): Removed.
220         (finput): Declare.
221         * lang.c: (compiling_from_source, current_encoding): Removed.
222         (java_handle_option): Ignore -fencoding.
223         * parse.h: Don't include lex.h.
224         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
225         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
226         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
227         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
228         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
229         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
230         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
231         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
232         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
233         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
234         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
235         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
236         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
237         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
238         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
239         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
240         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
241         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
242         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
243         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
244         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
245         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
246         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
247         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
248         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
249         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
250         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
251         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
252         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
253         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
254         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
255         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
256         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
257         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
258         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
259         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
260         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
261         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
262         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
263         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
264         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
265         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
266         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
267         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
268         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
269         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
270         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
271         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
272         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
273         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
274         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
275         SET_CPC_STATIC_INITIALIZER_STMT,
276         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
277         java_complete_class, java_check_circular_reference,
278         java_fix_constructors, java_layout_classes, java_reorder_fields,
279         java_method_add_stmt, java_get_line_col, reset_report,
280         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
281         java_finish_classes, ctxp, ctxp_for_generation,
282         ctxp_for_generation_last): Removed.
283         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
284         * mangle.c (utf8_cmp): New function.
285         (cxx_keywords): New global.
286         (cxx_keyword_p): New function.
287         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
288         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
289         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
290         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
291         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
292         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
293         * Make-lang.in (java.srcextra): Do nothing.
294         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
295         (JAVA_OBJS): Don't mention deleted files.
296         (java.mostlyclean): Likewise.
297         (java.clean): Likewise.
298         (JAVA_LEX_C): Removed.
299         (buffer.o, check-init.o, parse.o): Remove unused targets.
300         (typeck.o): Updated.
301         * jcf-parse.c (read_class): Comment out unused code.
302         (java_layout_seen_class_methods): New function.
303         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
304         Removed.
305         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
306         (init_jcf_parse): Removed.
307         * config-lang.in (gtfiles): Remove deleted files.
308         * decl.c (java_init_decl_processing): Don't initialize
309         finit_identifier_node, instinit_identifier_node,
310         length_identifier_node, super_identifier_node,
311         continue_identifier_node, access0_identifier_node.  Don't call
312         init_jcf_parse.
313         * class.c (cyclic_inheritance_report): New global.
314         (add_method_1): Don't use
315         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
316         (maybe_layout_super_class): Comment out code.
317         (safe_layout_class): New function.
318         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
319         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
320         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
321         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
322         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
323         (java_gimplify_case_expr): Removed.
324         (java_gimplify_default_expr): Likewise.
325         (java_gimplify_new_array_init): Likewise.
326         * parse.y: Removed.
327         * keyword.gperf, keyword.h: Removed.
328         * chartables.h: Removed.
329         * check-init.c: Removed.
330         * buffer.c, buffer.h: Removed.
331         * convert.h: Removed.
332         * gen-table.pl: Removed.
333         * lex.c, lex.h: Removed.
334
335 2007-01-02  Andrew Haley  <aph@redhat.com>
336
337         * expr.c (expand_java_arraystore): Make sure we perform a bounds
338         check at runtime before we perform a type check.
339
340 2006-12-19  Andrew Haley  <aph@redhat.com>
341
342         * decl.c: Bump minor BC ABI version.
343
344 2006-12-13  Gary Benson  <gbenson@redhat.com>
345
346         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
347
348 2006-12-12  Tom Tromey  <tromey@redhat.com>
349
350         * lang-specs.h: Pass -M options to jc1.
351         * jcf-depend.c (jcf_dependency_add_file): Don't emit
352         dependencies.
353
354 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
355
356         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
357
358 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
359
360         * lang-specs.h: Pass '%U'-based options as separate arguments.
361
362 2006-12-05  Tom Tromey  <tromey@redhat.com>
363
364         PR java/29495:
365         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
366         classes as well.
367         * class.c (add_field): Handle ACC_SYNTHETIC.
368         (add_method_1): Likewise.  Handle bridge and varargs.
369         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
370         annotation.
371         (set_class_decl_access_flags): Handle synthetic and annotation.
372         * java-tree.h (METHOD_BRIDGE): New macro.
373         (METHOD_VARARGS): Likewise.
374         (TYPE_SYNTHETIC): Likewise.
375         (TYPE_ANNOTATION): Likewise.
376         (lang_type): New fields 'synthetic' and 'annotation'.
377         (lang_decl_func): New fields 'varargs' and 'bridge'.
378
379 2006-12-04  Andrew Haley  <aph@redhat.com>
380
381         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
382         there's no map.
383
384 2006-11-29  Gary Benson  <gbenson@redhat.com>
385
386         * expr.c (rewrite_arglist_getcaller): Reorder.
387
388 2006-11-29  Andrew Haley  <aph@redhat.com>
389
390         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
391         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
392
393 2006-11-23  Andrew Haley  <aph@redhat.com>
394
395         * expr.c (rewrite_arglist_getcaller): New.
396         (rewrite_arglist_getclass): Fix indentation.
397         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
398         gnu.classpath.VMStackWalker.getCallingClassLoader().
399         * builtins.c (initialize_builtins): Remove duplicate def'n of
400         __sync_synchronize.
401         Add __builtin_return_address.
402
403 2006-11-22  Andrew Haley  <aph@redhat.com>
404
405         * jcf-reader.c (get_attribute): Mark attr_type unused.
406
407         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
408
409 2007-01-08  Richard Guenther  <rguenther@suse.de>
410
411         * lex.c (do_java_lex): Use build_int_cst_wide_type.
412         * jcf-parse.c (get_constant): Likewise.
413
414 2006-11-12  Jan Hubicka  <jh@suse.cz>
415
416         * resource.c (compile_resource_data): Update for new varpool names.
417         * java/class.c (build_utf8_ref): Likewise.
418
419 2006-11-12  David Daney  <ddaney@avtrex.com>
420
421         PR java/29805
422         * typeck.c (build_java_array_type): Increase buffer sizes.
423
424 2006-11-11  Richard Guenther  <rguenther@suse.de>
425
426         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
427         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
428
429 2006-11-06  Andrew Haley  <aph@redhat.com>
430
431         * java-tree.h (CONSTANT_LazyFlag): New.
432         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
433         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
434         reflection_data.
435         (handle_constant): Return 0 for dummy cpool entries.
436         Handle constants of kind Class.
437         Handle constants of kind NameAndType.
438         (handle_enclosingmethod_attribute): New.
439         (handle_signature_attribute): New.
440         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
441         (HANDLE_SIGNATURE_ATTRIBUTE): New.
442         (handle_constant): Use unmangle_classname()rather than calling
443         identifier_subst() directly.
444
445 2006-11-02  Andrew Haley  <aph@redhat.com>
446
447         * java-tree.h (FIELD_ENUM): New.
448         (lang_decl_var.field_enum): New.
449         (lang_type.enum_class): New.
450         (CLASS_ENUM): New.
451         * class.c (set_class_decl_access_flags): Handle enum types.
452         (add_field): Handle enum fields.
453         (get_access_flags_from_decl): Likewise.
454
455         * class.c (make_class_data): Put reflection_data into rodata.
456
457 2006-11-01  Andrew Haley  <aph@redhat.com>
458
459         * jcf-parse.c (field_offsets, bit_obstack): New variables.
460         (jcf_parse): Write end marker to annotation_data.
461         (java_parse_file): Create field_offsets bitmap.  Destroy it.
462         (annotation_grow, annotation_rewrite_byte) 
463         (annotation_rewrite_short, annotation_rewrite_int) 
464         (annotation_read_short, annotation_write_byte) 
465         (annotation_write_short, annotation_write_int) 
466         (handle_long_constant, handle_constant, handle_element_value) 
467         (handle_annotation, handle_annotations) 
468         (handle_annotation_attribute, rewrite_reflection_indexes) 
469         (handle_member_annotations, handle_parameter_annotations) 
470         (handle_default_annotation): New functions.
471         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
472         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
473         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
474         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
475         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
476         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
477         (TYPE_REFLECTION_DATA): New.
478         (TYPE_REFLECTION_DATASIZE): New.
479         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
480         an enum.
481         * jcf-reader.c (get_attribute): Pass field/method index and
482         attribute type to get_attribute().
483         * constants.c (find_class_or_string_constant): Make nonstatic.
484         (cpool_for_class): Likewise.
485         (build_constants_constructor): Separate string and scalar types.
486         * class.c (make_class_data): Generate field_indexes permutation.
487         Pass it to rewrite_reflection_indexes().
488         (make_class_data): Generate constructor for reflection_data field.
489
490 2006-10-20  Tom Tromey  <tromey@redhat.com>
491
492         * gcj.texi (Top): Don't mention jv-scan.
493         (Invoking gcj): Likewise.
494         (Invoking gcjh): Likewise.
495         (Invoking gjnih): Likewise.
496         (Invoking gij): Likewise.
497         (Invoking gcj-dbtool): Likewise.
498         (Invoking jv-scan): Removed.
499         * parse-scan.y: Removed.
500         * jv-scan.c: Removed.
501         * config-lang.in (stagestuff): Don't mention jv-scan.
502         * Make-lang.in (java): Removed jv-scan.
503         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
504         (JVSCAN_OBJS): Removed.
505         (jv-scan$(exeext)): Likewise.
506         (JAVA_MANFILES): Removed jv-scan.1.
507         (java.uninstall): Don't mention jv-scan.
508         (java.mostlyclean): Likewise.
509         (java.maintainer-clean): Likewise.
510         (.INTERMEDIATE): Likewise.
511         (java/jv-scan.o): Removed.
512         (jv-scan.pod): Likewise.
513         (java.srcextra): Don't mention parse-scan.c.
514         (java.mostlyclean): Likewise.
515         (java/parse-scan.c): Removed.
516         (java/parse-scan.o-warn): Removed.
517         (java/parse-scan.o): Removed.
518
519 2006-10-20  Tom Tromey  <tromey@redhat.com>
520
521         * lang.c (java_handle_option): Don't use
522         jcf_write_base_directory.
523         * jcf.h (jcf_write_base_directory): Removed.
524         * parse.y (java_expand_classes): Don't call write_classfile.
525         * config-lang.in (gtfiles): Removed jcf-write.c.
526         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
527         (java/jcf-write.o): Removed.
528         * jcf-parse.c (parse_class_file): Don't call write_classfile.
529         * java-tree.h (write_classfile): Removed declaration.
530         * jcf-write.c: Removed.
531
532 2006-10-20  Tom Tromey  <tromey@redhat.com>
533
534         * Make-lang.in (java): Removed gjnih, gcjh.
535         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
536         (GCJH_OBJS): Removed.
537         (GJNIH_OBJS): Likewise.
538         (gjnih$(exeext)): Likewise.
539         (gcjh$(exeext)): Likewise.
540         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
541         (java.install-common): Don't special case gcjh.
542         (java.uninstall): Don't mention gcjh, gjnih.
543         (java.mostlyclean): Likewise.
544         (java.maintainer-clean): Likewise.
545         (.INTERMEDIATE): Likewise.
546         (gcjh.pod): Removed.
547         (gjnih.pod): Likewise.
548         (GCJH_TARGET_INSTALL_NAME): Removed.
549         (java/gjavah-jni.o): Removed.
550         (java/gjavah.o): Likewise.
551         * config-lang.in (stagestuff): Removed gjnih, gcjh.
552         * gjavah.c: Removed.
553
554 2006-10-17  Tom Tromey  <tromey@redhat.com>
555
556         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
557         "string" case.
558
559 2006-10-17  Tom Tromey  <tromey@redhat.com>
560
561         * jvgenmain.c (main): Handle -findirect-dispatch.
562         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
563         jvgenmain.
564
565 2006-10-06  Andrew Haley  <aph@redhat.com>
566
567         * builtins.c (compareAndSwapInt_builtin): Check that we really do
568         have a compare_and_swap builtin.
569         (compareAndSwapLong_builtin): Likewise.
570         (compareAndSwapObject_builtin): Likewise.
571
572 2006-10-04  Andrew Haley  <aph@redhat.com>
573
574         * builtins.c (java_builtins): Add compareAndSwapInt,
575         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
576         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
577         putObjectVolatile, getObjectVolatile, getIntVolatile,
578         getLongVolatile, getLong.
579         (UNMARSHAL3): New macro.
580         (UNMARSHAL4): Likewise.
581         (UNMARSHAL5): Likewise.
582         (build_arglist_for_builtin): New function.
583         (build_addr_sum, build_check_this): New functions.
584         (putObject_builtin. compareAndSwapInt_builtin,
585         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
586         putVolatile_builtin, getVolatile_builtin): New builtins.
587
588 2006-06-08  Andrew Haley  <aph@redhat.com>
589  
590         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
591         get_symbol_table_index().
592         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
593         private method.
594         (build_known_method_ref): New arg: special.  Pass it to
595         get_symbol_table_index.
596         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
597         the method list.
598         (build_invokevirtual): New arg: special.  Pass it to
599         get_symbol_table_index.
600         (expand_invoke): New variable: special.
601         Pass it to maybe_rewrite_invocation().
602         Pass it to build_known_method_ref().
603         * class.c (build_symbol_entry): Add new arg: special.  Use it to
604         build the symbol table conbstructor.
605         (emit_symbol_table): Extract SPECIAL from the method list and pass
606         it to build_symbol_entry().
607         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
608         special accordingly.
609  
610 2006-09-08  Andrew Haley  <aph@redhat.com>
611
612         * class.c (layout_class_method): Use build_java_signature, not
613         build_java_argument_signature.  Use lookup_java_method, not
614         lookup_argument_method.
615
616 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
617             Bryce McKinlay  <bryce@mckinlay.net.nz>
618
619         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
620
621 2006-07-18  Tom Tromey  <tromey@redhat.com>
622
623         * lang.opt: Added missing -W options.
624
625 2006-07-12  Tom Tromey  <tromey@redhat.com>
626
627         PR java/28329:
628         * lang-specs.h: Pass '%U'-based options as separate arguments.
629         Use -faux-classpath.
630         * lang.c (java_handle_option): Handle OPT_faux_classpath.
631         * lang.opt (faux-classpath): New option.
632
633 2006-07-07  Tom Tromey  <tromey@redhat.com>
634
635         * class.c (make_class_data): Set value for reflection_data field.
636         * decl.c (java_init_decl_processing): Add reflection_data field.
637
638 2006-07-07  Tom Tromey  <tromey@redhat.com>
639
640         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
641         earlier.
642         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
643
644 2006-07-07  Andrew Haley  <aph@redhat.com>
645
646         * jcf-parse.c (set_source_filename): Don't check for
647         CLASS_FROM_CURRENTLY_COMPILED_P.
648         Remove // comments.
649
650 2006-07-07  Andrew Haley  <aph@redhat.com>
651
652         * java-tree.h (java_read_sourcefilenames): Declare.
653         * lang.c (java_handle_option): Call java_read_sourcefilenames().
654         * lang.opt (fsource-filename): New opt.
655         * lang-specs.h: Add -fsource-filename.
656         * jcf-parse.c (num_files, filenames): New variables.
657         (reverse, cmpstringp, java_read_sourcefilenames,
658         find_sourcefile): New.
659         (set_source_filename): Call find_sourcefile to find the real name
660         of a source file.
661
662 2006-06-27  Tom Tromey  <tromey@redhat.com>
663
664         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
665         Signature, LocalVariableTypeTable, annotation attributes.
666         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
667         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
668         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
669         (HANDLE_METHOD): Likewise.
670         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
671         (print_annotation): New function.
672         (print_element_value): Likewise.
673         (indent): Likewise.
674         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
675         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
676         (print_parameter_annotations): New function.
677         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
678         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
679         Likewise.
680         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
681         (print_annotations): New function.
682
683 2006-06-23  Tom Tromey  <tromey@redhat.com>
684
685         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
686         emitting class files, always use 1.5.
687         * gcj.texi (Input Options): Document -fsource.
688         (Code Generation): Document -ftarget.
689
690 2006-06-21  Tom Tromey  <tromey@redhat.com>
691
692         PR java/28089:
693         * expr.c (expand_java_field_op): Initialize field's declaring
694         class.
695
696 2006-06-20  Tom Tromey  <tromey@redhat.com>
697
698         * expr.c (push_value): Always flush quick stack.
699
700 2006-06-19  Tom Tromey  <tromey@redhat.com>
701
702         * expr.c (push_value): Also flush quick stack if value is a
703         component_ref.
704
705 2006-06-19  Tom Tromey  <tromey@redhat.com>
706
707         * expr.c (push_value): Flush quick stack if value has side
708         effects.
709
710 2006-06-13  Tom Tromey  <tromey@redhat.com>
711
712         * class.c (is_compiled_class): Explicitly check for current
713         class.
714
715 2006-06-09  Tom Tromey  <tromey@redhat.com>
716
717         * gjavah.c (decompile_method): Don't decompile a static field
718         accessor method.
719
720 2006-06-06  Tom Tromey  <tromey@redhat.com>
721
722         * lang-specs.h <jc1>: Add .jar file to command line if
723         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
724
725 2006-06-05  Tom Tromey  <tromey@redhat.com>
726
727         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
728         synthetic, enum, annotation.
729         * jcf.h (ACC_BRIDGE): New macro.
730         (ACC_VARARGS): Likewise.
731         (ACC_SYNTHETIC): Likewise.
732         (ACC_ENUM): Likewise.
733         (ACC_ANNOTATION): Likewise.
734
735 2006-06-04  Tom Tromey  <tromey@redhat.com>
736
737         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
738         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
739         and -ftarget.
740         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
741         when needed.  Handle classpath-setting.
742         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
743         * lang-specs.h: Rewrote.
744
745 2006-06-04  Tom Tromey  <tromey@redhat.com>
746
747         * jcf-io.c (find_class): Set source_ok to 0.
748         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
749         (parse_class_file): Don't call java_mark_class_local.
750         (java_parse_file): Skip .java files.  Call java_mark_class_local
751         before lowering any code.
752         (parse_zip_file_entries): Don't call duplicate_class_warning
753         here.
754         (process_zip_dir): ... call it here.
755         * class.c (add_field): Don't mark field external if it is being
756         compiled into this object.
757         (make_class_data): Handle situation where class_dtable_decl is
758         created before Class is compiled.
759         (is_compiled_class): Don't assume files in zip are compiled into
760         this object.
761         (layout_class_method): Don't mark method external if it is being
762         compiled into this object.
763
764 2006-06-04  Tom Tromey  <tromey@redhat.com>
765
766         * jcf-path.c (jcf_path_compute): New function.
767         * jcf.h (jcf_path_compute): Declare.
768
769 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
770
771         * decl.c: Include langhooks.h.
772         (builtin_function): Remove.
773         (java_init_decl_processing): Replace calls to builtin_function
774         with add_builtin_function.
775         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
776         (java/decl.o): Depend on langhooks.h.
777         * java-tree.h (builtin_function): Remove.
778
779 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
780
781         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
782
783 2006-09-12  Tom Tromey  <tromey@redhat.com>
784
785         * expr.c (push_value): Always flush quick stack.
786
787 2006-09-12  Tom Tromey  <tromey@redhat.com>
788
789         PR java/29013:
790         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
791         the push of the called method's return result.
792
793 2006-09-12  Tom Tromey  <tromey@redhat.com>
794
795         * jvspec.c (lang_specific_driver): Read spec file even if
796         -fsyntax-only.
797
798 2006-09-12  Tom Tromey  <tromey@redhat.com>
799
800         PR java/28754:
801         * expr.c (expand_java_field_op): Initialize field's declaring
802         interface if necessary.
803
804 2006-09-12  Tom Tromey  <tromey@redhat.com>
805
806         PR java/28892:
807         * expr.c (expand_java_field_op): No error for assignments not in
808         class initializer or constructor.
809
810 2006-08-22  Andrew Haley  <aph@redhat.com>
811
812         * decl.c (java_add_stmt): Give the statement list a type.
813
814 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
815             Bryce McKinlay  <bryce@mckinlay.net.nz>
816
817         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
818
819 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
820
821         PR java/8923
822         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
823         or '--' is used with a constant operand.
824         (java_complete_lhs): When processing a '++' or '--' expression,
825         don't call java_complete_tree but java_complete_lhs, so that a
826         static final variable operand is never replaced by its value. This
827         avoids an ICE later on.
828         (patch_unaryop): Fixed typo in comment.
829
830 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
831
832         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
833
834 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
835
836         * builtins.c (check_for_builtin): If a builtin could result in a
837         direct call being generated, don't use it if flag_indirect_dispatch
838         is set.
839
840 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
841
842         * gcj.texi (Invocation): Corrections for Invocation API example.
843
844 2006-07-04  Andrew Haley  <aph@redhat.com>
845
846         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
847         entry.
848
849 2006-06-21  Andrew Haley  <aph@redhat.com>
850
851         * java-tree.h (update_aliases): Remove
852         * expr.c (expand_iinc): Remove call to update_aliases().
853         (STORE_INTERNAL): Likewise.
854         * decl.c (update_aliases, initialize_local_variable) 
855         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
856
857 2006-06-19  Andrew Haley  <aph@redhat.com>
858
859         PR java/1305
860         PR java/27908
861         * expr.c (java_modify_addr_for_volatile): New function.
862         (expand_java_field_op): Handle volatile fields.
863         * java-gimplify.c (java_gimplify_component_ref): Call
864         java_modify_addr_for_volatile to give the field_ref the correct
865         volatile type.
866         (java_gimplify_modify_expr): Likewise.
867         * java-tree.h (java_modify_addr_for_volatile): New decl.
868
869 2006-06-17  Karl Berry  <karl@gnu.org>
870
871         * gcj.texi (@dircategory): Use "Software development" instead
872         of "Programming", following the Free Software Directory.
873
874 2006-06-16  Andrew Haley  <aph@redhat.com>
875
876         * class.c (make_class_data): When using flag_indirect_classes,
877         don't initialize the vtable of Class instances.
878
879 2006-06-09  Andrew Haley  <aph@redhat.com>
880
881         PR java/1305
882         PR java/27908
883         * builtins.c (initialize_builtins): Add __sync_synchronize().
884         * class.c (add_field): Mark volatile fields.
885         * java-gimplify.c (java_gimplify_expr): Call new functions to
886         handle self-modifying exprs and COMPONENT_REFs.
887         (java_gimplify_component_ref): New.
888         (java_gimplify_modify_expr): Add handling for volatiles.
889
890 2006-06-08  Tom Tromey  <tromey@redhat.com>
891
892         * gcj.texi (libgcj Runtime Properties): Document
893         gnu.gcj.user.realname.
894
895 2006-06-08  Andrew Haley  <aph@redhat.com>
896
897         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
898         get_symbol_table_index().
899         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
900         private method.
901         (build_known_method_ref): New arg: special.  Pass it to
902         get_symbol_table_index.
903         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
904         the method list.
905         (build_invokevirtual): New arg: special.  Pass it to
906         get_symbol_table_index.
907         (expand_invoke): New variable: special.
908         Pass it to maybe_rewrite_invocation().
909         Pass it to build_known_method_ref().
910         * class.c (build_symbol_entry): Add new arg: special.  Use it to
911         build the symbol table conbstructor.
912         (emit_symbol_table): Extract SPECIAL from the method list and pass
913         it to build_symbol_entry().
914         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
915         special accordingly.
916
917 2006-06-06  David Daney  <ddaney@avtrex.com>
918
919         * gcj.texi (libgcj Runtime Properties): Document
920         gnu.gcj.runtime.NameFinder.show_raw and
921         gnu.gcj.runtime.NameFinder.remove_unknown.
922
923 2006-06-06  Tom Tromey  <tromey@redhat.com>
924
925         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
926         synthetic, enum, annotation.
927         * jcf.h (ACC_BRIDGE): New macro.
928         (ACC_VARARGS): Likewise.
929         (ACC_SYNTHETIC): Likewise.
930         (ACC_ENUM): Likewise.
931         (ACC_ANNOTATION): Likewise.
932
933 2006-06-06  Mike Stump  <mrs@apple.com>
934
935         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
936         installing during build.
937
938 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
939
940         * gcj.texi (Extensions): Document the new gcj-dbtool-based
941         classname-to-library resolution mechanism.
942         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
943         mechanism deprecated.
944         (libgcj Runtime Properties): Document
945         gnu.gcj.runtime.VMClassLoader.library_control's new default.
946
947 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
948
949         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
950         bit wide type.
951         (jword): Define to uint64 on 64-bit arches.
952         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
953
954 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
955
956         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
957         typos.
958
959 2006-05-26  Tom Tromey  <tromey@redhat.com>
960
961         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
962         * verify-glue.c (vfy_class_type): New function.
963         * verify-impl.c (check_constant): Allow 'ldc class'.
964         * verify.h (vfy_class_type): Declare.
965
966 2006-05-25  Andrew Haley  <aph@redhat.com>
967
968         PR java/27756
969         * decl.c (maybe_pushlevels): When variable ranges are non-nested
970         update all lifetimes, not just the first one.
971
972 2006-05-24  Tom Tromey  <tromey@redhat.com>
973
974         * java-tree.h: Fixed flag documentation.
975
976 2006-05-24  Tom Tromey  <tromey@redhat.com>
977
978         PR libgcj/27729:
979         * jcf.h (ACC_INVISIBLE): Changed value.
980
981 2006-05-24  Andrew Haley  <aph@redhat.com>
982
983         PR java/27754
984         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
985         COMPOUND_EXPR.
986
987 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
988
989         * lang.opt (femit-class-file): Remove VarExists.
990
991 2006-05-16  Tom Tromey  <tromey@redhat.com>
992
993         * verify-impl.c (verify_instructions_0) <op_return>: Special case
994         for Object.<init>.
995
996 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
997
998         PR driver/26885
999         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1000         $(GCC_OBJS).
1001
1002 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1003
1004         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1005         (java/expr.o): Replace target.h with $(TARGET_H).
1006         (java/parse.o): Likewise.
1007
1008 2006-05-10  Andrew Haley  <aph@redhat.com>
1009
1010         * class.c (emit_indirect_register_classes): Fix comment.
1011
1012 2006-05-04  Tom Tromey  <tromey@redhat.com>
1013
1014         * java-tree.h (uses_jv_markobj_p): Declare.
1015         * class.c (uses_jv_markobj_p): Removed.
1016         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1017         (get_boehm_type_descriptor): Use it.
1018         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1019
1020 2006-05-04  Tom Tromey  <tromey@redhat.com>
1021
1022         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1023
1024 2006-05-04  Andrew Haley  <aph@redhat.com>
1025
1026         * class.c (make_field_value): Always build_address_of fdecl if
1027         there is an initializer.
1028
1029 2006-05-03  Andrew Haley  <aph@redhat.com>
1030
1031         PR libgcj/27352
1032         * expr.c (maybe_rewrite_invocation): New function.
1033         (rewrite_arglist_getclass): Likewise.
1034         (rules): New.
1035         (expand_invoke): Call maybe_rewrite_invocation.
1036         * parse.y (patch_invoke): Likewise.
1037         * java-tree.h: (maybe_rewrite_invocation): New function.
1038
1039 2006-04-21  Andrew Haley  <aph@redhat.com>
1040
1041         * lang.c (java_init): Handle flag_indirect_classes.
1042         * jvgenmain.c: Use "class$$" instead of "class$".
1043         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1044         DECLs.
1045         (mangle_class_field): Special case "class$$" as well as "class$".
1046         * constants.c (build_ref_from_constant_pool): If
1047         flag_indirect_classes, generate a ref into the heap.
1048         * decl.c (constants_field_decl_node,
1049         constants_data_field_decl_node): New.
1050         * class.c (build_static_class_ref): New.
1051         (build_classdollar_field): Factor out from build_class_ref().
1052         (make_field_value): Handle static fields in heap.
1053         (make_class_data): Make sure we get a static ref to class.
1054         Make class initializer const if flag_indirect_classes.
1055         (register_class): Build a class_ref for initialization if
1056         flag_indirect_classes.
1057         (emit_indirect_register_classes): New.
1058
1059 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1060
1061         * expr.c, gjavah.c: Fix comment typos.
1062
1063 2006-04-03  Andrew Haley  <aph@redhat.com>
1064
1065         PR java/26858
1066         * expr.c (build_field_ref): Don't check the field offset if
1067         flag_syntax_only.
1068
1069 2006-03-30  Andrew Haley  <aph@redhat.com>
1070
1071         PR java/26858
1072         * lang.c (java_attribute_table): New.
1073         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1074         * expr.c (build_field_ref): Add a null pointer check for all
1075         fields of offset > 4k.  Don't do so for accesses via the this
1076         pointer, which we know can never be null.
1077         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1078         methods nonnull.
1079
1080 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1081
1082         * Make-lang.in: Rename docdir to gcc_docdir.
1083
1084 2006-03-30  Tom Tromey  <tromey@redhat.com>
1085
1086         PR java/26042:
1087         * parse.y (java_reorder_fields): Reset superclass field's size as
1088         well.
1089
1090 2006-03-28  Tom Tromey  <tromey@redhat.com>
1091
1092         PR java/26390:
1093         * parse.y (find_most_specific_methods_list): Added 'class'
1094         argument.
1095         (lookup_method_invoke): Updated.
1096
1097 2006-03-15  Tom Tromey  <tromey@redhat.com>
1098
1099         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1100         non-static method calls.
1101
1102 2006-03-15  David Daney  <ddaney@avtrex.com>
1103
1104         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1105         declaration.
1106
1107 2006-03-15  David Daney  <ddaney@avtrex.com>
1108
1109         * lang.opt (-freduced-reflection): New option.
1110         * lang.c (java_post_options): Generate an error if
1111         -freduced-reflection used with -fjni or -findirect-dispatch.
1112         * java-tree.h (flag_reduced_reflection): Declare new variable.
1113         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1114         if bitmap overflows and flag_reduced_reflection set.
1115         * class.c (uses_jv_markobj_p): New function.
1116         (make_class_data): Moved generation of vtable to before
1117         reflection data, generate less reflection data if
1118         flag_reduced_reflection set.
1119         * gcj.texi: Document -freduced-reflection.
1120
1121 2006-03-15  Tom Tromey  <tromey@redhat.com>
1122
1123         PR java/26638:
1124         * class.c (get_interface_method_index): Don't put <clinit> into
1125         interface table.
1126
1127 2006-03-15  Tom Tromey  <tromey@redhat.com>
1128
1129         * parse.y (analyze_clinit_body): Ignore empty statements.
1130
1131 2006-03-08  David Daney  <ddaney@avtrex.com>
1132
1133         * gcj.texi: Document -static-libgcj option.
1134
1135 2006-02-20  Andrew Haley  <aph@redhat.com>
1136
1137         * jcf-parse.c (parse_class_file): Set input_location from
1138         current_class.
1139
1140 2006-02-15  Andrew Haley  <aph@redhat.com>
1141
1142         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1143         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1144         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1145
1146 2006-02-09  Andrew Haley  <aph@redhat.com>
1147
1148         PR java/26192
1149         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1150         in their superclass.
1151
1152         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1153         array types.
1154         
1155 2006-02-08  Tom Tromey  <tromey@redhat.com>
1156
1157         PR java/22578:
1158         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1159         * builtins.c (convert_real): New function.
1160         (java_builtins): Handle Float.intBitsToFloat,
1161         Float.floatToRawIntBits, Double.longBitsToDouble,
1162         Double.doubleToRawLongBits.
1163
1164 2006-02-07  Andrew Haley  <aph@redhat.com>
1165
1166         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1167         class other than the one in which we expected to find it, ignore
1168         the result.
1169
1170         PR java/25535
1171         * constants.c (build_constants_constructor): move initializer into
1172         first halfword on a 64-bit big-endian machine.
1173
1174 2006-02-04  Tom Tromey  <tromey@redhat.com>
1175
1176         PR java/25676:
1177         * builtins.c (max_builtin): Skip floating point 'max'.
1178         (min_builtin): Skip floating point 'min'.
1179         (check_for_builtin): Never return NULL_TREE.
1180
1181 2006-02-04  Tom Tromey  <tromey@redhat.com>
1182
1183         PR java/26097:
1184         * expr.c (push_type): Avoid side effect in gcc_assert.
1185
1186 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1187
1188         * decl.c (java_init_decl_processing): Create char_type_node as a
1189         regular INTEGER_TYPE node.
1190         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1191         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1192         test for char_type_node and promoted_char_type_node as special
1193         instances of INTEGER_TYPE tree codes.
1194         (promote_type,build_java_signature): Likewise.
1195         * jcf-write.c (adjust_typed_op): Likewise.
1196         * mangle.c (mangle_type): Likewise.
1197         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1198         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1199
1200 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1201
1202         * expr.c (java_stack_swap): Revert gcc_assert patch.
1203
1204 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1205
1206         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1207         * typeck.c: Likewise.
1208         * verify-impl.c: Likewise.
1209         * class.c: Likewise.
1210         * decl.c: Likewise.
1211         * jcf-parse.c: Likewise.
1212         * constants.c: Likewise.
1213         * check-init.c: Likewise.
1214         * jcf-write.c: Likewise.
1215         * verify-glue.c: Likewise.
1216         * mangle.c: Likewise.
1217         * expr.c: Likewise.
1218         * lang.c: Likewise.
1219         * boehm.c: Likewise.
1220
1221 2006-02-01  Jan Hubicka  <jh@suse.cz>
1222
1223         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1224         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1225
1226 2006-01-30  Andrew Haley  <aph@redhat.com>
1227
1228         PR java/21428
1229         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1230
1231 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1232
1233         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1234         Update copyright notice dates.
1235
1236 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1237
1238         * jvspec.c (lang_specific_spec_functions): Remove.
1239
1240 2006-01-06  Tom Tromey  <tromey@redhat.com>
1241
1242         * gcj.texi (Arrays): Added more documentation for
1243         JvNewObjectArray.
1244         (Primitive types): Correct information about primitive classes.
1245         (Reference types): New node.
1246         (Index): New node.
1247
1248 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1249
1250         * jcf-parse.c (set_source_filename): Set the decl source location
1251         even when returning early.
1252
1253 2005-12-15  Tom Tromey  <tromey@redhat.com>
1254             Andrew Haley  <aph@redhat.com>
1255
1256         PR java/25429
1257         * parse.y (resolve_expression_name): Don't generate accessor
1258         methods for constant fields.
1259
1260 2005-12-13  Andrew Haley  <aph@redhat.com>
1261
1262         PR java/25366
1263         PR java/25368
1264         * class.c (maybe_layout_super_class): Update current_class before
1265         calling do_resolve_class.
1266
1267 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1268
1269         PR java/25330
1270         * jcf-write.c (write_classfile): Use PID in temporary class
1271         file. Save/restore errno when reporting error.
1272
1273 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1274
1275         PR java/9861
1276         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1277         to bare_function_type and including the return type
1278         * builtins.c (initialize_builtins) : Change builtin mangled name
1279         constants to conform to new mangling scheme
1280
1281 2005-12-08  Andrew Haley  <aph@redhat.com>
1282
1283         PR libgcj/25265
1284         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1285         (soft_abstractmethod_node): New.
1286         * expr.c (build_field_ref): Add in-line check for missing field.
1287         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1288
1289 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1290
1291         * Make-lang.in (java.all.build, java.install-normal): Remove.
1292
1293 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1294
1295         * Make-lang.in: Remove all dependencies on s-gtype, except for
1296         gt-java-parse.h.
1297
1298 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1299
1300         * class.c (build_utf8_ref, emit_register_classes): Use
1301         switch_to_section and get_section.
1302
1303 2005-12-06  Tom Tromey  <tromey@redhat.com>
1304
1305         PR java/25283:
1306         * parse.y (patch_new_array_init): Revert previous patch.
1307         (lookup_method_invoke): Use size-less array type when creating an
1308         anonymous constructor.
1309
1310 2005-12-05  Tom Tromey  <tromey@redhat.com>
1311
1312         * parse.y (patch_new_array_init): Don't set length on array.
1313
1314 2005-12-02  Richard Guenther  <rguenther@suse.de>
1315
1316         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1317         buildN instead of build.
1318         * class.c (finish_class): Likewise.
1319         * expr.c (java_create_object): Likewise.
1320
1321 2005-11-28  Tom Tromey  <tromey@redhat.com>
1322
1323         PR java/18278:
1324         * expr.c (build_jni_stub): Unwrap the return value.
1325         * java-tree.h (soft_unwrapjni_node): New define.
1326         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1327         * decl.c (java_init_decl_processing): Initialize
1328         soft_unwrapjni_node.
1329
1330 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1331
1332         * gcj.texi (gij options): Add -Xss documentation.
1333
1334 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1335
1336         PR java/23617
1337         * zextract.c (read_zip_archive): Fix out of memory error when
1338         reading jar files with zip-style comments.
1339
1340 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1341
1342         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1343         formats.
1344         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1345
1346 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1347             Wil Mahan <wmahan@gmail.com>
1348
1349         PR java/23620
1350         * class.c (make_class): Create empty binfo here.
1351         (set_super_info): Only create binfo if we have superclasses.
1352
1353 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1354
1355         PR java/24127
1356         * parse.y (method_header): Make the result of the rule a NULL_TREE
1357         when a parsing error occurs.
1358
1359 2005-09-29  Tom Tromey  <tromey@redhat.com>
1360
1361         PR java/24120:
1362         * jcf-io.c (memoized_dirlist_hash): New function.
1363         (caching_stat): Use it.
1364
1365 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1366
1367         PR java/21418
1368         * class.c (inherits_from_p): Try to lay out super class
1369         if it is not already laid out.
1370         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1371         is a NULL_TREE.
1372
1373 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1374
1375         * builtins.c (max_builtin, min_builtin, abs_builtin,
1376         java_build_function_call_expr): Use fold_buildN.
1377         * class.c (layout_class_method): Likewise.
1378         * expr.c (java_truthvalue_conversion, build_java_jsr,
1379         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1380         build_java_binop, build_field_ref, expand_compare,
1381         build_known_method_ref, build_invokevirtual,
1382         process_jvm_instruction): Likewise.
1383         * parse.y (patch_binop, patch_exit_expr): Likewise.
1384         * typeck.c (convert_ieee_real_to_integer): Likewise.
1385         (convert): Don't call fold after convert_ieee_real_to_integer.
1386
1387 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1388
1389         PR java/23891
1390         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1391         the newly created type. Set import lists here, not in create_class.
1392         (jdep_resolve_class): Set current_class.
1393         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1394         the current package context, not ctxp->package.
1395         (cicp_cache): Removed.
1396         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1397         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1398         * java-tree.h (TYPE_PACKAGE): New macro.
1399         (struct lang_type): New member 'package'.
1400
1401 2005-09-09  Andrew Haley  <aph@redhat.com>
1402
1403         PR libgcj/23182 
1404         * expr.c (pop_type_0): If the expected type is object or ptr
1405         (i.e. void*), return the type of the object we just popped from
1406         the stack.
1407
1408 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1409
1410         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1411         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1412
1413 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1414
1415         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1416         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1417         typos.  Follow spelling conventions.
1418
1419 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1420
1421         PR java/23431
1422         * typeck.c (lookup_do): Look up interfaces for the original class,
1423         not the base class.
1424         * parse.y (java_check_regular_methods): Fix diagnostic message for
1425         more restrictive overriding of a method from an interface.
1426
1427 2005-08-16  Tom Tromey  <tromey@redhat.com>
1428
1429         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1430         class' initial state.
1431
1432 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1433
1434         PR java/22113
1435         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1436         `literal_token' for large numeric input tokens.
1437
1438 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1439
1440         PR java/19870
1441         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1442         and expand to handle method accesses across nested classes.
1443         (build_outer_method_access_method): Rename to
1444         build_nested_method_access_method.  Minor adjustments to comments.
1445         (resolve_expression_name): Use the newly-renamed
1446         nested_member_access_p method.
1447         (resolve_qualified_expression_name): Likewise.
1448         (patch_method_invocation): Also consider static methods for access
1449         method generation.  Minor adjustments to comments.
1450         (maybe_use_access_method): Use the more general
1451         nested_memeber_access_p to determine access across nested class
1452         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1453
1454 2005-08-15  Tom Tromey  <tromey@redhat.com>
1455
1456         PR java/23300.
1457         * expr.c (build_field_ref): Don't generate otable reference when
1458         DECL_FIELD_OFFSET is 0.
1459         * class.c (maybe_layout_super_class): Pass outer class to
1460         do_resolve_class.
1461
1462 2005-08-15  Tom Tromey  <tromey@redhat.com>
1463
1464         * java-tree.h (LABEL_IN_SUBR): Removed.
1465         (LABEL_IN_SUBR): Likewise.
1466         (LABEL_IS_SUBR_START): Likewise.
1467         (LABEL_SUBR_START): Likewise.
1468         (LABEL_SUBR_CONTEXT): Likewise.
1469         (LABEL_CHANGED): Likewise.
1470         (LABEL_RETURN_LABEL): Likewise.
1471         (LABEL_RETURN_TYPE_STATE): Likewise.
1472         (LABEL_RETURN_LABELS): Likewise.
1473         (RETURN_MAP_ADJUSTED): Likewise.
1474         (LABEL_PENDING_CHAIN): Likewise.
1475
1476 2005-08-15  Tom Tromey  <tromey@redhat.com>
1477
1478         * Make-lang.in (JAVA_OBJS): Removed verify.o
1479         (java/verify.o): Removed.
1480         * verify.c: Removed.
1481         * lang.c (flag_new_verifier): Removed.
1482         (java_post_options): Updated.
1483         * java-tree.h (flag_new_verifier): Removed.
1484         (verify_jvm_instructions): Removed.
1485         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1486         (build_java_check_indexed_type): Likewise.
1487         (expand_java_arraystore): Likewise.
1488         (expand_java_arrayload): Likewise.
1489         (pop_arguments): Likewise.
1490         (expand_byte_code): Likewise.
1491         (process_jvm_instruction): Likewise.
1492
1493 2005-08-10  Andrew Haley  <aph@redhat.com>
1494
1495         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1496         type mismatches to make legal GIMPLE.
1497
1498 2005-08-10  Robin Green <greenrd@greenrd.org>
1499
1500         PR java/23230:
1501         * parse.y (maybe_use_access_method): Generalize check from
1502         java.lang.Object to any superclass of current_class
1503
1504 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1505
1506         * class.c (build_class_ref): Wrap the primary class type in a
1507         NOP_EXPR.
1508         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1509         primary class type from the NOP_EXPR in which it was placed.
1510
1511 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1512
1513         * expr.c (expand_load_internal): Fix missing parens in
1514         predicate.
1515
1516 2005-07-28  Andrew Haley  <aph@redhat.com>
1517
1518         * expr.c (expand_load_internal): Convert to destination type.
1519
1520 2005-07-22  Manfred Hollstein  <mh@suse.com>
1521
1522         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1523         (check_constant): Likewise.
1524         (check_wide_constant): Likewise.
1525
1526 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1527
1528         Make CONSTRUCTOR use VEC to store initializers.
1529         * check-init.c (check_init): Update to cope with VEC in
1530         CONSTRUCTOR_ELTS.
1531         * class.c (make_field_value, make_method_value, get_dispatch_table,
1532         make_class_data, emit_symbol_table, emit_catch_table,
1533         emit_assertion_table): Use build_constructor_from_list instead of
1534         build_constructor.
1535         * constants.c (build_constants_constructor): Likewise.
1536         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1537         VEC in CONSTRUCTOR_ELTS.
1538         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1539         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1540         of a TREE_LIST.
1541         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1542         CONSTRUCTOR_ELTS.
1543         * parse.y (build_new_array_init): Use build_constructor_from_list
1544         instead of build_constructor.
1545         (patch_new_array_init): Update to cope with VEC in
1546         CONSTRUCTOR_ELTS.
1547         (array_constructor_check_entry): Likewise.
1548
1549 2005-07-12  Tom Tromey  <tromey@redhat.com>
1550
1551         * jvspec.c (lang_specific_driver): Put filelist_filename first on
1552         command line.
1553
1554 2005-07-12  Tom Tromey  <tromey@redhat.com>
1555
1556         PR java/19674:
1557         * parse-scan.y (interface_member_declaration): Added
1558         empty_statement.
1559
1560 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1561         
1562         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1563         (LABEL_PENDING_CHAIN): Ditto.
1564         (LABEL_PC): Ditto.
1565         (DECL_BIT_INDEX): Ditto.        
1566
1567 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1568
1569         PR java/18119
1570         * parse.y (inner_class_accessible): New function. Logic moved from
1571         check_inner_class_access.
1572         (check_inner_class_access): Use inner_class_accessible.
1573         (resolve_inner_class): Simplify arguments. Create circularity hash
1574         here. Keep looking for classes if we found one that was inaccessible. 
1575         Return the inaccessible class only if there is no other match.
1576         (do_resolve_class): Update for new resolve_inner_class arguments.
1577         Don't create circularity_hash here.
1578
1579 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1580
1581         PR java/21045
1582         * parse.y (add_exception_to_throws): New function.
1583         (purge_unchecked_exceptions): Removed.
1584         (get_constructor_super): Renamed from verify_constructor_super. Now
1585         returns the super constructor after verification.
1586         (java_complete_expand_method): Don't use purge_unchecked_exceptions
1587         or save/restore the exception list.
1588         (check_thrown_exceptions): Add uncaught exceptions in anonymous
1589         class initializers and constructors to the throws clause of the method. 
1590
1591 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
1592
1593         PR java/19674
1594         * parse.y (interface_member_declaration): Allow empty statements in
1595         interface declarations.
1596
1597 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
1598
1599         * Makefile.in (parse.o): Adjust dependencies.
1600         * parse.y: Include tree-dump.h.
1601
1602 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1603
1604         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
1605         flag for quoting.
1606
1607 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
1608
1609         * parse.y (issue_warning_error_from_context): Call
1610         pp_output_formatted_text to be able to get the buffer.
1611
1612 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
1613
1614         * parse.y (issue_warning_error_from_context): Update for the
1615         renaming of pp_format_text to pp_format.
1616
1617 2005-06-28  Paul Brook  <paul@codesourcery.com>
1618
1619         * decl.c (java_init_decl_processing): Call
1620         default_init_unwind_resume_libfunc.
1621
1622 2005-06-27  Tom Tromey  <tromey@redhat.com>
1623
1624         PR java/21540, PR java/13788:
1625         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1626         fold_constant_for_init.
1627         (patch_binop): Added 'folding' argument.  Updated all callers.
1628         (patch_unaryop) <NOP_EXPR>: New case.
1629         (fold_constant_for_init) <NOP_EXPR>: Likewise.
1630         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1631
1632 2005-06-25  Jan Hubicka  <jh@suse.cz>
1633
1634         * builtins.c (define_builtin): Accept new flags parameter.
1635         (initialize_builtins): Mark the builtins const and nothrow accordingly.
1636
1637 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1638
1639         * all files: Update FSF address in copyright headers.
1640
1641 2005-06-24  Tom Tromey  <tromey@redhat.com>
1642
1643         * verify-impl.c (verify_instructions_0): Correctly handle
1644         situation where PC falls off end.
1645
1646 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1647
1648         PR java/20697
1649         * parse.y (find_most_specific_methods_list): Remove special case for
1650         inner classes.
1651
1652 2005-06-15  Tom Tromey  <tromey@redhat.com>
1653
1654         PR libgcj/21906:
1655         * class.c (make_method_value): Use soft_abstractmethod_node for
1656         abstract method.
1657         * java-tree.h (soft_abstractmethod_node): New define.
1658         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1659         * decl.c (java_init_decl_processing): Initialize
1660         soft_abstractmethod_node.
1661
1662 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1663
1664         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1665
1666 2005-06-13  Per Bothner  <per@bothner.com>
1667
1668         * expr.c (int highest_label_pc_this_method,
1669         start_label_pc_this_method): New globals.
1670         (lookup_label): Add start_label_pc_this_method to pc for label, and
1671         update highest_label_pc_this_method.  This prevents conflicts between
1672         labels from different methods.
1673         * java-tree.h: Declare new globals.
1674         * jcf-parse.c (parse_class_file): If needed bump
1675         start_label_pc_this_method and reset highest_label_pc_this_method.
1676
1677 2005-06-13  Tom Tromey  <tromey@redhat.com>
1678
1679         PR java/21844:
1680         * parse.y (nested_field_access_p): Handle case where outer field
1681         is inherited by enclosing class.
1682
1683 2005-06-12  Per Bothner  <per@bothner.com>
1684
1685         * class.c (inherits_from_p): Do load_class if needed.
1686
1687 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1688
1689         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1690         * java-tree.h (parse_error_context): Move...
1691         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1692         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1693         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1694
1695 2005-06-08  Roger Sayle  <roger@eyesopen.com>
1696
1697         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1698
1699 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
1700
1701         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1702         msgid for argument name.
1703         * gjavah.c (error): Likewise.
1704         * java-tree.h (parse_error_context): Likewise.
1705         * parse.y (parse_error_context, parse_warning_context,
1706         issue_warning_error_from_context): Likewise.
1707
1708 2005-06-01  Tom Tromey  <tromey@redhat.com>
1709
1710         PR java/21722:
1711         * class.c (build_static_field_ref): Don't fold constant fields if
1712         current class is from a .class file and we're using indirect
1713         dispatch.
1714
1715 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1716
1717         * java/verify-glue.c: Don't include errors.h and include toplev.h.
1718         * java/Make-lang.in: Updates dependencies.
1719
1720 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
1721
1722         PR java/19870.
1723         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1724         NESTED_FIELD_ACCESS_IDENTIFIER_P.
1725         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
1726         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
1727         * jcf-write.c (generate_classfile): Use
1728         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1729         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1730         * parse.y (build_outer_field_access): Rename to
1731         build_nested_field_access. Support static fields and outer-to-inner
1732         class accesses.
1733         (outer_field_access_p): Rename to nested_field_access_p. Support
1734         static fields and generalise to outer-to-inner class and sibling
1735         inner class accesses.
1736         (outer_field_expanded_access_p): Rename to
1737         nested_field_expanded_access_p and support static fields.
1738         (outer_field_access_fix): Rename to nested_field_access_fix and
1739         support static fields.
1740         (build_outer_field_access_expr): Rename to
1741         build_nested_field_access_expr and support static fields.
1742         (build_outer_field_access_methods): Rename to
1743         build_nested_field_access_methods and support static fields. For
1744         static fields, generate accessors without class instance parameters.
1745         (build_outer_field_access_method): Rename to
1746         build_nested_field_access_method and support static fields.
1747         (build_outer_method_access_method): Use
1748         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1749         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1750         (resolve_expression_name): Consider static field accesses across
1751         nested classes.
1752         (resolve_qualified_expression_name): Likewise.
1753         (java_complete_lhs): Use nested_field_access_fix instead of
1754         outer_field_access_fix.
1755         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
1756         Use nested_field_expanded_access_p instead of
1757         outer_field_expanded_access_p. Use nested_field_access_fix instead
1758         of outer_field_access_fix.
1759         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
1760         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
1761
1762 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1763
1764         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
1765         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
1766         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
1767         MINOR_BINARYCOMPAT_ABI_VERSION): New.
1768         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
1769         (parse_version): Calculate version ID using new method. Use bit-flags
1770         for flag_indirect_dispatch and flag_bootstrap_classes.
1771
1772 2005-05-25  Richard Henderson  <rth@redhat.com>
1773
1774         PR libgcj/21692
1775         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
1776         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
1777         DECL_CONTEXT; avoid pushdecl_top_level.
1778         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
1779         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
1780         (layout_class_method): Likewise.
1781         * decl.c (java_mark_cni_decl_local): New.
1782         (java_mark_class_local): Use it.
1783         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1784         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1785         (struct lang_decl_func): Add local_cni;
1786         (struct lang_decl_var): Add class_field, vtable.
1787         (java_mangle_decl): Declare.
1788         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1789         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1790         (mangle_obstack_1): New.
1791         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
1792         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
1793         lhd_set_decl_assembler_name for things that don't need mangling.
1794         (mangle_class_field): Rename from java_mangle_class_field, make
1795         static, don't call init_mangling or finish_mangling.
1796         (mangle_vtable): Similarly.
1797         (mangle_local_cni_method_decl): New.
1798         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
1799         gcc_assert, and MANGLE_RAW_STRING.
1800         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1801
1802 2005-05-25  DJ Delorie  <dj@redhat.com>
1803
1804         * class.c (set_constant_value): Move warning control from if() to
1805         warning(OPT_*).
1806
1807 2005-05-24  Richard Henderson  <rth@redhat.com>
1808
1809         * builtins.c (define_builtin): Don't call make_decl_rtl.
1810         * constants.c (build_constant_data_ref): Likewise.
1811         * class.c (build_utf8_ref): Likewise.
1812         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1813         (get_dispatch_table, layout_class_method): Likewise.
1814         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1815         by hand.
1816         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1817         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1818         to determine if we need a non-zero address.
1819         * decl.c (builtin_function): Don't call make_decl_rtl.
1820         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1821         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1822         * resource.c (compile_resource_data): Likewise.
1823         * parse.y (resolve_field_access): Re-word comment to avoid
1824         building DECL_RTL.
1825
1826 2005-05-24  Richard Henderson  <rth@redhat.com>
1827
1828         * class.c (registered_class): Take it out of class_roots; turn into
1829         a vec of trees.
1830         (register_class): Make static.  Don't duplicate decl node.  Use
1831         VEC_safe_push.
1832         (emit_register_classes): Use VEC_iterate.  Use output_constant
1833         instead of assemble_integer.  Don't call mark_decl_referenced
1834         directly.
1835         * java-tree.h (register_class): Remove decl.
1836
1837 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
1838
1839         PR java/17845
1840
1841         * parse.y (register_package, package_list): Remove.
1842         (package_declaration): Do not call register_package.
1843         (do_resolve_class): Do not use package_list.
1844
1845 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
1846
1847         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
1848         unused variable.
1849
1850 2005-05-15  Tom Tromey  <tromey@redhat.com>
1851
1852         PR java/21519:
1853         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
1854         NOTE_PUSH.
1855
1856 2005-05-12  Aaron Luchko <aluchko@redhat.com>
1857
1858         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
1859
1860 2005-05-11  Tom Tromey  <tromey@redhat.com>
1861
1862         * gcj.texi (Code Generation): Document -fbootstrap-classes.
1863         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
1864         (parse_version): Use it.
1865         * lang.opt (-fbootstrap-classes): New option.
1866
1867 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
1868
1869         PR java/21436
1870         * class.c (maybe_layout_super_class): Look for imports in this_class.
1871         * parse.h (ctxp_for_generation_last): New.
1872         (do_resolve_class): Add a parameter.
1873         * parse.y (ctxp_for_generation_last): New.
1874         (java_pop_parser_context): Add at end of list.
1875         (find_in_imports, find_in_imports_on_demand): Look in ctxp
1876         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
1877         the given type are NULL.
1878         (do_resolve_class): Look into the imports of the new second parameter.
1879         Adjust recursive calls.
1880         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
1881         calls to do_resolve_class.
1882         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
1883         (java_complete_class): Do not do that here.
1884
1885 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
1886
1887         PR java/20309
1888         * Make-lang.in (java): Add gjnih.
1889         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1890         (GJNIH_OBJS): New variable.
1891         (gjnih$(exeext)): New target.
1892         (JAVA_MANFILES): Add gjnih.1.
1893         (java.uninstall): Add gjnih.1.
1894         (java.mostlyclean): Add gjnih.
1895         (java.maintainer-clean): Add gjnih.1.
1896         (java/gjavah-jni.o): New target.
1897         (.INTERMEDIATE): Add gjnih.pod.
1898         (gjnih.pod): New target.
1899         * config-lang.in (stagestuff): Add gjnih.
1900         * gcj.texi (Top): Add gjnih node.
1901         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
1902         -bootclasspath options.
1903         (Invoking gjnih): New node.
1904         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
1905         (TOOLNAME): New macro.
1906         (error): Replace hard-coded gcjh with TOOLNAME.
1907         (process_file): Likewise.
1908         (usage): Likewise.
1909         (version): Likewise.
1910         (help): Likewise.  Add help output for -force, -old, -trace and -J
1911         options.
1912         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
1913         (options): Add force, old, trace and J fields.
1914         (main): Handle -force, -old, -trace and -J options.
1915
1916 2005-05-03  Tom Tromey  <tromey@redhat.com>
1917
1918         PR java/21245:
1919         * gjavah.c (main): Unlink output file on error.
1920
1921 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1922
1923         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
1924         copyright.
1925
1926 2005-04-29  Tom Tromey  <tromey@redhat.com>
1927
1928         * expr.c (build_jni_stub): Updated for change to build_block.
1929
1930 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
1931
1932         * expr.c (force_evaluation_order): Declare 'saved' earlier.
1933
1934 2005-04-28  Andrew Haley  <aph@redhat.com>
1935
1936         PR java/19285
1937         * java-tree.h (soft_resolvepoolentry_node): New.
1938         (alloc_constant_fieldref): Declare.
1939         * expr.c (expand_java_field_op): Don't call class_init for
1940         accesses to static fields with indirect dispatch.
1941         * builtins.c (initialize_builtins): Add "__builtin_expect".
1942         * decl.c (soft_resolvepoolentry_node): New variable.
1943         (java_init_decl_processing): Create a decl for
1944         "_Jv_ResolvePoolEntry".
1945         * class.c (build_fieldref_cache_entry): New function.
1946         (build_static_field_ref): Rewrite for indirect dispatch.
1947         * constants.c (find_name_and_type_constant_tree): New function.
1948         (alloc_constant_fieldref): Likewise.
1949         (build_constants_constructor): Handle CONSTANT_Fieldref and
1950         CONSTANT_NameAndType.
1951
1952         PR java/21115
1953         * expr.c (force_evaluation_order): Convert outgoing args smaller
1954         than integer.
1955
1956 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
1957
1958         * gcj.texi (libgcj Runtime Properties): Remove obsolete
1959         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
1960         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
1961
1962 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1963
1964         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
1965         to `unlock_stream' with `unlock_std_streams'.
1966
1967 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
1968
1969         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
1970         instead of just expr.h.
1971
1972 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1973
1974         * gjavah.c (main): Unlock the stdio streams.
1975         * jcf-dump.c (main): Likewise.
1976         * jv-scan.c (main): Likewise.
1977         * jvgenmain.c (main): Likewise.
1978
1979 2005-04-23  DJ Delorie  <dj@redhat.com>
1980
1981         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1982         parse.y: Adjust warning() callers.
1983
1984 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
1985
1986         * gcj.texi (Object fields): Change "Integer" to "Int" in example
1987         contructor.
1988
1989 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1990
1991         * gcj.texi: Fix typos and bogus example.
1992
1993 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
1994
1995         * except.c: Fix a comment typo.
1996
1997 2005-04-19  Julian Brown  <julian@codesourcery.com>
1998
1999         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2000         indirect dispatch with PIC.
2001
2002 2005-04-18  Andrew Haley  <aph@redhat.com>
2003
2004         * java-except.h (struct eh_range.handler): Remove unused field.
2005         (handle_nested_ranges): Remove function declaration.
2006         (sanity_check_exception_range): Add function declaration.       
2007         * verify.c (verify_jvm_instructions): Remove call to
2008         handle_nested_ranges.
2009         * verify-glue.c (verify_jvm_instructions_new): Call
2010         sanity_check_exception_range.
2011         * except.c (link_handler, eh_range_freelist, link_handler,
2012         handle_nested_ranges): Remove.
2013         (add_handler): Rewrite.
2014         (sanity_check_exception_range): New function.
2015         (print_ranges): New function.
2016
2017 2005-04-13  Julian Brown  <julian@codesourcery.com>
2018
2019         * decl.c (finish_method): Give methods once-only linkage.
2020
2021 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2022
2023         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2024
2025 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2026
2027         * java-tree.h: Don't use PARAMS().
2028
2029 2005-04-07  Per Bothner  <per@bothner.com>
2030
2031         * class.c (push_class): By default, suppress debug output.
2032         (finish_class): Enable debug output for classes we're emitting.
2033
2034 2005-04-07  Andrew Haley  <aph@redhat.com>
2035
2036         * gcj.texi: Correct gcj-dbtool instructions.
2037
2038 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2039
2040         * gcj.texi: Fix a typo.
2041         * lang.c: Fix a comment typo.
2042
2043 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2044
2045         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2046         Mention recognized-and-ignored compatibility options.
2047         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2048         JvFree.
2049         (About CNI): Add Memory allocation section.
2050
2051 2005-04-01  Tom Tromey  <tromey@redhat.com>
2052
2053         * decl.c (java_init_decl_processing): Fix types of
2054         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2055         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2056         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2057
2058 2005-03-31  Jan Hubicka  <jh@suse.cz>
2059
2060         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2061         * class.c: Include cgraph.h
2062         (make_local_functoin_alias): Mark aslias as needed.
2063         * resource.c: Include cgraph.h
2064         (compile_resource_data): Go via cgraph interface.
2065
2066 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2067
2068         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2069
2070 2005-03-30  Tom Tromey  <tromey@redhat.com>
2071
2072         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2073         inner_class_info_index==0 or outer_class_info_index==0.
2074
2075 2005-03-29  Tom Tromey  <tromey@redhat.com>
2076
2077         * gcj.texi (libgcj Runtime Properties): Document
2078         gnu.gcj.runtime.endorsed.dirs.
2079
2080 2005-03-24  Anthony Green  <green@redhat.com>
2081
2082         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2083         'gcj-dbtool -p'.
2084
2085 2005-03-23  Tom Tromey  <tromey@redhat.com>
2086
2087         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2088         (parse_version): Use it.
2089
2090 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2091
2092         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2093
2094 2005-03-18  Andrew Haley  <aph@redhat.com>
2095
2096         PR java/20522
2097         * decl.c (update_aliases): Don't update variables that are about
2098         to die.
2099         (maybe_poplevels): Add comment.
2100
2101 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2102
2103         PR java/20502
2104         * jcf-parse.c (duplicate_class_warning): New function.
2105         (java_parse_file): Call duplicate_class_warning if 
2106         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2107         (parse_zip_file_entries): Likewise. Also set
2108         CLASS_FROM_CURRENTLY_COMPILED_P.
2109
2110 2005-03-16  Andrew Haley  <aph@redhat.com>
2111
2112         * expr.c (expand_java_arrayload): Don't generate a
2113         NullPointerException based on the type of the node.
2114         (build_java_array_length_access): Likewise.
2115
2116 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2117
2118         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2119
2120 2005-03-11  Tom Tromey  <tromey@redhat.com>
2121
2122         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2123         (libgcj Runtime Properties): Document the default .db.
2124
2125 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2126
2127         PR java/20312
2128         * parse.y (checks_throws_clauses): Check exceptions list even when
2129         the base class does not come from a source file being compiled.
2130         (java_complete_lhs): Remove unused variable 'wfl'.
2131
2132 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2133
2134         PR java/20338
2135         * decl.c (finish_method): Emit _Jv_InitClass for private static
2136         methods inside inner classes as well.
2137
2138 2005-03-08  Julian Brown  <julian@codesourcery.com>
2139         * Revert patch from 2005-03-08 for causing bootstrap failure on
2140         ppc-darwin.
2141
2142 2005-03-08  Julian Brown  <julian@codesourcery.com>
2143
2144         * decl.c (finish_method): Give methods once-only linkage.
2145
2146 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2147
2148         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2149
2150 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2151
2152         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2153         can_widen_reference_to if the C++ ABI is in use.
2154         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2155         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2156         type_isresolved, init_state, set_pc, state_get_pc,
2157         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2158         (verify_fail): Report the current PC from the verifier context.
2159         (free_state): Remove #if 0 block to enable this function.
2160         (free_verifier_context): Call free_state on state_list iterator
2161         values before freeing them.
2162         * expr.c (pop_type_0): Pop correct type for error message when stack
2163         contains a multi-word type.
2164
2165 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2166
2167         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2168         for known NULL array length access.
2169
2170 2005-03-07  Tom Tromey  <tromey@redhat.com>
2171
2172         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2173
2174 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2175
2176         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2177         typeck.c: Update copyright.
2178
2179 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2180
2181         Remove xref code.
2182         * xref.c, xref.h: Remove file.
2183         * Make-lang.in (java/xref.o): Remove.
2184         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2185         * lang.c (flag_emit_xref): Remove definition.
2186         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2187         * typeck.c (convert): Remove use of do_not_fold.
2188         * parse.y (do_not_fold): Remove definition.
2189         (parser grammar): Remove xref code.
2190         (maybe_create_class_interface_decl, create_class): Likewise.
2191         (register_fields, method_header, finish_method_declaration): Likewise.
2192         (declare_local_variables, source_end_java_method): Likewise.
2193         (java_complete_expand_classes): Do not set do_not_fold.
2194         (java_complete_expand_method): Remove xref code.
2195         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2196         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2197         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2198         (patch_synchronized_statement, patch_throw_statement): Likewise.
2199         (maybe_build_class_init_for_field): Likewise.
2200
2201 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2202
2203         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2204         instead of IS_NON_TYPE_CODE_CLASS.
2205
2206 2005-03-04  Andrew Haley  <aph@redhat.com>
2207
2208         PR java/18362
2209         * class.c (set_method_index): Don't set method_index if it is
2210         NULL_TREE.
2211         (layout_class_method): Don't complain about "non-static method foo
2212         overrides static method" in the case of indirect dispatch.
2213
2214 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2215
2216         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2217         warning.
2218         * Make-lang.in: Don't elide warnings in jcf-io.c.
2219
2220 2005-03-01  Per Bothner  <per@bothner.com>
2221
2222         PR java/8608
2223         * check-init.c (wfl): Remove static.
2224         (final_assign_error, check_init): Replace calls to parse_error_context
2225         by plain error.
2226         (check_init): Save, set, and restore input_location for each exp.
2227
2228 2005-03-01  Per Bothner  <per@bothner.com>
2229
2230         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2231         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2232         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2233
2234 2005-03-01  Per Bothner  <per@bothner.com>
2235
2236         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2237
2238 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2239
2240         PR libgcj/16923
2241         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2242         JvVMOption.
2243
2244 2005-02-22  Tom Tromey  <tromey@redhat.com>
2245
2246         PR java/20056:
2247         * verify-impl.c (EITHER): New define.
2248         (types_compatible): Handle it.
2249         (check_field_constant): Use it.
2250
2251 2005-02-18  Tom Tromey  <tromey@redhat.com>
2252
2253         PR java/20056:
2254         * verify-impl.c (types_equal): Fixed test.
2255
2256         PR java/20056:
2257         * verify-glue.c (vfy_class_has_field): New function.
2258         * verify.h (vfy_class_has_field): Declare.
2259         * verify-impl.c (check_field_constant): Added 'putfield'
2260         argument.
2261         (verify_instructions_0): Updated.
2262         (types_equal): New function.
2263
2264 2005-02-14  Tom Tromey  <tromey@redhat.com>
2265
2266         PR java/19921:
2267         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2268         stack effect of multianewarray.
2269
2270 2005-02-14  Andrew Haley  <aph@redhat.com>
2271
2272         PR java/19907
2273         * expr.c (expand_byte_code): Call promote_arguments().
2274         (promote_arguments): New function.
2275         * decl.c (check_local_unnamed_variable): Remove special case for
2276         new verifier.
2277         (find_local_variable): Promote all boolean types to int
2278         when searching for local variable decls.
2279
2280 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2281
2282         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2283         parse-scan.y: Update copyright.
2284
2285 2005-02-11  Per Bothner  <per@bothner.com>
2286
2287         PR java/15543
2288         * parse-scan.y (input_location): Remove variable.
2289         (main_input_filename): New - replaces input_filename, which isn't
2290         settable if USE_MAPPED_LOCATION.
2291         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2292         so we don't reference input_location or wfl_operator in that case.
2293         * jv-scan.c (expand_location): Remove - no longer used.
2294         (main): Set main_input_filename rather than input_filename.
2295
2296 2005-02-09  Richard Henderson  <rth@redhat.com>
2297
2298         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2299         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2300
2301 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2302
2303         * expr.c (add_type_assertion): Use the proper enumeration type,
2304         since this is what htab_find_slot() is expecting.
2305
2306 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2307
2308         * gcj.texi: Update copyright dates.
2309
2310 2005-02-02  Tom Tromey  <tromey@redhat.com>
2311
2312         * gcj.texi (libgcj Runtime Properties): Default library_control
2313         to 'cache'.
2314
2315 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2316
2317         PR java/15543
2318         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2319         (modifiers) when square brackets are present in a declaration for
2320         a final paramter.
2321         * jv-scan.c (main): Set input_filename and input_line.
2322
2323 2005-02-01  Tom Tromey  <tromey@redhat.com>
2324
2325         PR java/19742:
2326         * gjavah.c (get_field_name): Don't override name for JNI header.
2327
2328 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2329
2330         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2331         of unsigned types using iushr and lushr JVM bytecodes.
2332
2333 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2334
2335         PR java/19738
2336         * gjavah.c (jni_print_float): Do not emit floating-point
2337         initialiser for a static final field.
2338         (jni_print_double): Likewise.
2339
2340 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2341
2342         Revert:
2343         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2344         * gjavah.c (print_field_info): Mark static data members of
2345         floating-point type with "__extension__".
2346
2347 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2348
2349         * gjavah.c (print_field_info): Mark static data members of
2350         floating-point type with "__extension__".
2351
2352 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2353
2354         PR java/9157
2355         * parse.y (build_string_concatenation): Remove redundant if.
2356         (patch_conditional_expr): Attempt to patch_string() the condition
2357         of a ?: as well, in addition to its other operands.
2358
2359 2005-01-25  Tom Tromey  <tromey@redhat.com>
2360
2361         * Make-lang.in (java/java-tree-inline.o): Removed.
2362
2363 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2364
2365         PR java/19070
2366         * parse.y (patch_binop): Allow comparisons against NULL only
2367         if the other operand is of a reference type.
2368
2369 2005-01-24  Tom Tromey  <tromey@redhat.com>
2370
2371         * java-tree.h (gcj_abi_version): Declare.
2372         * class.c (make_class_data): Push gcj_abi_version into "next"
2373         field.  Renamed field.
2374         * decl.c (gcj_abi_version): New global.
2375         (parse_version): New function.
2376         (java_init_decl_processing): Call it.  Renamed 'next' field.
2377         Include version.h.
2378         (GCJ_BINARYCOMPAT_ADDITION): New define.
2379
2380 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2381
2382         PR java/19295
2383         * jcf-write.c (generate_bytecode_insns): Conversions between
2384         integer types of the same precision shouldn't generate widening
2385         or narrowing conversion bytecodes.
2386
2387 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2388
2389         * java-except.h, java-tree.h: Remove unused prototypes.
2390
2391 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2392
2393         PR java/18091:
2394         * jcf-write.c (perform_relocations): Don't call memcpy if source
2395         and destination are the same.
2396
2397 2005-01-17  Tom Tromey  <tromey@redhat.com>
2398
2399         * verify-impl.c (get_short): Sign extend.
2400         (get_int): Likewise.
2401
2402 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2403
2404         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2405         with TYPE_SIZE.
2406
2407 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2408
2409         * verify.c: Revert to the version before the BC-ABI merge.
2410
2411 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2412
2413         PR java/19277
2414         * check-init.c (check_init): Take care of references that do not
2415         have an explicit final variable declaration (e.g. array length
2416         access) for pre/post in/de-crement operators.
2417
2418 2005-01-08  Mark Wielaard  <mark@klomp.org>
2419
2420         * parse.y (process_imports): Allocate (and free) original_name only
2421         when not already defined.
2422         * jcf-parse.c (read_class): Free results of find_class() and
2423         lrealpath().
2424         (java_parse_file): Keep pointer to head of file_list and free when
2425         done. Free result of lrealpath().
2426
2427 2005-01-05  Tom Tromey  <tromey@redhat.com>
2428
2429         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2430
2431 2004-12-20  Andrew Haley  <aph@redhat.com>
2432
2433         * typeck.c: Use fold_convert for ints and booleans.
2434
2435 2004-12-17  Andrew Haley  <aph@redhat.com>
2436
2437         PR java/18931
2438         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2439         BOOLEAN_TYPE or CHAR_TYPE.
2440         (convert_to_boolean, convert_to_char) : Remove.
2441         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2442         * expr.c (expand_load_internal): Do type conversion if type is not
2443         as required.
2444
2445 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2446
2447         PR target/18459
2448         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2449         Update comment.
2450
2451 2004-12-07  Andrew Haley  <aph@redhat.com>
2452
2453         PR java/18811:
2454         * jcf-parse.c (load_class): Remove sanity test for missing inner
2455         class file.
2456
2457 2004-12-06  Tom Tromey  <tromey@redhat.com>
2458
2459         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2460         (java.uninstall): Likewise.
2461         (java.maintainer-clean): Likewise.
2462         (.INTERMEDIATE): Likewise.
2463         (java.install-man): Likewise.
2464         (gcj-dbtool.pod): New target.
2465         * gcj.texi (Code Generation): Document -findirect-dispatch.
2466         (libgcj Runtime Properties): Document
2467         gnu.gcj.precompiled.db.path.
2468         (Top): Link to "Invoking gcj-dbtool".
2469
2470 2004-12-06  Tom Tromey  <tromey@redhat.com>
2471
2472         PR java/14853:
2473         * java-tree.h (extract_field_decl): Declare.
2474         * parse.y (extract_field_decl): Renamed from
2475         strip_out_static_field_access_decl.  No longer static.
2476         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2477
2478 2004-12-03  Tom Tromey  <tromey@redhat.com>
2479
2480         * lang.c (flag_new_verifier): Define.
2481         (java_post_options): Set flag_new_verifier if indirect dispatch
2482         is being used.
2483         * lang.opt (fnew-verifier): Removed.
2484
2485 2004-12-03  Tom Tromey  <tromey@redhat.com>
2486
2487         PR bootstrap/14614:
2488         * Make-lang.in (java.install-common): Only install transformed
2489         gcjh if gcj-cross exists.
2490
2491 2004-12-03  Andrew Haley  <aph@redhat.com>
2492
2493         PR java/18812
2494         * except.c (link_handler): Patch 'outer' field of siblings of the
2495         range we're demoting.
2496
2497 2004-12-03  Andrew Haley  <aph@redhat.com>
2498
2499         PR java/18697
2500         * class.c (layout_class_method): Don't fail to override a method
2501         simply because it has DECL_ARTIFICIAL set.
2502
2503 2004-12-02  Tom Tromey  <tromey@redhat.com>
2504
2505         PR java/16675:
2506         * parse.y (craft_constructor): Special case null_pointer_node.
2507
2508 2004-12-02  Tom Tromey  <tromey@redhat.com>
2509
2510         PR java/18741:
2511         * java-gimplify.c (java_gimplify_expr): Don't call
2512         SET_EXPR_LOCATION unless wrapped tree is an expression.
2513
2514 2004-11-27  Per Bothner  <per@bothner.com>
2515
2516         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2517         Fix fencepost error in 'i', which got executed one too many times.
2518         Also, fold memcpy into explicit loop, as originally intended.
2519         Also, free temporary 'buf' which otherwise leaks.
2520
2521 2004-11-27  Per Bothner  <per@bothner.com>
2522
2523         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2524         local static variables if not USE_MAPPED_LOCATION.
2525
2526 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2527
2528         * class.c, decl.c, expr.c: Fix comment typos.
2529
2530 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2531
2532         PR java/18305
2533         * decl.c (end_java_method): Call
2534         attach_init_test_initialization_flags on all the init_decls.
2535         * parse.y (attach_init_test_initialization_flags): Move to ...
2536         * expr.c (attach_init_test_initialization_flags): here and
2537         support BIND_EXPR also.
2538         * java-tree.h (attach_init_test_initialization_flags): Prototype.
2539         * jcf-parse.c (parse_class_file): Don't disable class init
2540         optimization.
2541
2542 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2543
2544         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2545         in diagnostics.
2546
2547 2004-11-24  Richard Henderson  <rth@redhat.com>
2548
2549         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2550         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2551
2552 2004-11-24  Tom Tromey  <tromey@redhat.com>
2553
2554         * verify.c (defer_merging): Don't use C++-style comment.
2555         * verify.h (java_opcode): Added java_opcode_end.
2556         * class.c (build_class_ref): Remove C++ comment and old FIXME.
2557
2558         * verify-impl.c (vfy_push_type): Removed bogus "return".
2559         (initialize_stack): Use vfy_alloc and vfy_free.
2560         (verify_instructions_0): Likewise.
2561
2562         * Merged gcj-abi-2-dev-branch to trunk.
2563
2564 2004-11-24  Andrew Haley  <aph@redhat.com>
2565
2566         * jcf-parse.c (parse_class_file): Set file_start_location.
2567
2568 2004-11-10  Tom Tromey  <tromey@redhat.com>
2569
2570         * class.c (make_field_value): Don't call build_static_field_ref.
2571         (build_static_field_ref): Don't emit direct references when using
2572         indirect dispatch.
2573
2574         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
2575         -verbose:class into man page synopsis.
2576
2577 2004-11-09  Tom Tromey  <tromey@redhat.com>
2578
2579         * expr.c (build_java_arraystore_check): Still generate check if
2580         element type is itself an array.
2581
2582 2004-11-08  Tom Tromey  <tromey@redhat.com>
2583
2584         * java-tree.h (soft_check_assignment_node): Removed.
2585         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2586         * decl.c (java_init_decl_processing): Don't initialize
2587         soft_check_assignment_node.
2588
2589 2004-11-05  Tom Tromey  <tromey@redhat.com>
2590
2591         * class.c (layout_class_methods): Don't add Miranda methods when
2592         using indirect dispatch.
2593
2594 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
2595
2596         * class.c (make_class_data): Call emit_assertion_table to set the
2597         'assertion_table' field.
2598         (build_signature_for_libgcj): Move here from expr.c.
2599         (add_assertion_table_entry): New function. Callback for assertion
2600         hashtable traversal.
2601         (emit_assertion_table): New. Take class argument, and generate
2602         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2603         * decl.c (init_decl_processing): Define assertion_entry_type record.
2604         Push 'assertion_table' class field instead of 'verify'.
2605         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2606         (type_assertion_hash): Include 'assertion_code' in hash.
2607         (add_type_assertion): Rewritten. Take class and assertion_code
2608         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2609         (can_widen_reference_to): Use new add_type_assertion() arguments.
2610         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2611         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2612         (verify_identifier_node): Removed.
2613         (assertion_entry_type, assertion_table_type): New.
2614         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2615         assertion code definitions.
2616         (struct type_assertion): Add assertion_code. Rename 'source_type' and
2617         'target_type' to 'op1' and 'op2'.
2618         (add_type_assertion): Declare.
2619         (lang_printable_name_wls): Remove unused definition.
2620         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2621         to emit runtime assertion.
2622         (vfy_note_stack_type): Clean up non-C90 declarations.
2623         (vfy_note_local_type): Likewise.
2624         * verify.h (vfy_is_assignable_from): Declare.
2625         * verify-impl.c (is_assignable_from_slow): Remove unused function.
2626         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2627         instead of is_assignable_from_slow().
2628         (types_compatible): Reinstate ref_compatible() call.
2629
2630 2004-11-04  Tom Tromey  <tromey@redhat.com>
2631
2632         * class.c (build_static_field_ref): Reverted previous patch.
2633
2634         * class.c (build_static_field_ref): Don't emit direct references
2635         when using indirect dispatch.
2636
2637 2004-11-03  Tom Tromey  <tromey@redhat.com>
2638
2639         * expr.c (expand_java_arrayload): Set lhs_type_node.
2640         (expand_java_arraystore): Set rhs_type_node.
2641
2642 2004-11-02  Tom Tromey  <tromey@redhat.com>
2643
2644         * jcf-parse.c (compute_class_name): Use filename length from zip
2645         directory, not strlen.
2646
2647         * expr.c (expand_invoke): Mark new interface methods as abstract.
2648
2649 2004-11-01  Tom Tromey  <tromey@redhat.com>
2650
2651         * verify-impl.c (push_jump): Removed check for uninitialized
2652         objects.
2653         (push_exception_jump): Likewise.
2654         (handle_ret_insn): Likewise.
2655         (handle_jsr_insn): Likewise.
2656         (state_check_no_uninitialized_objects): Removed.
2657
2658         * decl.c (check_local_unnamed_variable): Recognize
2659         promoted-to-int parameters when using the new verifier.
2660         * expr.c (expand_java_arraystore): Explicitly request array type
2661         when using new verifier.
2662         (expand_java_arrayload): Likewise.
2663         (invoke_build_dtable): Don't pass object_type_node as
2664         expression argument to build_java_indirect_ref.
2665         (build_java_check_indexed_type): Do nothing.
2666         (build_java_arraystore_check): Handle case where array doesn't
2667         have array type.
2668         (build_java_array_length_access): Likewise.
2669         (expand_invoke): Handle case where interface overrides a method
2670         from Object.
2671         (pop_type_0): Always succeed for reference types.
2672         (process_jvm_instruction): Don't pop a value in a dead
2673         exception handler.
2674         (pop_arguments): Convert arguments to correct types.
2675
2676 2004-10-29  Andrew Haley  <aph@redhat.com>
2677
2678         * jcf-parse.c (give_name_to_class): Remove line that was
2679         incorrectly merged.
2680
2681 2004-10-29  Andrew Haley  <aph@redhat.com>
2682
2683         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2684
2685 2004-10-20  Andrew Haley  <aph@redhat.com>
2686
2687         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2688
2689 2004-10-26  Tom Tromey  <tromey@redhat.com>
2690
2691         * verify.h (vfy_notify_verified): Removed.
2692         * verify-glue.c (vfy_notify_verified): Removed.
2693
2694 2004-10-26  Tom Tromey  <tromey@redhat.com>
2695
2696         * verify-impl.c (debug_print_state): Declare `i' before code.
2697         (merge_types): Modify `t' when it is null_type.
2698
2699 2004-10-26  Tom Tromey  <tromey@redhat.com>
2700
2701         * verify-impl.c (type_print): Renamed from print.  Now static and
2702         takes an argument.
2703         (debug_print_state): Use type_print.
2704
2705 2004-10-25  Tom Tromey  <tromey@redhat.com>
2706
2707         * expr.c (build_invokeinterface): Compute correct offset for
2708         index into interface methods.
2709
2710 2004-10-20  Tom Tromey  <tromey@redhat.com>
2711
2712         * java-tree.h (verify_jvm_instructions_new): Declare.
2713
2714         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2715         command line.
2716
2717         * verify-impl.c (verify_instructions): Correctly handle wide
2718         types on the stack.
2719         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2720         (vfy_get_component_type): Strip pointer types.
2721         (vfy_find_class): Use get_type_from_signature.  Strip pointer
2722         types.
2723         Include java-except.h.
2724
2725 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
2726
2727         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
2728         vfy_push_type_t, set_variable, add_new_state, merge_into,
2729         handle_jsr_insn, branch_prepass, check_class_constant,
2730         check_wide_constant, get_one_type, compute_static_types,
2731         verify_instructions_0): Clean up C99 declarations after statements.
2732
2733 2004-10-20  Tom Tromey  <tromey@redhat.com>
2734
2735         * verify-impl.c (merge_refs): Compare reference against iterator,
2736         not ref2.
2737
2738         * verify-glue.c (vfy_tag): Mask off resolved flag.
2739
2740 2004-10-19  Tom Tromey  <tromey@redhat.com>
2741
2742         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
2743         (init_state_with_stack): Initialize `this_type' in state.
2744         (verify_method): Use debug_print.
2745         * verify-glue.c (vfy_is_primitive): Removed debugging print.
2746         (vfy_note_stack_depth): Reverted last patch.
2747         (vfy_note_stack_type): Note pointer to Object, not Object.
2748         (vfy_note_local_type): Likewise.
2749
2750         * verify.h (vfy_note_instruction_seen): Declare.
2751         * verify-glue.c (verify_jvm_instructions_new): Set
2752         BCODE_EXCEPTION_TARGET on target instruction.
2753         (vfy_note_instruction_seen): New function.
2754         * verify-impl.c (FLAG_INSN_SEEN): New define.
2755         (verify_instructions_0): Set flag on instruction.  Save state for
2756         PC=0 later.
2757         (verify_instructions): Call vfy_note_instruction_seen.
2758
2759         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
2760         (verify_jvm_instructions_new): Call method_init_exceptions,
2761         add_handler, and handle_nested_ranges.
2762         * verify-impl.c (verify_method): Return 1 on success.
2763         (verify_instructions_0): Save the state at PC=0.
2764
2765         * verify-impl.c (init_type_from_class): Set is_resolved and
2766         ref_next on new ref_intersection.
2767         (init_type_from_string): Likewise.
2768
2769 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
2770
2771         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
2772         if flag_new_verifier is set.
2773         * java-tree.h (flag_new_verifier): Declare.
2774         * lang.opt (fnew-verifier): New option.
2775         * verify-impl.c: Work around namespace pollution by undef'ing
2776         'current_class'.
2777         (struct verifier_context): Make 'bytecode' const.
2778         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
2779         (types_compatible): For the BC-ABI, always consider reference types
2780         compatible.
2781         (check_class_constant): Use vfr->current_class.
2782         (check_constant): Likewise.
2783         (check_wide_constant): Likewise.
2784         (check_field_constant): Check for 'L' at start of type name.
2785         (get_one_type): Return pointer instead of type. Set type result in
2786         caller via passed type pointer.
2787         (compute_argument_types): Update to use new get_one_type arguments.
2788         (compute_return_type): Likewise.
2789         (make_verifier_context): New. Allocate and initialize 'vfr'.
2790         (free_verifier_context): New. Free 'vfr' and its contents.
2791         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2792         and free_verifier_context.
2793
2794 2004-10-15  Tom Tromey  <tromey@redhat.com>
2795
2796         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2797         * verify.h (vfy_fail): Fixed formatting.
2798
2799         * verify-impl.c (vfr): Fixed comment formatting.
2800         (collapse_type): New function.
2801         (verify_instructions): Notify compiler about type map.
2802         * verify.h (vfy_note_stack_depth): Updated.
2803         (vfy_note_stack_type): Likewise.
2804         (vfy_note_local_type): Likewise.
2805         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2806         Declare.
2807         * verify-glue.c (vfy_note_stack_depth): Correctly size type
2808         state.  Added `method' argument.
2809         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
2810         argument.
2811         (vfy_note_local_type): New function.
2812         (vfy_unsuitable_type): Likewise.
2813         (vfy_return_address_type): Likewise.
2814         (vfy_null_type): Likewise.
2815
2816         * verify.h (VFY_IN_GCC): Removed.
2817         (VFY_WANT_TYPEMAP): Removed.
2818         * verify-impl.c (verify_instructions_0): Removed useless "\".
2819         (struct state) <next>: Uncomment.
2820
2821 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
2822
2823         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2824         C-style.
2825
2826 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2827
2828         * Make-lang.in (verify.o): Re-enabled this target.
2829         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2830         (vfy_get_interface): Likewise.
2831         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2832         * verify.h (verify_jvm_instructions_new): Declare.
2833         * verify-impl.c (free_state): Temporarily comment out unused
2834         function.
2835
2836 2004-10-06  Tom Tromey  <tromey@redhat.com>
2837
2838         * java-tree.h (JV_STATE_READ): New enum value.
2839
2840 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2841
2842         * verify.h: New file.
2843
2844 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
2845
2846         * verify-impl.c, verify-glue.c, verify.h: New files.
2847         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
2848
2849 2004-09-24  Andrew Haley  <aph@redhat.com>
2850
2851         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
2852         for a slot if it's of pointer type.
2853
2854 2004-09-14  Tom Tromey  <tromey@redhat.com>
2855
2856         * class.c (make_class_data): Correctly initialize "state" field.
2857         Initialize "engine" field.
2858         * decl.c (java_init_decl_processing): Add "engine" field.
2859
2860 2004-09-10  Andrew Haley  <aph@redhat.com>
2861
2862         PR java/12760
2863         * expr.c (build_invokeinterface): Use fast method for interface
2864         dispatch.
2865         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
2866         JTI_ITABLE_PTR_TYPE.
2867         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
2868         (emit_symbol_table): Add new arg, element_size.
2869         * decl.c (java_init_decl_processing): Initialize Class.itable.
2870         * class.c (GEN_TABLE): New macro.
2871         (gen_indirect_dispatch_tables): Use it.  Add itable.
2872         (make_class_data): Add new arg for emit_symbol_table().
2873         Emit itable.
2874         (add_miranda_methods): Make sure search_class has been parsed.
2875         (emit_symbol_table): Add new arg, element_size.
2876
2877 2004-09-06  Andrew Haley  <aph@redhat.com>
2878
2879         * verify.c (merge_types): Return Object for all merges of
2880         interfaces.
2881         * expr.c (add_type_assertion): Don't generate assertions when
2882         source type is array of Object.
2883
2884 2004-09-03  Andrew Haley  <aph@redhat.com>
2885
2886         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
2887
2888         * lang.c (java_post_options): Force flag_verify_invocations if
2889         we're not using indirect dispatch.
2890
2891         * expr.c (pop_type_0): Move test for interfaces before call to
2892         can_widen_reference_to().
2893         (build_signature_for_libgcj): Remove generation of canonical array
2894         type.
2895         (add_type_assertion): Canonicalize both arrays.
2896         Don't assert that type X can be assigned to Object.
2897         Don't assert that type X an be assigned to type X.
2898         Don't assert that Object can be assigned to type X.
2899         (can_widen_reference_to): Warn whenever we generate an assertion.
2900         (process_jvm_instruction): Use throwable_type_node for the type of
2901         an exception class.
2902
2903 2004-09-01  Andrew Haley  <aph@redhat.com>
2904
2905         * decl.c (java_init_decl_processing): Change
2906         verify_identifier_node to "__verify".
2907         * expr.c (add_type_assertion): Use verify_identifier_node for name.
2908         * java-tree.h (verify_identifier_node): Change to "__verify".
2909
2910         * expr.c (build_signature_for_libgcj): New function.
2911         (add_type_assertion): Use it to construct signatures for
2912         source_type and target_type.
2913
2914 2004-08-27  Andrew Haley  <aph@redhat.com>
2915
2916         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
2917         (verify_identifier_node): New.
2918         (TYPE_VERIFY_METHOD): New.
2919         (struct type_assertion): New type.
2920         * expr.c (type_assertion_eq): New function.
2921         (type_assertion_hash): New function.
2922         (add_type_assertion): New function.
2923         (can_widen_reference_to): Call add_type_assertion().
2924         * decl.c (java_init_decl_processing): Add verify_identifier_node.
2925         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
2926         (finish_class): Output TYPE_VERIFY_METHOD (type).
2927
2928         * decl.c (end_java_method): Nullify unused fields.
2929
2930 2004-08-17  Andrew Haley  <aph@redhat.com>
2931
2932         * verify.c (defer_merging): Quieten.
2933         * jcf-parse.c (load_class): Only try to open a class file if it's
2934         java.lang.Object or if it's part of the current compilation.
2935         Check that the class we just tried to load is the class we just
2936         loaded.  Quieten.
2937         (java_parse_file): Set flag_verify_invocations off if we're
2938         compiling from .class.
2939         (parse_zip_file_entries): Abort if we try to read a dummy class.
2940         * expr.c (can_widen_reference_to): Quieten.
2941         (build_invokevirtual): Abort if we try to invokevirtual an
2942         interface.
2943         (expand_invoke): Don't build a non-interface call to an interface.
2944         (build_instanceof): Don't do premature optimization if
2945         flag_verify_invocations is not set.
2946         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
2947         from superclass.
2948         (build_static_field_ref): Add correct type conversion for
2949         field_address.
2950         (add_miranda_methods): Disable generation of Miranda methods for
2951         dummy classes.
2952         (layout_class_method): Don't complain about non-static method
2953         overrides static method with dummy classes.
2954
2955 2004-08-13  Tom Tromey  <tromey@redhat.com>
2956
2957         * class.c (build_static_field_ref): Re-enable atable lookups for
2958         static fields.
2959
2960         * parse.y (strip_out_static_field_access_decl): Indentation fix.
2961
2962 2004-08-11  Tom Tromey  <tromey@redhat.com>
2963
2964         * gcj.texi (libgcj Runtime Properties): Document new properties.
2965
2966 2004-08-06  Andrew Haley  <aph@redhat.com>
2967
2968         * jcf-parse.c (load_class): Check that we really have loaded the
2969         class we're looking for.
2970
2971 2004-07-19  Andrew Haley  <aph@redhat.com>
2972
2973         * verify.c (verify_jvm_instructions): Comment change only.
2974
2975         * typeck.c (build_java_array_type): Add size field to array name.
2976
2977         * java-tree.h (LOCAL_SLOT_P): New.
2978         (update_aliases): Add PC argument.
2979         (pushdecl_function_level): New function.
2980
2981         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2982         MODIFY_EXPR, and SAVE_EXPR.
2983         (java_gimplify_modify_expr): New function.
2984
2985         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2986         (expand_iinc): Pass PC to update_aliases().
2987         (STORE_INTERNAL): Likewise.
2988         (process_jvm_instruction): Likewise.
2989
2990         * decl.c (base_decl_map): New variable.
2991         (uniq): New variable.
2992         (update_aliases): Rewrite with more thorough checking.
2993         (debug_variable_p): New function.
2994         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2995         (check_local_named_variable): Delete whole function.
2996         (initialize_local_variable): New function.
2997         (check_local_unnamed_variable): Add checks and comments.
2998         (find_local_variable): Rewrite.
2999         (java_replace_reference): New function.
3000         (function_binding_level): New variable.
3001         (pushdecl_function_level): New function.
3002         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3003         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3004         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3005         function_binding_level.
3006         (end_java_method): Null unused fields to save memory.
3007
3008 2004-06-29  Andrew Haley  <aph@redhat.com>
3009
3010         * except.c (expand_start_java_handler): Push a new binding level.
3011         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3012         register_exception_range() to register where we'll do it.
3013         (expand_end_java_handler): Remove old bogus code.  Replace with
3014         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3015         the top of the expression we're curently building.
3016         (maybe_end_try): Delete.
3017         * decl.c (binding_level.exception_range): New field.
3018         (clear_binding_level): Add field exception_range.  Reformat.
3019         (poplevel): Call expand_end_java_handler().
3020         (poplevel): Call java_add_stmt only if functionbody is false.
3021         (maybe_poplevels): Don't call maybe_end_try() from here.
3022         (end_java_method): Clear no longer used trees in function decl.
3023         (register_exception_range): New function.
3024         * java-tree.h (register_exception_range, struct eh_range): Declare.
3025
3026 2004-06-22  Andrew Haley  <aph@redhat.com>
3027
3028         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3029         the otable.
3030         * check-init.c (get_variable_decl): Teach check-init about
3031         FIELD_DECLs addressed via the otable.
3032         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3033         CLASS_PARSED_P.
3034
3035 2004-05-28  Andrew Haley  <aph@redhat.com>
3036
3037         * jcf-parse.c (load_class): Don't try to read a class that we've
3038         already read.
3039
3040         * expr.c (build_invokeinterface): Use the old-fashioned way of
3041         doing indirect dispatch: look up interfaces by name.
3042         * java-tree.h (enum java_tree_index): Add
3043         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3044         * decl.c (java_init_decl_processing): Add
3045         soft_lookupinterfacemethodbyname_node.
3046
3047         * gjavah.c (print_method_info): Final methods have vtable entries,
3048         so gjavah needs to output them.
3049         * class.c (layout_class_method): Generate vtable entries for final
3050         methods.
3051         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3052         dispatch, even if a method is final.
3053
3054 2004-05-25  Andrew Haley  <aph@redhat.com>
3055
3056         * class.c (build_symbol_entry): Convert the names of constructors
3057         to init_identifier_node when generating an entry for the indirect
3058         dispatch table.
3059
3060         * expr.c (build_known_method_ref): Generate indirect calls for
3061         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3062
3063 2004-05-24  Andrew Haley  <aph@redhat.com>
3064
3065         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3066         atable element is of the right type.
3067
3068         * class.c (build_static_field_ref): Cast pointer to correct type
3069         for field.
3070
3071 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3072
3073         * Merged with HEAD as of 20040514. Diff against
3074         gcj-abi-2-merge-20040514.
3075
3076 2004-04-16  Andrew Haley  <aph@redhat.com>
3077
3078         * verify.c (check_pending_block): Disable subroutine checks.
3079         (defer_merging): New function.
3080         (merge_types): If types are dummy, use defer_merging to combine them.
3081         (verify_jvm_instructions): If invocation is invokeinterface and
3082         target is dummy, assume target really is an interface.
3083
3084         * parse.y (patch_invoke): Break out call to java_create_object.
3085
3086         * lang.c (flag_verify_invocations): New.
3087
3088         * jcf-parse.c (load_class): If we've already failed to load a
3089         class, don't try again.
3090         (load_class): If we can't find a .class file, don't fail, but emit
3091         a warning.
3092         (parse_class_file): Don't act on dummy methods.
3093
3094         * java-tree.h (flag_verify_invocations): New.
3095         (TYPE_DUMMY): New.
3096         (lang_type.dummy_class): New field.
3097         (java_create_object): New function.
3098         (METHOD_DUMMY): New.
3099
3100         * expr.c (build_field_ref): Widen field offset.
3101         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3102         that each of its elements is compatible with the one we're
3103         popping.
3104         (pop_type_0): Issue a warning to say that we need to generate a
3105         runtime check.
3106         (java_create_object): New function.
3107         (build_field_ref): Only generate hard refs if we're not using
3108         indirect dispatch.
3109         (expand_java_field_op): If we're using !verify_invocations and we
3110         see a missing field, generate a decl for it.
3111
3112         (expand_invoke): If a class doesn't have the method we seek and
3113         we're using !flag_verify_invocations, generate a decl for the
3114         method now.
3115
3116         (build_known_method_ref): Always use indirect dispatch via the
3117         atable for static methods.
3118
3119         (expand_java_NEW): Break out object creation into new function,
3120         java_create_object.
3121
3122         (can_widen_reference_to): Issue a warning to say that we need to
3123         generate a runtime check.
3124
3125         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3126         (make_method_value): Also use index for interfaces.
3127         (make_class_data): Skip dummy field for inherited data.
3128         Don't build method array for dummy methods.
3129         Set size_in_byte to -1 when using inirect dispatch
3130         Don't build a hard class ref if we don't have a hard ref to our
3131         superclass, or if we're using inirect dispatch.
3132         Null out dispatch tables.
3133
3134         (layout_class_method): Don't complain about non-static method
3135         overrides static method is method is artificial.
3136
3137         (build_static_field_ref): Disable atable references to static
3138         fields for the time being.
3139
3140         (layout_class_methods): Check for CLASS_INTERFACE as
3141         well as CLASS_ABSTRACT.
3142
3143 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3144
3145         * class.c (make_class_data): Don't check flag_inline_functions.
3146         * lang.c (flag_really_inline): Remove unused flag.
3147         (java_handle_option): Don't set it here.  Remove special handling
3148         of flag_inline_functions for Java.
3149         (java_init): Don't set flag_inline_trees here.  Already done...
3150         (java_post_options): ...here.  Don't clear flag_inline_functions.
3151
3152 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3153
3154         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3155         (java_gimplify_exit_block_expr): New function.
3156         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3157         LABELED_BLOCK_EXPR.
3158         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3159         (EXIT_BLOCK_EXPR): Likewise.
3160         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3161         (LABELED_BLOCK_BODY): Likewise.
3162         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3163         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3164         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3165         TREE_OPERAND.
3166         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3167         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3168         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3169         second operand of EXIT_BLOCK_EXPR.
3170         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3171         TREE_OPERAND.
3172         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3173
3174 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3175
3176         * xref.h (xref_flag_value): Remove.
3177         (xref_set_data, xref_get_data): Likewise.
3178         (xref_set_current_fp): Likewise.
3179         (XREF_NONE): Likewise.
3180         (XREF_GET_DATA): Likewise.
3181         * xref.c (xref_flag_value): Remove.
3182         (xref_set_data, xref_get_data): Likewise.
3183         (xref_set_current_fp): Likewise.
3184
3185 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3186
3187         * gjavah.c (output_directory): Make static.
3188         (temp_directory): Likewise.
3189
3190 2004-11-15  Tom Tromey  <tromey@redhat.com>
3191
3192         * decl.c (instn_ptr_type_node): Removed.
3193         (lineNumbers_ptr_type_node): Removed.
3194         (jint_type): Removed.
3195         (jint_ptr_type): Removed.
3196
3197 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3198
3199         PR java/15576
3200         * check-init.c (check_init): Ignore DECL_EXPR.
3201         * expr.c (always_initialize_class_p): Reenable.
3202         (build_class_init): Use a variable to store the decl.  Also use
3203         boolean_false_node instead of integer_zero_node.
3204         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3205         to the block.
3206
3207 2004-11-08  Tom Tromey  <tromey@redhat.com>
3208
3209         PR java/16843:
3210         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3211         generating a JNI header.
3212         (print_field_info): Handle JNI headers.
3213         (jni_print_float): Likewise.
3214         (jni_print_double): Likewise.
3215
3216 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3217
3218         * decl.c (end_java_method): Remove duplicated code.
3219
3220 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3221             Gerald Pfeifer  <gerald@pfeifer.com>
3222
3223         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3224         as well.
3225
3226 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3227
3228         PR java/17265
3229         * class.c: Reinstate 2004-08-18 patch.
3230         (make_local_function_alias): Don't create an alias for extern (native)
3231         functions.
3232
3233 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3234
3235         PR java/17265
3236         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3237         (make_method_value): Likewise.
3238
3239 2004-10-21  Andrew Haley  <aph@redhat.com>
3240
3241         PR java/18091:
3242         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3243
3244 2004-10-20  Andrew Haley  <aph@redhat.com>
3245
3246         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3247         Remove duplicated code block.
3248
3249 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3250
3251         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3252         New rules to work around old Bison warnings.
3253
3254 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3255
3256         * class.c (ident_subst): Always alloca buffer.
3257         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3258         opcode after including javaop.def.
3259         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3260         conditional expression that exits, to avoid warnings.
3261         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3262         a user of an extension.
3263         * win32-host.c: Move check down to have non-empty file when
3264         WIN32 is not defined.
3265
3266         * Make-lang.in (java-warn): Add STRICT_WARN.
3267         (java/jcf-io.o-warn): Don't have Werror for this file.
3268         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3269
3270 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3271
3272         * expr.c (expr_add_location): Move declaration to before all
3273         statements.
3274         * parse.y (java_expand_classes): Ditto.
3275         * lex.c (java_peek_unicode): Ditto.
3276
3277 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3278
3279         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3280         if possible, else convert `foo' to 'foo'.
3281         * class.c: Likewise.
3282         * decl.c: Likewise.
3283         * expr.c: Likewise.
3284         * jcf-io.c: Likewise.
3285         * jcf-parse.c: Likewise.
3286         * lang.c: Likewise.
3287         * lex.c: Likewise.
3288         * parse.h: Likewise.
3289
3290 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3291
3292         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3293         rename parameter 'msg' to 'msgid' in function declaration.
3294         (issue_warning_error_from_context): Likewise.
3295         (yyerror): Rename parameter 'msg' to 'msgid'.
3296         (all over): Use new quoting style for diagnostics.
3297
3298 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3299
3300         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3301         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3302         Update copyright.
3303
3304 2004-10-14  Matt Austern  <austern@apple.com>
3305
3306         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3307         pointer_set_t* now.
3308
3309 2004-10-13  Tom Tromey  <tromey@redhat.com>
3310
3311         PR java/15578:
3312         * lang.opt (--extdirs): Document.
3313         * jvspec.c (lang_specific_driver): Recognize -encoding and
3314         -extdirs.
3315
3316 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3317
3318         * parse.y (issue_warning_error_from_context): Use va_list *
3319         instead of va_list parameter.
3320         (parse_error_context): Update call.
3321         (parse_warning_context): Likewise.
3322
3323 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3324
3325         * parse.y, parse-scan.y: Add list of diagnostic messages to
3326         insulate translation template from version of yacc/bison used
3327         to compile the grammar.
3328
3329 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3330
3331         Prepare for %q, %< and %> in diagnostic message strings.
3332         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3333         Name second parameter 'msgid'.
3334         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3335         (issue_warning_error_from_context): Use pretty-printer functions
3336         instead of vsprintf for constructing formatted messages. Rename
3337         parameter 'msg' to 'msgid'.
3338         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3339         (parse_warning_context): Likewise.
3340
3341 2004-10-05  Andrew Haley  <aph@redhat.com>
3342
3343         PR java/17779
3344         * jcf-parse.c (parse_zip_file_entries): If a class has a
3345         superclass and a TYPE_SIZE of zero, lay it out.
3346
3347 2004-09-30  Andrew Haley  <aph@redhat.com>
3348
3349         PR java/17733
3350         * jcf-parse.c (compute_class_name): Rewrite.
3351
3352 2004-10-01  Jan Hubicka  <jh@suse.cz>
3353
3354         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3355
3356 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3357
3358         * lex.c: Fix a comment typo.
3359
3360 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3361
3362         * java-tree.h: Fix a comment typo.
3363
3364 2004-09-30  Per Bothner  <per@bothner.com>
3365
3366         Simplify lexer.  Implement --enable-mapped-location support.
3367         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3368         (parse_source_file_1): Pass filename as extra parameter, so we can call
3369         linemap_add and set input_location here, rather than in both callers.
3370         (read_class): Pass copied filename to parse_source_file_1.
3371         Don't initialize wfl_operator - only needed for source compilation.
3372         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3373         * lex.h:  Remove a bunch of debugging macros.
3374         * lex.h (struct_java_line, struct java_error):  Remove types.
3375         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3376         (struct java_lc_s):  Remove prev_col field.
3377         (struct java_lexer):  New fields next_unicode, next_columns, and
3378         avail_unicode.  New position field, and maybe token_start field.
3379         Don't need hit_eof field - use next_unicode == -1 instead.
3380         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3381         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3382         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3383         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3384         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3385         (struct parser_ctxt):  New file_start_location field.
3386         Remove p_line, c_line fields since we no longer save lines.
3387         Remove elc, lineno, and current_jcf fields - no longer used.
3388         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3389         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3390         source_location and is probably not needed anymore anyway.
3391         Use new expr_add_Location function.
3392         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3393         (java_pop_parser_context):  Minor cleanup.
3394         (java_parser_context_save_global, java_parser_context_restore_global,
3395         java_pop_parser_context):  Save/restore input_location as a unit.
3396         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3397         a source_location instead of a wfl context node.
3398         (check_class_interface_creation):  input_filename is not addressable.
3399         (create_artificial_method):  Calling java_parser_context_save_global
3400         and java_parser_context_restore_global is overkill.  Instead,
3401         temporarily set input_location from class decl.
3402         (java_layout_seen_class_methods): Set input_location from method decl.
3403         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3404         (finish_loop_body):  Likewise.
3405         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3406         (java_sprint_unicode):  Take a character, not index in line.
3407         (java_sneak_uncode):  Replaced by java_peek_unicode.
3408         (java_unget_unicode):  No longer used.
3409         (java_allocate_new_line. java_store_unicode):  Removed, since we
3410         no longer remember "lines".
3411         (java_new_lexer):  Update for new data structures.
3412         (java_read_char):  Move unget_value checking to java_read_unicode.
3413         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3414         efficient functions that are used directly when lexing.
3415         (java_read_unicode_collapsing_terminators):  No longer needed.
3416         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3417         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3418         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3419         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3420         combine switch branches, and test for common token kinds earlier.
3421         (java_lex_error):  Rewrite.
3422         * jv-scan.c (expand_location): New function, copied from tree.c.
3423         (main): Set ctxp->filename instead of setting input_filename directly.
3424
3425 2004-09-30  Per Bothner  <per@bothner.com>
3426
3427         More cleanup for --enable-mapped-location.
3428         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3429         input_location here.  Instead do it in give_name_to_class.
3430         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3431         * expr.c (expand_byte_code): Call linemap_line_start.
3432         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3433         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3434         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3435         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3436         to USE_MAPPED_LOCATION case.
3437
3438         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3439         * jcf-parse.c (java_parse_file): Don't set input_filename.
3440         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3441         Create a list of TRANSLATION_UNIT_DECL.
3442         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3443         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3444         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3445         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3446         (file_start_location):  New static.
3447         (set_source_filename):  Avoid extra access to input_filename macro.
3448         Concatenate new name with class's package prefix.
3449         (set_source_filename, give_name_to_class): Update.
3450         (give_name_to_class):  Set class's "line 0" input_location here.
3451         (parse_class_file):  Set input_location as a unit.
3452
3453         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3454
3455 2004-09-29  Per Bothner  <per@bothner.com>
3456
3457         * java-tree.h:  Redefine some macros and add some declaration
3458         to handle the USE_MAPPED_LOCATION case.
3459         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3460         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3461         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3462         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3463
3464         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3465         * decl.c (finish_method, java_add_stmt): Likewise.
3466         * java-gimplify.c (java-gimplify.c):  Likewise.
3467         * jcf-write.c (generate_bytecode_insns):  Likewise.
3468         * lang.c (java_post_options): Likewise - call linemap_add.
3469
3470 2004-09-29  Andrew Haley  <aph@redhat.com>
3471
3472         PR java/17007
3473         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3474         result of TRUNC_MOD_EXPR.
3475         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3476         * decl.c (java_init_decl_processing): Mark
3477         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3478
3479 2004-09-28  Tom Tromey  <tromey@redhat.com>
3480
3481         PR java/15710:
3482         * class.c (add_miranda_methods): Load superinterface if not
3483         already loaded.
3484
3485 2004-09-28  Andrew Haley  <aph@redhat.com>
3486
3487         PR java/17586
3488         * jcf-parse.c (load_class): Don't try to read a class that we've
3489         already read.
3490
3491 2004-09-28  Andrew Haley  <aph@redhat.com>
3492
3493         * jcf-parse.c (load_class): Back out previous broken patch.
3494
3495 2004-09-28  Andrew Haley  <aph@redhat.com>
3496
3497         PR java/17586
3498         * jcf-parse.c (load_class): Don't try to read a class that we've
3499         already read.
3500         Check that we really did read the right class.
3501
3502 2004-09-25  Tom Tromey  <tromey@redhat.com>
3503
3504         PR java/17500:
3505         * parse.y (create_artificial_method): Use add_method_1.
3506
3507 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3508
3509         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3510         comment typos.
3511         * gcj.texi: Fix typos.
3512
3513 2004-09-24  Tom Tromey  <tromey@redhat.com>
3514
3515         PR java/15656:
3516         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3517         in error parts of rule.
3518         (unary_expression): Don't call error_if_numeric_overflow when $1
3519         is NULL.
3520
3521 2004-09-24  Tom Tromey  <tromey@redhat.com>
3522
3523         PR java/16789:
3524         * parse.y (resolve_qualified_expression_name): Set
3525         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3526         * expr.c (force_evaluation_order): Check for empty argument list
3527         after stripping COMPOUND_EXPR.
3528
3529 2004-09-23  Andrew Haley  <aph@redhat.com>
3530
3531         PR java/16927:
3532         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3533         COND_EXPRs.
3534
3535 2004-09-23  Tom Tromey  <tromey@redhat.com>
3536
3537         PR java/17329:
3538         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3539         where operand is null.
3540
3541 2004-09-23  Tom Tromey  <tromey@redhat.com>
3542
3543         PR java/17380:
3544         * parse.y (not_accessible_p): Allow access to protected members
3545         even when class is not static.
3546
3547 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3548
3549         * Make-lang.in: Revert the gcc-none.o change.
3550
3551 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3552
3553         * parse.y (patch_anonymous_class): VEC_space returns true if there
3554         is space.
3555
3556 2004-09-21  Matt Austern  <austern@apple.com>
3557
3558         Fix bootstrap.
3559         * gjavah.c (free_method_name_list): Fix function definition so
3560         it's a proper C prototype.
3561
3562 2004-09-21  Tom Tromey  <tromey@redhat.com>
3563
3564         PR java/17575:
3565         * gjavah.c (free_method_name_list): New method.
3566         (main): Call it.
3567
3568 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3569             Zack Weinberg  <zack@codesourcery.com>
3570
3571         * java-tree.def: Use tree_code_class enumeration constants
3572         instead of code letters.
3573         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3574         new tree-class enumeration constants.
3575
3576 2004-09-13  Tom Tromey  <tromey@redhat.com>
3577
3578         PR java/17216:
3579         * class.c (layout_class_method): Put synthetic methods into the
3580         vtable.
3581
3582 2004-09-11  Andrew Pinski  <apinski@apple.com>
3583
3584         * Make-lang.in (java/ggc-none.c): Change dependency
3585         for ggc.h into $(GGC_H).
3586
3587 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3588
3589         * Make-lang.in (java/win32-host.o): Add dependency on
3590         coretypes.h.
3591         * win32-host.c: Add includes for coretypes.h, jcf.h
3592
3593 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3594
3595         * Make-lang.in (GCJH_OBJS): Change dependency from
3596         ggc-none.o to java/ggc-none.o
3597         (JCFDUMP_OBJS): Likewise.
3598         (java/ggc-none.o): New target.
3599
3600 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3601
3602         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
3603         * class.c (build_utf8_ref, build_static_field_ref,
3604         make_field_value, make_method_value, get_dispatch_table,
3605         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3606         * constants.c (get_tag_node, build_ref_from_constant_pool,
3607         build_constants_constructor): Likewise.
3608         * decl.c (java_init_decl_processing): Likewise.
3609         * expr.c (build_java_array_length_access, build_newarray,
3610         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3611         build_java_binop, build_field_ref, expand_java_add_case,
3612         expand_java_call, build_known_method_ref, build_invokevirtual,
3613         build_invokeinterface, build_jni_stub): Likewise.
3614         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3615         * jcf-parse.c (get_constant): Likewise.
3616         * lex.c (do_java_lex): Likewise.
3617         * parse.y (patch_binop, patch_unaryop, patch_cast,
3618         build_newarray_node, patch_newarray): Likewise.
3619         * resource.c (compile_resource_data): Likewise.
3620         * typeck.c (build_prim_array_type): Likewise.
3621
3622 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3623
3624         * decl.c (java_init_decl_processing): Adjust
3625         initialize_sizetypes call.
3626
3627 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3628
3629         * jv-scan.c (fancy_abort): Add.
3630
3631 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3632
3633         * expr.c (build_java_arrayaccess): Use convert to change
3634         len's type.
3635
3636 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
3637
3638         * class.c (make_local_function_alias): Allocate extra space for 'L'
3639         in name buffer. Reported by Thomas Neumann.
3640
3641 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3642
3643         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3644         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
3645         * lex.c (do_java_lex): Adjust.
3646         (error_if_numeric_overflow): Likewise.
3647
3648 2004-08-18  Andrew Pinski  <apinski@apple.com>
3649
3650         * class.c (make_local_function_alias): Only make a new decl if we
3651         support alias attribute on all decls.
3652
3653 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
3654
3655         * class.c (make_local_function_alias): New function. Create local
3656         alias for public method DECL.
3657         (make_method_value): Use make_local_function_alias.
3658         * parse.y (craft_constructor): Don't special-case anonymous classes.
3659         Always set ctor_name to init_identifier_node.
3660         (lookup_method_invoke): Call layout_class_method when creating
3661         anonymous class constructor.
3662
3663 2004-08-18  Richard Henderson  <rth@redhat.com>
3664
3665         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3666         default case.  Treat '<' similarly.  Update for
3667         is_gimple_formal_tmp_var name change.
3668
3669 2004-08-17  Andrew Haley  <aph@redhat.com>
3670
3671         * lang.c (lang_printable_name): Obey verbose flag.
3672         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3673         lang_printable_name().
3674         (verify_constructor_circularity, get_printable_method_name,
3675         check_abstract_method_definitions, java_check_regular_methods,
3676         java_check_abstract_methods, check_inner_class_access,
3677         fix_constructors, patch_method_invocation, patch_return):
3678         Likewise.
3679         * expr.c (pop_type_0): Likewise.
3680
3681         * java-tree.h (lang_printable_name_wls): Delete.
3682
3683 2004-08-16  Tom Tromey  <tromey@redhat.com>
3684
3685         PR java/8473:
3686         * parse.y (primary): Changed for initialized and uninitialized
3687         array creations.
3688         (array_access): Handle array_creation_initialized.
3689         (array_creation_expression): Split into
3690         array_creation_initialized and array_creation_uninitialized.
3691
3692 2004-08-16  Andrew Haley  <aph@redhat.com>
3693
3694         * jcf-write.c (find_constant_index): Canonicalize NaNs when
3695         generating bytecode.
3696
3697 2004-08-16  Elliot Lee <sopwith@redhat.com>
3698
3699         PR java/9677
3700         * jcf-parse.c (java_parse_file): Handle filenames with embedded
3701         spaces, and quoted filelists.
3702
3703 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3704
3705         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3706         * class.c (build_utf8_ref, build_static_field_ref,
3707         make_field_value, make_method_value, get_dispatch_table,
3708         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3709         * constants.c (get_tag_node,  build_ref_from_constant_pool,
3710         build_constants_constructor): Likewise.
3711         * decl.c (java_init_decl_processing): Likewise.
3712         * expr.c (build_java_array_length_access, build_newarray,
3713         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3714         build_java_binop, build_field_ref, expand_java_add_case,
3715         expand_java_call, build_known_method_ref, build_invokevirtual,
3716         build_invokeinterface, build_jni_stub): Likewise.
3717         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3718         * jcf-parse.c (get_constant): Likewise.
3719         * lex.c (do_java_lex): Likewise.
3720         * parse.y (patch_binop, patch_unaryop, patch_cast,
3721         build_null_of_type, patch_newarray): Likewise.
3722         * resource.c (compile_resource_data): Likewise.
3723         * typeck.c (build_prim_array_type): Likewise.
3724
3725 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
3726
3727         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3728         Don't create BLOCK here or call java_gimplify_block.
3729
3730 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3731
3732         * java-tree.h (flag_deprecated): Removed.
3733         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
3734         * parse.y (check_deprecation): Check warn_deprecated instead of
3735         flag_deprecated.
3736
3737 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
3738
3739         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
3740         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
3741         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
3742         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
3743         flag_force_classes_archive_check, flag_optimize_sci,
3744         flag_indirect_dispatch): Remove explicit declarations.
3745         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
3746         final comment.
3747
3748 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
3749
3750         PR bootstrap/14893
3751         * Make-lang.in (java.install-man): Install from either build
3752         tree or source tree, whichever has the file first.
3753
3754 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3755
3756         * jcf-parse.c (get_constant): Adjust force_fit_type call.
3757         * lex.h (SET_LVAL_NODE_TYPE): Remove.
3758         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
3759         (do_java_lex): Likewise. Adjust force_fit_type call.
3760
3761 2004-08-04  Roger Sayle  <roger@eyesopen.com>
3762             Andrew Haley  <aph@redhat.com>
3763
3764         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
3765         checking trees as they're being built.
3766         (convert): Call convert_ieee_real_to_integer if we're
3767         converting a constant, even if we're writing a class file.
3768
3769 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
3770
3771         PR java/16701
3772         * parse.y (fold_constant_for_init): Call resolve_field_access with
3773         correct current_class context.
3774
3775 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3776
3777         * decl.c (update_aliases, initialize_local_variable): Replace calls
3778         to build with calls to buildN.
3779         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
3780         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
3781         * parse.h (BUILD_THROW): Likewise.
3782         * parse.y (switch_expression, synchronized_statement,
3783         catch_clause_parameter, array_creation_expression,
3784         conditional_expression, make_qualified_name,
3785         resolve_qualified_expression_name, patch_method_invocation,
3786         patch_invoke, build_method_invocation, build_new_invocation,
3787         build_assignment, patch_assignment, build_binop, patch_binop,
3788         build_string_concatenation, build_incdec, patch_unaryop,
3789         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3790         patch_return, build_if_else_statement, build_labeled_block,
3791         build_new_loop, build_loop_body, build_bc_statement,
3792         build_assertion, encapsulate_with_try_catch, build_try_statement,
3793         build_try_finally_statement, patch_synchronized_statement,
3794         emit_test_initialization): Likewise, replace build with buildN.
3795
3796 2004-07-28  Eric Christopher  <echristo@redhat.com>
3797
3798         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3799         (java_unsafe_for_reeval): Ditto.
3800
3801 2004-07-26    <hp@bitrange.com>
3802
3803         * parse.y (build_super_invocation): Adjust declaration order to
3804         avoid declaration after statement.
3805
3806 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3807
3808         * decl.c: Rename all identifiers named `class' to `cl'.
3809
3810 2004-07-25  Richard Henderson  <rth@redhat.com>
3811
3812         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3813
3814 2004-07-23  Mike Stump  <mrs@apple.com>
3815
3816         * boehm.c (set_bit): Improve type safety wrt unsignedness.
3817         * gjavah.c (throwable_p, decode_signature_piece,
3818         print_full_cxx_name, print_include, add_namelet, add_class_decl,
3819         process_file): Likewise.
3820         * jcf-dump.c (main): Likewise.
3821         * jcf-io.c (read_zip_member): Likewise.
3822         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3823         give_name_to_class, get_class_constant): Likewise.
3824         * jcf-write.c (find_constant_wide, push_long_const,
3825         generate_classfile): Likewise.
3826         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3827         * parse.y (read_import_dir): Likewise.
3828         * typeck.c (parse_signature_type): Likewise.
3829         * verify.c (verify_jvm_instructions): Likewise.
3830         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3831
3832 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3833
3834         * Make-lang.in: Replace rmic and rmiregistry references with
3835         grmic and grmiregistry.
3836         * gcj.texi: Likewise.
3837
3838 2004-07-20  Andrew Haley  <aph@redhat.com>
3839
3840         PR java/16431.
3841         * verify.c (verify_jvm_instructions): Comment change only.
3842
3843         * typeck.c (build_java_array_type): Add size field to array name.
3844
3845         * java-tree.h (LOCAL_SLOT_P): New.
3846         (update_aliases): Add PC argument.
3847         (pushdecl_function_level): New function.
3848
3849         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3850         MODIFY_EXPR, and SAVE_EXPR.
3851         (java_gimplify_modify_expr): New function.
3852
3853         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3854         (expand_iinc): Pass PC to update_aliases().
3855         (STORE_INTERNAL): Likewise.
3856         (process_jvm_instruction): Likewise.
3857
3858         * decl.c (base_decl_map): New variable.
3859         (uniq): New variable.
3860         (update_aliases): Rewrite with more thorough checking.
3861         (debug_variable_p): New function.
3862         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3863         (check_local_named_variable): Delete whole function.
3864         (initialize_local_variable): New function.
3865         (check_local_unnamed_variable): Add checks and comments.
3866         (find_local_variable): Rewrite.
3867         (java_replace_reference): New function.
3868         (function_binding_level): New variable.
3869         (pushdecl_function_level): New function.
3870         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3871         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3872         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3873         function_binding_level.
3874         (end_java_method): Null unused fields to save memory.
3875
3876 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3877
3878         * class.c (add_interface_do): Remove.
3879         (set_super_info, interface_of_p, maybe_add_interface,
3880         add_interface, make_class_data, layout_class,
3881         add_miranda_methods): Adjust BINFO accessors and addition.
3882         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
3883         accessors.
3884         * jcf-write.c (generate_classfile): Likewise.
3885         * parse.y (patch_anonymous_class, check_inner_circular_reference,
3886         check_circular_reference, java_complete_class,
3887         check_abstract_method_definitions,
3888         java_check_abstract_method_definitions,
3889         check_interface_throws_clauses, java_check_abstract_methods,
3890         lookup_java_interface_method2,
3891         find_applicable_accessible_methods_list): Adjust BINFO accessors
3892         and addition.
3893         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
3894
3895 2004-07-18  Roger Sayle  <roger@eyesopen.com>
3896
3897         * builtins.c (max_builtin, min_builtin,
3898         java_build_function_call_expr): Replace calls to build with buildN.
3899         * class.c (build_class_ref, build_static_field_ref,
3900         get_dispatch_table, make_class_data, layout_class_method): Likewise.
3901         * constants.c (build_ref_from_constant_pool): Likewise.
3902         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
3903         add_stmt_to_compound): Likewise.
3904         * except.c (build_exception_object_ref, expand_end_java_handler):
3905         Likewise.
3906         * java-gimplify.c (java_gimplify_case_expr,
3907         java_gimplify_default_expr, java_gimplify_block,
3908         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
3909         * jcf-write.c (generate_bytecode_insns): Likewise.
3910         * typeck.c (convert_ieee_real_to_integer): Likewise.
3911
3912 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3913
3914         * java-tree.h (builtin_function): Declare.
3915
3916 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3917
3918         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
3919         abuse restore_line_number_status.
3920
3921 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
3922
3923         g++/15861
3924         * jcf-parse.c (java_emit_static_constructor): Specify default
3925         priority.
3926
3927 2004-07-13  Per Bothner  <per@bothner.com>
3928
3929         * java-tree.h (all_class_filename):  Remove useless macro.
3930         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
3931         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
3932         * parse.y (java_parser_context_restore_global):  Replace
3933         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
3934         * jcf-parse.c (read_class, java_parse_file):  Likewise.
3935
3936 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3937
3938         PR java/16474
3939         gjavah.c (print_field_info): Emit constant only if field is static.
3940
3941 2004-07-11  Roger Sayle  <roger@eyesopen.com>
3942
3943         * expr.c (java_truthvalue_conversion, flush_quick_stack,
3944         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
3945         build_java_ret, build_java_throw_out_of_bounds_exception,
3946         build_java_array_length_access, java_check_reference,
3947         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
3948         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
3949         expand_java_arrayload, build_java_monitor, expand_java_return,
3950         expand_load_internal, expand_java_NEW, build_get_class,
3951         build_instanceof, expand_java_CHECKCAST, expand_iinc,
3952         build_java_soft_divmod, build_java_binop, build_field_ref,
3953         expand_compare, expand_java_goto, expand_java_switch,
3954         expand_java_add_case, build_class_init, build_known_method_ref,
3955         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
3956         expand_invoke, build_jni_stub, expand_java_field_op,
3957         java_expand_expr, expand_byte_code, STORE_INTERNAL,
3958         force_evaluation_order, emit_init_test_initialization): Convert
3959         calls to "build" into calls to the prefered "buildN" functions.
3960
3961 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3962
3963         * java-tree.h (set_block): Remove.
3964         * lang.c (java_clear_binding_stack): New.
3965         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3966         * decl.c (struct binding_level): Remove this_block.
3967         (clear_binding_level): Likewise.
3968         (poplevel): Don't handle this_block.
3969         (set_block): Remove.
3970
3971 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
3972
3973         * class.c (common_enclosing_context_p): Remove statement with no
3974         side-effects.
3975
3976 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3977
3978         PR java/8618
3979         * parse.y (create_anonymous_class): Remove 'location' argument. Use
3980         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3981         (craft_constructor): Inherit access flags for implicit constructor
3982         from the enclosing class.
3983         (create_class): Fix comment typo.
3984         (resolve_qualified_expression_name): Pass type of qualifier to
3985         not_accessible_p, not the type in which target field was found.
3986         (not_accessible_p): Handle inner classes. Expand protected
3987         qualifier-subtype check to enclosing instances, but don't apply this
3988         check to static members. Allow protected access to inner classes
3989         of a subtype. Allow private access within common enclosing context.
3990         (build_super_invocation): Get WFL line number info from current
3991         class decl.
3992         (build_incomplete_class_ref): Update for new create_anonymous_class
3993         signature.
3994         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
3995         common_enclosing_instance_p.
3996         * class.c (common_enclosing_context_p): New. Determine if types
3997         share a common enclosing context, even across static contexts.
3998         (common_enclosing_instance_p): Renamed from
3999         common_enclosing_context_p. Determines if types share a common
4000         non-static enclosing instance.
4001         * java-tree.h (common_enclosing_instance_p): Declare.
4002         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4003         for inner class constructors.
4004         (generate_classfile): Use get_method_access_flags.
4005
4006 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4007
4008         * class.c (interface_of_p): Check for null TYPE_BINFO.
4009
4010 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4011
4012         * class.c (make_class): Do not create binfo here.
4013         (set_super_info): Create it here.
4014         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4015
4016 2004-07-08  Richard Henderson  <rth@redhat.com>
4017
4018         * expr.c (case_identity, get_primitive_array_vtable,
4019         java_expand_expr, emit_init_test_initialization): Remove.
4020         * java-tree.h (java_expand_expr): Remove.
4021         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4022
4023 2004-07-07  Per Bothner  <per@bothner.com>
4024
4025         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4026         get internal error due to mismatched types.
4027
4028         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4029
4030         * gcj.texi (Linking):   New node.  Document -lgij usage.
4031
4032 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4033
4034         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4035         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4036         * java/class.c (set_super_info, class_depth, interface_of_p,
4037         maybe_add_interface, add_interface, make_class_data,
4038         layout_class, add_miranda_methods): Adjust BINFO macros.
4039         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4040         * jcf-write.c (generate_classfile): Likewise.
4041         * parse.y (patch_anonymous_class,
4042         check_inner_circular_reference, check_circular_reference,
4043         java_complete_class, check_abstract_method_definitions,
4044         java_check_abstract_method_definitions,
4045         check_interface_throws_clauses, java_check_abstract_methods,
4046         lookup_java_interface_method2,
4047         find_applicable_accessible_methods_list): Likewise.
4048         * typeck.c (find_method_in_interface): Likewise.
4049         * verify.c (merge_types): Likewise.
4050
4051 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4052
4053         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4054         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4055
4056 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4057
4058         * class.c (make_class): Use make_tree_binfo.
4059         (set_super_info, add_interface_do): Likewise.
4060         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4061
4062 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4063
4064         * verify.c: Correct array element access formatting thinko.
4065
4066 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4067
4068         * verify.c: Insert a short blurb at the start referring to the JVMS.
4069         (merge_type_state): Remove redundant nested if statement.
4070         (verify_jvm_instructions): Ensure current_subr is initialised to
4071         NULL_TREE.
4072         Minor formatting fixes all over the place.
4073
4074 2004-07-02  Richard Henderson  <rth@redhat.com>
4075
4076         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4077
4078 2004-07-01  Richard Henderson  <rth@redhat.com>
4079
4080         * class.c (registerClass_libfunc): Remove.
4081         (init_class_processing): Don't set it.
4082         (emit_register_classes): Take list_p parameter.  Fill it in
4083         with _Jv_RegisterClass calls.
4084         * decl.c (java_init_decl_processing): Don't call
4085         init_resource_processing.
4086         * jcf-parse.c (java_emit_static_constructor): New.
4087         (java_parse_file): Call it.
4088         * resource.c (registerResource_libfunc): Remove.
4089         (init_resource_processing): Remove.
4090         (write_resource_constructor): Take list_p parameter.  Fill it in
4091         with _Jv_RegisterResource calls.
4092         * java-tree.h: Update prototypes.
4093
4094 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4095
4096         PR java/1262
4097         * class.c (layout_class_method): Do not override package-private
4098         method if its in a different package.
4099         (split_qualified_name): Move here from parse.y. Rename from
4100         breakdown_qualified. Add comment.
4101         (in_same_package): Move here from parse.y. Add comment.
4102         * java-tree.h (break_down_qualified, in_same_package): Declare.
4103         (in_same_package): Likewise.
4104         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4105         Callers updated.
4106
4107 2004-06-29  Andrew Haley  <aph@redhat.com>
4108
4109         * except.c (expand_start_java_handler): Push a new binding level.
4110         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4111         register_exception_range() to register where we'll do it.
4112         (expand_end_java_handler): Remove old bogus code.  Replace with
4113         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4114         the top of the expression we're curently building.
4115         (maybe_end_try): Delete.
4116         * decl.c (binding_level.exception_range): New field.
4117         (clear_binding_level): Add field exception_range.  Reformat.
4118         (poplevel): Call expand_end_java_handler().
4119         (poplevel): Call java_add_stmt only if functionbody is false.
4120         (maybe_poplevels): Don't call maybe_end_try() from here.
4121         (end_java_method): Clear no longer used trees in function decl.
4122         (register_exception_range): New function.
4123         * java-tree.h (register_exception_range, struct eh_range): Declare.
4124
4125 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4126
4127         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4128
4129 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4130
4131         Formatting fixes.
4132         * expr.c (class_has_finalize_method): Fix method name indentation.
4133         (expand_java_call): Remove K&R style parameter declaration.
4134         (expand_invoke): Fix statement indentation.
4135         (expand_java_field_op): Likewise.
4136         * parse-scan.y: Fix typo.
4137         (reset_report): Fix method name indentation.
4138         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4139         line. Fix typos.
4140         * verify.c (verify_jvm_instructions): Document parameters, insert
4141         page break.
4142         * lang.c (lang_init_source): Fix method name indentation.
4143         * class.c (common_enclosing_context_p): Likewise.
4144         (emit_symbol_table): Fix parameter list indentation.
4145         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4146         parameter declaration.
4147         * constants.c: Fix copyright notice indentation.
4148         * typeck.c (find_method_in_superclasses): Fix parameter list
4149         indentation.
4150         (find_method_in_interfaces): Likewise.
4151         * zextract.c (makelong): Fix method name indentation.
4152
4153 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4154
4155         PR java/15715.
4156         * parse.y (create_interface): Set correct access modifiers for
4157         interfaces.
4158         * jcf-write.c (get_classfile_modifiers): New function.
4159         (generate_classfile): Use get_classfile_modifiers, not
4160         get_access_flags.
4161
4162 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4163
4164         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4165         dependency to current parser context, not NULL_TREE, for top-level
4166         classes.
4167         (jdep_resolve_class): Enable member access check for all inner
4168         class dependencies.
4169
4170 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4171
4172         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4173         load_class.
4174
4175 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4176
4177         PR java/15734
4178         * expr.c (expand_java_field_op): Ensure that target class for static
4179         field access has been loaded.
4180
4181 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4182             Ranjit Mathew  <rmathew@hotmail.com>
4183
4184         PR java/1207, java/16178
4185         * jcf-parse.c (load_class): Return immediately if passed a type decl
4186         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4187         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4188         before calling load_class.
4189         (qualify_and_find): Likewise.
4190         (find_in_imports_on_demand): Likewise.
4191         (find_applicable_accessible_methods_list): Likewise.
4192
4193 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4194
4195         * parse.y (java_layout_seen_class_methods): Don't call load_class
4196         on class defined by source parser.
4197
4198 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4199
4200         * parse.y (set_nested_class_simple_name_value): Removed.
4201         (java_complete_expand_class): Remove calls to
4202         set_nested_class_simple_name_value.
4203
4204 2004-06-22  Andrew Haley  <aph@redhat.com>
4205             Ranjit Mathew  <rmathew@hotmail.com>
4206
4207         Fixes PR java/16113.
4208         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4209
4210 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4211
4212         * parse.y (create_class): Correct diagnostic message about
4213         java.lang.Object extending anything else.
4214
4215 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4216
4217         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4218         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4219         * constants.c (build_ref_from_constant_pool): Likewise.
4220         * expr.c (build_java_array_length_access): Likewise.
4221         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4222         (invoke_build_dtable, build_invokevirtual): Likewise.
4223         (build_invokeinterface, java_expand_expr): Likewise.
4224         (emit_init_test_initialization): Likewise.
4225         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4226         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4227
4228 2004-06-21  Andrew Haley  <aph@redhat.com>
4229
4230         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4231         block.
4232
4233 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4234
4235         * jcf.h (struct JCF): Change java_source, right_zip and finished
4236         to unsigned int.
4237         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4238         byte_swap and use_fallback to unsigned int.
4239         * parse.h (struct _jdep): Change flag0 to unsigned int.
4240
4241 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4242
4243         Fixes PR java/13948
4244         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4245         before trying to lay out its methods.
4246         * jcf-parse.c (read_class): Track parsed files using canonical paths
4247         obtained via lrealpath from libiberty.
4248         (java_parse_file): Likewise.
4249         (parse_source_file_1): Rename formal parameter to reflect its
4250         modified purpose. Minor formatting fix.
4251
4252 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4253
4254         * class.c (emit_register_classes): Make the function uninlinable,
4255         do not set current_function_cannot_inline.
4256         * resource.c (write_resource_constructor): Do not reset
4257         flag_inline_functions around rest_of_compilation.
4258
4259 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4260
4261         PR java/15769
4262         * expr.c (java_truthvalue_conversion): Handle
4263         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4264         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4265         i.e. return the expression.
4266
4267 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4268
4269         * gjavah.c: Include version.h
4270
4271 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4272
4273         * jcf-write.c (generate_bytecode_conditional): Correct handling
4274         of unordered conditionals. Add comment.
4275
4276 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4277             Per Bothner  <per@bothner.com>
4278
4279         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4280         local variable was initialised upon declaration.
4281         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4282         variable was final and initialised upon declaration.
4283         * check-init.c (check_final_reassigned): Give error only if a blank
4284         final is not definitely unassigned or if an initialised final is
4285         reassigned.
4286         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4287         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4288         (check_init): Perform initialised-variable-removing-optimisation
4289         only on non-final local variables.
4290
4291 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4292
4293         * jcf-write.c (generate_bytecode_conditional): Handle binops
4294         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4295         and LTGT_EXPR.
4296         (generate_bytecode_insns): Likewise.
4297
4298 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4299
4300         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4301         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4302
4303 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4304
4305         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4306         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4307
4308 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4309
4310         * decl.c (struct binding_level): Add GTY marker. Compile
4311         binding_depth unconditionally.
4312         (current_binding_level, free_binding_level, global_binding_level):
4313         Likewise.
4314         (clear_binding_level): Unconditionally set binding_depth.
4315         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4316
4317 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4318
4319         * lex.c (java_new_lexer): Set 'encoding'.
4320         (java_read_char): Improve error message for unrecognized characters.
4321         * lex.h (struct java_lexer): New field 'encoding'.
4322
4323 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4324
4325         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4326
4327 2004-05-21  Mark Wielaard  <mark@klomp.org>
4328
4329         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4330         extern.
4331
4332 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4333
4334         * typeck.c: Remove non-printable character 160.
4335
4336 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4337
4338         * check-init.c: Correct minor typos.
4339
4340 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4341
4342         * Make-lang.in, expr.c, java-gimplify.c: Rename
4343         tree-simple.[ch] to tree-gimple.[ch].
4344
4345 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4346
4347         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4348
4349 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4350
4351         Merge from tree-ssa-20020619-branch.  See
4352         ChangeLog.tree-ssa for details.
4353
4354         * Make-lang.in, builtins.c, check-init.c, class.c,
4355         constants.c, decl.c, except.c, expr.c, java-except.h,
4356         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4357         lang.c, lang.opt, parse.y, resource.c: Merged.
4358         * java-gimplify.c: New file.
4359
4360 2004-05-10  Andrew Haley  <aph@redhat.com>
4361
4362         * parse.y (create_class): Set TYPE_VFIELD.
4363         * decl.c (java_init_decl_processing): Likewise.
4364
4365         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4366         * class.c (make_method_value): Replace DECL_VINDEX with call to
4367         get_method_index().
4368         (get_dispatch_vector): Likewise.
4369         (layout_class_method): Likewise.
4370         Replace set of DECL_VINDEX with call to set_method_index().
4371         (set_method_index): New function.
4372         (get_method_index): New function.
4373         * java-tree.h (set_method_index): New function decl.
4374         (get_method_index): New function decl.
4375
4376 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4377
4378         * parse.y (check_pkg_class_access): Add new argument
4379         and use it when cl is NULL to call lookup_cl on it.
4380         (parser_check_super_interface): Do not call lookup_cl.
4381         Pass this_decl to check_pkg_class_access and NULL
4382         instead of lookup_cl.
4383         (parser_check_super): Update for change in
4384         check_pkg_class_access.
4385         (do_resolve_class): Likewise.
4386         (process_imports): Likewise.
4387         (find_in_imports_on_demand): Likewise.
4388         (resolve_qualified_expression_name): Likewise.
4389
4390 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4391
4392         Fixes PR java/9685, PR java/15073
4393         * parse.y (accessibility_string): New method.
4394         (not_accessible_field_error): Use accessibility_string()
4395         instead of java_accstring_lookup().
4396         (resolve_qualified_expression_name): Check with
4397         check_pkg_class_access() before allowing access using
4398         qualified names.
4399         Fix comment typo.
4400         Use check_pkg_class_access() instead of not_accessible_p()
4401         for unqualified types.
4402         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4403         REFERENCE for package-private access checking.
4404         (patch_method_invocation): Use accessibility_string() instead
4405         of java_accstring_lookup().
4406
4407 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4408
4409         Fixes PR java/15133
4410         * gjavah.c (struct method_name): Add member is_native.
4411         (overloaded_jni_method_exists_p): Match candidate method only if
4412         it is native.
4413         (print_method_info): Initialise is_native flag from the method's
4414         access flags.
4415
4416 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4417
4418         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4419         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4420
4421 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4422
4423         * resource.c (write_resource_constructor): Guard call to possibly
4424         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4425
4426 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4427
4428         * class.c (make_class_data): Add new field aux_info.
4429         * decl.c (java_init_decl_processing): Push type and decl for
4430         `aux_info'.
4431
4432 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4433
4434         * expr.c (expand_java_NEW): Don't use size argument for
4435         _Jv_AllocObject calls.
4436         * parse.y (patch_invoke): Likewise.
4437
4438 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4439
4440         * expr.c (build_invokeinterface): Remove unused variables to
4441         fix warnings.
4442
4443 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4444
4445         * class.c (get_interface_method_index): New function. Return dispatch
4446         index for interface method.
4447         (make_method_value): For interface methods, set index field to
4448         iface dispatch index, not DECL_VINDEX.
4449         * expr.c (build_invokeinterface): Use get_interface_method_index.
4450
4451 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4452
4453         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4454
4455 2004-03-31  Andrew Haley  <aph@redhat.com>
4456
4457         PR java/14104
4458         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4459
4460 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4461
4462         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4463         form of GTY markers.
4464
4465 2004-03-25  Marcus Meissner  <meissner@suse.de>
4466
4467         PR java/14689:
4468         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4469
4470 2004-03-23  Tom Tromey  <tromey@redhat.com>
4471
4472         PR java/14315:
4473         * jcf-write.c (make_class_file_name): Don't report if mkdir
4474         failed with EEXIST.
4475
4476 2004-03-23  Tom Tromey  <tromey@redhat.com>
4477
4478         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4479
4480 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4481
4482         * class.c, gjavah.c, lang.c: Fix comment typos.
4483         * gcj.texi: Fix typos.
4484
4485 2004-03-19  Per Bothner  <per@bothner.com>
4486
4487         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4488
4489         * class.c (assume_compiled_node_struct):  Rename type to
4490         class_flag_node_struct, as it is now also used for enable_assertions.
4491         Rename assume_compiled_node typedef.  Rename excludep field to value.
4492         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4493         Minor optimization - avoid needless strlen.
4494         (add_assume_compiled):  Some tweaking and optimization.
4495         Rename and generalize to add_class_flag takem an extra parameter.
4496         (add_assume_compled):  New just calls add_class_flag.
4497         (add_enable_assert, enable_assertions):  New functions.
4498         (enable_assert_tree):  New static.
4499         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4500         * lang.opt (fenable-assertions, fenable-assertions=,
4501         fdisable-assertions, fdisable-assertions=):  New options.
4502         * lang.c (java_handle_option):  Handle new options.
4503         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4504         class in an interface - create helper class nested in outer interface.
4505         (build_assertion):  Short-circuit if enable_assertions is false.
4506
4507 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4508
4509         * java-tree.h: Changes throughout to add checking to macros
4510         and numerous whitespace changes.
4511         (VAR_OR_FIELD_CHECK): New macro.
4512         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4513         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4514
4515 2004-03-16  Per Bothner  <per@bothner.com>
4516
4517         * jcf-jump.c (options):  New --print-constants option.
4518         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4519
4520         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4521         (print_constant_terse_with_index):  New helper function.
4522         (various places):  Check flag_print_constant_pool where missing.
4523         (main):  If verbose set flag_print_constant_pool.
4524         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4525
4526 2004-03-15  Andrew Haley  <aph@redhat.com>
4527
4528         PR java/14581
4529         * parse.y (java_complete_lhs): Check that final variable has an
4530         initializer.
4531
4532 2004-03-12  Andrew Haley  <aph@redhat.com>
4533
4534         PR java/14551
4535         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4536         conversion.
4537
4538 2004-02-29  Roger Sayle  <roger@eyesopen.com>
4539
4540         * jcf-parse.c (java_parse_file): Handle the case that input_filename
4541         is NULL.
4542
4543 2004-02-27  Per Bothner  <per@bothner.com>
4544
4545         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
4546         suggestion:  Use build_incomplete_class_ref.
4547         This fixes PR java/13508, java/11714.
4548
4549 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
4550
4551         * java/parse.h: Update copyright.
4552
4553 2004-02-26  Andrew Haley  <aph@redhat.com>
4554
4555         PR java/14231:
4556         * parse.y (check_interface_throws_clauses): Check for
4557         !METHOD_INVISIBLE (iface_method).
4558         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4559         well as CLASS_ABSTRACT.
4560
4561 2004-02-25  Per Bothner  <per@bothner.com>
4562
4563         * parse.y (build_assertion):  If we're in an inner class, create the
4564         class$ helper routine in the outer class.
4565
4566 2004-02-19  Richard Henderson  <rth@redhat.com>
4567
4568         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4569
4570 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
4571
4572         * Make-lang.in (java.install-man): Add extra dependencies.
4573
4574 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
4575
4576         * Make-lang.in: Install man pages under the same names
4577         (possibly transformed) as the program they document.
4578
4579 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
4580
4581         * gjavah.c: Include "intl.h".
4582         (error): New function.
4583         (main): Call gcc_init_libintl.
4584         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4585         print_stub_or_jni, process_file, main): Use error rather than
4586         fprintf.
4587         (print_method_info, usage, help, version, main): Mark strings for
4588         translation with _.  Avoid splitting up sentences.  Send
4589         information messages to stdout.
4590         * jcf-dump.c: Include "intl.h".
4591         (main): Call gcc_init_libintl.
4592         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4593         Mark error, usage and version messages for translation with _.
4594         Avoid splitting up sentences.
4595         * jv-scan.c: Include "intl.h".
4596         (fatal_error, warning): Change parameter s to msgid.  Translate
4597         messages.
4598         (main): Call gcc_init_libintl.
4599         (usage, help, version): Mark error, usage and version messages for
4600         translation with _.  Avoid splitting up sentences.
4601         * jvgenmain.c: Include "intl.h".
4602         (main): Call gcc_init_libintl.
4603         (usage, main): Mark error messages for translation with _.
4604         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4605         JVGENMAIN_OBJS): Add intl.o.
4606         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4607         java/jvgenmain.o): Update dependencies.
4608
4609 2004-02-08  Per Bothner  <per@bothner.com>
4610
4611         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
4612         class don't use not_accessible_field_error, which can get confused.
4613
4614 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4615
4616         Make-lang.in (po-generated):  Delete.
4617
4618 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4619
4620         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4621         Depend on target.h.
4622         * decl.c: Include target.h.
4623         (start_java_method): Replace PROMOTE_PROTOTYPES with
4624         targetm.calls.promote_prototypes.
4625         * expr.c: Include target.h.
4626         (pop_arguments): Replace PROMOTE_PROTOTYPES with
4627         targetm.calls.promote_prototypes.
4628         * parse.y: Include target.h.
4629         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4630         with targetm.calls.promote_prototypes.
4631
4632 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4633
4634         * typeck.c: Update copyright.
4635
4636 2004-02-02  Tom Tromey  <tromey@redhat.com>
4637
4638         * decl.c (java_init_decl_processing): Remove duplicate
4639         gnu/gcj/RawData.
4640
4641 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
4642
4643         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4644
4645 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
4646
4647         * expr.c (build_field_ref): Move variable
4648         definition up.
4649
4650 2004-01-28  Andrew Haley  <aph@redhat.com>
4651
4652         * expr.c (build_field_ref): Widen field offset.
4653
4654 2004-01-27  Andrew Haley  <aph@redhat.com>
4655
4656         java/13273
4657         * parse.y (check_interface_throws_clauses): Make sure class_decl
4658         has been loaded.
4659
4660 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
4661
4662         PR java/13733
4663         * parse.y (patch_assignment): Don't modify lhs_type for
4664         reference assignments.
4665
4666 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4667
4668         * Make-lang.in: Replace $(docdir) with doc.
4669         (java.info, java.srcinfo, java.man, java.srcman): New rules.
4670         (java.install-man): Revamp rule.
4671
4672 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4673
4674         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4675         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4676         instead of deferred backquote.
4677
4678 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
4679
4680         * typeck.c (find_method_in_interfaces): Move variable
4681         definition up.
4682
4683 2004-01-16  Andrew Haley  <aph@redhat.com>
4684
4685         PR java/13273:
4686         * typeck.c (shallow_find_method): New.
4687         (find_method_in_superclasses): New.
4688         (find_method_in_interfaces): New.
4689         (lookup_do): Rewrite.
4690         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4691
4692         * jcf-parse.c (read_class): Save and restore output_class.
4693         * decl.c (java_expand_body): Set output_class from fndecl.
4694
4695 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
4696
4697         * class.c (gen_indirect_dispatch_tables): Fix string length
4698         calculations.
4699
4700 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
4701
4702         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4703         (java.srcextra): Copy above back to source directory if requested.
4704         (po-generated): Delete reference to $(parsedir).
4705         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4706         Use implicit rule.
4707
4708 2004-01-14  Jan Hubicka  <jh@suse.cz>
4709
4710         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4711         estimation.
4712
4713 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
4714
4715         * java-tree.h (java_expand_expr): Change prototype.
4716         * expr.c (java_expand_expr): Add alt_rtl parameter.
4717
4718 2004-01-09  Andrew Haley  <aph@redhat.com>
4719
4720         PR java/12755:
4721         * parse.y (java_fix_constructors):  Set output_class.
4722         (java_reorder_fields): Likewise.
4723         (java_layout_classes): Likewise.
4724         (java_expand_classes): Generate indirect dispatch tables.
4725         (java_expand_classes): Set output_class.
4726         (java_finish_classes): Likewise.
4727         * lang.c (java_init): Turn on always_initialize_class_p if we're
4728         using indirect dis[atch.
4729         (java_decl_ok_for_sibcall): Use output_class, not current_class.
4730         (java_get_callee_fndecl): Use class local atable.
4731         * jcf-parse.c
4732         (always_initialize_class_p): Decl moved to java-tree.h.
4733         (HANDLE_CLASS_INFO): Set output_class.
4734         (read_class): Likewise.
4735         (parse_class_file): Call gen_indirect_dispatch_tables.
4736         (parse_zip_file_entries): Set output_class.
4737         (java_parse_file): Set output_class.  Don't emit symbol tables.
4738         * java-tree.h (output_class): New.
4739         Remove global declarations for otable, atable, and ctable.
4740         (always_initialize_class_p): moved here from decl.c.
4741         (DECL_OWNER): New.
4742         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
4743         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
4744         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
4745         (struct lang_type): Add otable_methods, otable_decl,
4746         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
4747         ctable_decl, catch_classes, type_to_runtime_map.
4748         * expr.c (build_field_ref): Make otable, atable, and ctable class
4749         local rather than global.
4750         (build_known_method_ref): Likewise.
4751         (build_invokeinterface): Likewise.
4752         (java_expand_expr): Pass runtime type (rather than actual type) to
4753         expand_start_catch.
4754         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
4755         this class.  Look up each class in that map to delete duplicates.
4756         (expand_end_java_handler): Pass runtime type (rather than actual
4757         type) to expand_start_catch.
4758         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
4759         (do_nothing): New.
4760         (java_init_decl_processing): Rearrange things.  Remove global
4761         declarations of otable, atable, and ctable.
4762         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
4763         (java_expand_body): Set output_class.
4764         * constants.c (build_constant_data_ref): Use output_class, not
4765         current_class.
4766         (alloc_name_constant): Likewise.
4767         * class.c (gen_indirect_dispatch_tables): New.
4768         (build_class_ref): Generate hard reference to superclass, even if
4769         using indirect dispatch.
4770         (build_static_field_ref): Use class local atable.
4771         (make_class_data): Generate hard reference to superclass, even if
4772         using indirect dispatch.
4773         Generate symbolic references to interfaces when using indirect
4774         dispatch.
4775         (make_class_data): Emit otable, atable, and ctable.
4776         Make otable, atable, and ctable class local rather than global.
4777         (emit_catch_table): Make otable, atable, and ctable class local
4778         rather than global.
4779
4780 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
4781
4782         * parse.y (catch_clause_parameter): Fix typo.
4783
4784         PR java/13404
4785         * parse.y: (catch_clause_parameter): Return early if $3, aka
4786         formal_parameter, is null.
4787
4788 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4789
4790         * class.c: Remove uses of "register" specifier in
4791         declarations of arguments and local variables.
4792         * decl.c: Likewise.
4793         * expr.c: Likewise.
4794         * gjavah.c: Likewise.
4795         * jcf-dump.c: Likewise.
4796         * jcf-io.c: Likewise.
4797         * jcf-parse.c: Likewise.
4798         * jcf-write.c: Likewise.
4799         * keyword.h: Likewise.
4800         * parse.y: Likewise.
4801         * typeck.c: Likewise.
4802         * verify.c: Likewise.
4803
4804 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
4805
4806         * Make-lang.in (GCJ_CROSS_NAME): Delete.
4807         (java.install_common, java.install-man): Adjust for above.
4808         (java.uninstall): Likewise.
4809
4810 2003-12-03  Michael Koch  <konqueror@gmx.de>
4811
4812         * class.c (make_class_data):
4813         Push field value to 'hack_signers' instead of 'signers'.
4814         * decl.c (java_init_decl_processing):
4815         Push field 'hack_signers' instead of 'signers'.
4816
4817 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
4818
4819         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4820         including iconv.h.
4821
4822 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
4823
4824         PR java/12374:
4825         * parse.y (qualify_ambiguous_name): Remove lots of broken
4826         field access processing - there's no need to do that here,
4827         because we have resolve_field_access.  Remove
4828         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4829         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4830         used.
4831
4832 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
4833
4834         Fix PR java/13237
4835         * parse.y (java_complete_lhs): Save location prior to patching
4836         CALL_EXPR.
4837
4838 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
4839
4840         PR java/12548
4841         * resource.c (write_resource_constructor): Append
4842         "_resource" to constructor identifier name.
4843
4844 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
4845
4846         Fix PR java/13183.
4847         * constants.c (cpool_for_class): New function.
4848         (outgoing_cpool): Remove global variable.
4849         (alloc_name_constant): Use cpool_for_class.
4850         (build_constants_constructor): Likewise.
4851         * decl.c (java_expand_body): Set current_class.
4852         * java-tree.h (outgoing_cpool) Remove declaration.
4853         (init_outgoing_cpool): Likewise.
4854         * jcf-parse.c (init_outgoing_cpool): Remove function.
4855         (parse_class_file): Don't call init_outgoing_cpool.
4856         * parse.y (java_complete_expand_methods): Don't call
4857         init_outgoing_cpool.  Don't save outgoing_cpool.
4858         (java_expand_classes): Don't restore outgoing_cpool.
4859         (java_finish_classes): Likewise.
4860
4861 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
4862
4863         * Make-lang.in: (java.install-common) Add
4864         symlink for $(target_noncanonical)-gcjh for
4865         native builds.
4866
4867 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4868
4869         * Make-lang.in (java.extraclean): Delete.
4870
4871 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4872
4873         * Make-lang.in (check-java): Add.
4874
4875 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
4876
4877         Fix PR java/13024.
4878         * except.c (prepare_eh_table_type): Allocate variable-sized
4879         buffer `buf' with alloca.
4880
4881 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4882
4883         Fix PR java/12857.
4884
4885         decl.c (java_init_decl_processing): Don't initialize
4886         class_not_found_type_node, no_class_def_found_type_node.
4887
4888         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
4889         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
4890         (class_not_found_type_node, no_class_def_found_type_node):
4891         Don't define.
4892
4893         parse.y (build_dot_class_method_invocation): Add this_class
4894         argument.  Qualify method invocations to a different class.
4895         (create_new_parser_context): Initialize saved_data_ctx to 0.
4896         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
4897         (build_dot_class_method): Don't load classes.  Register
4898         incomplete types.
4899         (build_incomplete_class_ref): Special cases for interfaces
4900         and inner classes.  Move build_dot_class_method call to here...
4901         (patch_incomplete_class_ref): ...from here.  Pass current_class
4902         to build_dot_class_method_invocation.
4903         (build_assertion): Pass class_type to
4904         build_dot_class_method_invocation.
4905         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
4906
4907 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4908
4909         Fix PR java/12739.
4910         * java-tree.h (BLOCK_EMPTY_P): Define.
4911         * parse.y (java_complete_lhs): Check for empty blocks
4912         in TRY_FINALLY_EXPR case.
4913
4914 2003-11-17  Andrew Haley  <aph@redhat.com>
4915
4916         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
4917         (struct lang_decl_var:freed): New variable.
4918         * decl.c (poplevel): Mark local vars that have gone out of scope.
4919         (push_jvm_slot): Don't use the RTL of a var that has gone out of
4920         scope.
4921
4922 2003-11-16  Jason Merrill  <jason@redhat.com>
4923
4924         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
4925         and TAGS files that include them for each front end.
4926
4927 2003-11-15  Tom Tromey  <tromey@redhat.com>
4928
4929         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
4930
4931 2003-11-12  Jason Merrill  <jason@redhat.com>
4932
4933         PR optimization/12547
4934         * lang.c (java_tree_inlining_walk_subtrees): Just walk
4935         BLOCK_EXPR_BODY directly.
4936
4937 2003-11-12  Andrew Haley  <aph@redhat.com>
4938
4939         PR java/11045
4940         * parse.y (fold_constant_for_init): Check that we really do have a
4941         constant.
4942
4943         PR java/11533
4944         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
4945         init_test_decls being inlined.
4946
4947         PR java/12890:
4948         * parse.y (do_resolve_class): Check return value from
4949         breakdown_qualified().
4950
4951 2003-11-11  Tom Tromey  <tromey@redhat.com>
4952
4953         PR java/12915:
4954         * parse.y (merge_string_cste): Handle case where we have a
4955         pointer that happens to be zero, not null_pointer_node.
4956
4957 2003-11-10  Tom Tromey  <tromey@redhat.com>
4958
4959         * jcf-parse.c (classify_zip_file): Correctly compare
4960         filename_length against length of manifest file's name.
4961
4962 2003-11-08  Tom Tromey  <tromey@redhat.com>
4963
4964         PR java/12894:
4965         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
4966
4967 2003-11-06  Andrew Haley  <aph@redhat.com>
4968
4969         * expr.c (java_stack_swap): Make sure destination stack slots are
4970         of the correct type.
4971
4972 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
4973
4974         * Make-lang.in (dvi): Move targets to $(docobjdir).
4975         (gcj.dvi): Simplify rule and adjust target.
4976         (gcj.info): Simplify rule.
4977         (gcj.pod): New intermediate rule.
4978         (gcjh.pod): Likewise.
4979         (jv-scan.pod): Likewise.
4980         (jcf-dump.pod): Likewise.
4981         (gij.pod): Likewise.
4982         (jv-convert.pod): Likewise.
4983         (rmic.pod): Likewise.
4984         (rmiregistry.pod): Likewise.
4985         (gcj.1): Delete.
4986         (gcjh.1): Delete.
4987         (jv-scan.1): Delete.
4988         (jcf-dump.1): Delete.
4989         (gij.1): Delete.
4990         (jv-convert.1): Delete.
4991         (rmic.1): Delete.
4992         (rmiregistry.1): Delete.
4993
4994 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
4995
4996         Fixes PR java/12866.
4997         * parse.y (resolve_qualified_expression_name): Move test
4998         for outer field access methods from here...
4999         (check_thrown_exceptions) ...to here.
5000
5001 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5002
5003         * .cvsignore: Delete.
5004
5005 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5006
5007         * verify.c (verify_jvm_instructions): Don't warn about legal
5008         eh binding regions generated for example by jdk 1.4.1.
5009
5010 2003-10-24  David S. Miller  <davem@redhat.com>
5011
5012         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5013
5014 2003-10-22  Andrew Haley  <aph@redhat.com>
5015
5016         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5017         (java_get_callee_fndecl): New.
5018
5019         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5020
5021         * java-tree.h (ctable_decl): New.
5022         (catch_classes):  New.
5023         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5024
5025         * decl.c (java_init_decl_processing): Add catch_class_type.
5026         Add ctable_decl.
5027         Add catch_classes field.
5028
5029         * class.c (build_indirect_class_ref): Break out from
5030         build_class_ref.
5031         (make_field_value): Check flag_indirect_dispatch.
5032         (make_class_data): Ditto.
5033         Tidy uses of PUSH_FIELD_VALUE.
5034         Add field catch_classes.
5035         (make_catch_class_record): New.
5036
5037         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5038
5039 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5040
5041         * jcf-write.c: Follow spelling conventions.
5042         * parse.y: Likewise.
5043
5044 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5045
5046         * ChangeLog: Fix typos.
5047         * expr.c: Fix comment typos.
5048         * jcf-write.c: Likewise.
5049         * lang.c: Likewise.
5050         * lex.c: Likewise.
5051         * mangle.c: Likewise.
5052         * parse-scan.y: Likewise.
5053         * parse.y: Likewise.
5054
5055 2003-10-22  Tom Tromey  <tromey@redhat.com>
5056
5057         * expr.c (expand_byte_code): Only warn about dead bytecode when
5058         extra_warnings is set.
5059
5060 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5061
5062         Fix for PR java/12586.
5063         * mangle.c (find_compression_record_match): Don't iterate through
5064         package namespace elements unless they all match compression_table
5065         entries.
5066
5067 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5068
5069         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5070         (generate-manpages): Likewise.
5071         (java.maintainer-clean): Likewise.
5072         (gcj.info): Likewise.
5073         (gcj.1): Likewise.
5074         (gcjh.1): Likewise.
5075         (jv-scan.1): Likewise.
5076         (jcf-dump.1): Likewise.
5077         (gij.1): Likewise.
5078         (jv-convert.1): Likewise.
5079         (rmic.1): Likewise.
5080         (rmiregistry.1): Likewise.
5081         (java.install-man): Likewise.
5082         (parse-scan.o): Move and define complete compile line.
5083         (parse.o): Likewise.
5084         (jcf-tree-inline.o): Move.
5085
5086 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5087
5088         * Make-lang.in (info): Update dependencies.
5089         (java.install-info): Remove.
5090         ($(srcdir)/java/gcj.info): Replace with ...
5091         ($(docobjdir)/gcj.info): ... this.
5092
5093 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5094
5095         * Make-lang.in: Replace uses of $(target_alias) with
5096         $(target_noncanonical).
5097
5098 2003-10-09  Tom Tromey  <tromey@redhat.com>
5099
5100         * decl.c (java_init_decl_processing): Declare signers field.
5101         * class.c (make_class_data): Set signers field.
5102
5103 2003-10-09  Jason Merrill  <jason@redhat.com>
5104
5105         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5106         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5107         POINTER_TYPE.
5108
5109 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5110
5111         * Make-lang.in (java.info): Replace with ...
5112         (info): ... this.
5113         (java.dvi): Replace with ...
5114         (dvi): ... this.
5115         (java.generated-manpages): Replace with ...
5116
5117 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5118
5119         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5120
5121 2003-10-01  Andrew Haley  <aph@redhat.com>
5122
5123         * jcf-parse.c (java_parse_file): Write otable and atable.
5124         * java-tree.h (atable_methods): New.
5125         (atable_decl): New.
5126         (atable_syms_decl): New.
5127         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5128         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5129         (symbol_*type): Rename method_symbol* to symbol*type.
5130         (emit_offset_symbol_table): Delete.
5131         (emit_symbol_table): New.
5132         (get_symbol_table_index): New.
5133         (atable_type): New.
5134         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5135         (build_known_method_ref): Likewise.
5136         (get_symbol_table_index): Rename from get_offset_table_index.
5137         Parameterize to allow re-use by differing types of symbol table.
5138         (build_invokevirtual): Pass table to get_offset_table_index.
5139         * decl.c (java_init_decl_processing): Push types and decls for
5140         atable and atable_syyms.
5141         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5142         (make_class_data): Add new fields atable and atable_syms.
5143         (emit_symbol_table): Rename from emit_offset_symbol_table.
5144         Parameterize to allow re-use by different types of symbol table.
5145         (build_symbol_entry): Renamed from build_method_symbols_entry.
5146
5147 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5148
5149         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5150         semantics for SAVE_EXPR, by caching the result in a temporary.
5151
5152 2003-09-28  Richard Henderson  <rth@redhat.com>
5153
5154         * check-init.c (check_init): Save and restore input_location
5155         instead of file and line separately.
5156         * decl.c (java_expand_body): Likewise.
5157         * jcf-write.c (generate_bytecode_insns): Likewise.
5158         * parse.y (safe_layout_class): Likewise.
5159         * jcf-parse.c (read_class, parse_class_file): Likewise.
5160         (java_parse_file): Use %H for warning locator.
5161
5162 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5163
5164         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5165         with void-type branches instead of using a COMPOUND_EXPR.
5166
5167 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5168
5169         * decl.c (java_optimize_inline, dump_function): Remove.
5170         * java-tree.h (java_optimize_inline): Remove declaration.
5171         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5172         * parse.y (source_end_java_method, java_expand_classes):
5173         Likewise.  Remove dead code.
5174
5175 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5176
5177         * lang.c (java_init_options): Set flag_evaluation_order.
5178         * expr.c (force_evaluation_order): Don't attempt to force
5179         evaluation order of binary operations using save_expr.
5180         * parse.y (java_complete_lhs): No longer need to call
5181         force_evaluation_order when constructing binary operators.
5182
5183 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5184             Bryce McKinlay  <bryce@mckinlay.net.nz>
5185
5186         PR java/1333:
5187         * parse.y (not_accessible_field_error): New function.
5188         (resolve_expression_name): Check field access permissions.
5189         (resolve_qualified_expression_name): Use
5190         not_accessible_field_error.
5191         (resolve_qualified_expression_name): Likewise.
5192
5193 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5194
5195         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5196
5197 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5198
5199         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5200         with equal operands without side-effects.
5201
5202 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5203
5204         * decl.c (java_init_decl_processing): Don't emit otable decls
5205         if flag_indirect_dispatch is not set.
5206
5207 2003-09-21  Richard Henderson  <rth@redhat.com>
5208
5209         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5210         resource.c: Revert.
5211
5212 2003-09-21  Richard Henderson  <rth@redhat.com>
5213
5214         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5215         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5216
5217 2003-09-20  Richard Henderson  <rth@redhat.com>
5218
5219         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5220
5221 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5222
5223         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5224         * check-init.c (check_init): Likewise.
5225
5226 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5227
5228         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5229
5230 2003-09-16  Andrew Haley  <aph@redhat.com>
5231
5232         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5233
5234 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5235
5236         Fixes PR java/9577
5237         * mangle.c (find_compression_record_match): Skip
5238         over a "6JArray" (the array template mangled string)
5239         IDENTIFIER_NODE.
5240         (mangle_array_type): Correct minor typo.
5241         (atms): Move definition to the beginning.
5242
5243 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5244
5245         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5246         out. Fix for PR java/12254.
5247
5248 2003-09-11  Richard Henderson  <rth@redhat.com>
5249
5250         * parse.y (source_end_java_method): Update for new
5251         cgraph_finalize_function argument.
5252
5253 2003-09-09  Richard Henderson  <rth@redhat.com>
5254
5255         * parse.y (source_end_java_method): Update call to
5256         cgraph_finalize_function.
5257
5258 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5259
5260         * decl.c (java_expand_body): New function.
5261         * expr.c (build_class_init): Set DECL_IGNORED_P.
5262         * java-tree.h (start_complete_expand_method,
5263         java_expand_body): Declare.
5264         * jcf-parse.c (cgraph.h): Include.
5265         (java_parse_file): Handle flag_unit_at_a_time.
5266         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5267         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5268         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5269         (java_start_inlining): New function.
5270         * parse.h (java_finish_classes): Declare.
5271         * parse.y: Include cgraph.h.
5272         (block): Don't special-case empty block production.
5273         (craft_constructor): Set DECL_INLINE.
5274         (source_end_java_method): Handle flag_unit_at_a_time.
5275         Replace inline code with call to java_expand_body.
5276         (start_complete_expand_method): Remove static modifier.
5277         (java_expand_method_bodies): Patch function tree for
5278         class initialization and/or synchronization as needed.
5279         Don't begin RTL expansion yet.
5280         (java_expand_classes): Check flag_unit_at_a_time before
5281         calling finish_class.
5282         (java_finish_classes): New function.
5283         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5284         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5285         (emit_test_initialization): Set DECL_IGNORED_P.
5286
5287 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5288
5289         * builtins.c (enum builtin_type): Delete unused enumeration.
5290         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5291
5292 2003-08-28  Tom Tromey  <tromey@redhat.com>
5293
5294         * gcj.texi (Extensions): Document gcjlib URLs.
5295
5296 2003-08-20  Tom Tromey  <tromey@redhat.com>
5297
5298         * gcj.texi (Extensions): Added xref.
5299         (libgcj Runtime Properties): Document
5300         gnu.gcj.runtime.VMClassLoader.library_control.
5301
5302 2003-08-20  Andrew Haley  <aph@redhat.com>
5303
5304         * except.c (prepare_eh_table_type): Use new encoding for exception
5305         handlers when using -fno-assume-compiled.
5306
5307 2003-08-13  Tom Tromey  <tromey@redhat.com>
5308
5309         * gcj.texi (Invoking gij): Document -X and -?.
5310
5311 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5312
5313         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5314         GCJH_OBJS, JCFDUMP_OBJS
5315         * win32-host.c: Removed the unnecessary and broken dependency
5316         on jcf.h
5317
5318 2003-08-11  Tom Tromey  <tromey@redhat.com>
5319
5320         * parse.y (java_check_regular_methods): Typo fixes.  Call
5321         check_interface_throws_clauses.  Use
5322         check_concrete_throws_clauses.
5323         (check_interface_throws_clauses): New function.
5324         (check_concrete_throws_clauses): New function.
5325         (hack_is_accessible_p): New function.
5326         (find_most_specific_methods_list): Added FIXME.
5327         * typeck.c (lookup_do): Use `flags' argument to decide what to
5328         do.  Reimplemented.
5329         (lookup_argument_method_generic): New function.
5330         (lookup_argument_method2): Removed.
5331         * jcf.h (ACC_INVISIBLE): New define.
5332         * jcf-write.c (generate_classfile): Skip invisible methods.
5333         * class.c (add_miranda_methods): New function.
5334         (layout_class_methods): Use it.
5335         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5336         * java-tree.h (METHOD_INVISIBLE): New define.
5337         (lang_decl_func) [invisible]: New field.
5338         (lookup_argument_method_generic): Declare.
5339         (SEARCH_INTERFACE): New define.
5340         (SEARCH_SUPER): Likewise.
5341         (SEARCH_ONLY_INTERFACE): Likewise.
5342         (SEARCH_VISIBLE): Likewise.
5343         (lookup_argument_method2): Removed declaration.
5344
5345 2003-08-05  Tom Tromey  <tromey@redhat.com>
5346
5347         Fix for PR java/11600:
5348         * parse.y (java_complete_lhs): See whether we're calling a method
5349         on an array.
5350         (check_thrown_exceptions): Added `is_array_call' argument;
5351         fixed `clone' checking; updated all callers.
5352
5353 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5354
5355         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5356
5357 2003-08-03  Tom Tromey  <tromey@redhat.com>
5358
5359         * java-tree.h (METHOD_TRANSIENT): Removed.
5360         * decl.c (pushdecl): Removed some dead code.
5361         * class.c (get_access_flags_from_decl): Can't have transient
5362         method.
5363         (add_method_1): Can't have a transient method.
5364
5365 2003-07-28  Andreas Jaeger  <aj@suse.de>
5366
5367         * jvspec.c: Convert to ISO C90 prototypes.
5368
5369 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5370
5371         * decl.c (force_poplevels): Fix warning call.
5372
5373 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5374
5375         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5376         (expand_java_field_op): Likewise.
5377         * class.c (layout_class_method): Likewise
5378         (emit_register_classes): Likewise.
5379         * decl.c (pushdecl): Likewise.
5380         (poplevel): Likewise.
5381         (force_poplevels): Likewise.
5382         (give_name_to_locals): Likewise.
5383         * check-init.c (check_for_initialization): Likewise.
5384
5385 2003-07-24  Jason Merrill  <jason@redhat.com>
5386
5387         * java-tree.h: Move boolean_type_node et al to the back end.
5388
5389 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5390
5391         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5392         casts.
5393
5394 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5395
5396         * lang.opt: Don't show -MD_ and -MDD_.
5397
5398 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5399
5400         * lang-options.h: Remove.
5401         * lang.opt: Add help text.
5402
5403 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5404
5405         * expr.c: Remove the last argument to expand_assignment().
5406
5407 2003-07-09  Jan Hubicka  <jh@suse.cz>
5408
5409         * java-tree.h (DECL_NUM_STMTS): Rename to...
5410         (DECL_ESTIMATED_INSNS): ... this.
5411         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5412         New static functions.
5413         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5414         * parser.y (add_stmt_to_compound): Do not account statements.
5415
5416 2003-07-08  Mark Wielaard  <mark@klomp.org>
5417
5418         * gcj.texi: CNI now expands to Compiled Native Interface.
5419
5420 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5421
5422         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5423
5424 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5425
5426         * expr.c (expand_byte_code): Adjist emit_line_note call.
5427
5428 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5429
5430         * lang.c (java_handle_option): Don't handle filenames.
5431
5432 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5433
5434         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5435         DIR_SEPARATOR.
5436         Use FILENAME_CMP.
5437         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5438         * jcf.h: Delete COMPARE_FILENAMES definition.
5439
5440 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5441
5442         * lang.c (java_init_options): Update prototype.
5443
5444 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5445
5446         * decl.c (poplevel): Adjust define_label call.
5447
5448 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5449
5450         * gjavah.c (flag_jni): Make non-static.
5451         * parse-scan.y (ctxp): Make non-static.
5452
5453         * class.c (build_method_symbols_entry)
5454         * expr.c (get_offset_table_index)
5455         * jcf-parse.c (jcf_parse):
5456         Mark the definition static, matching the forward declaration.
5457
5458 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5459
5460         * lang.c (java_handle_option): Don't check for missing arguments.
5461
5462 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5463
5464         * class.c (push_class): Use a location_t to save place.
5465         (emit_register_classes): Set input_location. Adjust
5466         expand_function_end call.
5467         * resource.c (write_resource_constructor): Likewise.
5468         * decl.c (end_java_method): Adjust expand_function_end call.
5469         * parse.y (source_end_java_method): Likewise.
5470
5471 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5472
5473         * lang.c (java_handle_option): Likewise.
5474
5475 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5476
5477         * lang.c (java_handle_option): Special-casing of optional
5478         joined arguments no longer needed.
5479         * lang.opt: Update switches that take optional argument.
5480
5481 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5482
5483         * lang.opt: Declare Java.
5484         * lang.c (java_init_options): Update.
5485
5486 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5487
5488         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5489
5490 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5491
5492         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5493         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5494         * lang.opt: -MD and -MMD have an underscore.
5495
5496 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5497
5498         * class.c (emit_register_classes): Adjust init_function_start
5499         call.
5500         * decl.c (complete_start_java_method): Likewise.
5501         * resource.c (write_resource_constructor): Likewise.
5502
5503 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5504
5505         * Make-lang.in: Update to use options.c and options.h.
5506         * lang.c: Include options.h not j-options.h.
5507         (java_handle_option): Abort on unrecognized option.
5508         (java_init_options): Request Java switches.
5509
5510 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5511
5512         * Make-lang.in: Handle mostlyclean.
5513
5514 2003-06-11  Tom Tromey  <tromey@redhat.com>
5515
5516         * lang.c (java_handle_option): Update dependency_tracking for
5517         OPT_MF case.
5518
5519         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5520         empty argument.
5521
5522 2003-06-10  Andrew Haley  <aph@redhat.com>
5523
5524         * resource.c (write_resource_constructor): Use expand_expr to
5525         generate the address of the label attached to a resource.
5526         * Make-lang.in (java/resource.o): Add expr.h
5527
5528 2003-06-10  Andrew Haley  <aph@redhat.com>
5529
5530         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5531         (java_decl_ok_for_sibcall): New.
5532
5533 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
5534
5535         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5536         (java/j-options.c, java/j-options.h): New.
5537         * java-tree.h (resource_name, compile_resource_file,
5538         compile_resource_data): Constify.
5539         * jcf-write.c (jcf_write_base_directory): Similarly.
5540         * jcf.h (jcf_write_base_directory): Similarly.
5541         * lang.c: Include j-options.h.
5542         (cl_options_count, cl_options, string_option, java_decode_option,
5543         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5544         process_option_with_no): Remove.
5545         (resource_name): Constify.
5546         (LANG_HOOKS_HANDLE_OPTION): Override.
5547         (java_handle_option): New.
5548         (java_init): Don't call jcf_path_init.
5549         (java_init_options): Call jcf_path_init.
5550         * lang.opt: New.
5551         * resource.c (compile_resource_data, compile_resource_file): Constify.
5552
5553 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
5554
5555         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5556         (struct lang_decl_func): Add last_line field.
5557         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5558         DECL_SOURCE_LINE_LAST): Remove.
5559         * parse.y (missing_return_error, finish_method_declaration,
5560         lookup_cl, start_artificial_method_body, source_end_java_method,
5561         start_complete_expand_method): Adjust.
5562
5563 2003-06-08  Tom Tromey  <tromey@redhat.com>
5564
5565         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5566         fno-assume-compiled.
5567
5568 2003-06-08  Roger Sayle  <roger@eyesopen.com>
5569
5570         * builtins.c (define_builtin_type, builtin_types): Delete.
5571         (define_builtin): Rewritten to take just the built-in code,
5572         the function's name, type and fallback library function name.
5573         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5574         (initialize_builtins): Overhaul to define the GCC builtins
5575         used by gcj manually, providing the Java run-time's
5576         implementations as the fallback library function.
5577
5578 2003-06-08  Anthony Green  <green@redhat.com>
5579
5580         * parse.y (patch_cast): Fix conversions from floating-point to
5581         integral types.
5582
5583 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
5584
5585         * Make-lang.in: Update.
5586         * lang.c: Include opts.h. Define cl_options_count and cl_options.
5587
5588 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
5589
5590         * lang.c (java_init_options): Update.
5591
5592 2003-06-05  Jan Hubicka  <jh@suse.cz>
5593
5594         * Make-lang.in:  Add support for stageprofile and stagefeedback
5595
5596 2003-05-31  Roger Sayle  <roger@eyesopen.com>
5597
5598         * lang.c (java_init_options): Prescribe wrap-around two's
5599         complement arithmetic overflow by setting flag_wrapv.
5600
5601 2003-05-29  Roger Sayle  <roger@eyesopen.com>
5602
5603         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5604         (builtin_record): Add an additional builtin_code field to
5605         record which GCC built-in corresponds to the Java function.
5606         (java_builtins):  Add new entries for atan, atan2, exp, log,
5607         pow and tan.
5608         (max_builtin, min_builtin, abs_builtin): Perform constant
5609         folding on the resulting tree.
5610         (java_build_function_call_expr): Likewise, perform constant
5611         folding on the resulting tree.
5612         (initialize_builtins): The NULL creators are now allowed in
5613         the java_builtins table, which is now terminated by an entry
5614         with builtin_code == END_BUILTINS.
5615         (check_for_builtin): Likewise.  If the matching creator is
5616         NULL, construct the call using java_build_function_call_expr
5617         directly with the decl for the corresponding builtin_code.
5618
5619 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5620
5621         * win32-host.c: Normalize copyright boilerplate.
5622
5623 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5624
5625         * parse.y (print_int_node): Use string concatentation on
5626         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5627         function calls into one.
5628
5629 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
5630
5631         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5632         fatal_io_error with calls to fatal_error; add ": %m" to the end of
5633         all the affected error messages.
5634
5635 2003-05-13  Richard Henderson  <rth@redhat.com>
5636
5637         * class.c (layout_class_method): Set DECL_EXTERNAL.
5638         * decl.c (java_mark_decl_local, java_mark_class_local): New.
5639         * java-tree.h (java_mark_class_local): Declare.
5640         * jcf-parse.c (parse_class_file): Use it.
5641         * parse.y (java_expand_classes): Likewise.
5642
5643 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
5644
5645         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5646         * lex.h: #include input.h.
5647         * jv-scan.c (input_filename): Remove.
5648
5649 2003-05-02  Tom Tromey  <tromey@redhat.com>
5650
5651         PR java/10491:
5652         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5653         (handle_inner_classes): New function.
5654
5655 2003-05-01  Tom Tromey  <tromey@redhat.com>
5656
5657         PR java/10459:
5658         * parse.y (finish_for_loop): Do nothing if update expression is a
5659         EXPR_WFL_NODE wrapping nothing.
5660         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5661
5662 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5663
5664         * lex.h (input_lineno): Remove declaration.
5665         * parse-scan.y: #include input.h.
5666         (input_filename): Remove declaration.
5667         (input_location): Add definition.
5668         (input_line): Remove definition.
5669
5670 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5671
5672         * lex.h (lineno): Rename to ...
5673         (input_line): ... here
5674         * parse-scan.y (lineno): Rename to ...
5675         (input_line): ... here.
5676         (reset_report): Rename lineno to input_line.
5677         * check-init.c (check_init): Likewise.
5678         * class.c (push_class): Likewise.
5679         * decl.c (complete_start_java_method, end_java_method): Likewise.
5680         * expr.c (expand_byte_code): Likewise.
5681         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5682         * jcf-write.c (generate_bytecode_insns): Likewise.
5683         * lex.c (java_init_lex, java_allocate_new_line,
5684         do_java_lex): Likewise.
5685         * parse.h (YYNOT_TWICE): Likewise.
5686         * parse.y (empty_statement, expression_statement,
5687         java_pop_parser_context, java_parser_context_save_global,
5688         yyerror, register_fields, method_header, safe_layout_class,
5689         find_in_imports_on_demand, create_artificial_method,
5690         source_end_java_method, start_complete_expand_method,
5691         build_thisn_assign, java_complete_lhs,
5692         maybe_absorb_scoping_block): Likewise.
5693
5694 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
5695
5696         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5697         '/' when computing java source filename
5698
5699 2003-04-13  Tom Tromey  <tromey@redhat.com>
5700
5701         * gjavah.c (print_c_decl): Indentation fix.
5702
5703 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
5704
5705         * class.c (make_field_value, make_method_value, get_dispatch_table)
5706         (make_class_data, emit_offset_symbol_table)
5707         * constants.c (build_constants_constructor)
5708         * java-tree.h (START_RECORD_CONSTRUCTOR)
5709         * parse.y (maybe_build_array_element_wfl):
5710         Use build_constructor.
5711
5712 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
5713
5714         PR java/10253:
5715         * parse.y (string_convert_int_cst): Always use at least one digit
5716         in string conversion. Remove ASCII dependence.
5717         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5718
5719 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
5720
5721         * Make-lang.in: added win32-host.c
5722         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5723         resolves to open() on non-Win32 platforms and
5724         Win32-specific jcf_open_exact_case() on Win32
5725         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
5726         when trying .java and .class files
5727         * win32-host.c: added to repository. Defines
5728         Win32-specific jcf_open_exact_case()
5729
5730 2003-04-10  Andrew Haley  <aph@redhat.com>
5731
5732         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
5733         (maybe_free_localvar): Renamed from localvar_free.
5734         Add new arg, really.
5735         (generate_bytecode_insns): Set new variable, jsrs.
5736         Only free local vars if no jsr insns have been emittted.
5737         Call maybe_free_localvar, not localvar_free.
5738
5739 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5740
5741         * gcj.texi: Remove @ at start of file.
5742
5743 2003-03-25  Tom Tromey  <tromey@redhat.com>
5744
5745         * parse.y (create_interface): Call CHECK_DEPRECATED.
5746
5747 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
5748
5749         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5750
5751 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
5752
5753         * javaop.h (jfloat, jdouble): Make them structures mirroring
5754         the bit fields of IEEE float and double respectively.
5755         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
5756         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
5757         (union Word, union DWord): Delete.
5758         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
5759
5760         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
5761         D_NAN_MASK): Delete.
5762         (jni_print_float, jni_print_double): New.  Generate
5763         hexadecimal floating constants.
5764         (print_field_info): Use jni_print_float/double.
5765
5766         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
5767         finite floating point numbers for output; special case
5768         non-finite floats.
5769
5770 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
5771
5772         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
5773         Replace 0 and 1 with true and false in return statements.
5774
5775 2003-03-19  Tom Tromey  <tromey@redhat.com>
5776
5777         * lex.c (do_java_lex): Renamed from java_lex.
5778         (java_lex): New function.
5779         Include timevar.h.
5780
5781 2003-03-13  Tom Tromey  <tromey@redhat.com>
5782
5783         * parse.y (resolve_inner_class): Error if qualifier is a primitive
5784         type.
5785
5786 2003-03-04  Andrew Haley  <aph@redhat.com>
5787
5788         * gjavah.c (is_first_data_member): New global variable.
5789         (print_c_decl): If it's the first data member, align it as the
5790         superclass.
5791         (process_file): Set is_first_data_member.
5792
5793 2003-03-11  Tom Tromey  <tromey@redhat.com>
5794
5795         * parse.y (resolve_field_access): Initialize class if field is
5796         found in another static field.
5797         * expr.c (build_class_init): Don't optimize out initialization of
5798         implemented interface.
5799
5800 2003-03-11  Andrew Haley  <aph@redhat.com>
5801
5802         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5803         warning.
5804
5805 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
5806
5807         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5808         and DIR_SEPARATOR_2 for a target.
5809         Correct minor typos.
5810
5811         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5812         and DIR_SEPARATOR_2 for a target into account.
5813
5814 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5815
5816         * lang.c (java_init): Update prototype, move code to java_post_options.
5817         (java_post_options): Similarly.
5818
5819 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
5820
5821         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5822         compare file name components depending on the case-sensitivity
5823         or otherwise of the host file system.
5824
5825         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5826         "strcmp" to compare file name components.
5827         Use IS_DIR_SEPARATOR instead of comparing directly against
5828         DIR_SEPARATOR.
5829         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5830         comparing directly against DIR_SEPARATOR.
5831
5832 2003-03-04  Tom Tromey  <tromey@redhat.com>
5833
5834         * Make-lang.in (java.tags): New target.
5835
5836 2003-03-01  Roger Sayle  <roger@eyesopen.com>
5837
5838         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5839         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5840
5841 2003-03-01  Tom Tromey  <tromey@redhat.com>
5842
5843         * parse.y (jdep_resolve_class): Only check deprecation if we found
5844         a decl.
5845
5846 2003-02-28  Tom Tromey  <tromey@redhat.com>
5847
5848         PR java/9695:
5849         * class.c (maybe_layout_super_class): Always pass a WFL to
5850         do_resolve_class.
5851         * parse.y (do_resolve_class): Updated comment to explain
5852         parameters.
5853
5854 2003-02-26  Tom Tromey  <tromey@redhat.com>
5855
5856         * jcf-write.c (generate_classfile): Check whether class is
5857         deprecated before writing attribute count.
5858
5859 2003-02-25  Roger Sayle  <roger@eyesopen.com>
5860
5861         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
5862         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
5863
5864 2003-02-23  Tom Tromey  <tromey@redhat.com>
5865
5866         * lang-options.h: Added -Wdeprecated.
5867         * gcj.texi (Warnings): Document -Wdeprecated.
5868         * java-tree.h (flag_deprecated): Declare.
5869         * lang.c (lang_W_options): Added deprecated.
5870         (flag_deprecated): New global.
5871         * chartables.h: Rebuilt.
5872         * gen-table.pl (process_one): Look at whitespace.
5873         (print_tables): Define LETTER_SPACE, LETTER_MASK.
5874         * parse.h (CLEAR_DEPRECATED): New macro.
5875         (CHECK_DEPRECATED_NO_RESET): New macro.
5876         * jcf-parse.c (handle_deprecated): New function.
5877         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
5878         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
5879         * parse.y (resolve_type_during_patch): Check deprecation.
5880         (jdep_resolve_class): Likewise.
5881         (process_imports): Likewise.
5882         (resolve_expression_name): Likewise.
5883         (check_deprecation): Strip arrays from decl.  Check
5884         flag_deprecated.
5885         (patch_method_invocation): Also check the particular constructor
5886         for deprecation.
5887         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
5888         * jcf-write.c (append_deprecated_attribute): New function.
5889         (generate_classfile): Generate deprecated attribute when
5890         appropriate.
5891         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
5892         (java_lex) [case '*']: Simplify logic.
5893         (java_start_char_p): Use LETTER_MASK.
5894         (java_part_char_p): Likewise.
5895         (java_space_char_p): New function.
5896
5897 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5898
5899         Change base class access representation.
5900         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
5901         (add_interface_do): Likewise.
5902
5903 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
5904
5905         * decl.c (java_init_decl_processing): Change
5906         soft_lookupjnimethod_node to reflect the change in
5907         signature of _Jv_LookupJNIMethod in libjava/jni.cc
5908         * expr.c (build_jni_stub): Calculate and pass the size
5909         on the stack of the arguments to a JNI function. Use
5910         new target macro MODIFY_JNI_METHOD_CALL to allow a
5911         target to modify the call to a JNI method.
5912
5913 2003-02-08  Roger Sayle  <roger@eyesopen.com>
5914
5915         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
5916         instead of basename to avoid compiler warnings on Tru64.
5917
5918 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5919
5920         * gcj.texi: Update to GFDL 1.2.
5921
5922 2003-01-31  Andrew Haley  <aph@redhat.com>
5923
5924         * parse.y (java_expand_classes): Scan the whole class list looking
5925         for access methods that haven't yet been expanded.
5926
5927 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
5928
5929         Fix for java/4269:
5930
5931         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
5932         to fix bootstrap on sparc-unknown-netbsdelf1.5.
5933         * jcf-parse.c: Likewise.
5934
5935 2003-01-31  Mark Wielaard  <mark@klomp.org>
5936
5937         * gjavah.c (throwable_p): Allocate 1 more byte for string.
5938
5939 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5940
5941         * class.c (make_class): Use BINFO_ELTS.
5942         (set_super_info): Likewse.
5943         (add_interface_do): Likewise.
5944
5945 2003-01-30  Tom Tromey  <tromey@redhat.com>
5946
5947         * jcf-parse.c (read_class): Update identifier's class value if it
5948         changed during parsing.
5949
5950 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
5951
5952         * Make-lang.in (po-generated): Find the targets in $(parsedir).
5953         Propagate change to all other rules as required.
5954         (java/parse-scan.o): Add explicit dependency on
5955         $(parsedir)/java/parse-scan.c .
5956
5957 2003-01-29  Tom Tromey  <tromey@redhat.com>
5958
5959         * parse.y (patch_assignment): Only transform the rhs of an
5960         assignment when compiling to native.
5961
5962 2003-01-28  Tom Tromey  <tromey@redhat.com>
5963
5964         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
5965
5966 2003-01-28  Tom Tromey  <tromey@redhat.com>
5967
5968         * lex.c (java_lex): Don't include UEOF as part of token.
5969         (java_read_unicode): Error if \u sequence prematurely terminated.
5970
5971 2003-01-27  Tom Tromey  <tromey@redhat.com>
5972
5973         * parse.y (java_check_regular_methods): Check for construct after
5974         checking types in throws clause.
5975
5976 2003-01-24  Tom Tromey  <tromey@redhat.com>
5977
5978         * class.c (build_static_field_ref): Only a String or numeric field
5979         can fold to a constant.
5980
5981 2003-01-23  Tom Tromey  <tromey@redhat.com>
5982
5983         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
5984         file name in resource buffer.
5985
5986 2003-01-23  Tom Tromey  <tromey@redhat.com>
5987
5988         * expr.c (build_known_method_ref): Use method's context to find
5989         method table index.
5990
5991 2003-01-23  Tom Tromey  <tromey@redhat.com>
5992
5993         * constants.c (set_constant_entry): Allocated cleared memory.
5994
5995 2003-01-22  Tom Tromey  <tromey@redhat.com>
5996
5997         * java-tree.h: Don't use PARAMS.
5998         * resource.c: Add prototypes for all functions.
5999         (write_resource_constructor): Use `const char *' to avoid
6000         warning.
6001
6002 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6003
6004         * jcf-parse.c (process_zip_dir): Remove unused variable.
6005
6006 2003-01-22  Tom Tromey  <tromey@redhat.com>
6007
6008         * expr.c (build_invokeinterface): Abort if method's context is not
6009         an interface.
6010
6011 2003-01-22  Tom Tromey  <tromey@redhat.com>
6012
6013         * gcj.texi (Input and output files): Mention non-class entries.
6014         * decl.c (java_init_decl_processing): Call
6015         init_resource_processing.
6016         * java-tree.h (compile_resource_data, write_resource_constructor,
6017         compile_resource_file, init_resource_processing): Declare.
6018         * config-lang.in (gtfiles): Added resource.c.
6019         * Make-lang.in (gt-java-resource.h): New target.
6020         (JAVA_OBJS): Added resource.o.
6021         (java/resource.o): New target.
6022         * resource.c: New file.
6023         * class.c (compile_resource_file): Moved to resource.c.
6024         (registerResource_libfunc): Likewise.
6025         (utf8_decl_list): Mark with GTY; now static.
6026         * jcf-parse.c (classify_zip_file): New function.
6027         (parse_zip_file_entries): Use it; compile .properties files.
6028         (process_zip_dir): Use classify_zip_file and compute_class_name.
6029         Don't write class name into zip directory.
6030         (java_parse_file): Call write_resource_constructor.
6031         (compute_class_name): New function.
6032         * jcf-io.c (read_zip_member): Reindented.
6033
6034 2003-01-21  Tom Tromey  <tromey@redhat.com>
6035
6036         * class.c (supers_all_compiled): New function.
6037         (make_class_data): Use it.
6038
6039 2003-01-21  Tom Tromey  <tromey@redhat.com>
6040
6041         * parse.y (method_header): Native method can't be strictfp.
6042         No method can be transient or volatile.
6043
6044 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6045
6046         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6047
6048 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6049
6050         * check-init.c: Fix comment typos.
6051         * class.c: Likewise.
6052         * constants.c: Likewise.
6053         * decl.c: Likewise.
6054         * except.c: Likewise.
6055         * expr.c: Likewise.
6056         * java-except.h: Likewise.
6057         * java-tree.h: Likewise.
6058         * javaop.h: Likewise.
6059         * jcf-dump.c: Likewise.
6060         * jcf-io.c: Likewise.
6061         * jcf-parse.c: Likewise.
6062         * jcf-write.c: Likewise.
6063         * lang.c: Likewise.
6064         * mangle.c: Likewise.
6065         * typeck.c: Likewise.
6066         * verify.c: Likewise.
6067
6068 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6069
6070         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6071         * jcf-write.c: Include "tm_p.h".
6072
6073 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6074
6075         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6076
6077 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6078
6079         * builtins.c (java_build_function_call_expr): Renamed from
6080         build_function_call_expr.  All callers changed.
6081
6082         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6083         * jcf-parse.c: Include tm_p.h.
6084
6085         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6086         warning.
6087
6088 2003-01-14  Tom Tromey  <tromey@redhat.com>
6089
6090         * class.c (make_class_data): Check that super is compiled before
6091         building class reference to it.
6092
6093 2003-01-14  Andrew Haley  <aph@redhat.com>
6094
6095         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6096         varargs function -- correct.
6097
6098 2003-01-14  Andrew Haley  <aph@redhat.com>
6099
6100         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6101
6102 2003-01-14  Andrew Haley  <aph@redhat.com>
6103
6104         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6105         varargs function -- correct.
6106
6107         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6108         temporary if the RHS is a reference.
6109
6110 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6111
6112         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6113         * keyword.h: Regenerated.
6114
6115         * All Files: Convert to ISO C style function definitions.
6116
6117 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6118
6119         * parse.y (check_pkg_class_access): ANSIfy definition.
6120
6121 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6122
6123         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6124         xmalloc et al.
6125
6126         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6127
6128 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6129
6130         Merge from pch-branch:
6131
6132         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6133
6134         * Make-lang.in (java/gjavah.o): Update dependencies.
6135         * gjavah.c: Include ggc.h.
6136
6137         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6138
6139         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6140         (JCFDUMP_OBJS): Add ggc-none.o.
6141         (java/jcf-dump.o): Depend on GGC_H.
6142         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6143         CPool substructures.
6144         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6145         * jcf-dump.c: Include ggc.h.
6146
6147         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6148
6149         * jcf.h (union cpool_entry): New.
6150         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6151         an array of unions.
6152         (struct JCF): Use gengtype to mark.
6153         (CPOOL_UINT): Update for new cpool_entry type.
6154         (CPOOL_USHORT1): Likewise.
6155         (CPOOL_USHORT2): Likewise.
6156         (CPOOL_FINISH): Use GC to free cpool subfields.
6157         * parse.h (struct parser_ctxt): Mark field current_jcf.
6158         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6159         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6160         (main_jcf): Use gengtype to mark.
6161         (ggc_mark_jcf): Delete.
6162         (get_constant): Update for new cpool_entry type.
6163         (give_name_to_class): Likewise.
6164         (get_class_constant): Likewise.
6165         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6166         (java_parse_file): Use GGC to allocate struct JCF.
6167         (init_jcf_parse): Don't call ggc_add_root.
6168         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6169         cpool_entry type.
6170         * java-tree.h (current_jcf): Use gengtype to mark.
6171         (CPOOL_UTF): Update for new cpool_entry type.
6172         (outgoing_cpool): Use gengtype to mark.
6173         (struct lang_type): GC struct JCF and struct CPool.
6174         * config-lang.in (gtfiles): Add jcf.h.
6175         * constants.c (find_tree_constant): New.
6176         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6177         for new cpool_entry type.
6178         (find_constant1): Update for new cpool_entry type.
6179         (find_constant2): Likewise.
6180         (find_utf8_constant): Use find_tree_constant.
6181         (find_class_or_string_constant): Remove unnecessary cast to jword.
6182         Update for new cpool_entry type.
6183         (count_constant_pool_bytes): Update for new cpool_entry type.
6184         (write_constant_pool): Likewise.
6185         (alloc_name_constant): Use find_tree_constant.
6186         (build_constants_constructor): Update for new cpool_entry type.
6187
6188         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6189
6190         * parse.y (mark_parser_ctxt): Delete.
6191         (goal): Don't use ggc_add_root.
6192         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6193         (java_pop_parser_context): Let GC free parser_ctxt.
6194         (java_parser_context_resume): Likewise.
6195         * parse.h (struct parser_ctxt): Use gengtype to mark.
6196         (ctxp): Likewise.
6197         (ctxp_for_generation): Likewise.
6198         * lex.h (struct java_lc_s): Mark for gengtype.
6199         (java_lexer): Rearrange for gengtype.
6200         * config-lang.in (gtfiles): Add lex.h, parse.h.
6201
6202 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6203
6204         * All Files: Remove PARAMS macro.
6205
6206         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6207         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6208         `__STDC__' macros.
6209
6210         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6211         VA_CLOSE.
6212
6213 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6214
6215         * Make-lang.in (java.install-common, java.uninstall,
6216         java.install-info, java.install-man): Prepend $(DESTDIR)
6217         to destination paths in all (un)installation commands.
6218         (java.install-common): Rewrite $(LN) command to support
6219         DESTDIR with "ln" as well as with "ln -s".
6220
6221 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6222
6223         * java-tree.h: Protect against multiple inclusion.
6224
6225 2003-01-07  Tom Tromey  <tromey@redhat.com>
6226
6227         * class.c (add_assume_compiled): Don't adjust parent if we're
6228         already at the root of tree.
6229
6230 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6231
6232         * lang.c (dump_compound_expr): Prototype.
6233
6234 2003-01-03  Tom Tromey  <tromey@redhat.com>
6235
6236         Fix for PR java/8712:
6237         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6238         when simply checking against `null'.
6239
6240 2003-01-03  Tom Tromey  <tromey@redhat.com>
6241
6242         * gcj.texi (Standard Properties): Document http.proxyHost and
6243         http.proxyPort.
6244
6245         * gcj.texi (GNU Classpath Properties): Document new properties.
6246
6247 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6248
6249         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6250         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6251         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6252
6253 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6254
6255         * Make-lang.in, boehm.c, buffer.c,
6256           buffer.h, builtins.c, class.c,
6257           config-lang.in, constants.c,
6258           convert.h, decl.c, except.c,
6259           expr.c, java-except.h,
6260           java-tree.h, javaop.def,
6261           jcf-parse.c, jcf-write.c,
6262           jv-scan.c, jvgenmain.c,
6263           jvspec.c, keyword.gperf,
6264           keyword.h, lang-options.h,
6265           lang-specs.h, lang.c, lex.c,
6266           lex.h, mangle.c, mangle_name.c,
6267           parse-scan.y, parse.h, parse.y,
6268           typeck.c, verify.c, xref.c,
6269           xref.h: Replace "GNU CC" with
6270           "GCC" in the copyright header.
6271
6272         * check-init.c, gjavah.c, javaop.h,
6273           jcf-depend.c, jcf-dump.c, jcf-io.c,
6274           jcf-path.c, jcf-reader.c, jcf.h,
6275           zextract.c, zipfile.h: These files are
6276           "part of GCC". Also say "GCC" not "GNU CC".
6277
6278 2002-12-30  DJ Delorie  <dj@redhat.com>
6279
6280         * Make-lang.in: Protect against texi2pod/pod2man failing.
6281
6282 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6283
6284         * gcj.texi: Use @copying.
6285
6286 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6287
6288         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6289         print_cxx_classname.
6290         (print_cxx_classname): Add add_scope parameter.
6291         (print_class_decls): Do not emit a semicolon after the extern
6292         "Java" block.
6293         (process_file): Adjust calls to print_cxx_classname.
6294
6295 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6296
6297         * gcj.texi: Include Cover Texts in man page.
6298
6299 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6300
6301         * class.c (build_static_field_ref): Check FIELD_FINAL.
6302
6303         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6304         instead of current_constant_pool_data_ref.
6305         * java-tree.h (current_constant_pool_data_ref): Undefine.
6306         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6307         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6308         current_constant_pool_data_ref.
6309
6310         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6311         not build_internal_class_name.
6312
6313         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6314         Use it when class ref isn't certain to be compiled.
6315
6316 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6317
6318         * gcj.texi: Include gcc-common.texi.
6319         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6320         $(srcdir)/doc/include/gcc-common.texi.
6321
6322 2002-12-22  Anthony Green  <green@redhat.com>
6323
6324         * gcj.texi (Limitations): Add note about org.xml.sax and
6325         org.w3c.dom.
6326
6327 2002-12-20  Tom Tromey  <tromey@redhat.com>
6328
6329         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6330         where minimum case value is Integer.MIN_VALUE.
6331         Fixes PR java/8955.
6332
6333 2002-12-18  Andrew Haley  <aph@redhat.com>
6334
6335         * parse.y (patch_invoke): Force evaluation order when `check' is
6336         set.  For PR libgcj/8945.
6337
6338 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6339
6340         * gcj.texi: Change version number to 3.4.
6341
6342 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6343         Andrew Haley <aph@redhat.com>
6344
6345         * parse.y (source_end_java_method): Remove custom encoding of line
6346         numbers for a function decl before passing it to the back end.
6347
6348 2002-12-03  Andrew Haley  <aph@redhat.com>
6349
6350         * class.c (make_class_data): New field, "chain".
6351         * decl.c (java_init_decl_processing): Likewise.
6352
6353 2002-12-02  Tom Tromey  <tromey@redhat.com>
6354
6355         For PR java/8740:
6356         * parse.y (do_resolve_class): Handle qualified name via
6357         recursion.
6358
6359 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6360
6361         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6362         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6363         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6364         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6365         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6366         Include coretypes.h and tm.h.
6367         * Make-lang.in: Update dependencies.
6368
6369 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6370
6371         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6372
6373 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6374
6375         * jcf-reader.c: Don't expand JCF_readu4 inside the
6376         expansion of JCF_SKIP.
6377
6378 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6379
6380         * jcf-reader.c: Don't expand JCF_readu4 inside the
6381         expansion of JCF_SKIP.
6382
6383 2002-11-22  Tom Tromey  <tromey@redhat.com>
6384
6385         * parse.y (patch_binop): Cast right hand side of shift expression
6386         to `int'.  Fixes PR java/8676.
6387
6388 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6389             Andrew Haley <aph@redhat.com>
6390
6391         * gcc/java/jcf-write.c (write_classfile): Remove target
6392         class file, if it exists, before renaming the temporary
6393         class file to it.
6394
6395 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6396
6397         * jvspec.c (lang_specific_spec_functions): New.
6398
6399 2002-11-18  Tom Tromey  <tromey@redhat.com>
6400
6401         Fix for PR java/7912:
6402         * expr.c (can_widen_reference_to): Allow cast of array to
6403         Cloneable or Serializable.
6404         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6405         (java_io_serializable_identifier_node): Likewise.
6406         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6407         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6408         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6409         java_io_serializable.
6410         * decl.c (java_init_decl_processing): Initialize
6411         java_lang_cloneable_identifier_node and
6412         java_io_serializable_identifier_node.
6413         (java_lang_cloneable_identifier_node): New global.
6414         (java_io_serializable_identifier_node): Likewise.
6415
6416 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6417
6418         * buffer.c: Remove unnecessary casts.
6419         * check-init.c: Likewise.
6420         * class.c: Likewise.
6421         * constants.c: Likewise.
6422         * decl.c: Likewise.
6423         * except.c: Likewise.
6424         * gjavah.c: Likewise.
6425         * jcf-io.c: Likewise.
6426         * jcf-parse.c: Likewise.
6427         * jcf-path.c: Likewise.
6428         * jvspec.c: Likewise.
6429         * lang.c: Likewise.
6430         * lex.c: Likewise.
6431         * verify.c: Likewise.
6432
6433 2002-11-06  Tom Tromey  <tromey@redhat.com>
6434
6435         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6436         a JNI header.
6437
6438 2002-11-05  Tom Tromey  <tromey@redhat.com>
6439
6440         Fix for PR java/6388.
6441         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6442         * java-tree.h (enum java_tree_index): New values
6443         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6444         (decimal_int_max, decimal_long_max): New defines.
6445         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6446         (error_if_numeric_overflow): Rewrote range checking.
6447         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6448         decimal_long_max.
6449
6450 2002-11-02  Tom Tromey  <tromey@redhat.com>
6451
6452         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6453
6454         * class.c (make_method_value): Put class name, not signature, into
6455         `throws' field.  For PR java/8415.
6456
6457 2002-10-24  Tom Tromey  <tromey@redhat.com>
6458
6459         * gcj.texi (Invoking gij): Document --showversion.
6460         (Standard Properties): java.library.path now set.
6461
6462 2002-10-23  Tom Tromey  <tromey@redhat.com>
6463
6464         * gjavah.c (decode_signature_piece): In JNI mode, print
6465         `jobjectArray' when array depth is nonzero.
6466         Fixes PR java/8296.
6467
6468 2002-10-15  Andrew Haley  <aph@redhat.com>
6469
6470         * parse.y (patch_invoke): Call force_evaluation_order on a static
6471         arg list.
6472         (resolve_qualified_expression_name): Call force_evaluation_order
6473         on a arg list that is part of a Qualified Expression Name.
6474
6475         * lang.c (dump_compound_expr): New.
6476         (java_dump_tree): New.
6477
6478 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6479
6480         * gcj.texi: Added item describing the GCJ runtime property
6481         "gnu.gcj.progname".
6482
6483 2002-10-15  Richard Henderson  <rth@redhat.com>
6484
6485         * jcf-parse.c (get_constant): Fix type warning.
6486
6487 2002-10-15  Andrew Haley  <aph@redhat.com>
6488
6489         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6490         (java_inlining_map_static_initializers): Declare.
6491
6492 2002-10-14  Andrew Haley  <aph@redhat.com>
6493
6494         * tree-inline.c (remap_block): All local class initialization
6495         flags go in the outermost scope.
6496         (expand_call_inline): Call java_inlining_map_static_initializers.
6497         (expand_call_inline): Call java_inlining_merge_static_initializers.
6498         * java/lang.c (merge_init_test_initialization): New.
6499         (java_inlining_merge_static_initializers): New.
6500         (inline_init_test_initialization): New.
6501         (java_inlining_map_static_initializers): New.
6502
6503 2002-10-11  Mark Wielaard  <mark@klomp.org>
6504
6505         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6506
6507 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6508
6509         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6510
6511 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6512
6513         * parse.y (merge_string_cste): Add parentheses around & within |.
6514
6515 2002-10-08  Tom Tromey  <tromey@redhat.com>
6516
6517         * parse.y (variable_declarator_id): Simplify error path for
6518         array declarator error.  For PR java/8003.
6519
6520 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6521
6522         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6523         bug_report_url.
6524
6525 2002-10-08  Andrew Haley  <aph@redhat.com>
6526
6527         * parse.y (attach_init_test_initialization_flags): Check for
6528         error_mark_node.
6529
6530 2002-10-07  Anthony Green  <green@redhat.com>
6531
6532         * parse.y (merge_string_cste): Fix bug in string concatenation.
6533
6534 2002-10-03  Michael Koch  <konqueror@gmx.de>
6535
6536         * gcj.texi (Standard properties):
6537         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6538
6539 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6540
6541         PR optimization/6627
6542         * lang.c (java_init): If storing the vbit in function
6543         pointers, ensure that force_align_functions_log is atleast
6544         one to aid compatability with g++ vtables.
6545
6546 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
6547
6548         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6549         foul of type-based aliasing.
6550
6551 2002-09-30  Anthony Green  <green@redhat.com>
6552
6553         * gcj.texi (Invoking jv-scan): Fix texinfo.
6554
6555 2002-09-28  Anthony Green  <green@redhat.com>
6556
6557         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6558         (Code Generation): Add -fno-assert documentation.
6559         * jv-scan.c (flag_assert): New global.
6560         (options): Add assert option.
6561         (help): Add --no-assert documentation.
6562         * parse-scan.y (flag_assert): New global.
6563         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6564         (flag_assert): New global.
6565         * java-tree.h (flag_assert): New global.
6566         * lex.c (java_lex): Obey flag_assert.
6567         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6568         calling cc1.
6569
6570 2002-09-26  Andrew Haley  <aph@redhat.com>
6571
6572         * expr.c (build_java_array_length_access): Check for null pointer.
6573         * expr.c (expand_java_arrayload): Likewise.
6574
6575 2002-09-21  Richard Henderson  <rth@redhat.com>
6576
6577         * jcf-parse.c (get_constant): Decode from IEEE no matter
6578         what the target format.
6579
6580 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
6581
6582         * ChangeLog: Follow spelling conventions.
6583         * class.c: Likewise.
6584         * decl.c: Likewise.
6585         * expr.c: Likewise.
6586         * gjavah.c: Likewise.
6587         * java-tree.h: Likewise.
6588         * jcf-dump.c: Likewise.
6589         * jcf-parse.c: Likewise.
6590         * jvspec.c: Likewise.
6591         * lang.c: Likewise.
6592         * mangle.c: Likewise.
6593         * parse.y: Likewise.
6594
6595 2002-09-17  Tom Tromey  <tromey@redhat.com>
6596
6597         * lex.c (java_read_unicode_collapsing_terminators): Handle case
6598         where \r appears at EOF.  Fixes PR java/7950.
6599
6600 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6601
6602         * jvspec.c (lang_specific_driver): Remove unused variable.
6603
6604 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6605
6606         * java-tree.h (union lang_tree_node): Add chain_next option.
6607
6608 2002-09-16  Richard Henderson  <rth@redhat.com>
6609
6610         * jcf-parse.c (get_constant): Runtime check for IEEE format;
6611         use new real.h interface.
6612         * jcf-write.c (find_constant_index): Use new real.h interface.
6613         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6614
6615 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6616
6617         * lang.c: Follow spelling conventions.
6618
6619 2002-09-11  Per Bothner  <per@bothner.com>
6620
6621         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
6622         constant to the type of the field.
6623         (java_complete_tree):  Remove now-redundant code.
6624
6625         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
6626
6627 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
6628
6629         For PR java/5794:
6630         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6631         return label if a ret instruction for the jsr has been reached.
6632
6633 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
6634
6635         * parse.y (DIR_SEPARATOR): Don't define.
6636         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6637
6638 2002-08-28  Andrew Haley  <aph@redhat.com>
6639
6640         * verify.c (verify_jvm_instructions): Allow exception handler
6641         inside code that is being protected, but generate a warning.
6642         * except.c (link_handler): Initialize `expanded' in new eh_range.
6643         (binding_depth, is_class_level, current_pc): Declare extern.
6644
6645 2002-09-01  Mark Wielaard <mark@klomp.org>
6646
6647         * gcj.texi: Add chapter about system properties.
6648         Fixed some typos.
6649
6650 2002-08-26  Tom Tromey  <tromey@redhat.com>
6651
6652         * parse.y (try_builtin_assignconv): Allow narrowing primitive
6653         conversion if RHS_TYPE is byte, short, or char.
6654
6655 2002-08-22  Tom Tromey  <tromey@redhat.com>
6656
6657         * gcj.texi (Invoking gij): Document -cp and -classpath.
6658
6659 2002-08-21  Tom Tromey  <tromey@redhat.com>
6660
6661         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6662         $(prefix)/share.  For PR libgcj/7633.
6663
6664         For PR java/6005 and PR java/7611:
6665         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6666         (java_can_use_bit_fields_p): New function.
6667
6668 2002-08-16  Tom Tromey  <tromey@redhat.com>
6669
6670         * gcj.texi (Class Initialization): Mention class initialization of
6671         arrays.
6672
6673 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
6674
6675         * Make-lang.in (java-tree-inline.o): New.
6676         (JAVA_OBJS): Add java-tree-inline.o.
6677         * parse.y (source_end_java_method): Call java_optimize_inline.
6678         (java_expand_method_bodies): Save method's tree in
6679         DECL_SAVED_TREE.
6680         (add_stmt_to_compound): Keep track of the number of statments.
6681         * lang.c (java_init): Enable flag_inline_trees.
6682         (java_post_options): If flag_inline_functions is on, enable
6683         flag_inline_trees instread.
6684         (decl_constant_value): New.
6685         (java_tree_inlining_walk_subtrees): New.
6686         * java-tree.h (DECL_NUM_STMTS): New macro.
6687         (java_optimize_inline): Declare.
6688         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6689         Handle a LABEL_EXPR.
6690         * decl.c (build_result_decl): If we already have a DECL_RESULT
6691         don't make another.
6692         (dump_function): New.
6693         (java_optimize_inline): New.
6694         (dump_function): New.
6695
6696 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
6697
6698         For PR java/7483:
6699         * parse.y (build_assertion): Invert return from
6700         desiredAssertionStatus.
6701
6702 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6703
6704         * jcf-write.c (get_access_flags): Return correct access flags for
6705         private and protected inner classes.
6706
6707 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6708
6709         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6710
6711 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6712
6713         * mangle_name.c: Don't include obstack.h twice.
6714         * xref.c: Don't include obstack.h.
6715
6716 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6717
6718         * class.c: (permanent_obstack): Delete declaration.
6719         * constants.c: (permanent_obstack): Delete declaration.
6720         * except.c: (permanent_obstack): Delete declaration.
6721         * expr.c: (permanent_obstack): Delete declaration.
6722         * jcf-parse.c: (permanent_obstack): Delete declaration.
6723         (saveable_obstack): Delete declaration.
6724         * parse.h: (permanent_obstack): Delete declaration.
6725         * typeck.c: (permanent_obstack): Delete declaration.
6726
6727 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6728
6729         * gcj.texi (version-gcc): Increase to 3.3.
6730
6731 2002-07-22  Tom Tromey  <tromey@redhat.com>
6732
6733         * lex.c (java_lex): Check for `e' or `E' after 0.
6734
6735 2002-07-21  Richard Henderson  <rth@redhat.com>
6736
6737         * lang.c (java_unsafe_for_reeval): New.
6738         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6739
6740 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
6741
6742         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6743         (jcf_path_init): Use GET_ENVIRONMENT.
6744
6745 2002-07-10  Roger Sayle  <roger@eyesopen.com>
6746             Zack Weinberg <zack@codesourcery.com>
6747
6748         * builtins.c (initialize_builtins): Remove defines that
6749         handled C/C++ specific junk hereby removed from builtins.def.
6750
6751 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
6752
6753         * lang.c (java_post_options): Update prototype.
6754
6755 2002-07-05  Roger Sayle  <roger@eyesopen.com>
6756
6757         * builtins.c (initialize_builtins): Ignore the additional
6758         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
6759         the builtins.def file.
6760
6761 2002-07-01  Tom Tromey  <tromey@redhat.com>
6762
6763         For PR libgcj/7073:
6764         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6765         specially.
6766
6767 2002-07-01  Roger Sayle  <roger@eyesopen.com>
6768
6769         * java/decl.c (builtin_function): Accept additional parameter.
6770         (java_init_decl_processing): Pass an additional NULL_TREE
6771         argument to builtin_function.
6772
6773 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
6774
6775         * gcj.texi: Fixed gcj invocation example so that it compiles.
6776
6777 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6778
6779         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
6780         * parse.y (mark_parser_ctxt): Likewise.
6781         (check_modifiers, declare_local_variables): Avoid incorrect
6782         hardcoded constant 10.
6783
6784         * lex.c (java_read_char): Avoid "comparison is always true"
6785         warning.
6786
6787 2002-06-25  Andreas Schwab  <schwab@suse.de>
6788
6789         * expr.c (JSR): Avoid undefined operation on PC.
6790
6791 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6792
6793         * decl.c (clear_binding_level): Const-ify.
6794
6795 2002-06-13  Akim Demaille  <akim@epita.fr>
6796
6797         * parse.y (class_declaration, interface_declaration): Make sure
6798         all their rules have an action, in order to avoid meaningless `$$
6799         = $1' and their type clashes.
6800
6801 2002-06-11  Tom Tromey  <tromey@redhat.com>
6802
6803         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6804         * parse-scan.y (statement_without_trailing_substatement): Added
6805         assert_statement.
6806         (assert_statement): New rule.
6807         * java-tree.h (struct lang_type) [assertions]: New field.
6808         (TYPE_USES_ASSERTIONS): New macro.
6809         (CLASS_USES_ASSERTIONS): Likewise.
6810         (FIELD_SYNTHETIC): New define.
6811         * lex.c (java_lval;): Added ASSERT_TK.
6812         * parse.y (ASSERT_TK): Added.
6813         (statement_without_trailing_substatement): Added assert_statement.
6814         (assert_statement): New rule.
6815         (build_assertion): New function.
6816         (maybe_generate_pre_expand_clinit): Create and initialize
6817         $assertionsDisabled.
6818         (lookup_package_type): Removed decl.
6819         * keyword.h: Rebuilt.
6820         * keyword.gperf (assert): New token.
6821
6822 2002-06-10  Akim Demaille  <akim@epita.fr>
6823
6824         * parse.y (interface_type_list, class_member_declaration)
6825         (unary_expression_not_plus_minus): Remove duplicate %type.
6826         Whitespace changes.
6827
6828 2002-06-09  Tom Tromey  <tromey@redhat.com>
6829
6830         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6831
6832         * parse.y (method_header): Give error message in all cases.
6833         Fixes PR java/6865.
6834
6835 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6836
6837         Don't use RTL inlining. Fix for PR java/6820.
6838         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6839         (flag_really_inline): New.
6840         (java_decode_option): Set flag_really_inline if -finline-functions
6841         is seen.
6842         (java_post_options): New function. Turn off inlining unless
6843         flag_really_inline is set.
6844
6845 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6846
6847         * gjavah.c (throwable_p): Accept argument as either a classname or
6848         signature fragment. Create null-terminated classname string for super
6849         when calling itself recursively.
6850         (decode_signature_piece): Skip first character from class name
6851         signature when calling throwable_p.
6852
6853 2002-06-08  H.J. Lu  (hjl@gnu.org)
6854
6855         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
6856
6857 2002-06-04  Tom Tromey  <tromey@redhat.com>
6858
6859         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
6860
6861 2002-06-04  Michael Koch  <konqueror@gmx.de>
6862
6863         * gcj.texi (Input Options): Fixed typo.
6864
6865 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
6866
6867         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
6868         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
6869         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
6870         and all now-pointless local variables.  Rename other local
6871         variables to reflect their not being handles.
6872
6873         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
6874         #if JCF_USE_STDIO blocks.
6875
6876         * parse.y: Add missing semicolon at end of rule.
6877
6878 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6879
6880         * check-init.c (attach_initialized_static_class): Delete, unused.
6881         * parse.y: Use htab_t instead of struct hashtable, update
6882         all uses.
6883         * java-tree.h: Include hashtab.h instead of hash.h.
6884         (struct lang_decl_func): Use htab_t, set up for gengtype.
6885         (struct init_test_hash_entry): Delete.
6886         (struct treetreehash_entry): New.
6887         (java_treetreehash_find): New
6888         (java_treetreehash_new): New prototype.
6889         (java_treetreehash_create): New prototype.
6890         (java_mark_tree): Delete prototype.
6891         (java_hash_hash_tree_node): Delete prototype.
6892         (java_hash_compare_tree_node): Delete prototype.
6893         (attach_initialized_static_class): Delete prototype.
6894         * expr.c (build_class_init): Update to use java_treetreehash
6895         functions.
6896         (java_expand_expr): Update to use htab_t.
6897         (emit_init_test_initialization): Likewise.
6898         * decl.c (java_mark_tree): Delete.
6899         * class.c (init_test_hash_newfunc): Delete.
6900         (java_hash_hash_tree_node): Delete.
6901         (java_hash_compare_tree_node): Delete.
6902         (add_method_1): Update to use java_treetreehash functions.
6903         (JAVA_TREEHASHHASH_H): New macro.
6904         (java_treetreehash_hash): New function.
6905         (java_treetreehash_compare): New function.
6906         (java_treetreehash_find): New function.
6907         (java_treetreehash_new): New function.
6908         (java_treetreehash_create): New function.
6909         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
6910
6911         * Make-lang.in (java/parse.o): Depend on debug.h.
6912         * java-tree.h (struct lang_identifier): Use gengtype.
6913         (union lang_tree_node): New.
6914         (struct lang_decl_func): Use gengtype.
6915         (struct lang_decl_var): Likewise.
6916         (struct lang_decl): Likewise.
6917         * parse.y: Include debug.h.
6918         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
6919
6920         * lang.c (struct language_function): New dummy structure.
6921
6922         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
6923         descriminator for DECL_LANG_SPECIFIC.
6924         (struct lang_decl_func): Rename from struct lang_decl.
6925         (enum lang_decl_desc): New.
6926         (struct lang_decl): Make it a union.  Update all the accessor macros.
6927         (struct lang_type): Use gengtype.
6928         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
6929         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
6930         are now the same size.
6931         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
6932         use discriminator to mark DECL_LANG_SPECIFIC.
6933
6934         * Make-lang.in (gt-java-builtins.h): New rule.
6935         (java/builtins.o): Add dependency on gt-<filename>.h.
6936         * builtins.c: Use gengtype for roots.
6937         (union string_or_tree): Use gengtype.
6938         (struct builtin_record): Use gengtype.
6939         * config-lang.in (gtfiles): Add builtins.c.
6940
6941         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
6942         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
6943         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
6944         gt-java-parse.h, gtype-java.h): Add rules to generate.
6945         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
6946         (class.o): Add dependency on gt-*.h.
6947         (constants.o): Likewise.
6948         (decl.o): Likewise.
6949         (expr.o): Likewise.
6950         (jcf-parse.o): Likewise.
6951         (jcf-write.o): Likewise.
6952         (lang.o): Likewise.
6953         * config-lang.in (gtfiles): New.
6954         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6955         * constants.c: Replace uses of ggc_add_* with GTY markers.
6956         Include gt-*.h.
6957         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6958         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6959         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
6960         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
6961         Include gt-*.h.
6962         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
6963         Include gt-*.h.
6964         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6965         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
6966         gt-*.h.
6967         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6968         Include gtype-java.h.
6969
6970 2002-06-02  Tom Tromey  <tromey@redhat.com>
6971
6972         Fix for PR java/5913:
6973         * parse.y (patch_binop): Call patch_string on op1.
6974
6975 2002-06-02  Tom Tromey  <tromey@redhat.com>
6976
6977         Fix for PR java/1343, PR java/6336:
6978         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
6979         formatting.  Changed return type.
6980         (anonymous_class_counter): Moved to top of file.
6981         (maybe_make_nested_class_name): Append number to class name for
6982         function-local classes.
6983
6984 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6985
6986         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
6987         * Make-lang.in: Update dependency lists.
6988
6989 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
6990
6991         * gjavah.c (throwable_p): Do not free the name of the class after
6992         passing it to find_class.
6993         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
6994         * jcf-io.c (dirent.h): Include it.
6995         (fnmatch.h): Likewise.
6996         (compare_path): New function.
6997         (java_or_class_file): Likewise.
6998         (memoized_dirlist_entry): New type.
6999         (memoized_dirlist_lookup_eq): New function.
7000         (memoized_dirlists): New variable.
7001         (caching_stat): New function.
7002         (memoized_class_lookup_eq): New function.
7003         (memoized_class_lookups): Likewise.
7004         (find_class): Use memoized_class_lookups and caching_stat.
7005         * jcf.h (JCF_USE_SCANDIR): Define.
7006         * parse.y (java_expand_classes): Write the class files in reverse
7007         order.
7008
7009 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7010
7011         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7012
7013 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7014
7015         * jcf-write.c (write_classfile): Unlink the temporary file if it
7016         cannot be renamed.  Use concat to build up the name of the
7017         temporary file.
7018
7019 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7020
7021         * jcf-write.c (write_classfile): Write the file to a
7022         temporary file and then rename it.
7023
7024 2002-05-07  Tom Tromey  <tromey@redhat.com>
7025
7026         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7027
7028         Fix for PR java/1200:
7029         * gjavah.c (throwable_p): New function.
7030         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7031         same as a `jweak'.
7032         Include hashtab.h.
7033         (gcjh_streq): New function.
7034
7035 2002-05-07  Andreas Jaeger  <aj@suse.de>
7036
7037         * parse.y (finish_for_loop): Fix if statement.
7038
7039 2002-05-06  Tom Tromey  <tromey@redhat.com>
7040
7041         Fix for PR java/5941:
7042         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7043         loop update expression.
7044         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7045         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7046
7047 2002-05-04  Mark Wielaard  <mark@klomp.org>
7048
7049         For PR java/6519:
7050         * parse.y (build_string_concatenation): Return just op1 only when op2
7051         is null and op1 is a STRING_CST, otherwise always construct a
7052         StringBuffer.
7053
7054 2002-04-27  Tom Tromey  <tromey@redhat.com>
7055
7056         For PR java/6382:
7057         * parse.y (string_convert_int_cst): New function.
7058         (merge_string_cste): Use it.
7059
7060 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7061
7062         * java-tree.h (java_parse_file): Update.
7063         (java_set_yydebug): Remove.
7064         * jcf-parse.c (yydebug): Remove.
7065         (java_set_yydebug): Die.
7066         (java_parse_file): Update.
7067         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7068
7069 2002-04-24  Tom Tromey  <tromey@redhat.com>
7070
7071         For PR java/6425:
7072         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7073         EXPR_WFL_QUALIFICATION of qual_wfl.
7074
7075 2002-04-23  Per Bothner  <per@bothner.com>
7076
7077         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7078         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7079         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7080
7081 2002-04-23  Tom Tromey  <tromey@redhat.com>
7082
7083         For PR java/6314:
7084         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7085         recognize `-fcompile-resource='.
7086         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7087         a bit.
7088
7089 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7090
7091         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7092         paths. Fixes PR java/2791.
7093
7094 2002-04-19  Andrew Haley  <aph@redhat.com>
7095
7096         * jcf-write.c (push_long_const): lo, hi: New variables.
7097         Use rshift_double to extract the high part of a 64-bit long.
7098         Use WORD_TO_INT to extract the low part.
7099
7100         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7101         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7102         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7103
7104 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7105
7106         * typeck.c (incomplete_type_error): Remove.
7107
7108 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7109
7110         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7111         for hash synchronization.
7112         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7113         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7114         class_type_node.
7115
7116 2002-04-16  Mark Wielaard  <mark@klomp.org>
7117
7118         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7119         negative zero.
7120
7121 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7122
7123         Fix for PR java/6294:
7124         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7125         interfaces.
7126
7127 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7128
7129         Fix for PR java/6085:
7130         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7131         to get enclosing "this" argument for inner-class constructor
7132         invocation. Pass correct arguments to build_access_to_thisn.
7133
7134 2002-04-10  Andreas Jaeger  <aj@suse.de>
7135
7136         * gcj.texi (Input Options): Fix extdirs patch.
7137
7138 2002-04-10  Anthony Green  <green@redhat.com>
7139
7140         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7141
7142 2002-04-09  Anthony Green  <green@redhat.com>
7143
7144         * gcj.texi (Input Options): Add --extdirs documentation.
7145         * jcf-dump.c (OPT_extdirs): New macro.
7146         (options): Add extdirs option.
7147         (help): Describe --extdirs.
7148         (main): Handle OPT_extdirs.
7149         * gjavah.c (OPT_extdirs): New macro.
7150         (options): Add extdirs option.
7151         (help): Describe --extdirs.
7152         (main): Handle OPT_extdirs.
7153         * jcf-path.c (jcf_path_init): Add extdirs support.
7154         (jcf_path_extdirs_arg): New function.
7155         (extensions): New variable to hold extensions path entries.
7156         * jvspec.c: Remove -fextdirs= when compiling main().
7157         * lang.c (java_decode_option): Handle -fextdirs=.
7158         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7159         * Make-lang.in: Compile jcf-path with version info for use in
7160         identifying the appropriate libgcj.jar.
7161
7162 2002-04-08  Tom Tromey  <tromey@redhat.com>
7163
7164         For PR libgcj/5303:
7165         * .cvsignore: Added rmic.1 and rmiregistry.1.
7166         * gcj.texi (Top): Link to new nodes.
7167         (Invoking rmic): New node.
7168         (Invoking rmiregistry): Likewise.
7169         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7170         rmiregistry.1.
7171         (java.maintainer-clean): Likewise.
7172         ($(srcdir)/java/rmic.1): New target.
7173         ($(srcdir)/java/rmiregistry.1): Likewise.
7174         (java.install-man): Handle rmic.1 and rmiregistry.1.
7175
7176 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7177
7178         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7179         Add note about handling uncaught exceptions. Add an exception handler
7180         to example.
7181
7182 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7183
7184         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7185         after using it to patch CALL_EXPR.
7186
7187 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7188
7189         * gcj.texi (Invocation): Document CNI invocation API.
7190
7191 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7192
7193         * expr.c (truthvalue_conversion): Rename.  Update.
7194         (expand_compare): Update.
7195         * java-tree.h (java_truthvalue_conversion): New.
7196         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7197
7198 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7199
7200         * java-tree.h (java_mark_addressable): New.
7201         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7202         * typeck.c (mark_addressable): Rename, update.
7203
7204 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7205
7206         * expr.c (build_java_binop): Update.
7207         * java-tree.h (java_signed_type, java_unsigned_type,
7208         java_signed_or_unsigned_type): Update.
7209         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7210         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7211         * parse.y (patch_binop): Update.
7212         * typeck.c (signed_or_unsigned_type, unsigned_type,
7213         signed_type): Update.
7214
7215 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7216
7217         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7218         (java_dummy_print): Remove.
7219         (lang_print_error): Rename.  Exit early if inhibiting output.
7220         (inhibit_error_printing_function): New.
7221         (java_init): Don't set hook.
7222         (lang_init_source): Use new boolean.
7223
7224 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7225
7226         * parse.y (do_resolve_class): Fix infinite recursion.
7227
7228 2002-03-29  Tom Tromey  <tromey@redhat.com>
7229
7230         * parse.y (check_inner_circular_reference): Ignore incomplete
7231         types.
7232
7233 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7234
7235         * Make-lang.in (builtins.o): Update.
7236         * boehm.c (get_boehm_type_descriptor): Update.
7237         * builtins.c: Include langhooks.h.
7238         * decl.c (java_init_decl_processing): Update.
7239         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7240         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7241         Redefine.
7242         * typeck.c (type_for_mode, type_for_size): Update.
7243
7244 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7245
7246         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7247
7248 2002-03-28  Tom Tromey  <tromey@redhat.com>
7249
7250         * except.c (expand_end_java_handler): If the handler type is NULL,
7251         use java.lang.Throwable.  Fixes PR java/5986.
7252
7253 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7254
7255         Fix for PR java/4715:
7256         * jcf-parse.c (parse_source_file_3): New function.
7257         (read_class): Call it.
7258         (java_parse_file): Likewise.
7259
7260 2002-03-28  Jan Hubicka  <jh@suse.cz>
7261
7262         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7263
7264 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7265
7266         * parse.y (resolve_package): Initialize "decl".
7267         (lookup_package_type): Remove unused function.
7268
7269 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7270
7271         Fix for PR java/5993:
7272         * parse.y (resolve_package): Return the decl if resolution was
7273         successful. Don't special case "java.lang" and "java.lang.reflect"
7274         packages. Set type_name to the merged identifier.
7275         (resolved_qualified_expression_name): Print error using "name" if
7276         resolve_package returns NULL_TREE.
7277
7278 2002-03-27  Tom Tromey  <tromey@redhat.com>
7279
7280         * expr.c (expand_invoke): Don't generate null pointer check if
7281         we're calling <init>.
7282
7283 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7284
7285         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7286         fix prototype.
7287         * java-tree.h (java_lang_expand_expr): Similarly.
7288         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7289         (java_init): Don't set hook.
7290
7291 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7292
7293         Fix for PR java/5850:
7294         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7295         context if field was not found in the current scope.
7296         * expr.c (lookup_field): Don't look in enclosing contexts.
7297
7298 2002-03-26  Tom Tromey  <tromey@redhat.com>
7299
7300         Fix for PR java/5942:
7301         * parse.y (init_src_parse): Added sanity check.
7302         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7303         elements, not 11.
7304
7305 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7306
7307         * decl.c (lang_mark_tree): Rename java_mark_tree.
7308         * java-tree.h (java_mark_tree): New.
7309         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7310
7311 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7312
7313         * lex.c: Change java_perform_atof to take normal parameters
7314         instead of a pointer to a parameter block.  Call it directly
7315         from java_lex.
7316
7317 2002-03-22  Mark Wielaard  <mark@klomp.org>
7318
7319         Fix for PR java/5368:
7320         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7321         when printing error message.
7322
7323 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7324
7325         * decl.c (maybe_build_cleanup): Remove.
7326
7327 2002-03-22  Tom Tromey  <tromey@redhat.com>
7328
7329         Andrew Haley  <aph@cambridge.redhat.com>
7330
7331         * expr.c (build_field_ref): Don't build a check if the field is a
7332         member of `this'.
7333
7334 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7335
7336         Fix for PR java/6026:
7337         * lex.c (java_lex): Fix parsing of consecutive floats.
7338
7339 2002-03-21  Tom Tromey  <tromey@redhat.com>
7340
7341         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7342         class.
7343
7344 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7345
7346         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7347         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7348
7349 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7350
7351         * gcj.texi: @code{gcj} becomes @command{gcj}.
7352         @code{gcc} becomes @command{gcc}.
7353         GcjRaw changed to gnu.gcc.RawData.
7354
7355 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7356
7357         * decl.c (start_java_method): Use new hook.
7358         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7359         (java_init): Remove old hook.
7360
7361 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7362
7363         * builtins.c (define_builtin): Do nothing if `type' is null.
7364         Fixes PR java/5876.
7365
7366 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7367
7368         * parse.y (parser_check_super_interface): Fix error message
7369         grammar/order.
7370
7371 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7372
7373         * jcf-parse.c (get_constant): Delete unused variables.
7374
7375 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7376
7377         * java-tree.h (java_parse_file): New.
7378         * jcf-parse.c (yyparse): Rename java_parse_file.
7379         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7380
7381 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7382
7383         * parse.y (craft_constructor): Return the constructor decl.
7384         (java_expand_classes): Update comments.
7385         (lookup_method_invoke): Call fix_constructors immediately for
7386         anonymous class. Fixes PR java/5935.
7387
7388 2002-03-15  Anthony Green  <green@redhat.com>
7389
7390         * jcf-parse.c (yyparse): Don't emit class registration
7391         constructor when compiling resource files.
7392
7393 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7394
7395         * lang.c (java_tree_code_type, java_tree_code_length,
7396         tree_code_name): Delete.
7397         (tree_code_type, tree_code_length, tree_code_name): Define.
7398         (java_init): Don't try to copy into the various tree_code
7399         arrays.
7400
7401 2002-03-12  Tom Tromey  <tromey@redhat.com>
7402
7403         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7404         UTF-8, not UCS-2.  Fixes PR java/5923.
7405
7406         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7407         a call_expr wrapped in a convert.  Fixes PR java/5848.
7408
7409 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7410
7411         * jcf-write.c (write_classfile): Improve error strings.
7412
7413 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7414
7415         * lex.c: Adjust comments to GNU standards.
7416
7417 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7418
7419         Fix for PR java/5902:
7420         * lex.c (java_lex): Fix parsing of literals.
7421
7422 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7423
7424         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7425         to prevent it getting evaluated twice in the store checking case.
7426         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7427         examining OBJECT.
7428
7429 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7430
7431         * decl.c (java_init_decl_processing): Make sure class_type_node
7432         alignment is not less than 64 bits if hash synchronization is enabled.
7433
7434 2002-03-08  Per Bothner  <per@bothner.com>
7435
7436         * parse.y (java_complete_lhs):  Check if patch_assignment
7437         returned an error-mark.
7438
7439         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7440
7441 2002-03-08  Per Bothner  <per@bothner.com>
7442
7443         Fix for PR java/5812.
7444         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7445         here instead of in JSR macro.  Likewise with load_type_state call.
7446         Do the latter on if the return_pc has been verified (the jsr returns).
7447         (JSR):  Now just call build_java_jsr.
7448
7449 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7450
7451         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7452         (java.install-common): Link native driver to
7453         JAVA_TARGET_INSTALL_NAME.
7454
7455 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7456
7457         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7458         * builtins.c(sin_builtin): Likewise
7459         * builtins.c(sqrt_builtin): Likewise
7460
7461 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7462
7463         * java/expr.c, java/jcf-parse.c, java/lex.c:
7464         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7465         REAL_ARITHMETIC blocks unconditional.  Delete some further
7466         #ifdef blocks predicated on REAL_ARITHMETIC.
7467
7468 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7469
7470         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7471         explicit sizeof/sizeof.
7472         * decl.c (java_init_decl_processing): Likewise.
7473         * jcf-parse.c (init_jcf_parse): Likewise.
7474         * parse.y (init_src_parse): Likewise.
7475
7476 2002-03-02  Per Bothner  <per@bothner.com>
7477
7478         Make --CLASSPATH by a synonym for --classpath and -classpath.
7479         Implement --bootclasspath.
7480         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7481         (classpath_l):  Remove.
7482         (jcf_path_CLASSPATH_arg):  Remove.
7483         (jcf_path_bootclasspath_arg):  New function.
7484         (jcf_path_seal):  Simplify accordingly.
7485
7486         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7487         (jcf_path_CLASSPATH):  Remove declaration.
7488         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7489         (lang_specific_driver):  Translate -bootclasspath.
7490         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7491         * lang.c (decode_lang_options):  Do jcf_path_init first.
7492         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7493         * gjavah.c:  Also handle --bootclasspath.
7494         Handle --CLASSPATH as a synonum for --classpath.
7495         * jcf-dump.c: Likewise.
7496
7497         "." is not part of system path, but is the default for --classpath.
7498         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7499         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7500
7501         * gcj.texi:  Document changes.
7502
7503 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7504
7505         * expr.c (build_java_arraystore_check): Fix formatting.
7506
7507 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7508
7509         Fix for PR java/5758, java/5632:
7510         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7511         inner-class separator too.
7512         * parse.y (do_resolve_class): New local `decl_result.'
7513         Progressively build a name for what can have been loaded.
7514
7515 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7516
7517         * expr.c (java_array_data_offset): Removed function.
7518         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7519         (build_java_array_length_access): Obtain "length" value using a
7520         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7521         (build_java_arrayaccess): Correct comment. Access "data" using a
7522         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7523         (build_java_arraystore_check): New function.
7524         (expand_java_arraystore): Use build_java_arraystore_check.
7525         * parse.y (patch_assignment): Simplify code to insert a store check
7526         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7527         * check-init.c (check_init): Update to reflect that an array length
7528         access is now a COMPONENT_REF.
7529         * gcj.texi (Code Generation): Improve documentation of
7530         -fno-bounds-check. Add documentation for -fno-store-check.
7531         * java-tree.h (flag_store_check): Declare.
7532         (build_java_arraystore_check): Declare.
7533         * lang.c (flag_store_check): Initialize to 1.
7534         (lang_f_options): Add store-check option.
7535         * jvspec.c: Don't pass store-check option to jvgenmain.
7536         * lang-options.h: Add help string for -fno-store-check.
7537
7538 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7539
7540         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7541         * java-tree.h (java_dup_lang_specific_decl): New.
7542         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7543
7544 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7545
7546         * builtins.c, decl.c: Delete traditional-mode-related code
7547         copied from the C front end but not used, or used only to
7548         permit the compiler to link.
7549
7550 2002-02-22  Tom Tromey  <tromey@redhat.com>
7551
7552         Fix for PR java/2369:
7553         * jvspec.c (verify_class_name): New function.
7554         (lang_specific_driver): Call it.
7555         (JAVA_START_CHAR_P): New macro.
7556         (JAVA_PART_CHAR_P): Likewise.
7557
7558 2002-02-22  Per Bothner  <per@bothner.com>
7559
7560         * class.c:  Change vtable to be more compatible with g++ v3 abi.
7561         (get_dispatch_table):  Prepend offset-to-top (always 0) and
7562         type_info pointer (currently unimplemented hence NULL) to vtable.
7563         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7564         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
7565         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7566         (build_dtable_decl):  Add declarations for new fields.
7567
7568 2002-02-20  Per Bothner  <per@bothner.com>
7569
7570         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7571         to finit$ (otherwise generate_bytecode_insns drops it). However, we
7572         don't need to set it on the COMPOUND_EXPR - the caller does that.
7573
7574 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7575
7576         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7577         `--CLASSPATH' becomes `--classpath.'
7578         * gjavah.c: Likewise.
7579         * jcf-dump.c: Likewise.
7580         * lang-options.h: Likewise.
7581         * lang.c: Likewise.
7582         * jcf-path.c: Updated comment.
7583         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7584         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7585         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7586         (jcf_path_CLASSPATH_arg): Ditto.
7587         (classpath_u): Updated leading comment.
7588
7589 2002-02-20  Per Bothner  <per@bothner.com>
7590
7591         * builtins.c (check_for_builtin):  New function.
7592         (build_call_or_builtin):  Remove.
7593         * java-tree.h:  Update accordingly.
7594         * expr.c (expand_invoke):  Use build + check_for_builtin instead
7595         of build_call_or_builtin.
7596         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
7597         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7598         flag (which had caused jcf-write to incorrectly emit invokevirtual).
7599
7600 2002-02-17  Tom Tromey  <tromey@redhat.com>
7601
7602         * java-tree.h (TYPE_STRICTFP): New macro.
7603         (struct lang_type) [strictfp]: New field.
7604         (CLASS_STRICTFP): New macro.
7605         (METHOD_STRICTFP): New macro.
7606         (struct lang_decl) [strictfp]: New field.
7607         * parse.y (method_header): Disallow strictfp constructor or
7608         abstract method.
7609         (STRICT_TK): Move before MODIFIER_TK.
7610         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7611         (METHOD_MODIFIERS): Likewise.
7612         (INTERFACE_MODIFIERS): Likewise.
7613         * jcf-write.c (get_access_flags): Likewise.
7614         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7615         (add_method_1): Likewise.
7616         (get_access_flags_from_decl): Likewise.
7617         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
7618         recognize strictfp flag.
7619         * jcf.h (ACC_STRICT): New define.
7620
7621 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
7622
7623         * class.c(build_utf8_ref): Move declaration of decl_size
7624
7625 2002-02-07  Tom Tromey  <tromey@redhat.com>
7626
7627         * gcj.texi (Input Options): --CLASSPATH does not suppress system
7628         path.
7629
7630 2002-02-04  Anthony Green  <green@redhat.com>
7631
7632         * class.c (build_utf8_ref): Put UTF-8 constants into merged
7633         sections if available.
7634
7635 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7636
7637         * parse.y (java_expand_classes): Fix typo in static field loop.
7638
7639 2002-02-02  Richard Henderson  <rth@redhat.com>
7640
7641         * class.c (add_field): Mark static fields external.
7642         (build_class_ref): Remove redundant set.
7643         * parse.y (java_expand_classes): Mark static fields of classes
7644         to be compiled as local.
7645         * jcf-parse.c (parse_class_file): Likewise.
7646
7647 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7648
7649         * gcj.texi (About CNI): New node.
7650
7651 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7652
7653         PR java/5080
7654         * jcf-parse.c : Check for HAVE_LOCALE_H before using
7655         setlocale() with LC_CTYPE as a parameter.
7656         * jv-scan.c: Same.
7657
7658 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
7659
7660         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7661         Follow GNU Coding Standards for --version.
7662
7663 2002-01-28  Tom Tromey  <tromey@redhat.com>
7664
7665         * expr.c (build_jni_stub): Ensure storage for `meth' is
7666         generated.
7667         * parse.y (java_complete_expand_methods): Set
7668         current_function_decl before building JNI stub.
7669
7670 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7671
7672         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7673         BUILT_IN_SQRTF.
7674
7675 2002-01-22  Tom Tromey  <tromey@redhat.com>
7676
7677         * decl.c (java_init_decl_processing): Use add_predefined_file.
7678         Predefine RawData.java.
7679         (predef_filenames): Removed.
7680         (java_init_decl_processing): Don't register predef_filenames.
7681         * jcf-parse.c (add_predefined_file): New function.
7682         (predefined_filename_p): Rewrote.
7683         (predefined_filename_p): No longer static.
7684         * decl.c (java_init_decl_processing): Call initialize_builtins.
7685         * Make-lang.in (JAVA_OBJS): Added builtins.o.
7686         (java/builtins.o): New target.
7687         * builtins.c: New file.
7688         * parse.y (patch_invoke): Use build_call_or_builtin.
7689         * java-tree.h (build_call_or_builtin): Declare.
7690         (initialize_builtins): Declare.
7691         (java_set_exception_lang_code): Removed unused declaration.
7692         (PREDEF_FILENAMES_SIZE): Removed.
7693         (java_tree_index): Added JTI_PREDEF_FILENAMES.
7694         (predef_filenames): New define.
7695         (add_predefined_file): Declare.
7696         (predefined_filename_p): Declare.
7697         * expr.c (expand_invoke): Use build_call_or_builtin.
7698
7699 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7700
7701         * parse.y (patch_switch_statement): Fix format specifier.
7702
7703 2002-01-16  Tom Tromey  <tromey@redhat.com>
7704
7705         More for PR java/5365:
7706         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7707         default.
7708         (process_file): Generate include for
7709         java.lang.UnsupportedOperationExceptions.
7710
7711 2002-01-15  Andreas Jaeger  <aj@suse.de>
7712
7713         * .cvsignore: Add man pages.
7714
7715 2002-01-15  Tom Tromey  <tromey@redhat.com>
7716
7717         Fix for PR java/5365:
7718         * gjavah.c (process_file): Turn class name into a file name.
7719
7720 2002-01-14  Matthias Klose  <doko@debian.org>
7721
7722         * gcj.texi: Fix whitespace and formatting errors in the
7723         synopsis of the man pages. Update copyright.
7724
7725 2002-01-14  Tom Tromey  <tromey@redhat.com>
7726
7727         For PR libgcj/5303:
7728         * Make-lang.in (java.install-man): Handle jv-convert man page.
7729         (java.generated-manpages): Added jv-convert.1.
7730         (java.uninstall): Remove jv-convert.1.
7731         (java.maintainer-clean): Likewise.
7732         ($(srcdir)/java/jv-convert.1): New target.
7733         * gcj.texi (Top): Link to jv-convert node.
7734         (Individual utilities): Likewise.
7735         (Invoking jv-convert): New node.
7736
7737 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
7738             Martin Kahlert  <martin.kahlert@infineon.com>
7739
7740         * jcf-parse.c (get_constant): Don't swap lo/hi for big
7741         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7742
7743 2002-01-03  Graham Stott  <grahams@redhat.com>
7744
7745         * class.c (compile_resource_file): Update copyright date.
7746         Constify filename parameter.
7747         (java-tree.h): Update copyright date.
7748         (compile_resource_file): Constify filename parameter.
7749
7750 2002-01-03  Graham Stott  <grahams@redhat.com>
7751
7752         * gcc/jcf-parse.c: Update copyright date.
7753         (yyparse): Constify resource_filename.
7754
7755 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7756
7757         * parse.y (src_parse_roots): Don't needlessly zero init.
7758
7759 2001-12-31  Tom Tromey  <tromey@redhat.com>
7760
7761         * parse.y (dump_java_tree): New function.
7762         (source_end_java_method): Call it.
7763         (end_class_declaration): Likewise.
7764         * lang.c (java_decode_option): Call dump_switch_p.
7765
7766 2001-12-28  Tom Tromey  <tromey@redhat.com>
7767
7768         * gen-table.pl: Don't process characters after \uffff.  Added
7769         comment pointing to input file.
7770
7771 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7772
7773         * gen-table.pl: Const-ify output.  Document the location of a
7774         suitable unicode input file.
7775
7776         * chartables.h: Regenerate.
7777
7778 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7779
7780         * chartables.h: Const-ify.
7781         * gjavah.c (options): Likewise.
7782         * jcf-dump.c (options): Likewise.
7783         * jv-scan.c (options): Likewise.
7784         * lex.c (java_start_char_p, java_part_char_p): Likewise.
7785         * parse.y (binop_lookup): Likewise.
7786
7787 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7788
7789         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7790         the static arrays that are output.
7791         * jvspec.c (jvgenmain_spec): Make static.
7792         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7793         * keyword.h: Regenerate.
7794         * lang.c (string_option, process_option_with_no, lang_f_options,
7795         lang_W_options): Const-ify.
7796         * lex.c (java_lex): Likewise.
7797
7798 2001-12-21  Richard Henderson  <rth@redhat.com>
7799
7800         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7801         (get_boehm_type_descriptor): ... here.  Arrange for the
7802         TREE_TYPE to get set properly.
7803
7804 2001-12-21  Richard Henderson  <rth@redhat.com>
7805
7806         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7807         only if the target requires collect2.
7808
7809         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7810
7811 2001-12-20  Tom Tromey  <tromey@redhat.com>
7812
7813         For PR java/4509:
7814         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7815         CAN_COMPLETE_NORMALLY for the node.
7816         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7817         generate code for second branch if first branch can't complete
7818         normally.
7819         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7820         the loop head if the loop body can't complete normally.
7821
7822 2001-12-20  Tom Tromey  <tromey@redhat.com>
7823
7824         For PR java/4766:
7825         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7826         case where `finally' clause can't complete normally.
7827
7828 2001-12-20  Tom Tromey  <tromey@redhat.com>
7829
7830         Fixes PR java/5057:
7831         * parse.y (analyze_clinit_body): Added this_class parameter.
7832         Check for more cases where we must keep <clinit>.
7833         (maybe_yank_clinit): Cleaned up flow control.
7834
7835 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7836
7837         * decl.c (java_init_decl_processing): Don't initialize
7838         finit_leg_identifier_node.
7839         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7840         (finit_leg_identifier_node): Remove.
7841         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
7842
7843 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7844
7845         * mangle.c (mangle_member_name): Don't special-case for
7846         NO_DOLLAR_IN_LABEL.
7847         * mangle_name.c (unicode_mangling_length): Likewise.
7848         (append_unicode_mangled_name): Likewise.
7849         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
7850         code.
7851
7852 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7853
7854         * expr.c (build_java_array_length_access): Don't force null pointer
7855         check unless flag_check_references is set.
7856
7857 2001-12-20  Tom Tromey  <tromey@redhat.com>
7858
7859         Fix for PR java/3417:
7860         * parse.y (patch_assignment): Added special processing for
7861         `return'.
7862         (patch_return): Don't convert booleans to integers, and don't
7863         special-case `null'.
7864
7865 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7866
7867         * config-lang.in (diff_excludes): Remove.
7868
7869 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7870
7871         * gcj.texi: Update link to GCC manual.
7872
7873 2001-12-17  Tom Tromey  <tromey@redhat.com>
7874
7875         * parse.y (link_nested_class_to_enclosing): Removed useless
7876         statement.
7877
7878 2001-12-16  Tom Tromey  <tromey@redhat.com>
7879
7880         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
7881         Fixes PR java/5088.
7882
7883 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7884
7885         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
7886         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
7887         spelling errors.
7888
7889 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7890
7891         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
7892
7893 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7894
7895         * decl.c (java_init_decl_processing): Build otable_type correctly.
7896         otable_decl is an otable_type.
7897
7898 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7899
7900         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
7901         otable_type, otable_ptr_type, method_symbol_type,
7902         method_symbols_array_type, method_symbols_array_ptr_type): New
7903         field/global tree definitions.
7904         (flag_indirect_dispatch): New flag.
7905         * decl.c (java_init_decl_processing): Initialize new otable and
7906         otable_syms type nodes and decls. Add new field "index" to
7907         method_type_node.
7908         * class.c (build_method_symbols_entry): New function.
7909         (make_method_value): Set "index" to to method's vtable index for
7910         virtual methods when indirect-dispatch is not used.
7911         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
7912         and set vtable_method_count to -1. Set otable and otable_syms field
7913         if indirect-dispatch is used and there was something to put in them.
7914         (build_method_symbols_entry): New function.
7915         (emit_offset_symbol_table): New function.
7916         * expr.c (get_offset_table_index): New function.
7917         (build_invokevirtual): Build array reference to otable at the index
7918         returned by get_offset_table_index, and use the result as the vtable
7919         offset.
7920         (build_invokeinterface): Similar.
7921         * jcf-parse.c (yyparse): If indirect-dispatch, call
7922         emit_offset_symbol_table at the end of compilation, after all classes
7923         have been generated.
7924         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
7925         * lang.c (flag_indirect_dispatch): Define.
7926         (lang_f_options): Add indirect-dispatch flag.
7927
7928 2001-12-14  Matthias Klose  <doko@debian.org>
7929
7930         * gcj.texi: Markup for man page generation. Document missing
7931         options printed by <tool> --help.
7932         Terminate description of gij's -ms option with a dot.
7933         * Make-lang.in ($(srcdir)/java/*.1): New targets.
7934         (java.generated-manpages java.install-man, java.uninstall,
7935         java-maintainer-clean) Updated.
7936
7937 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
7938
7939         * class.c (get_dispatch_table): Fix java vtable layout
7940         for TARGET_VTABLE_USES_DESCRIPTORS.
7941         * decl.c (java_init_decl_processing): Initialize
7942         alloc_no_finalizer_node, finalize_identifier_node.
7943         * expr.c (class_has_finalize_method): New function.
7944         (expand_java_NEW): Generate calls for finalizer-free allocation.
7945         (build_invokevirtual): Fix java vtable layout for
7946         TARGET_VTABLE_USES_DESCRIPTORS.
7947         * java-tree.h (enum java_tree_index): New entries:
7948         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
7949         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
7950         (class_has_finalize_method): declare.
7951         (HAS_FINALIZER_P): New macro.
7952         * parse.y (patch_invoke): Generate calls for finalizer-free
7953         allocation.
7954
7955 2001-12-12  Matthias Klose  <doko@debian.org>
7956
7957         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
7958         whitespace at end of line.
7959
7960 2001-12-11  Tom Tromey  <tromey@redhat.com>
7961
7962         * lex.c (java_init_lex): Define wfl_to_string as
7963         gnu.gcj.runtime.StringBuffer unless generating bytecode.
7964
7965 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
7966
7967         * class.c (make_method_value): Use null_pointer_node to
7968         represent empty exception table.
7969
7970 2001-12-10  Tom Tromey  <tromey@redhat.com>
7971
7972         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
7973
7974 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
7975
7976         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
7977
7978 2001-12-09  Per Bothner  <per@bothner.com>
7979
7980         * check-init.c (current_switch_has_default):  New static field.
7981         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
7982         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
7983         DEFAULT_EXPR seen, simulate a default alternative that copies state.
7984
7985 2001-12-09  Tom Tromey  <tromey@redhat.com>
7986
7987         * check-init.c (check_init): Don't allow pre- or post- increment
7988         or decrement of final variable.
7989         (final_assign_error): Minor error message rewording.
7990
7991 2001-12-08  Tom Tromey  <tromey@redhat.com>
7992
7993         * java-tree.h: Fixed typo.
7994
7995         * gjavah.c (decompile_method): Don't decompile to `return this'
7996         for static methods.
7997
7998         * gjavah.c (cxx_keywords): Re-sorted.
7999         * lex.c (cxx_keywords): Re-sorted.
8000
8001         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8002         else.
8003
8004         * gjavah.c (print_namelet): Clear subnamelets.
8005         (HANDLE_METHOD): Set `method_printed' earlier.
8006
8007 2001-12-07  Tom Tromey  <tromey@redhat.com>
8008
8009         * lang.c (lang_f_options): Added
8010         optimize-static-class-initialization.
8011         (java_decode_option): Removed special case.
8012
8013 2001-12-07  Per Bothner  <per@bothner.com>
8014
8015         * check-init.c (check_init):  Fix typo freeing memory twice.
8016
8017 2001-12-05  Per Bothner  <per@bothner.com>
8018
8019         Restore support for static class initialization optimization.
8020         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8021         * check-init.c (check_int):  At end of BLOCK handle initialization
8022         blocks, which used to be done in java_complete_expand_method but did
8023         not handle the case where check_for_initialization might allocate
8024         more than a word of bits.
8025         * decl.c (lang_make_tree):  The smic field is now a tree.
8026         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8027         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8028
8029         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8030
8031         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8032         Change from a hash table to a list.
8033         (struct_lang_decl):  Change field 'smic' to match.
8034         * class.c (add_method_1):  Initialize
8035         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8036         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8037         (java_expand_method_bodies): -here, since 'smic' is now a list.
8038         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8039
8040         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8041
8042         * class.c (java_hash_compare_tree_node):  Fix casts.
8043
8044 2001-12-04  Per Bothner  <per@bothner.com>
8045
8046         * check-init.c:   Handle definite unassignment to finals in addition
8047         to definite assignment.
8048         (loop_current_locals):  New field.
8049         (num_current_locals, int start_current_locals, num_current_words):
8050         Make static.
8051         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8052         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8053         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8054         (get_variable_decl, check_final_reassigned):  New functions.
8055         (check_init, check_bool_init):  Modify as needed for checking finals.
8056         (check_for_initialization):  Take extra parameter and return void.
8057         Do extra start-up logic to check final fields for assignment.
8058         * parse.y (check_static_final_variable_assignment_flag,
8059         reset_static_final_variable_assignment_flag, check_final_assignment,
8060         check_final_variable_local_assignment_flag,
8061         reset_final_variable_indirect_assignment_flag,
8062         reset_final_variable_global_assignment_flag):  Remove functions.
8063         (java_complete_expand_methods, outer_field_access_fix,
8064         patch_assignment): Remove no-longer used logic.
8065         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8066         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8067
8068         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8069         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8070         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8071
8072         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8073
8074         * java-tree.h (DECL FINAL):  New bit-field.
8075         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8076         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8077         (DECL_INIT_CALLS_THIS):  New macro.
8078         (struct lang_decl):  New bit-field init_calls_this.
8079         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8080         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8081         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8082         use it for both local variables and final fields.
8083         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8084         and local_final.
8085         (struct lang_type):  Remove hfv bit-field.
8086         (check_for_initialization):  Change to return void.
8087
8088         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8089         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8090         * check-init.c (final_assign_error):  New helper function.
8091         (check_final_reassigned, check_init):  Use it.
8092         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8093
8094         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8095         bit-fields to unsigned.
8096
8097 2001-12-03  Per Bothner  <per@bothner.com>
8098
8099         * parse.y (patch_binop):  Minor constant folding.
8100
8101         * parse.y (build_current_thisn):  Shorter 'buffer'.
8102
8103 2001-12-03  Per Bothner  <per@bothner.com>
8104
8105         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8106         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8107         * jcf-write.c (generate_bytecode_insns):  Remove support for
8108         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8109         * check-init.c (check_init):  Likewise.
8110
8111 2001-12-03  Per Bothner  <per@bothner.com>
8112
8113         * verify.c (subroutine_nesting):  New function.
8114         (verify_jvm_instructions):  Use it to fix logic for checking that
8115         we're done with the current subroutine.
8116
8117         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8118         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8119
8120 2001-12-03  Per Bothner  <per@bothner.com>
8121
8122         * jcf.h:  Fix obvious typo in comment.
8123         * typeck.c (build_null_signature):  Add comment.
8124
8125 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8126
8127         * expr.c: Remove leading capital from diagnostic messages, as
8128         per GNU coding standards.
8129         * jcf-io.c: Similarly.
8130         * jcf-parse.c: Similarly.
8131         * jv-scan.c: Similarly.
8132         * jvspec.c: Similarly.
8133         * mangle.c: Similarly.
8134
8135 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8136             Alexandre Petit-Bianco  <apbianco@redhat.com>
8137
8138         * expr.c (build_java_arrayaccess): Call save_expr on array for
8139         correct evaluation order, modified comment, fixed indentation.
8140         * parse.y: (patch_assignment): Correctly extract the array base
8141         from the tree generate by build_java_arrayaccess, added comments.
8142         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8143         Fixes PR java/3096, PR java/3803, PR java/3965.
8144
8145 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8146
8147         * expr.c (expand_byte_code): Remove trailing periods from messages.
8148         * jcf-parse.c (load_class, jcf_parse): Similarly.
8149         * jcf-write.c (generate_classfile): Similarly.
8150         * lex.c (java_lex): Similarly.
8151
8152 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8153
8154         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8155
8156 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8157
8158         * Make-lang.in (java.generated-manpages): New dummy target.
8159
8160 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8161
8162         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8163         ASM_FINAL_SPEC.
8164         (lang_specific_pre_link): Use set_input to set input_filename.
8165         Append `main' here.
8166         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8167         (main): Fix definition.
8168         Strip `main' from classname.
8169         Fixes PR java/227.
8170
8171 2001-11-18  Roger Sayle <roger@eyesopen.com>
8172
8173         * parse.h (java_expand_switch): Remove old prototype.
8174
8175 2001-11-18  Tom Tromey  <tromey@redhat.com>
8176
8177         Fix for PR java/1401:
8178         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8179         arg0 is null.
8180         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8181         correctly.
8182
8183 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8184
8185         * lang.c (finish_parse): Rename to java_finish.
8186         (LANG_HOOKS_FINISH, java_finish): New.
8187
8188 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8189
8190         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8191         * java-tree.h: New prototype.
8192         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8193
8194 2001-11-13  Tom Tromey  <tromey@redhat.com>
8195
8196         * gjavah.c (method_signature): New global.
8197         (HANDLE_METHOD): Set it.
8198         (decompile_return_statement): New function.
8199         (decompile_method): Use it.
8200         (print_method_info): Removed `synth' argument.
8201
8202 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8203
8204         * java-tree.h (java_set_yydebug): New.
8205         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8206         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8207         (print_lang_decl, print_lang_type, print_lang_identifier,
8208         print_lang_statistics, lang_print_xnode): Remove.
8209
8210 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8211
8212         * jcf-parse.c (init_lex): Remove.
8213         * lang.c (language_string, lang_identify): Remove.
8214         (struct lang_hooks): Constify.
8215         (LANG_HOOKS_NAME): Override.
8216         (init_parse): Update.
8217
8218 2001-11-08  Andreas Franck  <afranck@gmx.de>
8219
8220         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8221         program_transform_name the way suggested by autoconf.
8222         (java.install-common): Also transform auxiliary program names with
8223         program_transform_name.
8224
8225 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8226
8227         * parse.y (trap_overflow_corner_case): New rule.
8228         (unary_expression): Use it.
8229         * lex.c (java_init_lex): Don't set minus_seen.
8230         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8231         it to handle.
8232         (error_if_numeric_overflow): New function.
8233         * parse.h (minus_seen): Removed field.
8234         (JAVA_RADIX10_FLAG): New define.
8235
8236 2001-11-07  Tom Tromey  <tromey@redhat.com>
8237
8238         Patch for PR java/1414:
8239         * parse.y (case_label_list): New global.
8240         (goal): Register case_label_list with GC.
8241         (java_complete_lhs): Save new case on case_label_list.
8242         (patch_switch_statement): Check for duplicate case labels.
8243
8244 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8245
8246         * parse.y (patch_assignment): Removed unused third argument.
8247         (java_complete_lhs): Removed unused third argument to patch_assignment.
8248
8249 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8250
8251         * lang.c: Include langhooks-def.h.
8252         * Make-lang.in: Update.
8253
8254 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8255
8256         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8257
8258 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8259
8260         * mangle.c (find_compression_record_match): Don't match compression
8261         records for package name elements unless they occur at the start of
8262         the name. Fix for PR java/4717.
8263
8264 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8265
8266         * expr.c (expand_java_field_op): Don't special-case references to
8267         java.lang.PRIMTYPE.TYPE.
8268         (build_primtype_type_ref): Removed.
8269         * java-tree.h (build_primtype_type_ref): Remove prototype.
8270         * parse.y (maybe_build_primttype_type_ref): Removed.
8271         (complete_function_arguments): Don't special-case references to
8272         java.lang.PRIMTYPE.TYPE.
8273         (patch_assignment): Likewise.
8274         (array_constructor_check_entry): Likewise.
8275
8276 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8277
8278         * mangle.c (static tree compression_table): Fixed leading comment.
8279         * parse.h (struct parser_ctxt): Fixed field comment.
8280         * parse.y (check_pkg_class_access): New prototype, fixed leading
8281         comment, new parameter used to emit error only if passed as true.
8282         (parse_check_super): Pass extra argument to check_pkg_class_access.
8283         (do_resolve_class): Likewise.
8284         (process_imports): Likewise.
8285         (read_import_dir): Fixed indentation.
8286         (find_in_imports_on_demand): New local class_type_name. Local
8287         node_to_use deleted. while loop changed into for loop. Report
8288         multiple definition only for accessible classes. Improved error
8289         message.
8290         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8291         assigned to parameter list, fixed indentation. while loop changed
8292         into for loop, restore TREE_CHAIN on local `tem' before the next
8293         iteration.
8294
8295 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8296
8297         * lang.c (lang_get_alias_set): Deleted.
8298
8299 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8300
8301         * gjavah.c (jni_print_char): Fix thinko in last change.
8302
8303         * gjavah.c (jni_print_char, decode_signature_piece): Use
8304         safe-ctype macros and/or fold extra calls into fewer ones.
8305         * lex.c (java_read_unicode, java_lex): Likewise.
8306         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8307         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8308         * mangle_name.c (append_unicode_mangled_name,
8309         unicode_mangling_length): Likewise.
8310
8311 2001-10-17  Richard Henderson  <rth@redhat.com>
8312
8313         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8314
8315 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8316
8317         * lang.c (langhooks.h): Included.
8318         (LANG_HOOKS_INIT): Redefined.
8319         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8320         (LANG_HOOKS_DECODE_OPTION): Likewise.
8321         (struct lang_hooks lang_hooks): New initialization.
8322
8323 2001-10-11  Per Bothner  <per@bothner.com>
8324
8325         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8326         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8327         The former is simpler, and jcf-write.c handles it better.
8328         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8329         or WITH_CLEANUP_EXPR.
8330         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8331         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8332
8333         * parse.y (patch_if_else_statement):  If the condition is constant,
8334         optimize away the test.
8335
8336 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8337
8338         * parse.y (patch_cast): Call patch_string on the first operand of
8339         the incoming node, update it if necessary. Fixes PR java/4510.
8340
8341 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8342
8343         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8344         when name qualifier matches a package name.
8345
8346 2001-10-08  Tom Tromey  <tromey@redhat.com>
8347
8348         Fix for PR java/4489:
8349         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8350         force a new label when computing `body_block'.
8351
8352 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8353
8354         * jcf-io.c (format_uint): Const-ify.
8355         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8356         * lex.c (java_get_line_col): Likewise.
8357         * parse.y (build_incdec): Likewise.
8358
8359 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8360
8361         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8362         a NULL enclosing context if appropriate. Fixes PR java/4466.
8363
8364 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8365
8366         * parse.y (patch_assignment): Use lvalue's original TYPE when
8367         building the final COMPOUND_EXPR.
8368         (try_reference_assignconv): Fixed leading comment.
8369
8370 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8371
8372         * parse.y (check_final_variable_indirect_assignment): For
8373         COMPOUND_EXPR, return only if finals were found initialized
8374         properly, if not, keep on checking.
8375         (check_final_variable_global_assignment_flag): New local
8376         error_found, set when appropriate and used to decide whether to
8377         report uninitialized finals. Fixed typo in comment.
8378
8379 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8380
8381         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8382         last three initializations. Fixes PR java/4360.
8383
8384 2001-09-21  Richard Henderson  <rth@redhat.com>
8385
8386         * class.c (get_dispatch_table): Handle function descriptors.
8387         (build_dtable_decl): Likewise.
8388         * expr.c (build_invokevirtual): Likewise.
8389
8390 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8391
8392         * parse.y (patch_method_invocation): Build class initialization
8393         when static finals are used to qualify method invocation.
8394         Fixes PR java/4366.
8395
8396 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8397
8398         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8399         build_type_name_from_array_name.
8400         (STRING_STRIP_BRACKETS): New macro.
8401         * parse.y (build_type_name_from_array_name): New function.
8402         (array_creation_expression:): Accumulate []s instead of [s.
8403         (cast_expression:): Accumulate []s instead of [s after cast type
8404         name.
8405         (build_array_from_name): Local string deleted, use
8406         build_type_name_from_array_name.
8407         (build_unresolved_array_type): Accumulate []s instead of [s after
8408         type name.
8409         (register_fields): Fixed comment.
8410         (resolve_class): Local name, base deleted, new locals tname and
8411         array_dims. Use build_type_name_from_array_name. Use array_dims to
8412         build array type.
8413         (purify_type_name): Use STRING_STRIP_BRACKETS.
8414
8415 2001-09-18  Andreas Jaeger  <aj@suse.de>
8416
8417         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8418         * jv-scan.c: Likewise.
8419
8420 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8421
8422         * parse.y (patch_method_invocation): Inner class creation context
8423         check not enforced within constructors. Fixes PR java/1873.
8424
8425 2001-09-16  Tom Tromey  <tromey@redhat.com>
8426
8427         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8428         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8429
8430 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8431
8432         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8433         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8434         (struct lang_type): New fields import_list and import_demand_list.
8435         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8436         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8437         (do_resolve_class): New local saved_enclosing_type, initialized,
8438         passed as parameter to find_in_imports and find_in_imports_on_demand.
8439         (find_in_imports): Added paramater enclosing_type, use its
8440         TYPE_IMPORT_LIST when applicable.
8441         (find_in_imports_on_demand): Added parameter enclosing_type, use
8442         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8443         declaration and initialization.
8444         (fold_constant_for_init): Switch/restore current_class to the
8445         appropriate context.
8446
8447 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8448
8449         * verify.c (verify_jvm_instructions): Fix typo.
8450
8451 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8452
8453         * expr.c (expand_invoke): Const-ification.
8454         * parse.y (patch_method_invocation): Likewise.
8455
8456 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8457
8458         * gjavah.c (cxx_keywords): Const-ification.
8459         * keyword.gperf (java_keyword): Likewise.
8460         * lang.c (java_tree_code_name): Likewise.
8461         * lex.c (cxx_keywords): Likewise.
8462         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8463
8464 2001-09-11  Richard Henderson  <rth@redhat.com>
8465
8466         * parse.h (ctxp_for_generation): Mark extern.
8467
8468 2001-09-10  Richard Henderson  <rth@redhat.com>
8469
8470         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8471
8472 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8473
8474         * typeck.c (java_array_type_length, build_prim_array_type):
8475         Represent empty arrays by NULL index.
8476
8477 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8478
8479         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8480         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8481
8482 2001-09-06  Anthony Green  <green@redhat.com>
8483
8484         * class.c (O_BINARY): Define if necessary.
8485         (registerResource_libfunc): Declare.
8486         (init_class_processing): Initilize registerResource_libfunc.
8487         (compile_resource_file): New function.
8488         * java-tree.h (resource_name): Declare.
8489         (compile_resource_file): Declare.
8490         * jcf-parse.c (yyparse): Handle compiling java resource files.
8491         * lang.c (java_decode_option): Handle -fcompile-resource option.
8492         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8493         resource files.
8494         * gcj.texi (Code Generation): Add documentation for -R flag.
8495
8496 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8497
8498         * jcf-write.c (generate_classfile): Issue an error in case of
8499         field/initial value mismatch.
8500         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8501         being initialized and we're generating bytecode.
8502         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8503         set DECL_INITIAL properly when appropriate.
8504         Fixes PR java/4230
8505         Fixes PR java/4204
8506
8507 2001-09-01  Per Bothner  <per@bothner.com>
8508
8509         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8510         relevant.  All initializers except static final and constant require
8511         <clinit>, regardless of flag_emit_class_files.
8512
8513 2001-08-31  Per Bothner  <per@bothner.com>
8514
8515         * class.c (set_constant_value):  When not emitting class files, then a
8516         String ConstantValue is a utf8const_ptr_type.
8517
8518 2001-08-30  Per Bothner  <per@bothner.com>
8519
8520         * jcf-write.c (generate_classfile):  Check that field is primitive
8521         or string before emitting ConstantValue attribute.
8522
8523 2001-08-30  Per Bothner  <per@bothner.com>
8524
8525         * parse.y (resolve_qualified_expression_name):  If creating a
8526         COMPOUND_EXPR, set it's type correctly.
8527
8528 2001-08-30  Per Bothner  <per@bothner.com>
8529
8530         * jcf-io.c (open_class):  Set filename field.
8531
8532         * jcf-parse,c (parse_class_file):  Set current_function_decl
8533         for better error message when Code attribute is missing.
8534
8535         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
8536         better diagnostics, especially for constructors.
8537
8538 2001-08-30  Per Bothner  <per@bothner.com>
8539
8540         * jcf-write.c (generate_classfile):  Don't write ConstantValue
8541         attribute if field is not final, for compatibility with jdk.
8542
8543         * jcf-write.c (generate_classfile):  Convert ConstantValue values
8544         to correct type.  Work-around for front-end bug.
8545         * class.c (set_constant_value):  Error if constant has wrong type.
8546
8547 2001-08-30  Per Bothner  <per@bothner.com>
8548
8549         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
8550         "Double" are printed at verbosity 1.
8551
8552         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
8553
8554         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
8555
8556 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8557
8558         * parse.y (patch_assignment): Don't verify final re-assignment here.
8559         (java_complete_lhs): Verify assignments to finals calling
8560         patch_assignment. Verify re-assignments to finals before calling
8561         patch_assignment.
8562
8563 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
8564
8565         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8566         Fixes PR java/1413
8567
8568 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8569
8570         * lex.c (java_lex): new local found_hex_digits. Set and then used
8571         in test to reject invalid hexadecimal numbers.
8572         * parse.y (java_complete_tree): Prevent unwanted cast with
8573         initialized floating point finals.
8574         (patch_binop): Emit a warning when detecting a division by zero,
8575         mark result not constant, don't simplify non integer division.
8576
8577 2001-08-28  Per Bothner  <per@bothner.com>
8578
8579         * jcf-write.c  (generate_bytecode_insns):  For increments and
8580         decrements just recurse to push constant.  Improvement on Mark's patch.
8581
8582 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
8583
8584         * jcf-write.c (generate_bytecode_insns): Generate an integer to
8585         real conversion for increments and decrements of reals.
8586
8587 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8588
8589         * parse.y (resolve_qualified_expression_name): Handle unresolved
8590         qualified expressions, prevent numerical qualifiers, fixed typo.
8591         Fixes PR java/4141
8592
8593 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8594
8595         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8596         don't report anything but deprecated class when marked so. Handle
8597         VAR_DECL.
8598         (patch_method_invocation): Check deprecation on methods and types.
8599         (patch_binop): code becomes an enum tree_code, added default: to
8600         switch to handle that. Detect division by zero, try to fold and
8601         return before using a subroutine.
8602
8603 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8604
8605         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8606         file smaller than 4 bytes.
8607         * parse.y (check_inner_circular_reference): New function.
8608         (check_circular_reference): Likewise.
8609         (array_initializer:): Accept {,}.
8610         (java_check_circular_reference): Rewritten using
8611         check_circular_reference and check_inner_circular_reference.
8612         (java_complete_expand_method): Unconditionally save and restore
8613         the unpurged exception list.
8614         (build_dot_class_method_invocation): Unmangle signature parameter.
8615
8616 2001-08-21  Tom Tromey  <tromey@redhat.com>
8617
8618         * decl.c (init_decl_processing): Add `throws' field to method
8619         descriptor.
8620         * class.c (make_method_value): Compute `throws' field for method.
8621
8622 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8623
8624         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8625         circularity is detected.
8626         (ctors_unchecked_throws_clause_p): Fixed leading comment.
8627
8628 2001-08-17  Richard Henderson  <rth@redhat.com>
8629
8630         * class.c (emit_register_classes): Add align parameter to
8631         call to assemble_integer.
8632
8633 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
8634
8635         * jcf-parse.c (load_class): New locals saved and class_loaded. If
8636         loading a class_or_name fails, try considering an innerclass name
8637         and load the enclosing context.
8638         * parse.y (resolve_inner_class): New function.
8639         (find_as_inner_class): Added leading comment.
8640         (register_incomplete_type): Keep the current context as enclosing
8641         context for JDEP_FIELD dependencies.
8642         (do_resolve_class): Locals new_class_decl and super initialized to
8643         NULL. Call resolve_inner_class, explore the enclosing context
8644         superclass if necessary.
8645         Fixes PR java/4007
8646
8647 2001-08-16  Tom Tromey  <tromey@redhat.com>
8648
8649         * jcf-dump.c (main): Updated for change to jcf_path_seal.
8650         * gjavah.c (main): Updated for change to jcf_path_seal.
8651         * lang.c (version_flag): New global.
8652         (java_decode_option): Recognize `-version'.
8653         (java_init): Update for change to jcf_path_seal.
8654         * jcf.h (jcf_path_seal): Added `print' argument.
8655         * jcf-path.c (jcf_path_seal): Added `print' argument.
8656
8657 2001-08-13  Zack Weinberg  <zackw@panix.com>
8658
8659         * Make-lang.in (java/decl.o): Update dependencies.
8660         * decl.c: Include libfuncs.h, don't include toplev.h.
8661
8662 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8663
8664         * decl.c (init_decl_processing): exception_type_node,
8665         class_not_found_type_node, and no_class_def_found_type_node
8666         initialized. predef_filenames augmented accordingly.
8667         instinit_identifier_node initialized.
8668         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8669         * java-tree.h (enum java_tree_index): New entries
8670         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8671         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8672         (exception_type_node): New macro.
8673         (class_not_found_type_node): Likewise.
8674         (no_class_def_found_type_node): Likewise.
8675         (instinit_identifier_node): Likewise.
8676         (PREDEF_FILENAMES_SIZE): Adjusted.
8677         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8678         (struct lang_type): Fixed typo in bitfield name.
8679         (DECL_INSTINIT_P): New macro.
8680         (ID_INSTINIT_P): Likewise.
8681         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8682         attribute.
8683         * parse.y (encapsulate_with_try_catch): New function.
8684         (generate_instinit): Likewise.
8685         (build_instinit_invocation): Likewise.
8686         (ctors_unchecked_throws_clause_p): Likewise.
8687         (add_instance_initializer): Deleted.
8688         (build_instance_initializer): Likewise.
8689         (in_instance_initializer): Likewise.
8690         (check_method_redefinition): instinit$ not to be verified.
8691         (java_complete_expand_methods): Generate instinit$, simplified code.
8692         (build_dot_class_method): Eliminated unnecessary locals. Use
8693         encapsulate_with_try_catch, removed unnecessary code.
8694         (fix_constructors): New local iii. Use build_instinit_invocation.
8695         (patch_method_invocation): Added comment.
8696         (maybe_use_access_method): Don't consider instinit$.
8697         (find_applicable_accessible_methods_list): Shorten the search for
8698         instinit$ too.
8699         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8700         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8701         (patch_throw_statement): Likewise. Fixed typo.
8702
8703 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
8704
8705         Revert:
8706         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8707         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8708         ASM_FINAL_SPEC.
8709         (lang_specific_pre_link): Use set_input to set input_filename.
8710         Append `main' here.
8711         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8712         (main): Fix definition.
8713         Strip `main' from classname.
8714         Fixes PR java/227.
8715
8716 2001-08-11  Zack Weinberg  <zackw@panix.com>
8717
8718         * lex.h: Don't include setjmp.h.  Don't define
8719         SET_FLOAT_HANDLER or prototype set_float_handler.
8720
8721 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8722
8723         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8724         `poplevel' in the right order.
8725
8726 2001-08-09  Richard Henderson  <rth@redhat.com>
8727
8728         * Make-lang.in (class.o): Depend on TARGET_H.
8729         * class.c (emit_register_classes): Use target hooks instead of
8730         assemble_constructor and assemble_destructor.
8731
8732 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
8733
8734         * check-init.c (flags.h): Include
8735         (check_init): Don't report uninitialized static class
8736         initialization flags, don't free bit index when doing static class
8737         initialization optimization.
8738         (check_for_initialization): Return type changed to `unsigned int.'
8739         (attach_initialized_static_class): New function.
8740         * class.c (add_method_1): Create the initialized static class
8741         table if necessary.
8742         (finish_class): Always emit deferred inline methods.
8743         * decl.c (emit_init_test_initialization): Moved to expr.c
8744         (complete_start_java_method): Don't traverse
8745         DECL_FUNCTION_INIT_TEST_TABLE.
8746         (lang_mark_tree): Mark hash tables in function decls.
8747         * expr.c (emit_init_test_initialization): Moved from decl.c.
8748         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
8749         initialization flag, set DECL_CONTEXT and
8750         LOCAL_CLASS_INITIALIZATION_FLAG.
8751         (java_lang_expand_expr): Emit initialization code for static class
8752         initialized flags when entering block, if necessary.
8753         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
8754         * java-tree.h (flag_optimize_sci): New global variable declaration.
8755         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
8756         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
8757         (LOCAL_FINAL_P): Fixed typo in comment.
8758         (FINAL_VARIABLE_P): Likewise.
8759         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
8760         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
8761         (struct lang_decl): New fields `ict', `smic' and `cif.'
8762         (check_for_initialization): New returned value for global.
8763         (attach_initialized_static_class): New global function.
8764         (STATIC_CLASS_INIT_OPT_P): New macro.
8765         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
8766         * lang.c (java_decode_option): Handle
8767         `-fno-optimize-static-class-initialization'
8768         * parse.y (start_complete_expand_method): New function.
8769         (java_expand_method_bodies): Likewise.
8770         (attach_init_test_initialization_flags): Likewise.
8771         (adjust_init_test_initialization): Likewise.
8772         (emit_test_initialization): Likewise.
8773         (java_complete_expand_methods): Nullify abstract and native method
8774         bodies.
8775         (java_complete_expand_method): New locals `fbody', `block_body'
8776         and `exception_copy.' Reorganized: directly return on empty method
8777         bodies, call `start_complete_expand_method', remember definitely
8778         initialized static class in function, don't expand method bodies.
8779         (java_expand_classes): Call `java_expand_method_bodies' before
8780         `finish_class' when compiling to native.
8781         (resolve_expression_name): Use `orig' after building outer class
8782         field access.
8783         (patch_invoke): Remember static method invocations.
8784
8785 2001-08-06  Richard Henderson  <rth@redhat.com>
8786
8787         * class.c (emit_register_classes): Pass a symbol_ref and priority
8788         to assemble_constructor.
8789
8790 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
8791
8792         * java-tree.h (all_class_filename): New macro.
8793         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8794         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8795         newly created IDENTIFIER_NODE to `all_class_filename.'
8796
8797 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
8798
8799         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8800         Use ggc_add_tree_root to register roots.
8801
8802 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8803
8804         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8805         second operand calling check_init.
8806         * decl.c (complete_start_java_method): Swaped second and third
8807         arguments while creating WITH_CLEANUP_EXPR node.
8808         * jcf-write.c (generate_bytecode_insns): Use second operand
8809         instead of third when handling WITH_CLEANUP_EXPR.
8810         * parse.y (java_complete_lhs): Expand second operand of
8811         WITH_CLEANUP_EXPR nodes.
8812         (patch_synchronized_statement): Swaped second and third arguments
8813         while creating WITH_CLEANUP_EXPR node.
8814
8815 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8816
8817         * parse.y (create_interface): Avoid cyclic inheritance report when
8818         syntax error encountered during class definition.
8819         Fixes PR java/2956
8820
8821 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8822
8823         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8824         ASM_FINAL_SPEC.
8825         (lang_specific_pre_link): Use set_input to set input_filename.
8826         Append `main' here.
8827         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8828         (main): Fix definition.
8829         Strip `main' from classname.
8830         Fixes PR java/227.
8831
8832 2001-07-18  Tom Tromey  <tromey@redhat.com>
8833
8834         For PR java/2812:
8835         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8836         * lex.c (java_new_lexer): Use ICONV_CONST.
8837         (java_read_char): Likewise.
8838         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8839         (jv-scan$(exeext)): Likewise.
8840
8841 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8842
8843         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
8844         * parse.y (check_class_interface_creation): Allow `private' if the
8845         enclosing is not an interface.
8846         (create_interface): Interface tagged public if the enclosing
8847         context is an interface.
8848         (create_class): Class tagged public if the enclosing context
8849         is an interface.
8850         Fixes PR java/2959
8851
8852 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8853
8854         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
8855         Fixes PR java/2665
8856
8857 2001-07-14  Tim Josling  <tej@melbpc.org.au>
8858
8859         * check-init.c (check_init): Remove references to EXPON_EXPR.
8860
8861 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8862
8863         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
8864         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
8865         Fixes PR java/3602
8866
8867 2001-07-13  Tom Tromey  <tromey@redhat.com>
8868
8869         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
8870         invocation.
8871
8872 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8873
8874         * parse.y (patch_method_invocation): Don't override primary if one
8875         is already provided, but let this$<n> be built. Fixed comment.
8876
8877 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8878
8879         * parse.y (empty_statement:): Report empty statement error only
8880         when found at class declaration level.
8881         Fixes PR java/3635
8882
8883 2001-07-12  Tom Tromey  <tromey@redhat.com>
8884
8885         * expr.c (expand_load_internal): New function.
8886         (LOAD_INTERNAL): Use it.
8887
8888 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
8889
8890         * parse.y (verify_constructor_super): Compare anonymous class ctor
8891         args with `valid_method_invocation_conversion_p.'
8892         Fixes PR java/3285
8893
8894 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8895
8896         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
8897         `-fsyntax-only.' Fixes PR java/3248
8898
8899 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8900
8901         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
8902
8903 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8904
8905         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
8906         current function is static. Fixes PR java/1970
8907
8908 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8909
8910         * parse.y (patch_method_invocation): Add enclosing context to ctor
8911         calls if necessary. Fixes PR java/2953
8912
8913 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8914
8915         * parse.y (resolve_package): Abort if qualified expression member
8916         isn't right.
8917         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
8918         Fixes PR java/1391
8919
8920 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
8921
8922         * verify.c: Don't use // comments.
8923
8924 2001-07-05  Tom Tromey  <tromey@redhat.com>
8925
8926         * lang.c (flag_assume_compiled): Removed.
8927         * java-tree.h (flag_assume_compiled): Removed.
8928         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
8929         -fhash-synchronization, -fuse-divide-subroutine,
8930         -fcheck-references, -femit-class-file, -femit-class-files,
8931         -fassume-compiled.  Updated --encoding information.  Changed
8932         -foutput-class-dir to `-d'.
8933
8934 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
8935
8936         * jcf-parse.c (parse_class_file): Add lineno parameter to
8937         debug_start_source_file call.
8938
8939 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8940
8941         * gcj.texi: Use gpl.texi.
8942         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
8943         dependencies and use doc/include in search path.
8944
8945 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
8946
8947         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
8948         `this'.  If so, don't build instance initializers.
8949
8950 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8951
8952         * parse.y (resolve_expression_name): Improved error message for
8953         inner class cases. Fixes PR java/1958
8954
8955 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8956
8957         * lang.c: #include diagnostic.h
8958         (lang_print_error): Add a `diagnostic_context *' parameter.
8959         (java_dummy_print): Likewise.
8960         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
8961
8962 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8963
8964         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
8965         * jcf.h (typedef struct JCF): New bitfield `finished.'
8966         (JCF_FINISH): Set `finished.'
8967         (JCF_ZERO): Reset `finished.'
8968         Fixes PR java/2633
8969
8970 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8971
8972         * parse.y (class_body_declaration:): Don't install empty instance
8973         initializers.
8974         Fixes PR java/1314
8975
8976 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8977
8978         * class.c (set_super_info): Call `set_class_decl_access_flags.'
8979         (set_class_decl_access_flags): New function.
8980         * java-tree.h (set_class_decl_access_flags): New prototype.
8981         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
8982         (parse_class_file): New local `decl_max_locals.' Take wide types
8983         into account to compute DECL_MAX_LOCALS.
8984         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
8985         imports on demand.
8986
8987 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
8988
8989         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
8990
8991 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8992
8993         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
8994         * parse.y (do_resolve_class): Moved comments out to leading comment
8995         section. Removed local `start', New local `_ht' and
8996         `circularity_hash.'  Record `enclosing' in hash table and search
8997         it to detect circularity.  Use `enclosing' as an argument to
8998         `lookup_cl.' Free the hash table when done.
8999
9000 2001-06-19  Tom Tromey  <tromey@redhat.com>
9001
9002         * lex.c (java_read_char): Disallow invalid and overlong
9003         sequences.  Fixes PR java/2319.
9004
9005 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9006
9007         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9008
9009 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9010
9011         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9012         arguments accordingly.
9013
9014 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9015
9016         * gcj.texi: Move contents to just after title page.
9017
9018 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9019
9020         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9021         builtin type.
9022         (patch_incomplete_class_ref): Build the class ref, build the class
9023         init if necessary, complete the tree.
9024         Fixes PR java/2605
9025
9026 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9027
9028         * parse.y (lookup_field_wrapper): Test `name' code.
9029         (resolve_qualified_expression_name): Test `qual_wfl' code.
9030         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9031         handle `qual_wfl' by code.
9032         (maybe_build_primttype_type_ref): Test `wfl' code.
9033
9034 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9035
9036         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9037         fdl.texi.
9038         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9039         the dvi file in the java directory.
9040
9041 2001-05-25  Sam TH  <sam@uchicago.edu>
9042
9043         * gen-table.pl javaop.h jcf.h lex.h,
9044         parse.h: Fix header include guards.
9045
9046 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9047
9048         * jv-scan.c (version): Update copyright year.
9049
9050 2001-05-21  Per Bothner  <per@bothner.com>
9051
9052         * jcf-parse.c (read_class):  If class is from .class or .zip file
9053         and it's already been read, don't push/pop parser context.
9054
9055 2001-05-18  Per Bothner  <per@bothner.com>
9056
9057         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9058         command line so the jvgenmain-generated main program comes first.
9059
9060 2001-05-15  Tom Tromey  <tromey@redhat.com>
9061
9062         * class.c (build_utf8_ref): Don't generate identifier based on
9063         utf8const contents.
9064
9065 2001-05-12  Richard Henderson  <rth@redhat.com>
9066
9067         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9068         * expr.c (java_lang_expand_expr): Expand it.
9069         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9070         calling build_exception_object_ref.
9071         * parse.y (catch_clause_parameter): Likewise.
9072         (build_dot_class_method): Likewise.
9073         (try_reference_assignconv): Likewise.
9074         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9075         * jcf-write.c (generate_bytecode_insns): Likewise.
9076
9077 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9078
9079         * parse.y (build_unresolved_array_type): Set
9080         EXPR_WFL_QUALIFICATION on the newly created wfl.
9081         Fixes PR java/2538. Fixes PR java/2535.
9082
9083 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9084
9085         * parse.y (fix_constructors): Removed unnecessary assignment to
9086         local. Moved assignment to `this$<n>', fixed comments and
9087         indentation.
9088         (build_wfl_wrap): Fixed indentation.
9089         Fixes PR java/2598, java/2579 and java/2658.
9090
9091 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9092
9093         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9094         check for byte swap.
9095
9096 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9097
9098         * expr.c (build_class_init): Move MODIFY_EXPR
9099         outside of COND_EXPR.  Remove variable `call'.
9100
9101 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9102
9103         * decl.c: NULL_PTR -> NULL.
9104         * jcf-write.c: Likewise.
9105
9106 2001-05-01  Tom Tromey  <tromey@redhat.com>
9107
9108         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9109         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9110         * gcj.texi: Updated copyright text.  Include fdl.texi.
9111         (Top): Link to new node.
9112
9113 2001-05-01  Per Bothner  <per@bothner.com>
9114
9115         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9116
9117 2001-05-01  Per Bothner  <per@bothner.com>
9118
9119         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9120         import_list contains the name, not the TREE_PURPOSE.
9121
9122 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9123
9124         * jcf-io.c (read_zip_member): Cast to long in comparison with
9125         signed value.
9126
9127         * jvspec.c (lang_specific_driver): Initialize variables.
9128
9129         * mangle.c (find_compression_record_match): Likewise.
9130
9131         * typeck.c (build_null_signature): Provide static prototype.  Mark
9132         parameter with ATTRIBUTE_UNUSED.
9133
9134         * verify.c (verify_jvm_instructions): Initialize variable.
9135
9136 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9137
9138         * parse.y (do_resolve_class): Check for cyclic inheritance during
9139         inner class resolution.
9140
9141 2001-04-27  Per Bothner  <per@bothner.com>
9142
9143         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9144         while iterating, since that could cause gc to lose stuff.
9145
9146 2001-04-26  Per Bothner  <per@bothner.com>
9147
9148         Fix method search wrt scope of inner classes to match JLS2.
9149         * typeck.c (build_null_signature):  New static function.
9150         (has_method):  New function.  Uses build_null_signature and lookup_do.
9151         * java-tree.h (has_method):  New declaration.
9152         * parse.y (find_applicable_accessible_methods_list):  Do not search
9153         context of inner classes here.
9154         (patch_method_invocation):  Search scope, ie. current and outer clases,
9155         for method matching simple name, to find class.
9156
9157 2001-04-26  Per Bothner  <per@bothner.com>
9158
9159         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9160         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9161
9162         * constants.c (find_methodref_with_class_index):  New function.
9163         (find_methodref_index):  Use find_methodref_with_class_index.
9164         * java-tree.h (find_methodref_with_class_index):  New declaration.
9165         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9166         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9167         If context changed from interface to class, don't use invokeinterface.
9168
9169 2001-04-25  Per Bothner  <per@bothner.com>
9170
9171         * verify.c (verify_jvm_instructions):  For field instructions,
9172         check that field index is valid.  For invoke instructions, check that
9173         method index is valid.
9174
9175 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9176
9177         * config-lang.in (target_libs): Copy from $libgcj_saved.
9178
9179 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9180
9181         * decl.c (init_decl_processing): Add new class "protectionDomain"
9182         field.
9183         * class.c (make_class_data): Set initial value for "protectionDomain".
9184
9185 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9186
9187         * jvspec.c (lang_specific_driver): Fix memory allocation
9188         deficit, by using concat in lieu of xmalloc/sprintf.
9189
9190 2001-04-20  Per Bothner  <per@bothner.com>
9191
9192         Fixes to compile multiple .class files at once.
9193         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9194         * java-tree.h (CLASS_PARSED_P):  New macro.
9195         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9196         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9197         (read_class):  Avoid some code duplication.
9198         Don't call JCF_FINISH for a .class file - might be needed later.
9199         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9200         rather than CLASS_LOADED_P, since latter implies class laid out.
9201         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9202         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9203
9204 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9205
9206         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9207
9208         * boehm.c: Include toplev.h.
9209
9210 2001-04-06  Tom Tromey  <tromey@redhat.com>
9211             Alexandre Petit-Bianco  <apbianco@redhat.com>
9212
9213         Fix for PR gcj/1404 and PR gcj/2332:
9214         * parse.y (build_array_from_name): If we use the type_wfl then
9215         accumulate dimensions from the original type as well.
9216         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9217
9218 2001-04-06  Tom Tromey  <tromey@redhat.com>
9219
9220         * parse.y (analyze_clinit_body): Return true if the second operand
9221         of a METHOD_EXPR is nonzero.
9222
9223 2001-04-06  Tom Tromey  <tromey@redhat.com>
9224
9225         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9226         directory.
9227         ($(srcdir)/java/parse.c): Likewise.
9228
9229 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9230
9231         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9232         (version-gcc): Initialized.
9233         (which-gcj): Likewise.
9234
9235 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9236
9237         * java-tree.h (struct lang_decl): New macro
9238         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9239         * parse.y (build_instance_initializer): New function.
9240         (add_instance_initializer): Use it.
9241         (java_fix_constructors): Set `current_class' before fix pass.
9242         (fix_constructors): Just return if already fixed. Move `super()'
9243         invocation ahead. Use `build_instance_initializer.'
9244         Fixes PR java/1315.
9245
9246 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9247
9248         * parse.y (resolve_qualified_expression_name): Pass field's
9249         DECL_CONTEXT to `not_accessible_p.'
9250         (not_accessible_p): Changed parameters order in `inherits_from_p'
9251         invocation.
9252
9253 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9254
9255         * lang-options.h: Add flag_check_references.
9256
9257 2001-04-04  Per Bothner  <per@bothner.com>
9258
9259         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9260         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9261         * parse.y (maybe_build_class_init_for_field):  New static function.
9262         (resolve_expression_name, resolve_field_access):  Use
9263         maybe_build_class_init_for_field instead of build_class_init
9264         This does not do the init if the field is compile-time-constant.
9265         (resolve_field_access):  Simplify.
9266
9267         * parse.y (fold_constant_for_init):  Merge test into switch.
9268
9269 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9270
9271         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9272         on gansidecl.h.
9273         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9274
9275 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9276
9277         * expr.c (pop_type_0): Save the result of the first
9278         lang_printable_name call in a scratch buffer, so it
9279         won't be clobbered by the second call.
9280
9281 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9282
9283         * parse-scan.y (array_type:): Rewritten.
9284         (type_declaration:): `empty_statement' replaces `SC_TK.'
9285         (class_member_declaration:): `empty statement' added.
9286         (method_body:): Simplified.
9287         (static_initializer:): Likewise.
9288         (primary_no_new_array:): Use `type_literals.'
9289         (type_literals:): New rule.
9290         (dims:): Set and update `bracket_count.'
9291         Fixes PR java/1074. Fixes PR java/2412.
9292
9293 2001-03-28  Hans Boehm  <boehm@acm.org>
9294
9295         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9296         (get_boehm_type_descriptor): Set type on returned value to be a
9297         pointer length integer.
9298
9299 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9300
9301         * expr.c (pop_type_0): Call `concat' rather than building the
9302         string manually.
9303         (pop_type): Add format specifier in call to `error'.
9304
9305         * parse.y (patch_method_invocation): Avoid casting away
9306         const-ness.
9307
9308 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9309
9310         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9311
9312 2001-03-28  Richard Henderson  <rth@redhat.com>
9313
9314         IA-64 ABI Exception Handling:
9315         * Make-lang.in (except.o): Don't depend on eh-common.h.
9316         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9317         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9318         [soft_exceptioninfo_call_node]: Remove.
9319         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9320         (end_java_method): No emit_handlers.
9321         * except.c (java_set_exception_lang_code): Remove.
9322         (method_init_exceptions): Don't call it.
9323         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9324         (build_exception_object_ref): New.
9325         (expand_end_java_handler): Update for except.h name changes.
9326         (emit_handlers, expand_resume_after_catch): Remove.
9327         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9328         (process_jvm_instruction): Use build_exception_object_ref.
9329         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9330         (soft_exceptioninfo_call_node): Remove.
9331         (build_exception_object_ref): Declare.
9332         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9333         soft_exceptioninfo_call_node.  Move processing ...
9334         [EXC_PTR_EXPR]: ... here.
9335         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9336         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9337         (source_end_java_method): No java_set_exception_lang_code or
9338         emit_handlers.
9339         (build_dot_class_method): Use build_exception_object_ref.
9340         (try_reference_assignconv): Check EXC_PTR_EXPR not
9341         soft_exceptioninfo_call_node.
9342
9343 2001-03-28  Richard Henderson  <rth@redhat.com>
9344
9345         * java-tree.h (throw_node): Define as a single member of
9346         java_global_trees instead of a separate array.
9347         (JTI_THROW_NODE): New.
9348         * decl.c (throw_node): Don't declare.
9349         (init_decl_processing): Init a scalar throw_node.
9350         Don't register it for gc.
9351         * check-init.c (check_init): Reference scalar throw_node.
9352         * expr.c (build_java_athrow): Likewise.
9353         * jcf-write.c (generate_bytecode_insns): Likewise.
9354         * parse.h (BUILD_THROW): Likewise.
9355
9356 2001-03-28  Richard Henderson  <rth@redhat.com>
9357
9358         * decl.c (end_java_method): Do not save and restore
9359         flag_non_call_exceptions.
9360         * parse.y (source_end_java_method): Likewise.
9361         * lang.c (flag_exceptions): Don't declare.
9362         (java_init_options): Set flag_non_call_exceptions.  Set
9363         flag_exceptions here ...
9364         (java_init): ... not here.
9365
9366 2001-03-27  Richard Henderson  <rth@redhat.com>
9367
9368         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9369         exceptions_via_longjmp.
9370
9371         * lang.c (flag_new_exceptions): Don't declare it.
9372         (java_init_options): Or set it.
9373
9374 2001-03-27  Richard Henderson  <rth@redhat.com>
9375
9376         * decl.c (end_java_method): Rename asynchronous_exceptions to
9377         flag_non_call_exceptions.
9378         * parse.y (source_end_java_method): Likewise.
9379
9380 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9381
9382         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9383
9384 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9385
9386         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9387
9388 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9389
9390         * parse.y (find_as_inner_class): Follow current package
9391         indications not to mistakingly load an unrelated class.
9392
9393 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9394
9395         * constants.c (PUTN): Use memcpy, not bcopy.
9396
9397         * lex.c (java_read_char): Use memmove, not bcopy.
9398
9399         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9400
9401 2001-03-23  Per Bothner  <per@bothner.com>
9402
9403         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9404         macro for better error pin-pointing.
9405         * java-tree.h:  Fix typo in comment.
9406
9407         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9408         Don't include jsr/goto in exception range.
9409         Check if start and end of exception range are the same (also TRY_EXPR).
9410         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9411         However, do emit the following goto even if try_block is empty.
9412         Defer freeing exception_decl until after the finalizer, to make
9413         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9414
9415         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9416         return the finally-clause and vice versa.
9417
9418 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9419
9420         * gcj.texi (Input Options): documented the check for attribute
9421         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9422         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9423         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9424         (jcf_parse): Check for the right classes archive if necessary.
9425         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9426         (jcf_parse_fields): Fixed indentation.
9427         * jcf-write.c (append_gcj_attribute): New function.
9428         (generate_classfile): Compute the attribute count, invoke
9429         `append_gcj_attribute'.
9430         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9431         turned into bit-fields. New bit-field `right_zip.'
9432         (JCF_ZERO): Set `right_zip' to zero.
9433         * lang-options.h (-fforce-classes-archive-check): Added flag.
9434         * lang.c (flag_force_classes_archive_check): New flag.
9435         (lang_f_options): New entry `force-classes-archive-check.'
9436         Fixes PR java/1213.
9437
9438 2001-02-07  Andrew Haley  <aph@redhat.com>
9439
9440         * gcj.texi (Configure-time Options): Add -fcheck-references.
9441         * expr.c (build_java_indirect_ref): New function.
9442         (java_check_reference): New function.
9443         (build_java_array_length_access): Use build_java_indirect_ref to
9444         check for null references.
9445         (build_java_arrayaccess): Likewise.
9446         (build_get_class): Likewise.
9447         (build_field_ref): Likewise.
9448         (invoke_build_dtable): Likewise.
9449         (build_invokeinterface): Likewise.
9450         * lang.c (lang_f_options): Add flag_check_references.
9451         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9452         * java-tree.h (flag_check_references): New variable.
9453         * lang.c (flag_check_references): Likewise.
9454         * parse.y (patch_invoke): Use java_check_reference.
9455         (patch_assignment): Allow for extra nesting in
9456         _Jv_CheckArrayStore.
9457
9458 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9459
9460         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9461         * lex.c (cxx_keywords): Likewise.
9462
9463 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9464
9465         * parse.y (qualify_ambiguous_name): Broaden `length'
9466         recognition. Help MODIFY_EXPR be resolved as expression names.
9467         Fixes PR java/2066. Fixes PR java/2400.
9468
9469 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9470
9471         * gjavah.c (process_file): Mark interface definitions with
9472         "__attribute__ ((java_interface))".
9473
9474 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9475
9476         * class.c (layout_class): Fixed push_super_field's second
9477         argument. Fixes PR java/2333.
9478         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9479         too early to lay innerclasses out.
9480
9481 2001-03-20  Tom Tromey  <tromey@redhat.com>
9482             Alexandre Petit-Bianco <apbianco@redhat.com>
9483
9484         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9485         inside an array reference. Insertion of the array store check
9486         rewritten. Fixes PR java/2299.
9487
9488 2001-03-20  Tom Tromey  <tromey@redhat.com>
9489
9490         * lex.c (java_read_unicode): Only accept leading `u's.
9491
9492 2001-03-20  Tom Tromey  <tromey@redhat.com>
9493
9494         * jcf-parse.c (read_class): Initialize `class'.
9495
9496 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9497
9498         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9499
9500 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9501
9502         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9503         (layout_class): Likewise.
9504         (layout_class_method): Likewise.
9505         (emit_register_classes): Likewise.
9506         * decl.c (builtin_function): Likewise.
9507         (give_name_to_locals): Likewise.
9508
9509 2001-03-19  Per Bothner  <per@bothner.com>
9510
9511         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9512         before trying to load an inner class.
9513
9514         Fixes to process to command-line .class files in two passes.
9515         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9516         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9517         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9518         * class.c (is_compiled_class):  Fix for renamed flag.
9519         * parse.y (maybe_create_class_interface_decl):  Likewise.
9520         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9521         * jcf-parse.c (read_class);  Read current_class.
9522         (jcf_parse):  Make static.
9523         (load_inner_classes):  New function, with code moved from jcf_parse,
9524         because we need to inner classes after the command-line files are read.
9525         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9526         Reduce use of main_jcf (basically only for archive) and
9527         use finput instead of main_jcf->read_state.
9528         Inline jcf_figure_file_type into yyparse.
9529         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9530         Defer load_inner_classes and parse_class_file to a second pass,
9531         after we've correctly mapped command-line .clas fiels to classes.
9532         (jcf_figure_file_type):  Removed.
9533         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
9534         (JCF_ZERO):  Also clear zipd field.
9535         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
9536
9537 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9538
9539         * jcf-parse.c (yyparse): Change ch from char * to char.
9540
9541 2001-03-19  Per Bothner  <per@bothner.com>
9542
9543         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
9544         Add constructed filelist-file at end, following -xjava.  Thus any .o
9545         and library files are not affected by the -xjava.  Also wrap
9546         explicit @FILE with -xjava and -xnone.
9547
9548 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
9549
9550         * class.c (build_static_field_ref): Call make_decl_rtl() after
9551         setting the DECL_EXTERNAL flag.
9552
9553 2001-03-17  Per Bothner  <per@bothner.com>
9554
9555         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
9556
9557         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
9558         when result is is needed (target is STACK_TARGET).
9559
9560         * parse.h (JDEP_SOLV):  Removed.
9561         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
9562
9563         * parse.y (incomplete_class_list): Removed.
9564         (obtain_incomplete_type): Don't use or set incomplete_class_list.
9565         It doesn't work if resolve_class changes the name of an array type
9566         that is on the list and then someone else looks for the modified name.
9567         Also, seems liable to break when compiling multiple source files at
9568         once.  So the simplest is to just remove incomplete_class_list -
9569         it is only a minor space win and it is not even clear it saves time.
9570
9571         * parse.y (resolve_class):  Remove unneeded promote_type.
9572
9573 2001-03-15  Per Bothner  <per@bothner.com>
9574
9575         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
9576         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
9577         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9578         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9579
9580         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
9581         * parse.y (java_expand_classes):  Likewise.
9582
9583         * parse.y (expand_start_java_method):  Was only called once and had a
9584         misleading name, so inline in caller java_complete_expand_method.
9585         (enter_a_block):  Likewise inline in enter_block and remove.
9586
9587         Remove junk from when gcc/java was created (by copying from C/C++).
9588         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
9589         (struct binding_level):  Remove fields keep, keep_if_subblocks,
9590         more_cleanups_ok, have_cleanups (which have never been used).
9591         (pushlevel, poplevel):  Remove related useless code.
9592
9593         * class.c (make_class_data):  The class_dtable_decl (i.e. the
9594         vtable for Class) should be external, except when compiling Class.
9595
9596         * jvspec.c (lang_specific_driver):  Fix -C handling.
9597         Check -save-temps to see if temp @FILE should be deleted.
9598         Follow-up to/fix for February 16 patch.
9599
9600         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
9601         (type_stack_dup):  Remove no-longer neded error check.
9602
9603 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
9604
9605         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9606         to 'for_pointer'. If this type is for a pointer (argument) mangling,
9607         don't surround the element with 'N..E' if the type name is
9608         unqualified.
9609
9610 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9611
9612         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9613         DECL_RTL_SET_P, etc.
9614         (make_method_value): Likewise.
9615         (get_dispatch_table): Likewise.
9616
9617         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9618
9619 2001-03-07  Tom Tromey  <tromey@redhat.com>
9620
9621         * config-lang.in (lang_requires): Define.
9622
9623 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
9624
9625         * typeck.c (convert): Check flag_unsafe_math_optimizations,
9626         not flag_fast_math.
9627
9628 2001-03-05  Per Bothner  <per@bothner.com>
9629
9630         Fix a problem where rest_of_decl_compilation applied to
9631         class_dtable_decl causes problems because it was done too early,
9632         before output file was opened.
9633         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
9634         * class.c (class_dtable_decl):  Add macro - element of class_roots.
9635         (make_class_data):  Define class_dtable_decl.
9636         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
9637
9638 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9639
9640         * java/class.c, java/decl.c, java/java-tree.h: Replace all
9641         uses of 'boolean' with 'bool'.
9642
9643 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9644
9645         * lang-specs.h: Add zero initializer for cpp_spec field to all
9646         array elements.
9647
9648 2001-02-16  Per Bothner  <per@bothner.com>
9649
9650         Handle compiling multiple input files at once, and @FILE syntax.
9651         * gcj.texi:  Updated documentation to match.
9652         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
9653         * jcf-parse.c (parse_source_file):  Split into ...
9654         (parse_source_file_1):  New function - and:
9655         (parse_source_file_2):  New function.
9656         (yyparse):  On -ffilelist-file, open and scan named file.
9657         On first pass over files, only do parse_source_file_1.
9658         A new second pass calls parse_source_file_2 for each file to compile.
9659         (init_jcf_parse):  Call init_src_parse.
9660         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
9661         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
9662         as multiple input file combined in one compilation.
9663         * lang-options.h:  Add -ffilelist-file
9664         * lang.c (flag_filelist_file):  New flag variable.
9665         (lang_f_options):  Handle -ffilelist-file.
9666         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9667         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
9668         gclass_list - use global fields of src_parse_roots instead.
9669         * parse.y (src_parse_roots):  New array.
9670         (incomplete_class_list, gclass_list):  New macros.
9671         (push_parser_context, java_pop_parser_context,
9672         java_parser_context_resume):  Don't fiddle with deleted fields.
9673         (various):  Use incomplete_class gclass_list and global macros
9674         instead of parse_ctxt fields - the lists are global.
9675         (init_src_parse):  New function.
9676
9677 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9678
9679         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9680
9681 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9682
9683         * parse.y (check_inner_class_access): Moved declaration of local
9684         `enclosing_decl_type' to the right location.
9685
9686 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
9687
9688         * parse.y (parser_check_super_interface): Don't call
9689         check_pkg_class_access for an inner interface.
9690         (parser_check_super): Don't call check_pkg_class_access for inner
9691         class.
9692         (do_resolve_class): Simplify enclosing type loop. Don't call
9693         check_pkg_class_access if CL and DECL are not set.
9694         (find_in_imports_on_demand): Set DECL if class_type needed to be
9695         loaded. Don't call check_pkg_class_access for an inner class.
9696         (check_inner_class_access): Rewritten to implement member access
9697         rules as per spec 6.6.1.
9698         (check_pkg_class_access): Handle the empty package correctly.
9699         (in_same_package): New function. Determine if two classes are in the
9700         same package.
9701
9702 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
9703
9704         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9705         method into array types.
9706         * parse.y (patch_method_invocation): Bypass access check on clone call
9707         to array instance.
9708
9709 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9710
9711         * expr.c (build_instanceof): Check for arrays when trying fold to
9712         false.
9713
9714 2001-02-15  Jim Meyering  <meyering@lucent.com>
9715
9716         * Make-lang.in (java.install-common): Depend on `installdirs'.
9717         (java.install-info): Likewise.
9718
9719 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
9720
9721         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9722
9723 2001-02-14  Tom Tromey  <tromey@redhat.com>
9724             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9725
9726         Fix for PR java/1261.
9727         * typeck.c (build_java_array_type): Add public `clone' method to
9728         arrays.
9729         * parse.y (resolve_qualified_expression_name): Use current_class
9730         when checking for inaccessibility.
9731         (patch_method_invocation): Fixed error message when accessibility
9732         denied.  Added `from_super' argument.
9733
9734 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9735
9736         * parse.y (resolve_class): Don't build a fake decl. Use the one
9737         already built.
9738         * typeck.c (build_java_array_type): Build and assign decl to array
9739         type.
9740
9741 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9742
9743         * parse.y (not_accessible_p): Changed leading comment. Added extra
9744         `where' argument. Use it to enforce protected access rules.
9745         (resolve_qualified_expression_name): Added extra argument to
9746         not_accessible_p.
9747         (patch_method_invocation): Use argument `primary' to provide
9748         not_accessible_p with an extra argument.
9749         (lookup_method_invoke): Added extra argument to not_accessible_p.
9750         (search_applicable_method_list): Likewise.
9751
9752 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9753
9754         * parse.y (resolve_qualified_expression_name): Try to resolve as
9755         an inner class access only if `decl' is a TYPE_DECL.
9756
9757 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9758
9759         * decl.c (classdollar_identifier_node): Initialize.
9760         * java-tree.h (enum java_tree_index): New entry
9761         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
9762         (classdollar_identifier_node): New macro.
9763         (ID_CLASSDOLLAR_P): Likewise.
9764         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
9765         (build_dot_class_method_invocation): Likewise.
9766         (find_applicable_accessible_methods_list): `class$' can't be
9767         inherited.
9768
9769 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
9770
9771         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9772
9773 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9774
9775         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9776         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9777         gone.
9778
9779 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9780
9781         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9782         outside of the `__U' sequence too.
9783         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9784         sequence too.
9785
9786 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9787
9788         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9789
9790 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9791
9792         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9793         (JVGENMAIN_OBJS): Likewise.
9794         * java-tree.h (append_gpp_mangled_name): New prototype.
9795         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9796         Removed cast calling `gcc_add_root.'
9797         * jvgenmain.c (mangle_obstack): New global, initialized.
9798         (main): Use it.
9799         (do_mangle_class): Constify local `ptr.'
9800         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9801         append_gpp_mangle_name and update `count' if necessary.
9802         Use `mangle_obstack.'
9803         * mangle.c (append_unicode_mangled_name): Removed.
9804         (append_gpp_mangled_name): Likewise.
9805         (unicode_mangling_length): Likewise.
9806         (mangle_member_name): Return type set to `void.'
9807         (mangle_field_decl): Don't append `U' in escaped names.
9808         (mangle_method_decl): Likewise.
9809         (mangle_member_name): Just use `append_gpp_mangled_name.'
9810         * mangle_name.c: New file.
9811
9812 2001-02-07  Per Bothner  <per@bothner.com>
9813
9814         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
9815
9816         * check-init.c (check_init):  Don't call done_alternative after
9817         processing loop code, as a LOOP_EXPR never terminates normally.
9818
9819 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9820
9821         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9822
9823 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9824
9825         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9826         DECLs.
9827
9828 2001-02-06  Tom Tromey  <tromey@redhat.com>
9829
9830         * lex.c (java_new_lexer): Longer error message.
9831
9832 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
9833             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9834
9835         * typeck.c (build_prim_array_type): Added leading comment.
9836         (build_java_array_type): Moved locals out of
9837         block. Always create the `data' field, fixed alignment to match
9838         C++.
9839
9840 2001-02-04  Tom Tromey  <tromey@redhat.com>
9841
9842         * expr.c (java_lang_expand_expr): Don't bother recomputing
9843         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
9844         Fixes PR java/1866.
9845
9846 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9847
9848         * parse.y (process_imports): Save the original name of the import
9849         for better error report.
9850
9851 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
9852
9853         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
9854         of macros used when compiling jvspec.c.
9855         * jvspec.c (lang_specific_driver): Link with the shared
9856         libgcc by default.
9857
9858 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9859
9860         * check-init.c (check_init): Call internal_error instead of fatal.
9861         * expr.c (java_lang_expand_expr): Likewise.
9862         * jcf-parse.c (get_constant): Likewise.
9863         * mangle.c (java_mangle_decl): Likewise.
9864         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
9865         (operator_string): Likewise.
9866         * check-init.c (check_init): Call abort instead of fatal.
9867         * class.c (build_class_ref): Likewise.
9868         * constants.c (write_constant_pool): Likewise.
9869         * decl.c (start_java_method): Likewise.
9870         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
9871         (java_stack_dup, encode_newarray_type): Likewise.
9872         (build_java_array_length_access): Likewise.
9873         (build_java_check_indexed_type, expand_java_pushc): Likewise.
9874         (build_java_soft_divmod, build_invokeinterface): Likewise.
9875         * java-tree.h (INNER_CLASS_P): Likewise.
9876         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
9877         (give_name_to_class, get_class_constant): Likewise.
9878         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
9879         (find_constant_index, generate_bytecode_conditional): Likewise.
9880         (generate_bytecode_insns, perform_relocations): Likewise.
9881         * lex.c (java_unget_unicode, java_lex): Likewise.
9882         * mangle.c (mangle_type, mangle_record_type): Likewise.
9883         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
9884         (finish_mangling): Likewise.
9885         * parse.h (MARK_FINAL_PARMS): Likewise.
9886         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
9887         (obtain_incomplete_type, java_complete_class): Likewise.
9888         (java_check_regular_methods, java_complete_expand_method): Likewise.
9889         (cut_identifier_in_qualified, check_deprecation): Likewise.
9890         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
9891         (java_complete_lhs, lookup_name_in_blocks): Likewise.
9892         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
9893         * typeck.c (set_local_type, parse_signature_type): Likewise.
9894         (parse_signature_string, build_java_signature): Likewise;
9895         (set_java_signature): Likewise.
9896         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
9897         * class.c (add_method): Call fatal_error instead of fatal.
9898         (build_static_field_ref): Likewise.
9899         * expr.c (build_known_method_ref, expand_invoke): Likewise.
9900         * jcf-parse.c (get_constant, jcf_parse): Likewise.
9901         * lex.c (java_new_new_lexer): Likewise.
9902         * jv-scan.c (main): Likewise.
9903         (fatal_error): Renamed from fatal.
9904         * jcf-parse.c (yyparse): Call fatal_io_error instead of
9905         pfatal_with_name.
9906         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
9907         (yyparse): Likewise.
9908         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
9909         * lex.c (java_get_line_col): Likewise.
9910         * jcf-parse.c (load_class): Make errors non-fatal.
9911         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
9912
9913 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
9914
9915         * jvgenmain.c (class_mangling_suffix): Remove unused string.
9916         (error): Remove unused function.
9917         (main): Don't use "__attribute__ alias" on generated class symbol.
9918
9919 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9920
9921         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
9922         argument.
9923         * parse.y (finish_method_declaration): Code accounting for WFLed
9924         method DECL_NAMEs deleted.
9925         (check_abstract_method_definitions): Likewise.
9926         (resolve_type_during_patch): Layout resolved type.
9927         * typeck.c (lookup_do): Removed unused local.
9928
9929 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
9930
9931         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
9932         * decl.c (init_decl_processing): Use integer_minus_one_node, not
9933         integer_negative_one_node.
9934         * expr.c (build_java_binop): Likewise.
9935
9936 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
9937
9938         * zextract.c (read_zip_archive): Read file_offset before writing
9939         zipd and consequently clobbering the header contents.
9940
9941 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9942
9943         * Make-lang.in: Remove all dependencies on defaults.h.
9944         * decl.c: Don't include defaults.h.
9945         * expr.c: Likewise.
9946         * parse.y: Likewise.
9947
9948 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9949
9950         * ChangeLog (2001-01-21): Fixed typo.
9951         * class.c (layout_class_method): Code accounting for WFLed
9952         method DECL_NAMEs deleted.
9953         * constant.c (find_methodref_index): Likewise.
9954         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
9955         * java-tree.h (DECL_FUNCTION_WFL): New macro.
9956         (struct lang_decl): New field `wfl'.
9957         (java_get_real_method_name): Prototype deleted.
9958         * mangle.c (mangle_method_decl): Code accounting for WFLed
9959         method DECL_NAMEs deleted.
9960         * parse.h (GET_METHOD_NAME): Macro deleted.
9961         * parse.y (reset_method_name): Deleted.
9962         (method_header): Set DECL_FUNCTION_WFL.
9963         (check_abstract_method_header): Code accounting for WFLed method
9964         DECL_NAMEs deleted.
9965         (java_get_real_method_name): Deleted.
9966         (check_method_redefinition): Code accounting for WFLed method
9967         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
9968         (java_check_regular_methods): Likewise.
9969         (java_check_abstract_methods): Likewise.
9970         (java_expand_classes): Don't call `reset_method_name.'
9971         (search_applicable_method_list): Use DECL_NAMEs instead of
9972         GET_METHOD_NAME.
9973         * typeck.c (lookup_do): Code accounting for WFLed method
9974         DECL_NAMEs deleted.
9975
9976 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
9977
9978         * lex.c (java_read_char): Check for EOF from getc first.
9979
9980 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9981
9982         * class.c (layout_class): Don't lay the superclass out if it's
9983         already being laid out.
9984         * jcf-parse.c (handle_innerclass_attribute): New function.
9985         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
9986         handle_innerclasses_attribute.
9987         (jcf_parse): Don't load an innerclasses if it's already being
9988         laid out.
9989         * jcf-write.c (append_innerclass_attribute_entry): Static
9990         `anonymous_name' and its initialization deleted. `ocii' and `ini'
9991         to be zero for anonymous classes.
9992
9993 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9994
9995         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
9996         necessary.
9997         * jcf-parse.c (set_source_filename): Use
9998         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
9999
10000 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10001
10002         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10003         gets a unique asm name.
10004
10005 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10006
10007         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10008         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10009         if necessary.
10010         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10011         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10012         * parse.y (lookup_package_type_and_set_next): Deleted.
10013         (resolve_package): Removed unnecessary code.
10014         (find_applicable_accessible_methods_list): `finit$' can't be
10015         inherited.
10016         * verify.c (pop_argument_types): Added missing prototype.
10017
10018 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10019
10020         * config-lang.in: Disable java by default.
10021
10022 2001-01-23  Tom Tromey  <tromey@redhat.com>
10023
10024         * gcj.texi (Copying): New node.
10025         Added copyright information.
10026
10027 2001-01-21  Per Bothner  <per@bothner.com>
10028
10029         Various fixes to allow compiling a compressed .jar/.zip archive.
10030         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10031         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10032         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10033         * jcf.h (struct ZipDirectory):  Add forward declaration.
10034         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10035         Remove seen_in_zip and zip_offset fields.
10036         (JCF_SEEN_IN_ZIP):  New macro.
10037         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10038         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10039         (read_zip_member):  New function.
10040         (open_in_zip):  Call read_zip_member.
10041         * jcf-parse.c (find_in_current_zip):  Remove function.
10042         (read_class):  Merge in find_in_current_zip functionality.
10043         Call read_zip_member if needed.
10044         (parse_zip_file_entries):  Use read_zip_member.
10045         (process_zip_dir):  Update for removed and added JCF fields.
10046         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10047
10048 2001-01-21  Per Bothner  <per@bothner.com>
10049
10050         Minor optimization of static ggc roots.
10051         * jcf-parse.c (parse_roots):  New static field.
10052         (current_field, current_method, current_file_list):  Replace by macros
10053         naming fields of parse_roots.
10054         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10055         * class.c (class_roots):  New static field.
10056         (registered_class, fields_ident, info_ident, class_list):
10057         New macros naming fields of parse_roots.
10058         (build_static_field_ref):  Don't register roots here.
10059         (layout_class):  Static field list replaced by macro class_list.
10060         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10061         Initialize fields_ident and info_ident here.
10062
10063 2001-01-21  Per Bothner  <per@bothner.com>
10064
10065         * jcf-parse.c (ggc_mark_jcf):  New function.
10066         (init_jcf_parse):  Register current_jcf as ggc root.
10067
10068 2001-01-21  Per Bothner  <per@bothner.com>
10069
10070         * lang.c (put_decl_node):  Print method's name.
10071
10072 2001-01-21  Per Bothner  <per@bothner.com>
10073
10074         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10075         (verify_jvm_instructions):  Use it, for better error messages on loads.
10076
10077 2001-01-21  Per Bothner  <per@bothner.com>
10078
10079         * verify.c (merge_type_state):  Still may have to merge even if
10080         LABEL_VERIFIED (label).
10081
10082 2001-01-21  Per Bothner  <per@bothner.com>
10083
10084         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10085         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10086
10087 2001-01-19  Per Bothner  <per@bothner.com>
10088
10089         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10090         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10091
10092 2001-01-18  Per Bothner  <per@bothner.com>
10093
10094         * gcj.texi (Input Options): Mention .java files.
10095
10096 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10097
10098         * lang-options.h (-Wunsupported-jdk11): Removed.
10099         * lang.c (flag_not_overriding): Deleted.
10100         (flag_static_local_jdk1_1): Likewise.
10101         (lang_W_options): Removed "unsupported-jdk11" entry.
10102         * parse.y (java_check_methods): Removed dead code.
10103
10104 2001-01-17  Tom Tromey  <tromey@redhat.com>
10105
10106         Changes suggested by Per Bothner:
10107         * gcj.texi (Input Options): Don't mention input files.
10108         (Code Generation): Updated --main information.
10109         (Invoking jcf-dump): Mention that --javap is incomplete.
10110         From Alexandre Petit-Bianco:
10111         (Warnings): Don't mention -Wunsupported-jdk11.
10112         My stuff:
10113         (Compatibility): Mention JDK 1.2-ness of libraries.
10114         (Resources): Mention resources used when writing gcj.
10115
10116 2001-01-17  Tom Tromey  <tromey@redhat.com>
10117
10118         * gcj.texi: New file.
10119         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10120         (java.info): Depend on gcj.info.
10121         (java/gcj.dvi): New target.
10122         (java.dvi): Depend on gcj.dvi.
10123         (java.install-info): Wrote.
10124
10125 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10126
10127         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10128         having called make_decl_rtl.
10129
10130 2001-01-14  Per Bothner  <per@bothner.com>
10131
10132         Various patches to emit better messages on verification errors.
10133         * expr.c (push_type_0):  Return error indication on stack overflow,
10134         instead of callinfg fatal.
10135         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10136         (pop_type_0):  Return detailed error message (in a char** argument).
10137         (pop_type):  If pop_type_0 fails, print error message.
10138         (pop_argument_types):  Moved to verify.c.
10139         * verify.c (pop_argument_types):  Moved from expr.c.
10140         Return a (possible) error message, rather than void.
10141         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10142         (verify_jvm_instruction):  Use new macros, improving error messages.
10143         For case OPCODE_astore use object_ptr_type_node.
10144         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10145         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10146
10147         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10148         constant, return body without wrapper.  (Improves constant folding.)
10149         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10150
10151 2001-01-13  Per Bothner  <per@bothner.com>
10152
10153         * expr.c (expand_java_field_op):  Assigning to a final field outside
10154         an initializer does not violate JVM spec, so should be warning, not
10155         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10156
10157 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10158
10159         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10160         to 2001.
10161
10162 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10163
10164         * parse.y (resolve_expression_name): Permit instance variables from
10165         enclosing context in super constructor call.
10166         (resolve_qualified_expression_name): Permit enclosing class's qualified
10167         "this" in super constructor call.
10168
10169 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10170
10171         * class.c (build_utf8_ref): Remove last argument in call to
10172         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10173         (build_class_ref): Likewise.
10174         (build_static_field_ref): Likewise.
10175         (get_dispatch_table): Likewise.
10176         (layout_class_method): Likewise.
10177         (emit_register_classes): Likewise.
10178         * constants.c (build_constant_data_ref): Likewise.
10179         * decl.c (builtin_function): Likewise.
10180         (create_primitive_vtable): Likewise.
10181         * expr.c (build_known_method_def): Likewise.
10182         (build_jni_stub): Likewise.
10183         (java_lang_expand_expr): Likewise.
10184
10185 2001-01-10  Tom Tromey  <tromey@redhat.com>
10186
10187         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10188
10189 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10190
10191         * java-tree.h (lang_printable_name_wls): New prototype.
10192         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10193         rather than `current_class' to print type name. Don't prepend type
10194         names when printing constructor names.
10195         (lang_printable_name_wls): New function.
10196         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10197         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10198         * parse.y (patch_method_invocation): Message tuned for constructors.
10199         (not_accessible_p): Grant `private' access from within
10200         enclosing contexts.
10201
10202 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10203
10204         All files with updated copyright when applicable.
10205         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10206         * class.c (mangle_class_field): Function removed.
10207         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10208         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10209         (build_class_ref): Call `java_mangle_class_field' instead of
10210         `mangle_class_field.'
10211         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10212         (layout_class): Call `java_mangle_decl' instead of
10213         `mangle_static_field.'
10214         (cxx_keywords): Initialized static array moved to `lex.c.'
10215         (layout_class_method): Changed leading comment. Simplified to
10216         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10217         * decl.c (lang_mark_tree): Mark field `package_list.'
10218         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10219         (struct lang_type): New field `package_list.'
10220         (unicode_mangling_length): Prototype removed.
10221         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10222         emit_unicode_mangled_name): Likewise.
10223         (cxx_keyword_p): New prototype.
10224         (java_mangle_decl, java_mangle_class_field,
10225         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10226         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10227         `build_expr_wfl.'
10228         * jvgenmain.c (main_method_prefix): Global variable removed.
10229         (main_method_suffix): Likewise.
10230         (do_mangle_classname): New function.
10231         (main): Call it. Format changed to accommodate new mangling scheme.
10232         * lex.c: (utf8_cmp): Conditionally prototyped.
10233         (cxx_keywords): Moved from class.c, conditionally defined.
10234         (utf8_cmp, cxx_keyword_p): Likewise.
10235         * mangle.c (obstack.h, ggc.h): Included.
10236         (mangle_field_decl): New function.
10237         (mangle_method_decl, mangle_type, mangle_pointer_type,
10238         mangle_array_type, mangle_record_type,
10239         find_compression_pointer_match, find_compression_array_match,
10240         find_compression_record_match,
10241         find_compression_array_template_match, set_type_package_list,
10242         entry_match_pointer_p, emit_compression_string, init_mangling,
10243         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10244         (mangle_obstack): New global.
10245         (MANGLE_RAW_STRING): New macro.
10246         (unicode_mangling_length): Turned static.
10247         (append_unicode_mangled_name): Renamed from
10248         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10249         replaces `obstack', removed from the parameter list.
10250         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10251         replaces parameter `obstack', removed from the parameter list. Call
10252         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10253         (append_gpp_mangled_classtype): Removed.
10254         (compression_table, compression_next): New static variables.
10255         * parse.y (temporary_obstack): Extern declaration removed.
10256
10257 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10258
10259         * parse.y (patch_binop): Compute missing type in error situations.
10260
10261 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10262
10263         * class.c (make_class_data): Push initial value for "arrayclass".
10264         * decl.c (init_decl_processing): Add new class field "arrayclass".
10265
10266 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10267
10268         From patha@softlab.ericsson.se:
10269         * parse.y (switch_label): Use build, not build1, to construct
10270         DEFAULT_EXPR.
10271
10272 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10273
10274         * lang.c (lang_decode_option): Change -MA to -MP.
10275         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10276         Update to new prototype; do quote targets.
10277         (jcf_dependency_write): Update.
10278
10279 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10280
10281         Shorten primitive array allocation path:
10282         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10283         to create new primitive arrays.
10284         * expr.c (build_newarray): If generating native code, call
10285         soft_newarray_node with a reference to the primitive TYPE identifier
10286         instead of type_value.
10287
10288 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10289
10290         Fix for PRs gcj/312 and gcj/253:
10291         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10292         dest if they arn't already.
10293         * class.c (layout_class): Call maybe_layout_super_class on
10294         superinterfaces also, but only if compiling from bytecode.
10295
10296         Fix for PR gcj/373:
10297         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10298         interface.
10299
10300 2000-12-15  Tom Tromey  <tromey@redhat.com>
10301
10302         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10303         set.
10304
10305 2000-12-14  Andrew Haley  <aph@redhat.com>
10306
10307         * boehm.c (mark_reference_fields): Change test to correctly detect
10308         bitmap overflow.
10309
10310 2000-12-15  Andreas Jaeger  <aj@suse.de>
10311
10312         * config-lang.in (lang_dirs): Added.
10313
10314 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10315
10316         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10317         Credits go to rth for finding it.
10318
10319 2000-12-13  Mike Stump  <mrs@wrs.com>
10320
10321         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10322
10323 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10324
10325         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10326         * lex.c (java_ignorable_control_p): Removed.
10327         (java_letter_or_digit_p): Removed.
10328         (java_start_char_p): New function.
10329         (java_read_char): Return `int', not `unicode_t'.  Changed
10330         callers.
10331         (java_read_unicode): Likewise.
10332         (java_read_unicode_collapsing_terminators): Likewise.
10333         (java_get_unicode): Likewise.
10334         (java_new_lexer): Initialize hit_eof.
10335         (java_parse_end_comment): Take `int' argument.
10336         (java_parse_doc_section): Likewise.
10337         (java_parse_escape_sequence): Don't allow backlash-newline.
10338         Return `int'.
10339         * lex.h (JAVA_DIGIT_P): Removed.
10340         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10341         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10342         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10343         (JAVA_PART_CHAR_P): New macro.
10344         (UEOF): Now -1.
10345         (JAVA_CHAR_ERROR): Now -2.
10346         (java_lexer): New field `hit_eof'.
10347         * chartables.h: New file.
10348         * gen-table.pl: new file.
10349
10350 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10351             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10352
10353         * parse.y (java_complete_lhs): Only allow compound assignment of
10354         reference type if type is String.
10355
10356 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10357
10358         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10359         jcf-path.c: Likewise.
10360
10361 2000-12-09  Anthony Green  <green@redhat.com>
10362
10363         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10364         filestart and filename_length as int values.
10365
10366 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10367
10368         * jcf-io.c (find_class): Correct the logic that tests to see if a
10369         .java file is newer than its .class file. The compiler was
10370         incorrectly printing a warning when file mod times were equal.
10371
10372 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10373
10374         * jvgenmain.c: Use ISPRINT not isascii.
10375
10376 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10377
10378         * parse.y (end_artificial_method_body): Fixed typo.
10379
10380 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10381
10382         * parse.y (patch_method_invocation): Pick the correct enclosing
10383         context when creating inner class instances.
10384         Fixes gcj/332.
10385
10386 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10387
10388         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10389         Update copyright year to 2000.
10390
10391 2000-11-23  Anthony Green  <green@redhat.com>
10392
10393         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10394         Move current_file_list out of yyparse and make it static.
10395
10396         * expr.c: Declare quick_stack and tree_list_free_list as static
10397         (init_expr_processing): Register quick_stack and
10398         tree_list_free_list roots.
10399
10400 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10401
10402         * parse.y (build_outer_field_access): New local `decl_ctx', use
10403         it. Check for field's context and current class immediate outer
10404         context inheritance.
10405         (outer_field_access_p): Consider fields inherited from the last
10406         enclosing context.
10407         (build_access_to_thisn): Stop at the last enclosing context if
10408         necessary.
10409         Fixes gcj/367.
10410
10411 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10412
10413         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10414
10415 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10416
10417         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10418         scratch buffer.
10419
10420 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10421
10422         * jv-scan.c (help): Document --complexity.
10423         (options): Added --complexity.
10424         (flag_complexity): New global.
10425         (main): Call `report'.
10426         * parse-scan.y (complexity): New global.
10427         (if_then_statement, if_then_else_statement,
10428         if_then_else_statement_nsi, switch_block_statement_group,
10429         while_expression, do_statement, for_begin, continue_statement,
10430         throw_statement, catch_clause, finally, method_invocation,
10431         conditional_and_expression, conditional_or_expression,
10432         conditional_expression): Update complexity.
10433         (reset_report): Reset complexity.
10434         (report): New function.
10435
10436 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10437
10438         * lex.c (yylex): Added STRICT_TK case.
10439         * parse.y (STRICT_TK): Added.
10440         * parse-scan.y (STRICT_TK): Added.
10441         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10442         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10443         file.
10444         * keyword.h: Rebuilt.
10445         * keyword.gperf (strictfp): Added.
10446
10447 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10448
10449         * lex.c (yylex): Recognize floating point constants with leading
10450         0.
10451
10452 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10453
10454         * java-tree.h (cyclic_inheritance_report): Constify.
10455         * parse.y (cyclic_inheritance_report): Likewise.
10456
10457 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10458
10459         * parse.y (goal): Remove call to ggc_add_string_root.
10460
10461 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10462
10463         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10464         Create string in scratch buffer, then pass to build_string.
10465
10466 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10467
10468         * parse.y (issue_warning_error_from_context): Add
10469         ATTRIBUTE_PRINTF.
10470
10471 2000-11-11  Anthony Green  <green@redhat.com>
10472
10473         * jcf-parse.c (process_zip_dir): Add finput parameter.
10474         (jcf_figure_file_type): Call process_zip_dir with appropriate
10475         argument.
10476
10477 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10478
10479         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10480         * jcf-parse.c (jcf_figure_file_type): Likewise.
10481
10482 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10483
10484         * parse.y (create_new_parser_context): Use memset () instead of
10485         bzero ().
10486
10487 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10488
10489         * gjavah.c (process_file): Only include gcj/cni.h when generating
10490         CNI stubs.
10491
10492 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10493
10494         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10495         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10496         instead of bzero ().
10497
10498 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10499
10500         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10501         * lex.c (IS_ZERO): New define.
10502         (java_perform_atof): Error on floating point underflow.
10503
10504 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10505
10506         * lex.c (java_parse_escape_sequence): Only read two octal
10507         characters if the first one is greater than 3.  Don't allow
10508         "octal" numbers to include the digits 8 or 9.
10509
10510 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10511
10512         * Make-lang.in (java.distdir): Remove.
10513
10514 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10515
10516         * Make-lang.in (java.dvi): New target.
10517         Partial fix for PR other/567.
10518
10519         * lang-options.h: Mention -Wout-of-date.
10520         * jcf-dump.c (flag_newer): New global.
10521         * gjavah.c (flag_newer): New global.
10522         * jcf-io.c (find_class): Only warn when flag_newer set.
10523         * lang.c (flag_newer): New global.
10524         (struct string_option): New declaration.
10525         (lang_W_options): New global.
10526         (process_option_with_no): New function.
10527         (lang_decode_option): Use it.
10528
10529         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10530         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10531         `$'.
10532
10533         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10534         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10535         * lex.c (java_read_unicode): Removed `term_context' argument.
10536         Recognize any number of `u' in `\u'.
10537         (java_read_unicode_collapsing_terminators): New function.
10538         (java_get_unicode): Use it.
10539         (java_lineterminator): Removed.
10540         (yylex): Produce error if character literal is newline or single
10541         quote.  Return if eof found in middle of `//' comment.  EOF in
10542         `//' comment is only an error if pedantic.
10543         (java_ignorable_control_p): New function.
10544         (java_parse_end_comment): Return if eof found in middle of
10545         comment.
10546         Include flags.h.
10547         * jv-scan.c (pedantic): New global.
10548
10549 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10550
10551         * parse.y (outer_field_access_p): Inherited fields aren't
10552         consider outer fields.
10553         (maybe_build_thisn_access_method): Use
10554         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10555         (resolve_expression_name): Trigger an error if a static field
10556         is being accessed as an outer field.
10557
10558 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10559
10560         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10561         Fixes gcj/365.
10562
10563 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10564
10565         * Make-lang.in: Move all build rules here from Makefile.in,
10566         adapt to new context.  Wrap all rules that change the current
10567         directory in parentheses.  Expunge all references to $(P).
10568         When one command depends on another and they're run all at
10569         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10570         all object-file generation rules.  Delete obsolete variables.
10571
10572         * Makefile.in: Delete.
10573         * config-lang.in: Delete outputs= line.
10574
10575 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10576
10577         * parse.y (patch_method_invocation): NULLify this_arg when already
10578         inserted.
10579         (maybe_use_access_method): Handle call to methods unrelated to the
10580         current class. Fixed comment.
10581         Fixes gcj/361.
10582
10583 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10584
10585         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10586         scope.
10587
10588 2000-10-24  Tom Tromey  <tromey@cygnus.com>
10589
10590         * lex.c (java_new_lexer): Initialize new fields.  Work around
10591         broken iconv() implementations.
10592         (java_read_char): Swap bytes if required.  Use fallback decoder if
10593         required.
10594         (byteswap_init, need_byteswap): New globals.
10595         (java_destroy_lexer): Only close iconv handle if it is in use.
10596         * lex.h (java_lexer): New fields read_anything, byte_swap,
10597         use_fallback.
10598         Made out_buffer unsigned.
10599
10600 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10601
10602         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10603         where an enclosing context can be set on the jdep.
10604         (do_resolve_class): Fixed identation.
10605
10606 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10607
10608         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10609
10610         * jcf-reader.c (peek_attribute, skip_attribute): Only define
10611         when requested.
10612
10613         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10614
10615         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10616
10617 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10618
10619         * jcf-write.c (OP1): Update `last_bc'.
10620         (struct jcf_block): Fixed indentation and typo in comments.  New
10621         field `last_bc'.
10622         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10623         follows `monitorenter'.
10624         * parse.y (patch_synchronized_statement): New local `tmp'. Call
10625         `patch_string'.
10626         Fixes gcj/232.
10627
10628 2000-10-16  Tom Tromey  <tromey@cygnus.com>
10629
10630         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10631         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10632         * lang-options.h: Added -MA, -MT, -MF..
10633         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10634         (DEPEND_TARGET_SET): New macro.
10635         (DEPEND_FILE_ALREADY_SET): Likewise.
10636         (init_parse): Handle new flags.
10637         * jcf.h (jcf_dependency_print_dummies): Declare.
10638         * Make-lang.in (s-java): Added mkdeps.o.
10639         * Makefile.in (BACKEND): Added mkdeps.o.
10640         (../gcjh$(exeext)): Added mkdeps.o.
10641         (../jcf-dump$(exeext)): Added mkdeps.o.
10642         * jcf-depend.c: Include mkdeps.h.
10643         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10644         add_entry): Removed.
10645         (jcf_dependency_reset): Rewrote.
10646         (dependencies): New global.
10647         (jcf_dependency_set_target): Rewrote.
10648         (jcf_dependency_add_target): Likewise.
10649         (jcf_dependency_add_file): Likewise.
10650         (munge): Removed.
10651         (print_ents): Removed.
10652         (jcf_dependency_write): Rewrote.
10653         (print_dummies): New global.
10654         (jcf_dependency_print_dummies): New function
10655         (jcf_dependency_write): Call deps_dummy_targets if required.
10656
10657 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10658
10659         * gjavah.c (add_class_decl): Removed unused variables `tname',
10660         `tlen' and `name_index'.
10661         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10662         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10663         in `wfl_operator' with value.
10664         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10665         (jcf_figure_file_type): Fixed identation.
10666         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10667         * parse.y (analyze_clinit_body): New function.
10668         (static_initializer:): Reset `current_static_block'.
10669         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10670         `wfl_operator' with new value.
10671         (lookup_cl): Use EXPR_WFL_FILENAME.
10672         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10673         analyze_clinit_body.
10674         (build_outer_field_access): Access to this$<n> built from
10675         current_class, not its outer context.
10676         (build_access_to_thisn): Fixed leading comment. Tidied things up.
10677         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10678         (patch_method_invocation): Use `is_static_flag' when already
10679         initialized.
10680         (patch_newarray): Removed assignment in ternary operator.
10681
10682 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10683
10684         * except.c (free_eh_ranges): Don't free `whole_range'.
10685
10686 2000-10-15  Anthony Green  <green@redhat.com>
10687
10688         * decl.c (init_decl_processing): Call init_class_processing before
10689         anything else.
10690
10691 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10692
10693         * check-init.c (check_init): Fixed leading comment. Use
10694         LOCAL_FINAL_P.
10695         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10696         (give_name_to_locals): Likewise.
10697         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10698         fields in lang_decl_var.
10699         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10700         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10701         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10702         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10703         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10704         (LOCAL_FINAL): Rewritten.
10705         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10706         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10707         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10708         `init_final' fields.
10709         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10710         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10711         (TYPE_HAS_FINAL_VARIABLE): New macro.
10712         (struct lang_type): Added `afv' field.
10713         * parse.y (check_static_final_variable_assignment_flag): New function.
10714         (reset_static_final_variable_assignment_flag): Likewise.
10715         (check_final_variable_local_assignment_flag): Likewise.
10716         (reset_final_variable_local_assignment_flag): Likewise.
10717         (check_final_variable_indirect_assignment): Likewise.
10718         (check_final_variable_global_assignment_flag): Likewise.
10719         (add_inner_class_fields): Use LOCAL_FINAL_P.
10720         (register_fields): Handle local finals and final variables.
10721         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10722         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10723         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10724         on local finals.
10725         (java_complete_expand_methods): Loop to set
10726         TYPE_HAS_FINAL_VARIABLE. Call
10727         `reset_final_variable_local_assignment_flag' and
10728         `check_final_variable_local_assignment_flag' accordingly before
10729         and after constructor expansion. Call
10730         `reset_static_final_variable_assignment_flag'
10731         before expanding <clinit> and after call
10732         `check_static_final_variable_assignment_flag' if the
10733         current_class isn't an interface. After all methods have been
10734         expanded, call `check_final_variable_global_assignment_flag' and
10735         `check_static_final_variable_assignment_flag' if the current class
10736         is an interface.
10737         (maybe_yank_clinit): Fixed typo in comment.
10738         (build_outer_field_access_methods): Removed old sanity check. Use
10739         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10740         Don't create access methods for finals.
10741         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
10742         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
10743         existing DECL_INIT has been processed.
10744         (java_complete_lhs): Likewise.
10745         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
10746         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
10747         logic.
10748         (patch_assignment): Use LOCAL_FINAL_P.
10749         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10750         DECL_INITIAL is nullified.
10751         Fixes gcj/163.
10752
10753 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10754
10755         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10756
10757         * Makefile.in (parse.c, parse-scan.c): Likewise.
10758
10759 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10760
10761         * class.c (temporary_obstack): Remove.
10762         (make_class): Don't mess with obstascks.
10763         (push_class): Likewise.
10764         (set_super_info): Likewise.
10765         (add_method_1): Likewise.
10766         (add_method): Likewise.
10767         (add_field): Likewise.
10768         (build_utf8_ref): Likewise.
10769         (build_class_ref): Likewise.
10770         (build_static_field_ref): Likewise.
10771         (finish_class): Likewise.
10772         (push_super_field): Likewise.
10773         (layout_class): Likewise.
10774         (layout_class_methods): Likewise.
10775         (init_class_processing): Likewise.
10776         * constants.c (get_tag_node): Likewise.
10777         (build_constant_data_ref): Likewise.
10778         * decl.c (ggc_p): Remove.
10779         (copy_lang_decl): Use ggc_alloc.
10780         (complete_start_java_method): Don't mess with obstacks.
10781         (start_java_method): Likewise.
10782         (end_java_method): Likewise.
10783         * except.c (link_handler): Use xmalloc.
10784         (free_eh_ranges): New function.
10785         (method_init_exceptions): Use it.
10786         (add_handler): Use xmalloc.
10787         (expand_start_java_handler): Don't mess with obstacks.
10788         (prepare_eh_table_type): Likewise.
10789         (expand_end_java_handler): Likewise.
10790         * expr.c (push_value): Likewise.
10791         (create_label_decl): Likewise.
10792         (build_jni_stub): Likewise.
10793         (java_lang_expand_expr): Likewise.
10794         (note_instructions): Use xrealloc.
10795         (java_push_constant_from_pool): Don't mess with obstacks.
10796         (process_jvm_instruction): Likewise.
10797         * java-tree.h (cyclic_inheritance_report): Remove duplicate
10798         declaration.
10799         * jcf-parse.c (get_constant): Don't mess with obstacks.
10800         (read_class): Likewise.
10801         (jcf_parse): Likewise.
10802         * lex.c (expression_obstack): Remove.
10803         (java_lex): Don't use obstack_free.
10804         * parse.h (exit_java_complete_class): Don't mess with obstacks.
10805         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10806         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10807         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10808         * parse.y (gaol): Add more GC roots.
10809         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10810         (lookup_field_wrapper): Likewise.
10811         (obtain_incomplete_type): Don't mess with obstacks.
10812         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10813         macros.
10814         (craft_constructor): Don't mess with obstacks.
10815         (safe_layout_class): Likewise.
10816         (java_complete_class): Likewise.
10817         (source_end_java_method): Likewise.
10818         (build_outer_field_access_methods): Likewise.
10819         (build_outer_method_access_method): Likewise.
10820         (maybe_build_thisn_access_method): Likewise.
10821         (build_dot_class_method_invocation): Likewise.
10822         (java_complete_tree): Likewise.
10823         (java_complete_lhs): Likewise.
10824         (do_merge_string_cste): Likewise.
10825         (patch_string_cst): Likewise.
10826         (array_constructor_check_entry): Likewise.
10827         * typeck.c (build_java_array_type): Likewise.
10828         (parse_signature_string): Likewise.
10829         (build_java_signature): Likewise.
10830
10831 2000-10-12  Tom Tromey  <tromey@cygnus.com>
10832
10833         Fix for PR gcj/356:
10834         * gjavah.c (add_class_decl): Don't special-case inner classes.
10835         (add_namelet): Likewise.
10836
10837 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
10838
10839         * java-tree.h: Constify current_encoding.
10840         * lang.c: Constify current_encoding.
10841
10842 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
10843
10844         * jvgenmain.c (class_mangling_suffix): Omit `.'.
10845         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
10846
10847 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10848
10849         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
10850         patch. Fixes gcj/340.
10851
10852 2000-10-10  Tom Tromey  <tromey@cygnus.com>
10853
10854         * lex.c (java_new_lexer): Initialize out_first and out_last
10855         fields.
10856         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
10857
10858 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10859
10860         * parse.y (pop_current_osb): New function.
10861         (array_type:): Use `dims:', changed actions
10862         accordingly. Suggested by Anthony Green.
10863         (array_creation_expression:): Used pop_current_osb.
10864         (cast_expression:): Likewise.
10865         (search_applicable_method_list): Fixed indentation.
10866
10867 2000-10-08  Anthony Green  <green@redhat.com>
10868
10869         * parse.y (array_type_literal): Remove production.
10870         (type_literals): Refer to array_type, not array_type_literal.
10871
10872 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10873
10874         Patch contributed by Corey Minyard.
10875         * decl.c (check_local_named_variable): New function.
10876         (tree check_local_unnamed_variable): Likewise.
10877         (find_local_variable): Splitted. Call check_local_{un}named_variable.
10878
10879 2000-10-07  Anthony Green  <green@redhat.com>
10880
10881         * class.c (layout_class): Handle case where superclass can't be
10882         layed out yet.
10883
10884 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10885
10886         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
10887         gperf.
10888
10889 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10890
10891         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
10892         * jvgenmain.c (class_mangling_prefix): Removed.
10893         (class_mangling_suffix): New global.
10894         (main): Use it.
10895         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
10896         `$'.
10897         (print_method_info): Handle overrides for static and final
10898         methods.
10899         (process_file): Generate declaration for class object field.
10900         * class.c (cxx_keywords): New array.
10901         (utf8_cmp): New function.
10902         (cxx_keyword_p): New function.
10903         (layout_class_method): Mangle C++ keywords by appending `$'.
10904         (mangle_field): New function.
10905         (mangle_class_field): Use mangle_field.  Mangle class name as
10906         `class$'.
10907         (mangle_static_field): Use mangle_field.
10908
10909 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10910
10911         * decl.c (find_local_variable): Removed uncessary type check and
10912         fixed range check typo. From Corey Minyard.
10913
10914 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10915
10916         * decl.c (give_name_to_locals): New local `code_offset'. Call
10917         `maybe_adjust_start_pc'.
10918         * expr.c (note_instructions): New function.
10919         (expand_byte_code): Don't collect insn starts here.
10920         (peek_opcode_at_pc): New function.
10921         (maybe_adjust_start_pc): Likewise.
10922         * java-tree.h (maybe_adjust_start_pc): Declare.
10923         (note_instructions): Likewise.
10924         * jcf-parse.c (parse_class_file): Call `note_instructions'.
10925
10926 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10927
10928         * parse.y (field_access:): Fixed indentation.
10929         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
10930
10931 2000-09-07  Tom Tromey  <tromey@cygnus.com>
10932
10933         Fix for PR gcj/307:
10934         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
10935         JPRIMITIVE_TYPE_P, for arithmetic operators.
10936         (patch_method_invocation): Indentation fix.
10937         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
10938         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
10939         (do_unary_numeric_promotion): Cleaned up code.
10940         (valid_cast_to_p): Handle boolean correctly.
10941
10942 2000-09-27  Tom Tromey  <tromey@cygnus.com>
10943
10944         * lex.c (java_read_unicode): Reset bs_count when finished with
10945         `\u' sequence.
10946
10947 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10948
10949         Convert to GC.
10950         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
10951         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
10952         (typeck.o): Depend on ggc.h.
10953         * class.c (add_method_1): Use GC functions for allocation.
10954         (init_class_processing): Register roots.
10955         * decl.c (ggc_p): Set to 1.
10956         (pending_local_decls): Make it static.
10957         (push_jvm_slot): Use GC functions for allocation.
10958         (init_decl_processing): Register roots.
10959         (give_name_to_locals): Use GC functions for allocation.
10960         (lang_mark_tree): New function.
10961         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
10962         functions for allocation.
10963         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
10964         * lex.c (java_lex): Use build_string, rather than replicating it
10965         inline.
10966         * parse.y (goal): Add more roots.
10967         (mark_parser_ctxt): New function.
10968         * typeck.c: Include ggc.h.
10969
10970 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10971
10972         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
10973         contains something else than MODIFY_EXPR.
10974
10975 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
10976
10977         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
10978         * Makefile.in (parse.o): Depend on ggc.h.
10979         (class.o): Likewise.
10980         (constants.o): Likewise.
10981         (decl.o): Likewise.
10982         (expr.o): Likewise.
10983         (jcf-parse.o): Likewise.
10984         (jcf-write.o): Likewise.
10985         (mangle.o): Likewise.
10986         * class.c: Include ggc.h.
10987         (build_static_field_ref): Register GC roots.
10988         (layout_class): Likewise.
10989         (init_class_processing): Likewise.
10990         * constants.c: Include ggc.h.
10991         (current_constant_pool_data_ref): Remove.
10992         (tag_nodes): Move it to ...
10993         (get_tag_node): ... here.  Register GC roots.
10994         * decl.c: Include ggc.h.  Remove many global tree definitions.
10995         (throw_node): Define.
10996         (java_global_trees): Likewise.
10997         (predef_filenames): Make the size a constant.
10998         (init_decl_processing): Adjust accordingly.
10999         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11000         * expr.c: Include ggc.h.
11001         (init_expr_processing): Register GC roots.
11002         (build_invokeinterface): Likewise.
11003         * java-tree.h: Replace extern tree declarations with macros.
11004         (java_global_trees): New variable.
11005         (java_tree_index): New enumeration.
11006         (init_jcf_parse): Declare.
11007         * jcf-parse.c: Include ggc.h.
11008         (current_class): Remove declaration.
11009         (main_class): Likewise.
11010         (all_class_list): Likewise.
11011         (predefined_filename_p): Adjust for constant size of
11012         predef_filenames.
11013         (init_jcf_parse): New function.
11014         * jcf-write.c: Include ggc.h.
11015         (generate_classfile): Register GC roots.
11016         (append_synthetic_attribute): Likewise.
11017         (append_innerclass_attribute_entry): Likewise.
11018         * lang.c: Include ggc.h.
11019         (lang_print_error): Register GC roots.
11020         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11021         with macros.
11022         * parse.y: Include ggc.h.
11023         (wfl_operator): Remove.
11024         (goal): Register GC roots.
11025         (java_pop_parser_context): Adjust for new field names.
11026         (java_parser_context_save_global): Likewse.
11027         (java_parser_context_restore_global): Likewise.
11028         (java_parser_context_suspend): Likewise.
11029         (java_parser_context_resume): Likewise.
11030         (verify_constructor_circularity): Register GC roots.
11031         (lookup_cl): Likewise.
11032         (java_reorder_fields): Likewise.
11033         (build_current_this): Likewise.
11034         (class_in_current_package): Likewise.
11035         (argument_types_convertible): Likewise.
11036         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11037
11038 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11039
11040         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11041
11042 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11043
11044         * jcf-parse.c: Include <locale.h>.
11045         * jv-scan.c: Include <locale.h>.
11046
11047 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11048
11049         * expr.c (pop_type_0): Return `Object' if trying to merge two
11050         interface types.
11051         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11052         interface types; `Object' is always a valid supertype.
11053
11054 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11055
11056         Fix for PR gcj/33:
11057         * jv-scan.c (help): Document --encoding.
11058         (options): Added `encoding' entry.
11059         (OPT_ENCODING): New define.
11060         (main): Handle --encoding.
11061         Include <langinfo.h> if nl_langinfo exists.
11062         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11063         --encoding.
11064         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11065         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11066         argument.  Use nl_langinfo to determine default encoding.
11067         * java-tree.h (current_encoding): Declare.
11068         * parse.y (java_parser_context_restore_global): Don't restore
11069         `finput'.
11070         (java_parser_context_save_global): Don't set `finput' field.
11071         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11072         if required.
11073         * lang.c (current_encoding): New global.
11074         (lang_decode_option): Recognize `-fencoding='.
11075         (finish_parse): Don't close finput.
11076         * parse.h (struct parser_ctxt): Removed `finput' and
11077         `unget_utf8_value' fields.  Added `lexer' field.
11078         (java_init_lex): Fixed declaration.
11079         * lex.c (java_new_lexer): New function.
11080         (java_destroy_lexer): Likewise.
11081         (java_read_char): Added `lex' argument.  Handle iconv case.
11082         (java_read_unicode): Added `lex' argument.  Count backslashes in
11083         lexer structure.
11084         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11085         `lexer' field in ctxp.
11086         (BAD_UTF8_VALUE): Removed.
11087         (java_lex): Handle seeing UEOF in the middle of a string literal.
11088         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11089         (java_lexer): New structure.
11090         (UNGETC): Removed.
11091         (GETC): Removed.
11092         (DEFAULT_ENCODING): New define.
11093         (java_destroy_lexer): Declare.
11094
11095 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11096
11097         Fix for PR gcj/343:
11098         * lex.c (java_init_lex): Initialize java_io_serializable.
11099         * parse.y (java_io_serializable): New global.
11100         (valid_ref_assignconv_cast_p): An array can be cast to
11101         serializable.
11102
11103 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11104
11105         * decl.c, expr.c: Include defaults.h if not already included.
11106         Don't define the *_TYPE_SIZE macros.
11107
11108 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11109
11110         * typeck.c (build_java_array_type): Correct first parameter
11111         in ADJUST_FIELD_ALIGN invocation.
11112
11113 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11114
11115         * lang-specs.h: Also recognize `-femit-class-files'.
11116
11117 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11118
11119         * verify.c (merge_types): Load the types to merge if necessary.
11120
11121 2000-09-02  Anthony Green  <green@redhat.com>
11122
11123         * jcf-io.c: Include zlib.h.
11124         (open_in_zip): Read compressed class file archives.
11125         * zipfile.h (ZipDirectory): Add uncompressed_size and
11126         compression_method fields.
11127         * zextract.c (read_zip_archive): Collect file compression info.
11128
11129 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11130
11131         * parse.y (do_resolve_class): Also explore superclasses of
11132         intermediate enclosing contexts when searching for inner classes.
11133
11134 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11135
11136         * parse.y (variable_declarator_id:): Better error message.
11137         (expression_statement:): Use YYNOT_TWICE.
11138         (cast_expression:): Likewise.
11139         (assignment:): Likewise.
11140
11141 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11142
11143         * parse.y (do_merge_string_cste): New locals. Create new
11144         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11145
11146 2000-08-07  Hans Boehm  <boehm@acm.org>
11147
11148         * boehm.c (mark_reference_fields): Set marking bits for all words in
11149         a multiple-word record.
11150         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11151         java.lang.Class.
11152
11153 2000-08-31  Mike Stump  <mrs@wrs.com>
11154
11155         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11156         jcf-dump$(exeext)): Make parallel safe.
11157
11158 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11159
11160         * jcf-parse.c (set_source_filename): Constify a char *.
11161         * jcf-write.c (append_innerclasses_attribute,
11162         make_class_file_name): Constify a char *.  Don't recycle a
11163         variable for an unrelated purpose.
11164         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11165         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11166
11167 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11168
11169         * expr.c (can_widen_reference_to): Fixed indentation.
11170         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11171         * parse.y: `finit$' replaces `$finit$' in comments.
11172         (try_builtin_assignconv): Fixed leading comment.
11173
11174 2000-08-25  Greg McGary  <greg@mcgary.org>
11175
11176         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11177
11178 2000-08-24  Greg McGary  <greg@mcgary.org>
11179
11180         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11181         * parse.y (BINOP_LOOKUP): Likewise.
11182
11183 2000-08-22  Andrew Haley  <aph@cygnus.com>
11184
11185         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11186         sign extending. Fixes gcj/321.
11187         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11188         combining to make a jlong. Fixes gcj/321.
11189
11190 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11191
11192         * lang-specs.h: Do not process -o or run the assembler if
11193         -fsyntax-only.
11194
11195 2000-08-16  Andrew Haley  <aph@cygnus.com>
11196
11197         * typeck.c (build_java_array_type): Rewrite code to do array
11198         alignment.  Take into account back-end macros when aligning array
11199         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11200         user to set alignment. Fixes gcj/252 and 160.
11201
11202 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11203
11204         * parse.y (check_abstract_method_definitions): Now return `int'.
11205         Check implemented interfaces.  Fixes PR gcj/305.
11206
11207         * parse.y (patch_switch_statement): Disallow `long' in switch
11208         expressions.  Fixes PR gcj/310.
11209
11210 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11211
11212         * decl.c (finit_leg_identifier_node): New global.
11213         (init_decl_processing): Use `finit$' to initialize
11214         finit_identifier_node. Use `$finit$' to initialize
11215         finit_leg_identifier_node.
11216         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11217         * java-tree.h (finit_identifier_node): Changed attached comment.
11218         (finit_leg_identifier_node): New declaration.
11219         (ID_FINIT_P): Take finit_identifier_node and
11220         finit_leg_identifier_node into account. This is a backward
11221         compatibility hack.
11222
11223 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11224
11225         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11226         Jan 6 2000 patch.
11227         (generate_bytecode_insns): Check `nargs' before emitting it.
11228         * verify.c (merge_type_state): Fixed typo.
11229         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11230         generate_bytecode_{conditional,insns}.
11231
11232 2000-08-13  Anthony Green  <green@redhat.com>
11233
11234         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11235         for -pg builds).
11236
11237 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11238
11239         * class.c (maybe_layout_super_class): Fixed indentation.
11240         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11241         (java_check_methods): New function declaration.
11242         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11243         instead of `str_ptr'.
11244         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11245         of a `invokeinterface' at the right time.
11246         * parse.h (WFL_STRIP_BRACKET): New macro.
11247         (SET_TYPE_FOR_RESOLUTION): Use it.
11248         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11249         (check_class_interface_creation): Don't check for cross package
11250         innerclass name clashes.
11251         (method_header): Behave properly if MDECL is `error_mark_node'.
11252         (method_declarator): Return `error_mark_node' if bogus current
11253         class.
11254         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11255         (resolve_and_layout): New local `decl_type', set and used. Call
11256         java_check_methods.
11257         (java_check_methods): New method.
11258         (java_layout_classes): Use it.
11259         (resolve_qualified_expression_name): No EH check necessary in
11260         access$<n>.
11261         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11262         `case' statement.
11263         (patch_assignment): Set DECL_INITIAL on integral final local.
11264
11265 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11266
11267         * java-tree.h (flag_extraneous_semicolon): New extern.
11268         * lang-options.h: (-Wextraneous-semicolon): New option.
11269         * lang.c (flag_redundant): Fixed typo in leading comment.
11270         (flag_extraneous_semicolon): New global.
11271         (lang_decode_option): Set `flag_extraneous_semicolon' when
11272         -Wall. Decode `-Wextraneous-semicolon'.
11273         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11274         `empty_statement' rule.
11275         (class_body_declaration): Likewise.
11276         (method_body:): Accept `;' as a method body.
11277         (static_initializer:): Removed `SC_TK' hack.
11278         (constructor_block_end:): Likewise.
11279         (empty_statement:): Report deprecated empty declaration. Fixes
11280         gcj/295
11281
11282 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11283
11284         * parse.y (build_dot_class_method_invocation): Changed parameter
11285         name to `type'. Build signature from `type' and convert it to a
11286         STRING_CST if it's an array.
11287         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11288         to use `ref_type' directly.
11289
11290 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11291
11292         * lang-options.h: Added a comma after the last element to avoid
11293         syntax errors when other languages define additional options.
11294
11295 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11296
11297         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11298         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11299         (jc1): Link with $(BACKEND).
11300         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11301
11302 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11303
11304         * jvspec.c: Adjust type of second argument to
11305         lang_specific_driver, and update code as necessary.
11306
11307         * class.c (build_dtable_decl): Initialize dummy.
11308
11309 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11310
11311         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11312         method bodies not to rule out discarding `<clinit>'; don't use
11313         <clinit> to initialize static fields with constant initializers.
11314
11315 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11316
11317         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11318         synthetic methods.
11319         (method_synthetic): New global.
11320         (HANDLE_METHOD): Recognize synthetic method and tell
11321         `print_method_info' about it.
11322         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11323         processing a synthetic method.
11324         * jcf-reader.c (skip_attribute): New function.
11325         ( skip_attribute): Likewise.
11326
11327 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11328
11329         * parse.y (build_outer_field_access): Fixed comments.
11330         (fix_constructors): Emit the initialization of this$<n> before
11331         calling $finit$.
11332         (resolve_qualified_expression_name): Build an access to `decl' if
11333         necessary.
11334
11335 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11336
11337         * parse-scan.y (curent_class): Non longer const.
11338         (inner_qualifier, inner_qualifier_length): Deleted.
11339         (current_class_length): New global.
11340         (bracket_count): Fixed typo in leading comment.
11341         (anonymous_count): New global.
11342         (class_instance_creation_expression:): Handle anonymous classes.
11343         (anonymous_class_creation:): New rule.
11344         (push_class_context): Rewritten.
11345         (pop_class_context): Likewise.
11346         (INNER_QUALIFIER): Macro deleted.
11347         (report_class_declaration): call `push_class_context' when
11348         entering the function. `fprintf' format modified not to use
11349         INNER_QUALIFIER.
11350         (report_class_declaration): Assign `package_name' and
11351         `current_class' to NULL separately.
11352
11353 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11354
11355         * expr.c (build_invokeinterface): Call layout_class_methods on
11356         target interface.
11357
11358 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11359             Anthony Green  <green@cygnus.com>
11360             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11361
11362         * class.c (make_class_data): Create vtable for abstract classes.
11363         (get_dispatch_table): Changed to cope with abstract classes.
11364
11365 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11366
11367         * parse.y (patch_method_invocation): Don't reverse the argument
11368         list when dealing with anonymous class constructors. Fixed typo in
11369         comment.
11370
11371 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11372
11373         * parse.y (build_alias_initializer_parameter_list): Reverse
11374         crafted list when building aliases for anonymous class
11375         constructors.
11376
11377 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11378
11379         * parse.y (jdep_resolve_class): Don't bother checking potential
11380         innerclass access if `decl' is NULL.
11381         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11382         WFL.
11383
11384 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11385
11386         * parse.c: Remove (again.)
11387
11388 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11389
11390         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11391         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11392         outside the `if' statement, alias to innerclass removed, `decl'
11393         used to mark the class complete.
11394
11395 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11396
11397         * parse.y (simple_name:): Fixed typo in error message.
11398
11399 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11400
11401         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11402         or its first operand can be error marks.
11403
11404 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11405
11406         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11407         * parse.y (method_header): Likewise.
11408
11409 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11410
11411         * parse.y (process_imports): Consider that one might be trying to
11412         import an innerclass. Fixes gcj/254
11413
11414 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11415
11416         * parse.y (find_as_inner_class): Handle the case where the
11417         enclosing context of an innerclass has been loaded as bytecode.
11418
11419 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11420
11421         * parse.y (simple_name:): Reject `$' in type names.
11422         (resolve_type_during_patch): Use `type' as a second
11423         argument to resolve_no_layout. Fixes gcj/257.
11424
11425 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11426
11427         * parse.y (find_most_specific_methods_list): Select the only
11428         non-abstract method even if max has been set.
11429         Fixes gcj/285, gcj/298.
11430
11431 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11432
11433         * lang-specs.h: Added %(jc1) to java compiler options.
11434
11435 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11436
11437         * .cvsignore: New file.
11438
11439 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11440
11441         * parse.y (not_accessible_p): Access granted to innerclasses
11442         (indirectly) extending the reference type. Fixes gcj/249.
11443
11444 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11445
11446         * parse.y (patch_method_invocation): Fixed comment.
11447         (maybe_use_access_method): Build this$<n>s to the context of the
11448         target method, or a type that extends it. Fixes gcj/242.
11449
11450 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11451
11452         * parse.c: Remove.
11453
11454 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11455
11456         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11457
11458 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11459
11460         * lang-specs.h: Added %{I*}.
11461
11462 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11463
11464         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11465
11466 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11467
11468         * parse-scan.c: Remove.
11469
11470 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11471
11472         * class.c (set_super_info): Handled protected inner classes.
11473         (common_enclosing_context_p): Bail early if arguments aren't both
11474         inner classes.
11475         (get_access_flags_from_decl): Handle private and protected inner
11476         classes.
11477         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11478         (CLASS_PROTECTED): Likewise.
11479         (struct lang_type): New bitfield `poic'.
11480         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11481         inner classes only.
11482         (check_inner_class_access): Renamed arguments, added
11483         comments. Handles protected inner classes (fixes gcj/225)
11484         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11485
11486 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11487
11488         * parse.y (resolve_qualified_expression_name): Verify qualified
11489         access to `this'. Fixes gcj/239.
11490
11491 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11492
11493         * jcf-write.c (generate_classfile): Don't install ConstantValue
11494         for null pointers.
11495
11496 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11497
11498         * parse.y (resolve_qualified_expression_name): Handle inner class
11499         access. Fixes gcj/256.
11500
11501 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11502
11503         * jcf-write.c (generate_classfile): Properly install the
11504         ConstantValue attribute and the initial value constant pool index
11505         on string constants.
11506         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11507         class files.
11508
11509 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11510
11511         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11512         construct.
11513         * parse.y (find_as_inner_class): Fixed typo.
11514         (do_resolve_class): Explore enclosing contexts when searching for
11515         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11516         (check_inner_class_access): Check `decl' which can be null in case
11517         of previous errors.
11518
11519 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11520
11521         * java-tree.h (java_debug_context): Declared `extern'.
11522         (safe_layout_class): Likewise.
11523         * parse.y (resolve_field_access): Field must be `static' in order
11524         to be replaced by its initial value. Added comments.
11525         (find_applicable_accessible_methods_list): Fixed typo.
11526         (find_most_specific_methods_list): Methods found in innerclasses
11527         take over methods founds in the enclosing contexts.
11528         (java_complete_tree): Loosen restrictions on the type of DECLs
11529         that can be replaced by their initialization values.
11530         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11531
11532 2000-07-05  Tom Tromey  <tromey@cygnus.com>
11533
11534         * Make-lang.in (PARSE_DIR): New macro.
11535         (PARSE_RELDIR): Likewise.
11536         (PARSE_C): Likewise.
11537         (PARSE_SCAN_C): Likewise.
11538         ($(PARSE_C)): New target.
11539         ($(PARSE_SCAN_C)): Likewise.
11540         (SET_BISON): New macro.
11541         (BISONFLAGS): Likewise.
11542         (JAVABISONFLAGS): Likewise.
11543
11544 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
11545
11546         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11547         argument on the first pass for CNI as well as JNI.
11548         (print_method_info): Set up method name on the first pass only.
11549
11550 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11551
11552         * parse.y (parser_qualified_classname): Removed parameter
11553         `is_static'.
11554         (create_interface): Removed first passed parameter to
11555         parser_qualified_classname.
11556         (create_class): Likewise. Don't install alias on static
11557         innerclasses. Fixes gcj/275.
11558
11559 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11560
11561         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11562         debugable statement with empty_stmt_node. Fixes gcj/272
11563
11564 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11565
11566         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11567         gcj/271.
11568
11569 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11570
11571         * jcf-write.c (push_long_const): Appropriately cast short negative
11572         constant to jword.
11573
11574 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11575
11576         * parse.y (verify_constructor_super): Use loop variable
11577         `m_arg_type' initialized with `mdecl_arg_type'.
11578
11579 2000-06-29  Tom Tromey  <tromey@cygnus.com>
11580
11581         * parse.y (resolve_field_access): Handle case where `type_found'
11582         is NULL.
11583
11584 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11585
11586         * expr.c (lookup_field): The same field can be found through two
11587         different interface. Don't declare it ambiguous in that case.
11588
11589 2000-06-27  Tom Tromey  <tromey@cygnus.com>
11590
11591         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
11592         follows \r, then unget it at a lower level.
11593
11594 2000-06-26  Tom Tromey  <tromey@cygnus.com>
11595
11596         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11597         java_complete_tree.
11598
11599 2000-06-25  Tom Tromey  <tromey@cygnus.com>
11600
11601         * parse.y (for_statement): Wrap expression in a WFL if it is a
11602         constant.  For PR gcj/268.
11603
11604 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11605
11606         * parse.y (do_resolve_class): Minor optimiztion in the package
11607         list search. Removed unnecessary test and return statement.
11608         (valid_ref_assignconv_cast_p): Order of arguments to
11609         enclosing_context_p fixed.
11610
11611 2000-06-24  Tom Tromey  <tromey@cygnus.com>
11612
11613         * expr.c (lookup_field): Print error and return error_mark_node if
11614         field reference is ambiguous.
11615
11616         * parse.y (check_abstract_method_definitions): Also check if
11617         `other_method' is abstract.
11618
11619 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11620
11621         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11622         classes.
11623         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11624         (struct lang_type): New field `pic'.
11625         (CLASS_PRIVATE): New macro.
11626         * parse.y (check_inner_class_access): New function.
11627         (jdep_resolve_class): Call it.
11628
11629 2000-06-23  Tom Tromey  <tromey@cygnus.com>
11630
11631         * parse.y (patch_incomplete_class_ref): Initialize the returned
11632         class.  For PR gcj/260.
11633
11634 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11635
11636         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11637
11638 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11639
11640         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11641         Java specific checks.
11642         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11643         screened by DECL_P.
11644         * java-tree.def (CASE_EXPR): Marked 'e'.
11645         (DEFAULT_EXPR): Likewise.
11646         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11647         screened by DECL_P.
11648         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11649         Java specific checks.
11650         (generate_bytecode_insns): Test try_block for BLOCK before using
11651         BLOCK_EXPR_BODY.
11652         * parse.y (build_wfl_wrap): Added `location' argument. Set
11653         EXPR_WFL_LINECOL accordingly.
11654         (dim_expr:): Wrap constants with WFLs.
11655         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11656         (resolve_package): Check for `stmt' not being a BLOCK before
11657         building a debuggable statement with it.
11658         (make_qualified_primary): Added extra parameter to build_wfl_wrap
11659         invocation.
11660         (resolve_field_access): Make sure `decl' is a DECL before treating
11661         it as such.
11662         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11663         IDENTIFIER_NODE before treating it as such.
11664         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11665         treating it as such.
11666         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11667         to be applied only on non array types.
11668
11669 2000-06-16  Per Bothner  <per@bothner.com>
11670
11671         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
11672         define in terms of DECL_RESULT, as that fails when --enable-checking.
11673
11674 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11675
11676         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
11677         types the same in comparison.
11678         (CHECK_OP): Add static prototype.
11679
11680 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11681
11682         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11683         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11684         * parse.c: Rebuilt.
11685
11686 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11687
11688         * decl.c (create_primitive_vtable): Prototype.
11689
11690         * jcf-write.c (generate_bytecode_insns): Initialize variable
11691         `saved_context'.
11692
11693         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11694
11695 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11696
11697         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11698         to track searched classes, and do not search the same class more than
11699         once. Call find_applicable_accessible_methods_list on immediate
11700         superclass, instead of search_applicable_method_list on all ancestors.
11701         Fix for PR gcj/238.
11702
11703 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11704
11705         * parse.y (register_fields): Permit static fields in inner classes
11706         if they are final. Fix for PR gcj/255.
11707
11708 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11709
11710         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11711         * parse.y (find_in_imports): Returned type changed to void,
11712         leading comment fixed.
11713         (register_package): New function.
11714         (qualify_and_find): Likewise.
11715         (package_declaration:): Use `register_package'.
11716         (single_type_import_declaration:): Removed local variable
11717         `node'. Added missing `;' for consistency.
11718         (type_import_on_demand_declaration:): Use `chainon' to link new
11719         entries.
11720         (lookup_field_wrapper): Lookup local variables defined in outer
11721         contexts first.
11722         (java_complete_class): Don't reverse the list of imported on demand.
11723         (do_resolve_class): Reorganized. Removed local variable
11724         `original_name'. Call `qualify_and_find' with the current package
11725         name, invoke `find_in_imports_on_demand' right after. Call
11726         `qualify_and_find' with the packages we've seen so far. Fixed
11727         operations numbering in comments.
11728         (java_expand_class): Don't reverse `package_list'.
11729         (find_most_specific_methods_list): New local variables `abstract'
11730         and `candidates'. Use them to pick the right method.
11731
11732 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
11733
11734         * parse.y (check_modifiers_consistency): Don't subtract out
11735         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11736
11737 2000-06-04  Philipp Thomas  <pthomas@suse.de>
11738
11739         * Makefile.in (INTLLIBS): New.
11740         (LIBS): Add above.
11741         (DEPLIBS): Ditto.
11742
11743 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11744
11745         * class.c (get_dispatch_table): Build the vtable dummy entry list
11746         element with a null purpose. Fixed leading comment.
11747         (build_dtable_decl): Build an accurate dtable type when appropriate
11748         and use it.
11749
11750 2000-06-02  Richard Henderson  <rth@cygnus.com>
11751
11752         * lang.c (lang_get_alias_set): New.
11753
11754 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11755
11756         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11757         before using it as the accessed field.
11758
11759 2000-05-31  Tom Tromey  <tromey@cygnus.com>
11760
11761         * java-tree.h (boolean_array_vtable, byte_array_vtable,
11762         char_array_vtable, short_array_vtable, int_array_vtable,
11763         long_array_vtable, float_array_vtable, double_array_vtable):
11764         Declare.
11765         * expr.c (get_primitive_array_vtable): New function.
11766         (create_primitive_vtable): New function.
11767         (java_lang_expand_expr): Enable code to statically generate
11768         arrays.
11769         * decl.c (init_decl_processing): Create primitive vtables.
11770         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
11771         short_array_vtable, int_array_vtable, long_array_vtable,
11772         float_array_vtable, double_array_vtable): Define.
11773
11774 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
11775
11776         * java/parse.y (find_applicable_accessible_methods_list):
11777         Don't add an uninitialized value to the list.
11778
11779 2000-05-25  Tom Tromey  <tromey@cygnus.com>
11780
11781         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11782         when trying to see if field's class should be initialized.  Always
11783         initialize field's declaring class, not qualified class.
11784         For PR gcj/162.
11785
11786         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11787         `wfl_operator', to maybe_build_primttype_type_ref.
11788         Fixes PR gcj/235.
11789
11790 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
11791
11792         * parse.y (patch_method_invocation): Don't try to lookup methods
11793         in primitive types.
11794
11795 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11796
11797         * parse.y (resolve_field_access): Call the appropriate <clinit>
11798         before accessing the length of a static array. Craft a decl for
11799         the field while its time. Fixes PR gcj/129.
11800
11801 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11802
11803         * parse.y (resolve_package): Correctly set `*next' (was off by
11804         one.)
11805         (resolve_qualified_expression_name): Fixed comment.
11806
11807 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11808
11809         * jcf-parse.c (jcf_parse_source): Reset current_class and
11810         current_function_decl to NULL before parsing a new file.
11811
11812 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11813
11814         * parse.y (block_end:): If the collected block doesn't feature a
11815         statement, insert an empty statement.
11816
11817 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11818
11819         * parse.y (maybe_yank_clinit): New function.
11820         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11821         end of the list of methods belonging to a class.
11822         (java_complete_expand_method): Check whether <clinit> is really
11823         necessary and expand it accordingly.
11824
11825 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11826
11827         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11828         processed by the method's switch statement.
11829
11830 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11831
11832         * java-tree.h: Added init state enum.
11833         * decl.c (emit_init_test_initialization): Initialize class
11834         initialization check variable by looking at class' state.
11835
11836 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11837
11838         * java-tree.h (build_instanceof): Declare.
11839         (build_get_class): Declare.
11840         * parse.y (patch_binop): Use build_instanceof.
11841         * expr.c (build_instanceof): New function.  If class is final,
11842         don't make a function call.
11843         (expand_java_INSTANCEOF): Use it.
11844         (build_get_class): New function.
11845
11846 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
11847
11848         * jcf-write.c (generate_classfile): Scan the source_file for
11849         slashes with the right pointer variable.
11850
11851 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
11852
11853         * lang.c (lang_decode_option): Update -Wunused flags by calling
11854         set_Wunused.
11855         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
11856
11857 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
11858
11859         * check_init.c (check_init): Constify local char *.
11860         * class.c (push_class): Constify local char *.
11861         * java_tree.h: Update prototypes.
11862         * jcf-io.c (open_class): Constify filename parameter and
11863         return value.
11864         (find_class): Remove redundant string copy.  Cast return from
11865         open_class.
11866         * jcf-parse.c (read_class, parse_class_file, yyparse):
11867         Constify local char *.
11868         * jcf-write.c (generate_bytecode_insns, generate_classfile):
11869         Constify local char *.
11870         * jcf.h (JCF): Constify filename and classname.
11871         (JCF_FINISH): Cast args to FREE to char * when appropriate.
11872         * lang.c (init_parse): Constify parameter and return value.
11873         * lex.c (java_get_line_col): Constify filename parameter.
11874         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
11875         * parse.y (java_parser_context_suspend,
11876         issue_warning_error_from_context, safe_layout_class): Constify
11877         local char *.
11878         * parse.c: Regenerate.
11879
11880 2000-05-08  Tom Tromey  <tromey@cygnus.com>
11881
11882         * expr.c (build_jni_stub): Cache the result of
11883         _Jv_LookupJNIMethod.
11884
11885 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11886
11887         * decl.c (predef_filenames_size): Now 7.
11888         (predef_filenames): New seventh entry.
11889
11890 2000-05-04  Tom Tromey  <tromey@cygnus.com>
11891
11892         * boehm.c (mark_reference_fields): Don't mark RawData fields.
11893         Keep track of when we've seen a reference field after a
11894         non-reference field.
11895         (get_boehm_type_descriptor): Handle case where we see
11896         non-reference fields but no trailing reference field.
11897         * decl.c (rawdata_ptr_type_node): Define.
11898         (init_decl_processing): Initialize rawdata_ptr_type_node.
11899         * java-tree.h (rawdata_ptr_type_node): Declare.
11900
11901 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11902
11903         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
11904         specifiers in calls to fprintf.
11905
11906 2000-05-03  Andrew Haley  <aph@cygnus.com>
11907
11908         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
11909
11910         * javaop.h (WORD_TO_INT): New function.
11911         (IMMEDIATE_s4): Use WORD_TO_INT.
11912         * jcf.h (JPOOL_INT): Ditto.
11913
11914         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
11915         separator.
11916
11917 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11918
11919         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
11920         on native function.
11921         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
11922         JNI methods.
11923         * expr.c (build_jni_stub): New function.
11924         * lang-specs.h: -fjni and -femit-class-file are incompatible.
11925         * parse.c: Rebuilt.
11926         * parse.y (java_complete_expand_methods): Expand a native method
11927         and call build_jni_stub if -fjni given.
11928         * lang-options.h: Document -fjni.
11929         * lang.c (flag_jni): New global.
11930         (lang_f_options): Added `jni' entry.
11931         * java-tree.h (soft_lookupjnimethod_node,
11932         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
11933         Declare.
11934         (flag_jni): Declare.
11935         (build_jni_stub): Declare.
11936         (struct lang_decl): Added `native' flag.
11937         (METHOD_NATIVE): Redefined to use `native' field of lang specific
11938         structure.
11939         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
11940         soft_jnipopsystemframe_node): New globals.
11941         (init_decl_processing): Set them.  _Jv_InitClass only takes one
11942         argument.
11943
11944         * java-tree.def: Put into `C' mode.
11945
11946 2000-04-27  Tom Tromey  <tromey@cygnus.com>
11947
11948         Fix for PR gcj/2:
11949         * expr.c (expand_invoke): Generate check to see if object pointer
11950         is null in nonvirtual invocation case.
11951         * java-tree.h (soft_nullpointer_node): Declare.
11952         * decl.c (soft_nullpointer_node): New global.
11953         (init_decl_processing): Initialize soft_nullpointer_node.
11954         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11955         or `private' methods.
11956         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11957
11958 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11959
11960         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11961         from <clinit>
11962
11963 2000-04-26  Tom Tromey  <tromey@cygnus.com>
11964
11965         * zextract.c (find_zip_file_start): New function.
11966         (read_zip_archive): Use it.
11967
11968 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11969
11970         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
11971
11972 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11973
11974         * class.c (common_enclosing_context_p): New function.
11975         * java-tree.h (common_enclosing_context_p): Added prototype.
11976         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
11977         classes sharing an outer context with the current instance.
11978         * parse.y (build_access_to_thisn): Fixed leading comment.
11979         (verify_constructor_super): New local `supper_inner'. Skip
11980         enclosing context argument in the case of inner class constructors.
11981         (patch_method_invocation): Insert proper context as second
11982         parameter to pure inner class constructor super invocations.
11983
11984 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11985
11986         * parse.y (end_class_declaration): Reset the interface number
11987         counter.
11988
11989 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11990
11991         * parse.y (source_start_java_method): Deleted unnecessary code.
11992         (patch_method_invocation): Fixed comment.
11993
11994 2000-04-24  Robert Lipe <robertlipe@usa.net>
11995
11996         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
11997
11998 2000-04-23  Tom Tromey  <tromey@cygnus.com>
11999
12000         * boehm.c (mark_reference_fields): Use int_byte_position.
12001
12002 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12003
12004         * boehm.c (mark_reference_fields): Only call byte_position on
12005         non-static fields.
12006
12007 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12008
12009         * boehm.c (mark_reference_fields): Added `last_view_index'
12010         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12011
12012 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12013
12014         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12015         * parse.y (check_class_interface_creation): Fixed comments. Select
12016         permitted modifiers for (inner) interfaces. Changed error message
12017         to report rejected modifiers used with local classes.
12018
12019 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12020
12021         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12022         of directly inherited type considered in scope.
12023         * parse.y (do_resolve_class): Search inherited classes for inner
12024         classes.
12025
12026 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12027
12028         * parse.y (not_accessible_p): Use member's class, not current
12029         class, when doing inheritance check for protected reference.
12030         Fixes PR gcj/124.
12031
12032 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12033
12034         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12035
12036 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12037
12038         * parse.y (lookup_field_wrapper): Search for final local aliases.
12039         (resolve_expression_name): Let lookup_field_wrapper search for
12040         final local aliases. Force the value of `name' if one is found.
12041         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12042         an expression name. Fixed comments.
12043
12044 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12045
12046         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12047
12048 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12049
12050         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12051
12052 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12053
12054         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12055
12056 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12057
12058         PR gcj/211:
12059         * gjavah.c (utf8_cmp): Changed return value.
12060         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12061         result.
12062         (cxx_keywords): New global.
12063         (get_field_name): Handle new result of cxx_keyword_subst.
12064         (print_method_info): Likewise.
12065
12066 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12067
12068         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12069         with a newline, for CNI.
12070         (print_stub_or_jni): Print a space or newline before method name for
12071         CNI as well as JNI.
12072         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12073         (process_file): Include gcj/cni.h if generating CNI stubs.
12074
12075 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12076
12077         * gjavah.c (decompile_method): Use print_field_name.
12078         Fixes PR gcj/205.
12079
12080 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12081
12082         * parse.y (java_expand_classes): Reverse the package list once.
12083         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12084         reduction.
12085         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12086         the `==' and `!=' operators.
12087
12088 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12089
12090         * jcf-write.c (generate_bytecode_insns): At invocation time,
12091         always relate an interface method to the type of its selector.
12092
12093 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12094
12095         Fix for PR gcj/2:
12096         * expr.c (expand_invoke): Generate check to see if object pointer
12097         is null in nonvirtual invocation case.
12098         * java-tree.h (soft_nullpointer_node): Declare.
12099         * decl.c (soft_nullpointer_node): New global.
12100         (init_decl_processing): Initialize soft_nullpointer_node.
12101         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12102         or `private' methods.
12103         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12104
12105 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12106
12107         Fix for PR gcj/140:
12108         * parse.y (check_final_assignment): Recognize assignments to the
12109         `length' field of an array when generating class files.
12110
12111 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12112
12113         * class.c (decl_hash): Prototype removed.
12114         (decl_compare): Likewise.
12115
12116 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12117
12118         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12119         * parse.y (check_modifiers_consistency): Check for final/volatile
12120         clash.  Fixes PR gcj/164.
12121
12122 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12123
12124         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12125         made global.
12126         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12127         global.
12128         (add_method_1): Use `java_hash_hash_tree_node' and
12129         `java_hash_compare_tree_node'.
12130         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12131         (java_hash_compare_tree_node): Likewise.
12132         * parse.y (find_applicable_accessible_methods_list): Create,
12133         delete and use a hash table to remember already searched interfaces.
12134
12135 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12136
12137         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12138         with latest entry.
12139
12140 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12141
12142         * boehm.c (mark_reference_fields, set_bit): Prototype.
12143         (set_bit): Un-ANSI-fy definition.
12144
12145         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12146         Prototype.
12147
12148         * decl.c (emit_init_test_initialization): Likewise.
12149
12150         * gjavah.c (jni_print_char): Likewise.
12151
12152         * parse.y (create_new_parser_context): Likewise.
12153
12154 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12155
12156         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12157         patch missing hunk. Fixed indentation.
12158
12159 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12160
12161         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12162         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12163
12164 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12165
12166         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12167         when negative *before* using it as an array index.
12168         * ChangeLog: Fixed typo.
12169
12170 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12171
12172         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12173         to 0 when it reaches -1.
12174
12175 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12176
12177         * jcf-parse.c (get_constant): Properly cast `num' during the
12178         invocation of `add_double'.
12179         * jcf-write.c (push_long_const): Properly cast `lo' before
12180         comparing it to short bounds.
12181         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12182         `interface_body:' is reduced after the current interface is
12183         pushed.
12184
12185 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12186
12187         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12188         Java-specific `-f' option.
12189
12190 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12191
12192         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12193         Adjust order of making types.
12194         Make bitsize_*_node values.
12195
12196 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12197
12198         * class.c (make_field_value): Use byte_position.
12199         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12200         (java_array_data_offset): Likewise.
12201         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12202         bzero call.
12203
12204 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12205
12206         * parse.y (check_abstract_method_definitions): New local
12207         `end_type_reached'. Make sure we also consider `end_type'.
12208         (java_check_abstract_method_definitions): Make sure we eventually
12209         consider `java.lang.Object'.
12210         (maybe_use_access_method): Don't use access method if not in the
12211         context of a pure inner class or if the method's context is right.
12212         (find_applicable_accessible_methods_list): New static flag
12213         `object_done'. Don't search abstract classes as interfaces. Fixed
12214         indentation. Fixed the `java.lang.Object' only search. Search
12215         class interface(s) first, then fully search enclosing contexts.
12216         (find_most_specific_methods_list): Pick the closest candidate when
12217         they're all abstract.
12218
12219 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12220
12221         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12222         properly initialize `finished_label'. Don't emit gotos for empty
12223         try statements.
12224
12225 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12226
12227         * except.c (emit_handlers): Clear catch_clauses_last.
12228
12229 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12230
12231         * parse.y (check_method_types_complete): New function.
12232         (create_class): Reset anonymous class counter only when seeing an
12233         non inner classe.
12234         (java_complete_class): JDEP_METHOD: Don't recompute signature
12235         if incomplete.
12236
12237 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12238
12239         * class.c (build_static_ref): Fixed indentation in comment.
12240         * java-tree.def (TRY_EXPR): Fixed typo in name.
12241         (CLASS_LITERAL): Likewise.
12242         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12243         (struct lang_type): New field `dot_class'.
12244         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12245         (generate_classfile): Method `class$' is synthetic.
12246         * parse.y (build_do_class_method): New function.
12247         (build_dot_class_method_invocation): Likewise.
12248         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12249         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12250         (qualify_ambiguous_name): Likewise.
12251         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12252         (build_try_statement): Fixed leading comment.
12253
12254 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12255
12256         * class.c (make_field_value): Properly handle sizes.
12257         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12258         (layout_class_method): Count using trees.
12259         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12260         * expr.c (java_array_data_offset): Use int_bit_position.
12261         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12262         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12263
12264 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12265
12266         * lang.c (flag_hash_synchronization): New global.
12267         (lang_f_options): Added `hash-synchronization'.
12268         * lang-options.h: Mention -fhash-synchronization.
12269         * java-tree.h (flag_hash_synchronization): Declare.
12270         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12271         hash table synchronization is disabled.
12272         * decl.c (init_decl_processing): Only push `sync_info' value when
12273         hash table synchronization is disabled.
12274         * class.c (make_class_data): Only push `sync_info' field when hash
12275         table synchronization is disabled.  Removed dead code.
12276
12277 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12278
12279         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12280
12281 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12282
12283         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12284         classes.
12285         * parse.y (patch_method_invocation): Handle anonymous classes
12286         creation in static context.
12287
12288 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12289
12290         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12291         * parse.y (resolve_qualified_expression_name): Use it.
12292         (patch_method_invocation): Likewise.
12293
12294 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12295
12296         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12297         depending on the type of dependency which dictates what the
12298         current class is.
12299         (unresolved_type_p): Resolved types limited to the current class.
12300
12301 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12302
12303         * decl.c (init_decl_processing): Set type of `sync_info' to be
12304         pointer to Object.
12305
12306         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12307         Correctly compute bit number for current slot.  Zero `high' and
12308         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12309         mark_reference_fields.
12310         (mark_reference_fields): New function.
12311
12312 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12313
12314         * parse.y (register_incomplete_type): Fixed initialization of
12315         JDEP_ENCLOSING.
12316
12317 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12318
12319         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12320         static globals.
12321         (push_class_context, pop_class_context): New function.
12322         (class_body:): Call pop_class_context.
12323         (interface_body:): Likewise.
12324         (INNER_QUALIFIER): New macro.
12325         (report_class_declaration): Changed output format and use
12326         INNER_QUALIFIER. Call push_class_context.
12327
12328 2000-02-14  Andrew Haley  <aph@cygnus.com>
12329
12330         * check-init.c (check_init): Add new cases for unary and binary
12331         tree nodes.
12332
12333 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12334
12335         * parse.y (resolve_package): Set `next' once a type name has been
12336         progressively discovered.
12337         (resolve_qualified_expression_name): Propagate resolution only if
12338         there are remaining qualifiers. Take into account `q' might have
12339         been cleared after re-qualification.
12340         * parse.y (patch_method_invocation): New local `resolved'.
12341         Section dealing with qualified expression rewritten to use
12342         resolve_field_access.
12343
12344 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12345
12346         * parse.h (PUSH_CPC): Fixed indentation.
12347         (DEBUG_CPC): New macro.
12348         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12349         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12350         * parse.y (class_body_declaration:): Use
12351         SET_CPC_INSTANCE_INITIALIZER_STMT.
12352         (method_declaration:): Check for null current_function_decl.
12353         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12354         (java_parser_context_pop_initialized_field): Better handling of
12355         empty lists.
12356         (maybe_make_nested_class_name): Mark nested class name as
12357         qualified when necessary.
12358         (end_class_declaration): Don't call java_parse_context_resume when
12359         one or more error occurred.
12360         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12361         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12362         SET_CPC_INITIALIZER_STMT.
12363         (method_header): Check for inner classes declaring static methods.
12364         (resolve_qualified_expression_name): Handle situation where `this'
12365         is implied.
12366
12367 2000-03-13  Hans Boehm <boehm@acm.org>
12368
12369         * typeck.c (build_prim_array_type): Correctly set the high word too.
12370
12371 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12372
12373         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12374         ordinary methods.
12375         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12376         list of methods for interfaces.
12377
12378 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12379
12380         * parse.y (qualify_ambiguous_name): Properly handle expressions
12381         using `null'.
12382
12383 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12384
12385         * parse.y (check_final_assignment): Extended to process
12386         COMPOUND_EXPR.
12387         (patch_assignment): Have check_final_assignment called only once.
12388
12389 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12390
12391         * java-tree.h (IS_INIT_CHECKED): New flag.
12392         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12393         * parse.y (patch_string): Call force_evaluation_order on the
12394         completed string concatenation tree.
12395         * expr.c (force_evaluation_order): Call force_evaluation_order on
12396         function's arguments too.
12397
12398 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12399
12400         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12401         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12402         (build_anewarray): Likewise.
12403         * parse.y (patch_newarray): Likewise.
12404         * parse.c: Regenerated.
12405
12406 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12407
12408         * decl.c (init_decl_processing): Added new class fields `depth',
12409         `ancestors', and `idt' to class_type_node. Use
12410         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12411         * class.c (make_class_data): Push initial values for new fields.
12412         * java-tree.h: Updated prototype for `build_invokeinterface'.
12413         * expr.c (build_invokeinterface): Changed parameters to accept
12414         `method' tree. Calculate index of `method' in its declaring
12415         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12416         (expand_invoke): Call `build_invokeinterface' with new parameters.
12417         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12418         parameters.
12419
12420 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12421
12422         * typeck.c (lookup_do): Search superinterfaces first
12423         when looking up an interface method. From Godmar Back
12424         <gback@cs.utah.edu>
12425
12426 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12427
12428         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12429
12430 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12431
12432         * java-tree.h (lookup_argument_method2): Declared.
12433         (safe_layout_class): Prototype moved from parse.h.
12434         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12435         * parse.y (java_check_regular_methods): Local `super_class' gone.
12436         Call lookup_argument_method2 instead of lookup_argument_method.
12437         Perform modifier match for methods found declared in implemented
12438         interfaces. Fixed indentation problem. Overriding/hiding error
12439         report to take place only for methods found in classes.
12440         * typeck.c (lookup_argument_method): Changed leading
12441         comment. Re-written by calling lookup_do.
12442         (lookup_argument_method2): New function.
12443         (lookup_java_method): Re-written by calling lookup_do.
12444         (lookup_do): New function.
12445
12446 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12447
12448         * check-init.c (check_init): Removed dead code. Handle (blank)
12449         final variables.
12450         * parse.y (declare_local_variables): New local `final_p', set it
12451         and use it to initialize LOCAL_FINAL.
12452         (check_final_assignment): Only check FIELD_DECLs.
12453
12454 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12455
12456         * Makefile.in (JAVA_OBJS): Added boehm.o.
12457         (boehm.o): New target.
12458         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12459         * java-tree.h (flag_use_boehm_gc): Declare.
12460         (get_boehm_type_descriptor): Declare.
12461         * lang.c (lang_f_options): Added `use-boehm-gc'.
12462         (flag_use_boehm_gc): New global.
12463         * lang-options.h: Added -fuse-boehm-gc.
12464         * boehm.c: New file.
12465         * class.c (get_dispatch_table): If class uses a Boehm type
12466         descriptor, put it in the vtable.
12467         (make_class_data): Removed dead code.
12468
12469 2000-03-03  Per Bothner  <per@bothner.com>
12470
12471         * decl.c (init_decl_processing):  Initialize sizetype properly.
12472
12473 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12474
12475         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12476         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12477         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12478         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12479         (jcf_parse): New local `current'. Load innerclasses seen in outer
12480         context being processed.
12481         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12482         * jcf-write.c (append_innerclasses_attribute): New function.
12483         (append_innerclasses_attribute_entry): Likewise.
12484         (get_access_flags): Handle static classes. Set anonymous and local
12485         classes to be private.
12486         (generate_classfile): Attribute count adjusted. Call
12487         append_innerclasses_attribute.
12488         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12489         PURE_INNER_CLASS_TYPE_P.
12490         * parse.y (parser_qualified_classname): New parameter `is_static',
12491         produce non qualified name accordingly.
12492         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12493         (create_interface): Added argument to parser_qualified_classname.
12494         (create_class): Added argument to parser_qualified_classname. Setup
12495         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12496         (add_inner_class_fields): Fixed indentation.
12497         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12498         (method_declarator): Fixed typo in comment.
12499         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12500         (build_current_thisn): Likewise.
12501         (patch_method_invocation): Likewise.
12502
12503 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12504
12505         * decl.c (current_function_decl): Move to toplev.c.
12506
12507 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12508
12509         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12510         (DECL_BIT_INDEX): Use underlying representation.
12511         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12512
12513 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12514
12515         * expr.c (build_java_ret): Pass proper type to size_binop.
12516
12517 2000-02-25  Anthony Green  <green@cygnus.com>
12518
12519         * expr.c (build_class_init): Mark the decl to be ignored by
12520         check_init.
12521         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12522         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12523         * class.c (init_test_hash_newfunc): New function.
12524         (decl_hash): New function.
12525         (decl_compare): New function.
12526         * decl.c (emit_init_test_initialization): New function.
12527         (complete_start_java_method): Traverse the init test hashtable,
12528         calling emit_init_test_initialization.
12529         (always_initialize_class_p): Define.
12530         * expr.c (build_class_init): Use initialization tests when
12531         emitting class initialization code.
12532         (always_initialize_class_p): Declare.
12533         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12534         1.
12535         * java-tree.h: Include hash.h.
12536         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12537         (struct lang_decl): Add init_test_table field.
12538         (init_test_hash_entry): Define.
12539
12540 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12541
12542         * gjavah.c (main): Avoid using `argi' to report unimplemented
12543         options.
12544
12545 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12546
12547         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12548         initialize locals to avoid warnings. Local `exception_type' moved
12549         into if statement.
12550
12551 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12552
12553         * parse.y (resolve_expression_name): Use `orig' as a second
12554         argument to resolve_field_access.
12555         (resolve_field_access): Removed unnecessary code when dealing with
12556         static fields.
12557
12558 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12559
12560         * class.c (push_super_field): Don't push the field twice.
12561         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12562         * parse.h (java_reorder_fields): Prototyped.
12563         * parse.y (java_reorder_fields): New function.
12564         (java_layout_class): Simplified not to worry about re-ordering.
12565
12566 2000-02-23  Tom Tromey  <tromey@cygnus.com>
12567
12568         * gjavah.c (print_name): In JNI case, correctly quote string.
12569         (print_method_info): Don't handle overrides in JNI mode.
12570
12571 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12572
12573         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12574         value type set to `boolean_type_node'.
12575
12576 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12577
12578         * jcf-dump.c (main): Test for correct condition after
12579         output file creation.
12580
12581 2000-02-19  Anthony Green  <green@cygnus.com>
12582
12583         * jcf-depend.c (add_entry): Fix test for first list entry.
12584
12585 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12586
12587         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12588         * constants.c (build_constants_constructor): Likewise.
12589
12590 2000-02-19  Anthony Green  <green@cygnus.com>
12591
12592         * jcf-depend.c (add_entry): Add entries to the end of the list.
12593
12594 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
12595
12596         * decl.c (INT_TYPE_SIZE): Define if necessary.
12597         (expand_java_return): Handle the case of a native integer smaller
12598         than a JVM integer.
12599
12600 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12601
12602         * gjavah.c (help): Use GCCBUGURL.
12603         * jv-scan.c (help): Likewise.
12604         * jcf-dump.c (help): Likewise.
12605
12606 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12607
12608         * jcf-write.c (generate_bytecode_insns): Don't generate empty
12609         `finally' clauses.
12610
12611 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12612
12613         * jcf-parse.c (load_class): Call `fatal' if no file containing
12614         the target class are found.
12615
12616 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
12617
12618         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12619         lex.c, lex.h, and PARSE_H to...
12620         (parse.o, parse-scan.o): ...here, respectively.
12621
12622         * lex.c: Split out code that may trigger SIGFPE from yylex()
12623         to its own function.
12624         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12625
12626 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12627
12628         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12629
12630 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12631
12632         * parse.y (outer_field_access_p): Stop in time when outer contexts
12633         are exhausted.
12634         (resolve_qualified_expression_name): Properly qualify *everything*
12635         after a package.type to be resoled as expression names.
12636         (find_applicable_accessible_methods_list): Save/restore `class' to
12637         isolate it from a possible outer context search.
12638
12639 2000-02-15  Tom Tromey  <tromey@cygnus.com>
12640
12641         * gjavah.c (jni_print_char): New function.
12642         (print_full_cxx_name): Use it.
12643         (decode_signature_piece): Likewise.
12644         (print_cxx_classname): Likewise.
12645
12646 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12647
12648         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12649         version.o.
12650         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12651
12652         * gjavah.c: Include version.h.
12653
12654         * jcf-dump.c: Likewise.
12655
12656         * jv-scan.c: Likewise.
12657
12658 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12659
12660         * parse.y (outer_field_access_fix): First parameter now a tree
12661         node. Check for assignment to final. First argument to
12662         build_outer_field_access_fix modified to accommodate prototype.
12663         (build_outer_field_access): Don't check for assignment to final
12664         here.
12665         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12666         possibly returned by outer_field_access_fix. Changed
12667         outer_field_access_fix's first argument.
12668         (check_final_assignment): $finit$'s context is OK.
12669         (patch_unaryop): Use node instead of its line/column value when
12670         calling outer_field_access_fix.
12671
12672 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12673
12674         * parse.y (interface_declaration:): No longer tagged
12675         <node>. Re-installed default action.
12676         (class_member_declaration:): Handle inner interfaces.
12677         (interface_member_declaration): Handle inner interfaces and
12678         classes.
12679         (create_interface): Push error if one seen. Suspend parsing
12680         context when processing an inner interface.
12681         (register_fields): Inner class static field limitations not to
12682         apply to inner interfaces.
12683
12684 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12685
12686         * jcf-parse.c (load_class): Update `java_error_count' when a
12687         class' file can't be found.
12688         (parse.y): Avoid (byte)code generation when errors seen.
12689
12690 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12691
12692         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12693         decodes a valid node.
12694         (patch_binop): Handle TRUNC_DIV_EXPR.
12695
12696 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12697
12698         * parse.y (resolve_package): New local `acc'. Try to progressively
12699         build and guess a package and type name.
12700
12701 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12702
12703         * parse.y (find_applicable_accessible_methods_list): Load and
12704         layout the search class if necessary.
12705         (java_complete_tree): Keep to original type of the folded initial
12706         value.
12707
12708 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12709
12710         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12711         Generate error message if circularity is detected. New static
12712         local `list'.
12713         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
12714         * jcf-write.c (generate_bytecode_insns): Very simply handle
12715         SAVE_EXPR.
12716         * parse.y (java_check_circular_reference): Use
12717         `cyclic_inheritance_report' during report, if necessary.
12718         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12719         walking NEW_ARRAY_INIT twice.
12720
12721 2000-02-09  Tom Tromey  <tromey@cygnus.com>
12722
12723         * parse.y (check_class_interface_creation): Allow inner classes to
12724         be `private' or `protected', check modifiers' consistency. Prevent
12725         block local classes from bearing any modifiers.
12726
12727 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12728
12729         * except.c (check_start_handlers): Re-add prototype lost in last
12730         patch.
12731         (maybe_start_try): Remove excess argument to `check_start_handlers'.
12732
12733 2000-02-09  Andrew Haley  <aph@cygnus.com>
12734
12735         * decl.c (clear_binding_level): Remove excess initializer.
12736         (maybe_poplevels): Remove unused variable.
12737         (force_poplevels): Ditto.
12738         (struct binding_level): Add comment.
12739
12740 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12741
12742         * jcf-write.c (generate_classfile): Don't consider
12743         pre-initialization with reference value (use <clinit> instead.)
12744         * parse.y (java_fix_constructors): No generated constructor for
12745         interfaces.
12746         (build_outer_field_access): Removed debug message.
12747         (outer_field_expanded_access_p): Adapted to bytecode generation.
12748         (build_outer_field_access_method): Use fix_method_argument_names.
12749         (build_outer_method_access_method): Fixed indentation. Added
12750         comment. Handle access method generation for static and also void
12751         methods.
12752         (build_access_to_thisn): Inserted debug message.
12753         (maybe_build_thisn_access_method): Use fix_method_argument_names.
12754         (resolve_qualified_expression_name): Fixed comment.
12755         (not_accessible_p): Adapted to bytecode generation. Added comment.
12756         (patch_method_invocation): Added comment.
12757         (maybe_use_access_method): Fixed leading comment. Handle static
12758         methods.
12759         (java_complete_lhs): Don't shortcut handling of initialized upon
12760         declaration String type static fields when generating bytecode.
12761         (patch_unaryop): Handle outer field access when generating
12762         bytecode.
12763
12764 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12765
12766         * java-tree.h (FIELD_THISN): New macro.
12767         * jcf-write.c (append_synthetic_attribute): New function.
12768         (generate_classfile): Set "Synthetic" attribute on this$<n>,
12769         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
12770         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
12771         this$<n> fields.
12772         (build_outer_field_access): Turned on access functions usage and
12773         generation when compiling to bytecode.
12774         (maybe_use_access_method): Likewise.
12775
12776 2000-01-25  Andrew Haley  <aph@cygnus.com>
12777
12778         * java-except.h (struct eh_range): Add `expanded' field.
12779         (maybe_start_try): Add end_pc arg.
12780         (maybe_end_try): Ditto.
12781         * java-tree.h (force_poplevels): new function.
12782         * expr.c (expand_byte_code): Don't call maybe_start_try or
12783         maybe_end_try.
12784         * except.c (add_handler): Reset expanded.
12785         (expand_start_java_handler): Set expanded.
12786         (check_start_handlers): Don't expand a start handler that's
12787         already been expanded.
12788         (maybe_start_try): Add end_pc arg.  Only expand a handler which
12789         ends after end_pc.
12790         (expand_end_java_handler): call force_poplevels.
12791         (force_poplevels): new function.
12792         * decl.c (binding_level): Add start_pc of binding level.
12793         (maybe_pushlevels): Call maybe_start_try when pushing binding
12794         levels.
12795         (maybe_poplevels): Call maybe_end_try when popping binding levels.
12796         (LARGEST_PC): Define.
12797         (clear_binding_level): Use LARGEST_PC.
12798
12799         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12800         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12801         (binding_depth, is_class_level, current_pc): new variables.
12802         (struct binding_level): ditto.
12803         (indent): new function.
12804         (push_jvm_slot): add debugging info.
12805         (maybe_pushlevels): ditto.
12806         (maybe_poplevels): ditto.
12807         (pushlevel): ditto.
12808         (poplevel): ditto.
12809         (start_java_method): ditto.
12810         (give_name_to_locals): comment only.
12811         * except.c (binding_depth, is_class_level, current_pc):
12812         new variables.
12813         (expand_start_java_handler): add debugging info.
12814         (expand_end_java_handler): ditto.
12815
12816 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12817
12818         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12819         (print_name_for_stub_or_jni, process_file): Constify a char*.
12820
12821 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12822
12823         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12824
12825 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12826
12827         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12828         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12829         defined to be 1.
12830
12831 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12832
12833         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12834         * java-tree.h (TYPE_II_STMT_LIST): New macro.
12835         (struct lang_type): New field `ii_block'.
12836         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12837         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12838         * parse.h (struct parser_ctxt): New field `instance_initializers'.
12839         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12840         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12841         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
12842         macros.
12843         * parse.y (add_instance_initializer): New function.
12844         (in_instance_initializer): New static global.
12845         (class_body_declaration:): Link instance initializer block.
12846         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
12847         (array_creation_expression:): Remove unused local.
12848         (java_parser_context_push_initialized_field): Fixed leading
12849         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
12850         CPC_INSTANCE_INITIALIZER_LIST.
12851         (java_parser_context_pop_initialized_field): Likewise.
12852         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
12853         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
12854         CPC_INITIALIZER_STMT.
12855         (fix_constructors): New local `class_type'. Use it. Call
12856         add_instance_initializer.
12857         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
12858         (patch_return): Forbid return in instance initializers.
12859         (patch_throw_statement): Enforce exception handling in the context
12860         of instance initializers.
12861
12862 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12863
12864         * Make-lang.in (java.mostlyclean): Remove executables in
12865         `mostlyclean'.
12866
12867 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12868
12869         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
12870         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
12871         (java_float_finite): Convert to use union Word from javaop.h.
12872         (java_double_finite): Convert to use union DWord from javaop.h.
12873
12874 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12875
12876         * gjavah.c (options): Added `jni' entry.
12877         (help): Document -jni.
12878         (flag_jni): New global.
12879         (process_file): Handle JNI output.  Don't print text from
12880         -prepend, -add, etc, when generating stubs.  Only remove `.class'
12881         suffix if it actually exists.
12882         (main): Create a `.c' file when run with `--jni --stubs'.  Create
12883         correct output file name with `--jni'.
12884         (print_include): Mangle header name differently in JNI case.
12885         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
12886         method list.
12887         (print_method_info): Handle JNI case.  Put signature info into
12888         method name.  Handle case when STREAM is NULL.
12889         (print_name_for_stub_or_jni): New function.
12890         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
12891         (print_cxx_classname): Handle JNI.
12892         (print_full_cxx_name): Likewise.
12893         (decode_signature_piece): Likewise.
12894         (overloaded_jni_method_exists_p): New function.
12895         (struct method_name): Added `signature' and `sig_length' fields.
12896         (HANDLE_END_FIELD): Do nothing in JNI mode.
12897
12898 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12899
12900         * jv-scan.c: Include version.c, <getopt.h>.
12901         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
12902         (options): New array.
12903         (usage): New function.
12904         (version): New function.
12905         (main): Use getopt_long to parse command line.
12906         * jcf-dump.c: Include version.c, <getopt.h>.
12907         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
12908         OPT_JAVAP): New macros.
12909         (options): New array.
12910         (usage): Return `void'.  Changed message.
12911         (help): New function.
12912         (version): New function.
12913         (main): Use getopt_long_only to parse command line.
12914         * gjavah.c: Include <getopt.h>.
12915         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
12916         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
12917         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
12918         (options): New array.
12919         (java_no_argument): Removed.
12920         (help): Updated with missing options.
12921         (main): Use getopt_long_only to parse command line.
12922         (usage): Changed message.
12923
12924 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12925
12926         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
12927         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
12928         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
12929         * parse.y (array_creation_expression:): Handle anonymous arrays.
12930         (build_array_from_name): Don't set `ret_name' if null.
12931         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
12932         (qualify_ambiguous_name): Likewise.
12933         (java_complete_expand_class): Likewise.
12934
12935 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12936
12937         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
12938         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
12939         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
12940         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
12941         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
12942         AIPL_FUNCTION_COMPLETED_INVOCATION.
12943         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
12944         AIPL_FUNCTION_INVOCATION_READY.
12945         (AIPL_FUNCTION_DECLARATION): New enum entry.
12946         * parse.y (reorder_static_initialized): New function.
12947         (java_parser_context_pop_initialized_field): Use it.
12948         (add_inner_class_fields): Use
12949         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
12950         augmented. Install marker after last alias initializer, if any.
12951         (generate_finit): Fixed typo. Don't try to retain only the used
12952         fields.
12953         (method_header): Compute and set DECL_FUNCTION_NAP.
12954         (method_declarator): Fixed comment. Insert alias initializer in
12955         parameter list.
12956         (build_alias_initializer_parameter_list): Fixed leading
12957         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
12958         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
12959         (java_complete_expand_class): Code to retain only used aliases
12960         removed.
12961         (java_complete_expand_methods): New local `first_decl'. Generate
12962         $finit$ first, then expand the constructors, regular methods and
12963         <clinit>.
12964         (java_complete_expand_method): Don't report error on missing
12965         return statement if previously detected bogus.
12966         (fix_constructors): Don't patch constructor parameters list.
12967         (patch_method_invocation): Use new AIPL enum values. Reverse
12968         alias initializer list for anonymous classes.
12969
12970 2000-01-30  Anthony Green  <green@redhat.com>
12971
12972         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
12973         determine how many stack slots to pop.
12974
12975 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12976
12977         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
12978         error handling/recovery.
12979         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
12980
12981 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12982
12983         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
12984         FIELD_LOCAL_ALIAS_USED): New macros.
12985         (DECL_FUNCTION_NAP): New macro.
12986         (struct lang_decl): New field `nap'.
12987         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
12988         (struct lang_type): New fields `finit_stmt_list' and
12989         `clinit_stmt_list'.
12990         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
12991         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
12992         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
12993         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
12994         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
12995         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
12996         (BUILD_THROW): Macro line separator re-indented.
12997         * parse.y (end_class_declaration): New function.
12998         (maybe_generate_pre_expand_clinit): New name for
12999         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13000         pre-expand static fields.
13001         (maybe_generate_clinit): Function deleted.
13002         (check_for_static_method_reference): Prototype's parameter list
13003         indented.
13004         (generate_finit): New name for maybe_generate_finit. Changed
13005         leading comment. Function rewritten to use
13006         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13007         (build_alias_initializer_parameter_list): New function.
13008         (java_parser_context_pop_initialized_field): Likewise.
13009         (add_inner_class_fields): Likewise.
13010         (type_declaration:): Call end_class_declaration.
13011         (class_member_declaration:): Likewise.
13012         (formal_parameter_list:): Fixed typos.
13013         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13014         element. Improved error handling.
13015         (block_statement:): Call end_class_declaration.
13016         (anonymous_class_creation:): Likewise.
13017         (create_anonymous_class): Fixed comments.
13018         (create_class): Call add_inner_class_fields.
13019         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13020         (method_header): Use MARK_FINAL_PARMS.
13021         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13022         (method_declarator): Propagate final argument flag.
13023         (craft_constructor): New local `artificial'. Call
13024         build_alias_initializer_parameter_list. Use
13025         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13026         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13027         necessary.
13028         (complete_expand_class): Get rid of unused outer context local
13029         alias fields.
13030         (java_complete_expand_methods): Fixed leading
13031         comment. Generate/pre-expand <clinit> first. Changed method
13032         expansion order to regular, $finit$, constructors, <clinit>.
13033         (java_complete_expand_method): Set current_function_decl.
13034         (fix_constructors): Fix constructor parameter list to account for
13035         outer context local alias initializers.
13036         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13037         (resolve_expression_name): Lookup outer context local aliases. New
13038         local `access', use it.
13039         (patch_method_invocation): Patch inner class ctor invocation with
13040         outer context local aliases initialization values. $finit$
13041         invocation patching now includes things generated with
13042         build_alias_initializer_parameter_list.
13043         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13044         (build_super_invocation): Likewise.
13045         (patch_assignment): Changed comment.
13046
13047 2000-01-27  Andrew Haley  <aph@cygnus.com>
13048
13049         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13050         (emit_if): Ditto.
13051         (emit_jsr): Ditto.
13052
13053 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13054
13055         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13056         concatenation.
13057         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13058
13059         * parse.y (register_fields): Don't pass a format specifier to
13060         OBSOLETE_MODIFIER_WARNING.
13061         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13062         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13063         specifier.
13064         (check_modifiers): Change function into a macro.
13065         (check_class_interface_creation): Pass a literal format string.
13066
13067 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13068
13069         * buffer.h: PROTO -> PARAMS.
13070         * check-init.c: Likewise.
13071         * class.c: Likewise.
13072         * constants.c: Likewise.
13073         * convert.h: Likewise.
13074         * decl.c: Likewise.
13075         * except.c: Likewise.
13076         * expr.c: Likewise.
13077         * gjavah.c: Likewise.
13078         * java-except.h: Likewise.
13079         * java-tree.h: Likewise.
13080         * jcf-depend.c: Likewise.
13081         * jcf-dump.c: Likewise.
13082         * jcf-parse.c: Likewise.
13083         * jcf-path.c: Likewise.
13084         * jcf-reader.c: Likewise.
13085         * jcf-write.c: Likewise.
13086         * jcf.h: Likewise.
13087         * jv-scan.c: Likewise.
13088         * jvgenmain.c: Likewise.
13089         * jvspec.c: Likewise.
13090         * lang.c: Likewise.
13091         * lex.c: Likewise.
13092         * lex.h: Likewise.
13093         * parse-scan.y: Likewise.
13094         * parse.h: Likewise.
13095         * parse.y: Likewise.
13096         * typeck.c: Likewise.
13097         * verify.c: Likewise.
13098         * xref.c: Likewise.
13099         * xref.h: Likewise.
13100         * zextract.c: Likewise.
13101         * zipfile.h: Likewise.
13102
13103 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13104
13105         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13106         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13107         * constants.c (build_constant_data_ref): Check for cached
13108         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13109         in TYPE_CPOOL_DATE_REF.
13110         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13111         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13112         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13113         (LOCAL_FINAL): New macro.
13114         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13115         constant pool -- don't try to reuse.
13116         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13117         TYPE_LANG_SPECIFIC.
13118         (find_in_current_zip): Use TYPE_JCF.
13119         * parse.h (java_check_final): Prototype removed.
13120         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13121         (maybe_create_class_interface_decl,
13122         check_class_interface_creation): Likewise.
13123         (java_expand_finals): Function removed.
13124         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13125         (block_statement:): Fixed comment.
13126         (anonymous_class_creation:): Likewise.
13127         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13128         argument patch.
13129         (check_class_interface_creation): Loosened error report on (inner)
13130         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13131         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13132         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13133         argument patch.
13134         (create_interface): Likewise.
13135         (anonymous_class_counter): New static global.
13136         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13137         patch. Fixed comments.
13138         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13139         anonymous_class_counter when declaring a toplevel class.
13140         (craft_constructor): Fixed constructor name when handling
13141         anonymous classes. Anonymous class constructors to feature hidden
13142         this$<n> parameter.
13143         (java_fix_constructors): Added comment.
13144         (java_check_final): Function removed.
13145         (java_complete_expand_methods): Fixed comment. Don't generate
13146         class data, save its outgoing constant pool instead.
13147         (verify_constructor_super): Skip anonymous class constructor
13148         hidden this$<n> parameter.
13149         (java_expand_classes): New local `saved_ctxp'. Removed call to
13150         java_expand_finals and java_check_final. Expand anonymous class
13151         constructors. Generate class data.
13152         (build_super_invocation): Skip anonymous class hidden this$<n>
13153         parameter.
13154         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13155         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13156         (set_java_signature): Likewise.
13157
13158 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13159
13160         * gjavah.c: Delete ACC_VISIBILITY define.
13161         * jcf.h: Add ACC_VISIBILITY define.
13162         * parse.y: final: rule tagged <value>.
13163         (java_check_regular_methods): Use ACC_VISIBILITY define for
13164         default package access check.
13165         (local_variable_declaration_statement): Use final: rule.
13166
13167 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13168
13169         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13170         (final:): New rule.
13171
13172 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13173
13174         * gjavah.c (print_field_info): Allow non-static final fields.
13175
13176 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13177
13178         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13179         * parse.y (patch_anonymous_class): New function.
13180         (create_anonymous_class): Register incomplete type when the
13181         class/interface to extends/implement isn't known yet.
13182         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13183         (verify_constructor_super): Tuned error message.
13184
13185 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13186
13187         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13188         (ANONYMOUS_CLASS_P): New macro.
13189         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13190         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13191         * parse.y (create_class): Added leading argument.
13192         (maybe_create_class_interface_decl,
13193         check_class_interface_creation): Likewise.
13194         (craft_constructor): New function.
13195         (verify_constructor_super): Added argument in prototype.
13196         (class_declaration:): Inserted leading argument.
13197         (for_begin:): Use FOR_LOOP_P.
13198         (anonymous_class_creation): Create WFL of the anonymous class to
13199         instantiate. Call build_new_invocation. Added comments.
13200         (check_class_interface_creation): Handle parameter `anonymous' in
13201         verbose mode class creation announce.
13202         (link_nested_class_to_enclosing): Exclude anonymous classes.
13203         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13204         anonymous class, even though they appear to have an enclosing
13205         context.
13206         (create_interface): Pass extra argument to
13207         check_class_interface_creation.
13208         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13209         (create_class): Call check_class_interface_creation and
13210         maybe_create_class_interface_decl with extra new argument. Don't
13211         add private this$<n> to anonymous classes.
13212         (method_declarator): Insert hidden this$<n> to anonymous class
13213         constructors.
13214         (java_fix_constructors): Deleted code creating default
13215         constructor. Call craft_constructor instead.
13216         (java_check_regular_methods): Set `saw_constructor' to 1 for
13217         anonymous classes.
13218         (fix_constructors): Pass extra argument to verify_constructor_super.
13219         (verify_constructor_super): New local `sdecl', use it. Search for
13220         matching constructor (possibly featuring arguments) in super
13221         class.
13222         (lookup_method_invoke): Craft constructor according to arguments
13223         list when dealing with anonymous class constructors.
13224         (build_super_invocation): Pass arguments to anonymous class super
13225         constructors.
13226         (search_loop): Use FOR_LOOP_P.
13227         (labeled_block_contains_loop_p): Likewise.
13228
13229 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13230
13231         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13232         (enclosing_context_p): New function.
13233         (get_access_flags_from_decl): Handle CLASS_STATIC.
13234         (maybe_layout_super_class): Extra first argument passed to
13235         do_resolve_class.
13236         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13237         ID_INIT_P.
13238         * decl.c (access0_identifier_node): New global.
13239         (init_decl_processing): access0_identifier_node initialized.
13240         (pushdecl): Set DECL_CONTEXT only on non type decls.
13241         * expr.c (lookup_field): Lookup inner class fields in enclosing
13242         contexts.
13243         (expand_invoke): Use ID_INIT_P.
13244         (expand_java_field_op): Use DECL_CLINIT_P.
13245         * java-tree.def (CLASS_LITERAL): New tree code.
13246         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13247         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13248         (struct lang_decl): New field `inner_access'.
13249         (enclosing_context_p): Prototyped.
13250         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13251         ID_CLINIT_P): New macros.
13252         (CLASS_STATIC): New macro.
13253         (CLASS_ACCESS0_GENERATED_P): New macro.
13254         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13255         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13256         INNER_CLASS_P): New macros.
13257         (DECL_INNER_CLASS_LIST): New macro.
13258         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13259         concatenation.
13260         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13261         the shift value to int. Fixed typo in comment.
13262         * lex.c (inst_id, wpv_id): Initialize.
13263         * mangle.c (unicode_mangling_length): Take `$' into account.
13264         * parse.h (DRECOVER, RECOVER): Terminate properly.
13265         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13266         (typedef struct _jdep): New field `enclosing'.
13267         (JDEP_ENCLOSING): New macro.
13268         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13269         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13270         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13271         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13272         GET_ENCLOSING_CPC_CONTEXT): New macros.
13273         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13274         (do_resolve_class): Added extra argument in prototype.
13275         * parse.y (resolve_class): Added extra argument in prototype.
13276         (maybe_create_class_interface_decl): Likewise.
13277         (maybe_use_access_method, build_wfl_wrap): New functions.
13278         (java_complete_expand_classes, java_complete_expand_class):
13279         Likewise.
13280         (java_parser_context_push_initialized_field,
13281         java_parser_context_suspend, java_parser_context_resume):
13282         Likewise.
13283         (maybe_make_nested_class_name, make_nested_class_name,
13284         set_nested_class_simple_name_value,
13285         link_nested_class_to_enclosing, find_as_inner_class,
13286         find_as_inner_class_do, check_inner_class_redefinition,
13287         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13288         maybe_build_thisn_access_method, build_outer_field_access,
13289         build_outer_field_access_methods, build_outer_field_access_expr,
13290         build_outer_method_access_method, build_new_access_id,
13291         build_outer_field_access_method, outer_field_access_p,
13292         outer_field_expanded_access_p, outer_field_access_fix,
13293         build_incomplete_class_ref, patch_incomplete_class_ref,
13294         create_anonymous_class): Likewise.
13295         (inst_id, wpv_id): New static global variables.
13296         (synchronized:): New rule, tagged <node>.
13297         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13298         rules.
13299         (anonymous_class_creation:): New rule, tagged <node>.
13300         (NEW_TK): Tagged <node>.
13301         (type_literals, array_type_literal): New rules, tagged <node>.
13302         (class_declaration:): Removed action when reducing by class_body:
13303         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13304         using GET_CPC in sub-rules.
13305         (class_member_declaration): Handle inner classes.
13306         (method_declaration): When reducing method_header:, reset
13307         current_function_decl when appropriate.
13308         (method_declarator:): Set the number of formal parameter to 0 for
13309         method declared without arguments.
13310         (constructor_declarator:): Likewise.
13311         (static_initializer:): List of elements kept in a list.
13312         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13313         use of the keyword `static' for type declarations.
13314         (block_statement:): Handle inner class declarations.
13315         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13316         type qualified `this'.
13317         (class_instance_creation_expression): Use anonymous_class_creation:
13318         to handle inner class instances creation. Handle qualified `new'.
13319         (something_dot_new): Added appropriate actions.
13320         (create_new_parser_context): New function.
13321         (java_push_parser_context, java_parser_context_save_global,
13322         java_parser_context_suspend): Use create_new_parser_context.
13323         (check_modifiers): Changed leading comment.
13324         (check_class_interface_creation): Handle interclasses.
13325         (add_superinterfaces): Fixed comment.
13326         (create_interface): Build qualified name from the raw_name instead
13327         of its matching WFL. Push the initialized fields list. raw_name added
13328         as an extra argument to maybe_create_class_interface_decl.
13329         (create_class): Build qualified name from the raw_name instead of
13330         its matching WFL. Removed assignment to current_parsed_class_un.
13331         Call PUSH_ERROR before returning an error. Suspend the current
13332         parser context when processing an inner class. Push the
13333         initialized fields list. raw_name added as an extra argument to
13334         maybe_create_class_interface_decl. Add the private this$<n>
13335         field.
13336         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13337         (register_fields): Get the class type from GET_CPC and handle
13338         previous errors.  Added code to handle the creation of static
13339         fields in inner classes. Initialized fields initialization
13340         statements kept in a list of lists.
13341         (maybe_generate_finit): Initialized fields initialization
13342         statements kept in a list of lists. Use GET_CPC.
13343         (maybe_generate_clinit): Likewise.
13344         (method_header): Use GET_CPC and GET_CPC_UN.
13345         (parser_qualified_classname): Handle inner classes.
13346         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13347         (java_fix_constructors): Hide pointer to enclosing context
13348         instance in constructor list when dealing with inner classes.
13349         (jdep_resolve_class): Call resolve_class with extra first argument
13350         JDEP_ENCLOSING.
13351         (resolve_class): Add enclosing context as a first extra argument
13352         to do_resolve_class.
13353         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13354         properly.
13355         (resolve_no_layout): Extra argument added to resolve_class
13356         invocation.
13357         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13358         (java_get_real_method_name): Use GET_CPC_UN.
13359         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13360         (java_check_abstract_methods): Handle static method declared in
13361         inner classes by an error.
13362         (java_check_regular_methods): Use DECL_CLINIT_P.
13363         (source_start_java_method): Also set DECL_MAX_LOCALS.
13364         (create_artificial_method): Call java_parser_context_save_global
13365         and java_parser_context_restore_global instead of saving/restoring
13366         the context by hand.
13367         (expand_start_java_method): Improved verbose mode message.
13368         (java_complete_expand_methods): Fixed leading comment. Use
13369         DECL_CLINIT_P.
13370         (fix_constructors): Added assignment to this$<n> if necessary.
13371         (java_expand_classes): Call java_complete_expand_classes instead
13372         of java_complete_expand_methods.
13373         (make_qualified_primary): Simplified.
13374         (merge_qualified_name): Optimized for missing left or right parts.
13375         (resolve_expression_name): Handle access to outer class fields from
13376         interclasses.
13377         (resolve_qualified_expression_name): New macro
13378         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13379         classes. Report error on non appropriate qualification of
13380         `new'. Handle qualified `this'.
13381         (not_accessible_p): Allow access to outer class private fields from
13382         inner classes.
13383         (patch_method_invocation): Handle method invocations through
13384         access methods and inner class constructor invocations.
13385         (find_applicable_accessible_methods_list): Search enclosing
13386         contexts of an inner class.
13387         (search_applicable_methods_list): Fixed typo.
13388         (argument_types_convertible): Handle inner class constructors'
13389         hidden outer context reference argument.
13390         (qualify_ambiguous_name): Handle qualified `this'.
13391         (java_complete_lhs): Handle use of field accessed through
13392         artificial access methods in various cases of assignments. Handle
13393         CLASS_LITERAL node.
13394         (check_final_assignment): Use DECL_CLINIT_P.
13395         (valid_ref_assignconv_cast_p): Handle the destination being an
13396         enclosing context of the source.
13397         (patch_unaryop): Handle use of field accessed through artificial
13398         access methods.
13399         (patch_return): Use DECL_CLINIT_P.
13400         (patch_throw_statement): Use DECL_CLINIT_P.
13401         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13402         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13403         ID_INIT_P.
13404
13405 2000-01-16  Anthony Green  <green@cygnus.com>
13406
13407         * parse.y (build_string_concatenation): Only use
13408         StringBuffer(String) shortcut if String arg is constant.
13409
13410 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13411
13412         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13413         the shift value to int. Fixed typo in comment.
13414
13415 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13416
13417         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13418         * jcf-write.c: Likewise.
13419         * parse.y: Likewise.
13420         * parse.c: Regenerate.
13421
13422 2000-01-09  Anthony Green  <green@cygnus.com>
13423
13424         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13425         bytecodes in the correct order.
13426
13427 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13428
13429         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13430
13431 2000-01-06  Anthony Green  <green@cygnus.com>
13432
13433         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13434         before building constant array decl.
13435
13436 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13437
13438         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13439         method invocation and typo in conditional expression.
13440         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13441         the appropriate NOTE_POP.
13442         * parse.y (patch_binop): Shift value mask to feature the right
13443         type.
13444
13445 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13446
13447         * class.c (assume_compiled, assume_compiled_node): Add static
13448         prototype.
13449         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13450
13451         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13452
13453         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13454
13455         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13456         to `__modifier' to avoid stringifying it.
13457
13458         * parse.y (verify_constructor_circularity): Don't call a variadic
13459         function with a non-literal format string.
13460         (java_check_abstract_methods): Move unreachable code inside
13461         `continue' statement.
13462         (lookup_method_invoke): Call xstrdup, not strdup.
13463
13464         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13465         concatenation.
13466
13467         * jcf-parse.c (yyparse): Likewise.
13468
13469         * jv-scan.c (main): Likewise.
13470
13471 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13472
13473         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13474         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13475         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13476         concatenation.
13477
13478         * parse.y (synchronized, variable_redefinition_error,
13479         check_class_interface_creation, create_interface, create_class,
13480         method_header, finish_method_declaration,
13481         check_modifiers_consistency, method_declarator,
13482         complete_class_report_errors, check_abstract_method_definitions,
13483         java_check_regular_methods, check_throws_clauses,
13484         java_check_abstract_methods, read_import_dir,
13485         check_pkg_class_access, declare_local_variables, fix_constructors,
13486         cut_identifier_in_qualified, resolve_expression_name,
13487         resolve_qualified_expression_name, patch_method_invocation,
13488         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13489         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13490         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13491         patch_try_statement, patch_synchronized_statement,
13492         patch_throw_statement, check_thrown_exceptions,
13493         patch_conditional_expr): Likewise.
13494
13495 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13496
13497         * Makefile.in (LIBDEPS): Added gcc's errors.o
13498         (../jcf-dump$(exeext):): Link with gcc's errors.o
13499         (../gcjh$(exeext):): Likewise.
13500         * expr.c (expand_java_NEW): Layout the entire target type instead of
13501         laying out its methods only.
13502         (lookup_field): Layout the class after having loaded it.
13503         * java-tree.h (java_debug_context): Declared.
13504         * jcf-io.c (toplev.h): Included.
13505         (find_class): Removed assignment to jcf's outofsynch
13506         field. Force source file to be read if newer than its matching
13507         class file. Tweaked debug messages.
13508         * jcf-parse.c (jcf_out_of_synch): Deleted.
13509         (read_class): Call to jcf_out_of_synch removed.
13510         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13511         (jcf_out_of_synch): Prototype deleted.
13512         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13513         `deprecated' and `class_err': integer turned into bit-fields.
13514         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13515         * parse.y (package_list): New global.
13516         (package_declaration:): Record newly parsed package name.
13517         (extra_ctxp_pushed_p): Static global deleted.
13518         (java_parser_context_save_global): Create buffer context for the
13519         purpose of saving globals, if necessary.
13520         (java_parser_context_restore_global): Pop context pushed for the
13521         purpose of saving globals, if necessary.
13522         (java_debug_context_do): New prototype and function.
13523         (java_debug_context): Likewise.
13524         (do_resolve_class): Use already parsed package names to qualify
13525         and lookup class candidate.
13526         (java_pre_expand_clinit): Removed unnecessary local variable.
13527
13528 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13529
13530         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
13531         fixes PR gcj/119.
13532         (process_file): Use `\n\' at end of each line in string.
13533
13534 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13535
13536         * expr.c (expand_invoke): Layout the loaded class before
13537         attempting to use it.
13538         (expand_java_field_op): Allow final field assignments to take
13539         place in $finit$.
13540         * typeck.c (convert): Return error_mark_node if expr is null.
13541
13542 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13543
13544         * class.c (class_depth): Return -1 if the class doesn't load
13545         properly.
13546         * expr.c (can_widen_reference_to): Check for errors during depth
13547         computation and return 0 accordingly.
13548         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13549         create default constructors and add an other error check.
13550         * parse.h (java_fix_constructors): Prototyped.
13551         * parse.y (java_pre_expand_clinit): Likewise.
13552         (build_super_invocation): Re-prototyped to feature one argument.
13553         (java_check_circular_reference): Directly use `current'.
13554         (java_fix_constructors): New function.
13555         (java_check_regular_methods): Don't create default constructors
13556         here, but abort if none were found.
13557         (java_complete_expand_methods): Pre-process <clinit> calling
13558         java_pre_expand_clinit.
13559         (java_pre_expand_clinit): New function.
13560         (fix_constructors): build_super_invocation invoked with the
13561         current method declaration as an argument.
13562         (build_super_invocation): Use the context of the processed method
13563         decl argument instead of current_class.
13564         * typeck.c (lookup_java_method): Take WFLs in method names into
13565         account.
13566
13567 1999-12-14  Per Bothner  <per@bothner.com>
13568
13569         * class.c (make_class_data): flag_keep_inline_functions to keep
13570         private methods in the method array.
13571
13572 1999-12-15  Anthony Green  <green@cygnus.com>
13573
13574         * check-init.c (check_init): Take into account both types of
13575         `throw's when checking for uninitialized variables.
13576
13577 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13578
13579         * parse.y (java_complete_lhs): Force conversion of array
13580         dimensions to int_type_node, that's what runtime's ABI expects.
13581
13582 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13583
13584         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13585         operand of a WFL, until the Java front-end gets fixed with regard
13586         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13587
13588 1999-12-10  Andrew Haley  <aph@cygnus.com>
13589
13590         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13591         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13592         expr.c (build_java_athrow): Add support for sjlj-exceptions.
13593         java-tree.h: Ditto.
13594         jcf-write.c: Ditto.
13595
13596 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13597
13598         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13599         before calling expand_eh_region_start and expand_start_all_catch.
13600         * except.c (expand_start_java_handler): Switch to permanent
13601         obstack before calling expand_eh_region_start.
13602         (expand_end_java_handler): Switch to permanent obstack before
13603         calling expand_start_all_catch.
13604
13605 1999-12-5  Anthony Green  <green@cygnus.com>
13606
13607         * decl.c (init_decl_processing): Mark throw_node as a noreturn
13608         function with side effects.
13609         (init_decl_processing): Mark all memory allocating DECLs with
13610         DECL_IS_MALLOC.
13611
13612 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13613
13614         * except.c (expand_end_java_handler): Call
13615         expand_resume_after_catch and end_catch_handler.
13616
13617 1999-11-30  Anthony Green  <green@cygnus.com>
13618
13619         * verify.c (verify_jvm_instructions): Create new return label
13620         chain if non existent (don't rely on the verified state of the jsr
13621         target.)
13622
13623 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13624
13625         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13626         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13627
13628         * parse.y (patch_assignment): Removed bogus final class test on
13629         lhs when checking on whether to emit an ArrayStoreException runtime
13630         check.
13631         * expr.c (expand_java_arraystore): Likewise.
13632
13633 1999-11-28 Anthony Green <green@cygnus.com>
13634
13635         * decl.c (find_local_variable): Reuse single slot decls when
13636           appropriate.
13637
13638 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13639
13640         * jcf-parse.c (saw_java_source): Global variable removed.
13641         (read_class): Don't use `saw_java_source'. Added extra braces.
13642         (yyparse): Code setting `saw_java_source' removed.
13643
13644 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
13645
13646         * except.c (emit_handlers): Zero catch_clauses after emitting them.
13647
13648 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13649
13650         * verify.c (merge_type_state): Non verified subroutines being
13651         considered more than once to trigger passive type merge.
13652
13653 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13654
13655         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13656         in case of error. Error message tuned.
13657
13658 1999-11-21  Anthony Green  <green@cygnus.com>
13659
13660         * constants.c (find_methodref_index): Unwrap method names before
13661         inserting them in the constant pool.
13662
13663         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13664
13665         * class.c (assume_compiled_node): New typedef.
13666         (assume_compiled_tree): New static data.
13667         (find_assume_compiled_node): New function.
13668         (add_assume_compiled): New function.
13669         (assume_compiled): New function.
13670         * class.c (make_class_data): Use assume_compiled.
13671         (is_compiled_class): Use assume_compiled.
13672
13673         * java-tree.h (add_assume_compiled): Declare.
13674
13675         * lang.c (lang_decode_option): Parse new options.
13676
13677 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13678
13679         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13680         int_type_node: that's what `_Jv_AllocObject' expects.
13681
13682 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13683
13684         * parse.y (lookup_method_invoke): Use lang_printable_name to
13685         reliably build the type name during error report. Fixes PR gcj/97.
13686
13687 1999-11-09  Tom Tromey  <tromey@cygnus.com>
13688
13689         * jcf-path.c: Include <sys/stat.h>.
13690         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
13691         (DIR_UP): New macro.
13692
13693 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13694
13695         * parse.y (source_end_java_method): Resume permanent allocation,
13696         reversing Apr 27 1998 patch.
13697         (patch_string_cst): Pop obstacks after having pushed the permanent
13698         ones.
13699
13700 1999-11-05  Tom Tromey  <tromey@cygnus.com>
13701
13702         * class.c (finish_class): Emit inlined methods if any native
13703         methods exist in the class.  Fixes PR gcj/85.
13704
13705 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13706
13707         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13708         (qualify_ambiguous_name): Likewise.
13709
13710 1999-11-03  Godmar Back <gback@cs.utah.edu>
13711
13712         * typeck.c: (lookup_java_method):  search all inherited
13713         interfaces when looking up interface method.
13714
13715 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13716
13717         * parse.y (method_header:): Issue error message for rule `type
13718         error'.
13719         (synchronized:): Error report when not using synchronized.
13720
13721 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13722
13723         * parse.y (resolve_qualified_expression_name): Prevent `this' from
13724         being used before the superclass constructor has been called.
13725         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
13726         instead of `CALL_THIS_CONSTRUCTOR_P'.
13727
13728 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
13729
13730         * check-init.c: Fix typo in comment.
13731
13732 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13733
13734         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13735         and final method.
13736
13737 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13738
13739         * parse.y (expression_statement:): Call function to report
13740         improper invocation of a constructor.
13741         (parse_ctor_invocation_error): New function.
13742
13743 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
13744
13745         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13746         remember_end_note.
13747
13748 1999-10-21  Tom Tromey  <tromey@cygnus.com>
13749
13750         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13751         in generated `main'.
13752
13753 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13754
13755         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13756         (qualify_ambiguous_name): Likewise.
13757
13758 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13759
13760         * parse.y (java_complete_tree): fold_constant_for_init to work on
13761         permanent_obstack.
13762         (java_complete_lhs): Likewise.
13763         (array_constructor_check_entry): Complete an initializer element
13764         on permanent_obstack.
13765
13766 1999-10-19  Tom Tromey  <tromey@cygnus.com>
13767
13768         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13769         From Mike Moreton <mike@pillim.demon.co.uk>.
13770
13771 1999-10-15  Greg McGary  <gkm@gnu.org>
13772
13773         * java-tree.h (flag_bounds_check): Remove extern decl.
13774         * lang.c (flag_bounds_check): Remove global variable.
13775         (lang_f_options): Remove "bounds-check" entry.
13776         (lang_init_options): Default flag_bounds_check to "on".
13777
13778 1999-10-14  Tom Tromey  <tromey@cygnus.com>
13779
13780         * jvgenmain.c (usage): New function.
13781         (main): Use it.  Also, handle `-D' options.
13782         * jvspec.c (lang_specific_driver): Recognize -D.
13783         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13784
13785         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13786
13787 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13788
13789         * jcf-dump.c (print_constant, disassemble_method): Don't call a
13790         variadic function with a non-literal format string.
13791
13792         * parse-scan.y (report_main_declaration): Likewise.
13793
13794         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13795
13796         * parse.y (read_import_dir, patch_assignment, patch_binop,
13797         patch_array_ref): Likewise.
13798
13799         * typeck.c (build_java_array_type): Likewise.
13800
13801         * verify.c (verify_jvm_instructions): Likewise.
13802
13803 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13804
13805         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13806
13807 1999-10-07  Anthony Green  <green@cygnus.com>
13808
13809         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13810         where CHECK_PUT may fail for valid reasons.
13811
13812         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13813         UNSAFE_PUTN): New macros.
13814
13815 1999-10-04  Tom Tromey  <tromey@cygnus.com>
13816
13817         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13818         well.  Fixes Java PR gcj/59.
13819         * parse-scan.y (yyerror): Report errors.
13820
13821 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
13822
13823         * decl.c (insert_block): Remove unconditional `abort'.
13824
13825 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
13826
13827         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
13828         FUNCTION_CODE now of type int.  All callers changed.
13829         Set the builtin's DECL_BUILT_IN_CLASS.
13830
13831 1999-09-23  Tom Tromey  <tromey@cygnus.com>
13832
13833         * jvspec.c (lang_specific_driver): Don't read spec file if
13834         -fsyntax-only given.
13835
13836 1999-09-22  Tom Tromey  <tromey@cygnus.com>
13837
13838         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13839
13840         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13841         (WORDS_TO_LONG): Likewise.
13842         (WORDS_TO_DOUBLE): Likewise.
13843
13844 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13845
13846         * jcf-write.c (RELOCATION_VALUE_0): New macro.
13847         (RELOCATION_VALUE_1): Likewise.
13848         (emit_iinc, emit_reloc, push_constant1, push_constant2,
13849         push_in_const, push_long_const): Prototyped.
13850         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
13851         (push_constant2): Likewise.
13852         (push_int_const): Cast find_constant1's integer arguments to `jword'.
13853         (find_constant_wide): Cast find_constant2's integer arguments to
13854         `jword'.
13855         (find_constant_index): Cast find_constant2's and find_constant2's
13856         integer arguments to `jword'.
13857         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
13858         (emit_switch_reloc): Use RELOCATION_VALUE_0.
13859         (emit_if): Use RELOCATION_VALUE_1.
13860         (emit_goto): Likewise.
13861         (emit_jsr): Likewise.
13862         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
13863         argument to push_long_const to HOST_WIDE_INT.
13864
13865 1999-09-15  Andreas Schwab  <schwab@suse.de>
13866
13867         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
13868
13869 1999-09-20  Nick Clifton  <nickc@cygnus.com>
13870
13871         * lang.c (lang_decode_option): Extend comment.
13872
13873 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13874
13875         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
13876         instead of fndecl.
13877
13878 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13879
13880         * gjavah.c (get_field_name, print_method_info, print_include,
13881         add_namelet): Use xmalloc, not malloc.
13882
13883         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
13884         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
13885         NULL pointer.
13886
13887         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
13888
13889         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
13890
13891         * jcf-path.c (add_entry): Likewise.
13892
13893         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
13894
13895         * jv-scan.c (xmalloc): Remove definition.
13896
13897         * jvgenmain.c (xmalloc): Likewise.
13898
13899         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
13900
13901         * lex.c (java_store_unicode): Use xrealloc, not realloc.
13902
13903         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
13904         concat, not xmalloc/sprintf.
13905         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
13906         (xstrdup): Remove definition.
13907
13908         * parse.y (duplicate_declaration_error_p,
13909         constructor_circularity_msg, verify_constructor_circularity,
13910         check_abstract_method_definitions, java_check_regular_methods,
13911         java_check_abstract_methods, patch_method_invocation,
13912         check_for_static_method_reference, patch_assignment, patch_binop,
13913         patch_cast, array_constructor_check_entry, patch_return,
13914         patch_conditional_expr): Use xstrdup, not strdup.
13915
13916         * zextract.c (ALLOC): Use xmalloc, not malloc.
13917
13918 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13919
13920         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
13921
13922         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
13923         (do_spec, lang_specific_pre_link, lang_specific_driver,
13924         input_filename, input_filename_length): Don't declare.
13925         (main_class_name, jvgenmain_spec, lang_specific_driver):
13926         Constify a char*.
13927         (lang_specific_driver): All calls to the function pointer
13928         parameter now explicitly call `fatal'.
13929
13930 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13931
13932         * parse.y (find_applicable_accessible_methods_list): Search
13933         abstract classes as interfaces.
13934
13935 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13936
13937         * class.c (finish_class): We're now outside a valid method
13938         declaration. Tell the rest of gcc so.
13939
13940 1999-09-08  Bruce Korb  autogen@linuxbox.com
13941
13942         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
13943
13944 1999-09-07  Tom Tromey  <tromey@cygnus.com>
13945
13946         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
13947         java-array.h.
13948         (decode_signature_piece): Don't emit "::" in JArray<>.
13949         (print_namelet): Only print trailing `;' when printing a class.
13950
13951 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
13952
13953         * java-tree.h: Delete declarations for all tree nodes now moved to
13954         global_trees.
13955         * decl.c: Delete their definitions.
13956
13957 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
13958
13959         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
13960         * Makefile.in (OBJS): Add ggc-callbacks.o.
13961         (OBJDEPS): Likewise.
13962
13963 1999-09-03  Tom Tromey  <tromey@cygnus.com>
13964
13965         * parse.y (strip_out_static_field_access_decl): Return operand if
13966         it satisfies JDECL_P.
13967
13968 1999-09-02  Tom Tromey  <tromey@cygnus.com>
13969
13970         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
13971         Handle nested arrays, like `[[I'.
13972
13973 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13974
13975         * class.c (finish_class): Remove unused parameter, all callers
13976         changed.
13977
13978         * expr.c (build_java_athrow): Change return type to void.
13979         (java_lang_expand_expr): Make sure each case in switch returns a
13980         value.
13981
13982         * java-tree.h (finish_class): Fix prototype to take void args.
13983
13984         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
13985         (main): Issue return from main, not exit.
13986
13987         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
13988
13989         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
13990
13991         * jv-scan.c (main): Issue return from main, not exit.
13992
13993         * parse.y (check_abstract_method_definitions,
13994         java_check_abstract_method_definitions): Add static prototypes.
13995         (java_complete_expand_methods): Fix call to `finish_class'.
13996
13997         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
13998         and `prevpc'.
13999
14000 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14001
14002         * lang.c (language_string): Constify.
14003
14004 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14005
14006         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14007         Remove hacks for stuff which comes from libiberty.
14008
14009         * Make-lang.in: Likewise.
14010
14011 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14012
14013         * Makefile.in (xref.o): Depend on xref.c explicitly.
14014
14015 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14016
14017         * java-tree.h (lang_printable_name): Constify a char*.
14018
14019         * lang.c (lang_printable_name): Likewise.
14020
14021 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14022
14023         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14024         comments in C code.
14025
14026 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14027
14028         * gjavah.c (print_cxx_classname): Print "::" before qualified
14029         name.
14030
14031 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14032
14033         * parse.y (lookup_cl): Changed leading comment. Now does its best
14034         to set the column number.
14035         (qualify_ambiguous_name): Take WFL wrappers into account.
14036
14037 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14038
14039         * verify.c (verify_jvm_instructions): Don't check instruction
14040         validity beyond end of method.
14041
14042 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14043
14044         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14045
14046 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14047
14048         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14049         cxx_keyword_subst, generate_access, name_is_method_p,
14050         get_field_name, print_field_name, super_class_name, print_include,
14051         decode_signature_piece, print_class_decls, usage, help,
14052         java_no_argument, version, add_namelet, print_namelet): Add static
14053         prototype.
14054         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14055         name_is_method_p): Constify a char*.
14056         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14057         Provide a final else clause in an if-else-if.
14058         (print_field_info): Add missing final arg in function call to
14059         `print_field_name'.
14060         (print_method_info, decompile_method, decode_signature_piece,
14061         print_c_decl, print_full_cxx_name, print_stub,
14062         print_mangled_classname, super_class_name, print_include,
14063         add_namelet, add_class_decl, print_class_decls, process_file,
14064         help): Constify a char*.
14065
14066         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14067         push_int_const, find_constant_wide, find_constant_index,
14068         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14069         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14070         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14071         emit_if, emit_goto, emit_jsr, call_cleanups,
14072         make_class_file_name): Add static prototypes.
14073         (generate_bytecode_return, generate_bytecode_insns): Pass a
14074         NULL_PTR, not a NULL_TREE.
14075
14076         * jv-scan.c: Include "jcf.h".
14077         (main): Declare using DEFUN macro.
14078
14079         * jvspec.c (find_spec_file, lang_specific_pre_link,
14080         lang_specific_driver): Add prototypes.
14081         (find_spec_file): Constify a char*.
14082
14083         * keyword.gperf (hash, java_keyword): Add prototypes.
14084
14085         * lang.c (lang_print_error): Add static prototype.
14086         (lang_init): Prefer memcpy over bcopy to avoid casts.
14087
14088         * lex.c (yylex): Add static prototype.
14089
14090         * parse-scan.y: Include "lex.c" earlier.
14091
14092         * parse.h: Remove redundant declaration for `yylex'.
14093
14094         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14095         labeled_block_contains_loop_p): Add static prototypes.
14096         (not_accessible_p): Make static to match prototype.
14097
14098         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14099
14100 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14101
14102         * parse.y (check_method_redefinition): Changed leading comment.
14103         (check_abstract_method_definitions): New function.
14104         (java_check_abstract_method_definitions): New function.
14105         (java_check_regular_methods): Call it.
14106         (verify_constructor_super): Fixed indentation.
14107         (lookup_method_invoke): Likewise.
14108
14109 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14110
14111         * parse.y (method_header): Return a null pointer if the current
14112         class node is null.
14113         (finish_method_declaration): Return if the current function decl
14114         is null.
14115         (source_start_java_method): Likewise.
14116         (java_method_add_stmt): Likewise.
14117
14118 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14119
14120         * class.c (emit_register_class): Removed unnecessary call to
14121         start_sequence.
14122         * parse.y (labeled_block_contains_loop_p): Removed unused local
14123         variable.
14124
14125 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14126
14127         * parse.y (java_refold): Added prototype.
14128
14129 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14130
14131         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14132         (java_stabilize_reference): Removed unnecessary `else'.
14133         (java_complete_lhs): Set flag to remember boolean. Call
14134         java_refold. Added comments.
14135         (java_decl_equiv): New function.
14136         (binop_compound_p): Likewise.
14137         (java_refold): Likewise.
14138         (patch_unaryop): Striped static field access assigned to decl and
14139         op. Changed promotion scheme for ++/-- operators.
14140         (search_loop): New function.
14141         (labeled_block_contains_loop_p): Likewise.
14142         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14143         comment.
14144         (patch_bc_statement): Call search_loop. Fixed comment.
14145
14146 1999-08-14  Anthony Green  <green@cygnus.com>
14147
14148         * expr.c (java_lang_expand_expr): Mark static array data as
14149         referenced.
14150
14151 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14152
14153         * jvgenmain.c (main): NUL-terminate name_obstack.
14154
14155 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14156
14157         * check-init.c (check_bool2_init, done_alternative): Add static
14158         prototypes.
14159
14160         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14161         (add_method, build_utf8_ref, build_class_ref,
14162         append_gpp_mangled_type, layout_class_method): Constify a char*.
14163
14164         * decl.c (push_promoted_type, make_binding_level): Add static
14165         prototypes.
14166         (push_promoted_type, pushdecl): Constify a char*.
14167
14168         * except.c (find_handler_in_range, link_handler,
14169         check_start_handlers): Add static prototypes.
14170
14171         * expr.c (process_jvm_instruction): Constify a char*.
14172
14173         * gjavah.c (main): Constify a char*.
14174
14175         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14176         Constify a char*.
14177
14178         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14179         static prototypes.
14180         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14181         munge, print_ents): Constify a char*.
14182
14183         * jcf-dump.c (disassemble_method): Constify a char*.
14184         (print_constant_pool, print_exception_table): Add static prototypes.
14185         (print_constant, print_exception_table, main, disassemble_method):
14186         Constify a char*.
14187
14188         * jcf-io.c (find_classfile, find_class): Likewise.
14189
14190         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14191         (set_source_filename, predefined_filename_p): Add static prototypes.
14192         (set_source_filename, get_constant, get_class_constant,
14193         find_in_current_zip): Constify a char*.
14194
14195         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14196         static prototypes.
14197         (add_entry, add_path, jcf_path_classpath_arg,
14198         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14199
14200         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14201         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14202         jcf_parse_one_method, jcf_parse_methods,
14203         jcf_parse_final_attributes): Add static prototypes.
14204         (get_attribute): Constify a char*.
14205
14206         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14207         jcf_dependency_add_target, jcf_path_classpath_arg,
14208         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14209
14210         * jv-scan.c (main): Constify a char*.
14211         (gcc_obstack_init): Add prototype arguments.
14212
14213         * jvgenmain.c (gcc_obstack_init): Likewise.
14214         (main): Constify a char*.
14215
14216         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14217         static prototypes.
14218         (put_decl_string, lang_print_error): Constify a char*.
14219         (lang_init): Remove redundant extern prototype.
14220
14221         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14222
14223         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14224         Add static prototypes.
14225         (get_type_from_signature): Constify a char*.
14226
14227         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14228         Add static prototypes.
14229         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14230         (verify_jvm_instructions): Constify a char*.
14231
14232         * xref.c (xref_flag_value): Likewise.
14233
14234         * xref.h (xref_flag_value): Likewise.
14235
14236         * zextract.c (makeword, makelong): Add static prototypes.
14237         (makeword, makelong): Constify a uch*.
14238
14239 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14240
14241         * lang.c (java_dummy_print): Constify a char*.
14242         (lang_print_error): Likewise.
14243         (lang_init): Remove redundant prototype for `print_error_function'.
14244         (lang_init_source): Likewise.
14245         (lang_identify): Constify a char*.
14246
14247 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14248
14249         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14250         (WORDS_TO_LONG): Likewise.
14251         (WORDS_TO_DOUBLE): Likewise.
14252
14253 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14254
14255         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14256
14257         * expr.c (java_stack_pop, java_array_data_offset,
14258         build_java_throw_out_of_bounds_exception, case_identity,
14259         build_java_check_indexed_type): Add static prototypes.
14260         (linenumber_table, expand_invoke, expand_java_field_op,
14261         build_primtype_type_ref, expand_byte_code): Constify a char*.
14262
14263         * java-tree.h (build_primtype_type_ref, linenumber_table):
14264         Constify a char*.
14265         (java_lang_expand_expr): Add prototype.
14266
14267         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14268         `java_lang_expand_expr'.
14269
14270         * lex.c (java_lex_error): Constify a char*.
14271         (java_get_unicode, java_read_char, java_allocate_new_line,
14272         java_unget_unicode, java_sneak_unicode): Prototype.
14273
14274         * parse-scan.y (current_class, package_name, method_declarator,
14275         report_class_declaration, yyerror): Constify a char*.
14276
14277         * parse.h (java_report_errors): Prototype.
14278         (yyerror): Constify a char*.
14279
14280         * parse.y (classitf_redefinition_error, check_modifiers,
14281         parse_jdk1_1_error, lookup_package_type,
14282         lookup_package_type_and_set_next, get_printable_method_name,
14283         purify_type_name): Constify a char*.
14284         (build_super_invocation, maybe_generate_finit,
14285         verify_constructor_super, parser_add_interface,
14286         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14287         java_complete_expand_methods, java_expand_finals,
14288         cut_identifier_in_qualified, java_stabilize_reference,
14289         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14290         merge_string_cste): Prototype.
14291         (single_type_import_declaration, yyerror,
14292         variable_redefinition_error, build_array_from_name,
14293         build_unresolved_array_type, check_class_interface_creation,
14294         resolve_class, complete_class_report_errors,
14295         note_possible_classname, read_import_dir,
14296         find_in_imports_on_demand, resolve_package, fix_constructors,
14297         check_deprecation, lookup_method_invoke,
14298         maybe_build_primttype_type_ref, array_constructor_check_entry):
14299         Constify a char*.
14300         (java_complete_expand_methods, java_expand_finals): Make static.
14301         (convert_narrow): Remove static prototype.
14302
14303 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14304
14305         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14306
14307 1999-08-02  Richard Henderson  <rth@cygnus.com>
14308
14309         * decl.c: Include defaults.h instead of expr.h.
14310         * parse.y: Likewise.
14311
14312 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14313
14314         * java/decl.c (start_java_method): Change all uses of
14315         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14316         Ensure expr.h is included.
14317         * java/expr.c (pop_arguments): Ditto.
14318         * java/parse.y (expand_start_java_method): Ditto.
14319
14320 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14321
14322         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14323
14324 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14325
14326         * decl.c: Include "function.h".
14327         * except.c: Likewise.
14328         * parse.y: Likewise.
14329         * Makefile.in: Update dependencies.
14330
14331 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14332
14333         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14334         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14335         `modifier' with ATTRIBUTE_UNUSED.
14336
14337         * gjavah.c (process_file): Add braces around ambiguous `else'.
14338
14339         * jcf-dump.c (print_access_flags, localvar_free): Change return
14340         type to void.
14341
14342         * parse.y (java_complete_expand_method): Initialize variable
14343         `exception_copy'.
14344         (resolve_qualified_expression_name): Likewise for `field_decl'.
14345         (patch_method_invocation): Likewise for `class_to_search'.
14346         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14347         (patch_assignment): Likewise for `lhs_type'.
14348
14349         * verify.c (verify_jvm_instructions): Remove unused variable
14350         `caller'.
14351
14352 1999-07-25  Richard Henderson  <rth@cygnus.com>
14353
14354         * decl.c (va_list_type_node): New.
14355
14356 1999-07-25  Anthony Green  <green@cygnus.com>
14357
14358         * gjavah.c (print_stub): New function.
14359         (METHOD_IS_NATIVE): New macro.
14360         (print_mangled_classname): Make static.
14361         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14362         (process_file): Perform stub generation.
14363         (HANDLE_METHOD): Don't emit class decls during stub
14364         generation.
14365         (HANDLE_END_METHOD): Take into account stub generation.
14366         (print_method_info): Handle stub generation.
14367         (print_stub): New function.
14368         (print_cxx_classname): Make signature consistant with others.
14369         (help): Describe -stubs option.
14370         (main): Create stub file.
14371         (version): Use version.c.
14372         (print_full_cxx_name): New function.
14373         (print_c_decl): Use print_full_cxx_name.
14374
14375 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14376
14377         * check-init.c (check_init): Handle MAX_EXPR.
14378
14379 1999-07-15  Andrew Haley  <aph@cygnus.com>
14380
14381         * lang.c (flag_use_divide_subroutine): New variable.
14382         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14383         fp-to-integer conversion.
14384         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14385         is not set.
14386
14387         * expr.c (build_java_soft_divmod): New function.
14388         (build_java_binop): Call build_java_soft_divmod if
14389         flag_use_divide_subroutine is set.
14390         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14391         soft_lrem_node: new builtin functions.
14392         (init_decl_processing) Initialize the new builtins.
14393         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14394         soft_lrem_node: new builtin functions.
14395         (build_java_soft_divmod): New function.
14396         * parse.y: Call build_java_soft_divmod if
14397         flag_use_divide_subroutine is set.
14398         * parse.c: Rebuilt.
14399
14400         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14401         a --specs= arg) even if not linking.
14402         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14403         -fuse-divide-subroutine
14404
14405 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14406
14407         * parse.y (resolve_and_layout): Check methods only once.
14408         (resolve_qualified_expression_name): Verify thrown exceptions
14409         compatibility.
14410         (check_thrown_exceptions): Reject exceptions thrown in
14411         initializer. Error message tuned.
14412
14413 1999-07-14  Andrew Haley  <aph@cygnus.com>
14414
14415         * expr.c (expand_expr): Do not return the last statement in a
14416         block as the block's value.
14417
14418 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14419
14420         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14421         CALL_EXPR, to avoid order of evaluation changes.
14422
14423 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14424
14425         * parse.y (qualify_ambiguous_name): Do not use
14426         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14427
14428 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14429
14430         * check-init.c (check_init): Handle MAX_EXPR.
14431         * expr.c (force_evaluation_order): Force method call arguments to
14432         be evaluated in left-to-right order.
14433         * parse.y (qualify_ambiguous_name): Loop again to qualify
14434         NEW_ARRAY_EXPR properly.
14435
14436 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14437
14438         * parse.y (patch_invoke): Resolve unresolved invoked method
14439         returned type.
14440         (qualify_ambiguous_name): STRING_CST to qualify expression for
14441         type name resolution.
14442
14443 1999-06-24  Andrew Haley  <aph@cygnus.com>
14444
14445         * class.c (finish_class): Whenever a deferred method is
14446         output, rescan the list of methods to see if a new candidate for
14447         output can be found.
14448
14449 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14450
14451         * jvspec.c (lang_specific_driver): Recognize --help.
14452
14453 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14454
14455         * parse.y (resolve_package): Fixed bogus return statement.
14456         (patch_method_invocation): Resolve method invocation beginning with
14457         a package name qualifier.
14458
14459 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14460
14461         * Make-lang.in (java.stage1): Depend on stage1-start.
14462         (java.stage2): Likewise for stage2-start.
14463         (java.stage3): Likewise for stage3-start.
14464         (java.stage4): Likewise for stage4-start.
14465
14466 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14467
14468         * parse.y (java_complete_lhs): When doing cross referencing, don't
14469         try to keep file location on a WFL expanded as a CALL_EXPR.
14470
14471 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14472
14473         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14474         compiling to class file a void method with an empty method body.
14475         As a side effect, the bytecode backend will generate the
14476         appropriate `return' instruction.
14477
14478 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14479
14480         * parse.y (lookup_package_type_and_set_next): New function prototype.
14481         (resolve_package): Search current and imported packages.
14482         (lookup_package_type_and_set_next): New function.
14483
14484 1999-06-22  Andrew Haley  <aph@cygnus.com>
14485
14486         * verify.c (verify_jvm_instructions): Check for pending blocks
14487         before invalid PC test and opcode switch, not after.
14488
14489 1999-06-21  Andrew Haley  <aph@cygnus.com>
14490
14491         * except.c (find_handler_in_range): The upper limit for exception
14492         ranges is exclusive, not inclusive: (start <= pc < end).
14493         (link_handler): find child pointer which points to outer by
14494         searching sibling list: previous code incorrectly assumed that
14495         outer->outer->first_child must point to outer.
14496         * verify.c (verify_jvm_instructions): FIXME added to code for
14497         `athrow'.
14498         (verify_jvm_instructions): Do not assume that the last block
14499         processed in a subroutine is a block which ends with a `ret'
14500         instruction.  With some control flows it is possible that the last
14501         block ends with an `athrow'.
14502
14503 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14504
14505         * parse.y (qualify_ambiguous_name): Reorganized the post
14506         evaluation of non WFL leading expression nodes.
14507
14508 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14509
14510         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14511         CONVERT_EXPR.
14512
14513 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14514
14515         * parse.y (qualify_ambiguous_name): Handle qualified expression
14516         beginning with a STRING_CST.
14517
14518 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14519
14520         * parse.y (register_fields): Set DECL_INITIAL on both
14521         pre-initialized static and public fields.
14522         (resolve_field_access): Static field access expressions to always
14523         use pointer types.
14524         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14525         qualification. CONVERT_EXPR to be resolved as an expression name.
14526         (java_complete_lhs): Identify and access qualified final
14527         initialized field in switch statement case expression.
14528         (fold_constant_for_init): Pre-initialized field decl constant to
14529         be folded.
14530
14531 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14532
14533         * parse.y (note_possible_classname): Mark returned node with
14534         QUALIFIED_P only if the original class name contained a '/'.
14535
14536 1999-06-05  Anthony Green  <green@cygnus.com>
14537
14538         * Make-lang.in (gcjh): More parallel build fixes.
14539
14540 1999-06-03  Mike Stump  <mrs@wrs.com>
14541
14542         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14543
14544 1999-06-02  Anthony Green  <green@cygnus.com>
14545
14546         * except.c (link_handler): Chain exception handlers in order.
14547
14548 1999-06-02  Anthony Green  <green@cygnus.com>
14549
14550         * expr.c (expand_byte_code): Fill unreachable bytecode regions
14551         with nops and process as usual in order to always set correct EH
14552         ranges.  Emit detailed warnings about unreachable bytecodes.
14553
14554 1999-06-02  Anthony Green  <green@cygnus.com>
14555
14556         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14557         constant.
14558
14559 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14560
14561         * parse.y (lookup_field_wrapper): Unified returned value to NULL
14562           or the searched field decl.
14563
14564 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14565
14566         * parse.y (fold_constant_for_init): Convert numerical constant
14567         values to the type of the assigned field.
14568
14569 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14570
14571         * expr.c (lookup_field): Relaxed the test on class loading error
14572         detection.
14573         * parse.y (fold_constant_for_init): Enabeled old code.
14574
14575 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14576
14577         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14578         decide the validity of the cast of a java.lang.Cloneable reference
14579         to an array.
14580         (patch_conditional_expr): Fixed first argument passed to
14581         binary_numeric_promotion.
14582
14583 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14584
14585         * parse.y (qualify_ambiguous_name): Take into account that a
14586         CONVERT_EXPR might specify a type as a WFL.
14587
14588 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14589
14590         * parse.y (patch_assignment): Save the rhs before using it as an
14591         argument to _Jv_CheckArrayStore.
14592
14593 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14594
14595         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14596
14597 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14598
14599         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14600         floating point literal only when the exponent indicator has been
14601         parsed.
14602
14603 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14604
14605         * parse.y (formal_parameter:): Construct argument tree list
14606         element even if a yet unsupported final parameter was encountered.
14607
14608 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14609
14610         * parse.y (finish_method_declaration): Issue errors for native or
14611         abstract methods declared with a method body, as well as for non
14612         native or non abstract methods with no method body.
14613
14614 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14615
14616         * class.c (build_utf8_ref): Initialize variable `field'.
14617
14618         * decl.c (init_decl_processing): Initialize variable `field'.
14619
14620         * expr.c (build_known_method_ref): Mark parameters `method_type',
14621         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14622         (process_jvm_instruction): Likewise for parameter `length'.
14623
14624         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14625         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14626         ATTRIBUTE_UNUSED.
14627
14628         * parse.y (maybe_generate_clinit): Remove unused variable
14629         `has_non_primitive_fields'.
14630         (find_in_imports_on_demand): Initialize variables `node_to_use'
14631         and `cl'.
14632         (patch_binop): Likewise for variable `prom_type'.
14633         (patch_unaryop): Likewise for variable `prom_type'.
14634
14635         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14636
14637         * xref.c (xref_table): Add missing initializer.
14638
14639 1999-05-14  Tom Tromey  <tromey@cygnus.com>
14640
14641         * java-except.h (struct eh_range): Removed unused `next' member.
14642         * verify.c (verify_jvm_instructions): Call check_nested_ranges
14643         after adding all exception handlers.  Sort exception ranges in
14644         order of start PC.
14645         (struct pc_index): New structure.
14646         (start_pc_cmp): New function.
14647         * except.c (add_handler): Return `void'.  Don't call link_handler;
14648         instead construct an ordinary linked list and do range
14649         coalescing.
14650         (check_nested_ranges): New function.
14651         (link_handler): Changed interface to allow merging of eh_ranges.
14652         Split overlapping ranges.  Return `void'.
14653
14654 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14655
14656         * parse.y (constructor_block_end:): New rule, tagged <node>.
14657         (constructor_body:): Use `constructor_block_end' instead of
14658         `block_end'.
14659
14660 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14661
14662         * parse.y (statement_nsi:): Pop `for' statement block.
14663         (java_complete_lhs): Labeled blocks containing no statement are
14664         marked as completing normally.
14665
14666 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14667
14668         * xref.c (xref_set_current_fp): New function, defined.
14669         * xref.h (xref_set_current_fp): New function, prototyped.
14670
14671 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14672
14673         * check-init.c (check_init): Take into account that
14674         LABELED_BLOCK_STMT can be empty.
14675
14676 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14677
14678         * parse.y (java_check_regular_methods): Warning check on not
14679         overriding methods with default access in other packages does not
14680         apply to `<clinit>'.
14681         (java_complete_lhs): If block body is an empty_stmt_node, replace
14682         it by NULL_TREE. This prevents gcc from generating an irrelevant
14683         warning.
14684
14685 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14686
14687         * check-init.c (check_init): Removed code accepting to see things
14688         falling through default:, when doing xrefs.
14689         * java-tree.h (do_not_fold): New global variable, declared.
14690         * parse.y (do_not_fold): New global variable, defined.
14691         (java_complete_expand_method): Set `do_not_fold' to the value of
14692         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14693         and reinstall them after them have been purged; do not check for
14694         initializations; do not issue missing return errors.
14695         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14696         when doing xrefs.
14697         (patch_binop): Skip the fold part when doing xrefs.
14698         (build_string_concatenation): Skip the concatenation part when
14699         doing xrefs.
14700         (patch_synchronized_statement): Do not generate a try-finally when
14701         doing xrefs.
14702         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14703         and keep the location where the throw was seen.
14704         * typeck.c (convert): When `do_not_fold' is set, do not attempt
14705         any treatment on the converted node an simply return a NOP_EXPR of
14706         the targeted type.
14707         * xref.c (xref_get_data): New function, defined.
14708         * xref.h (xref_get_data): New function, declared.
14709         (XREF_GET_DATA): Use xref_get_data.
14710
14711 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14712
14713         * gjavah.c (print_include): Cast the result of `strlen' to int
14714         when comparing against a signed value.
14715         (add_namelet): Likewise.
14716
14717 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14718
14719         * expr.c (expand_invoke): Mark parameter `nargs' with
14720         ATTRIBUTE_UNUSED.
14721         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14722
14723         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14724         ATTRIBUTE_UNUSED.
14725
14726         * jcf-reader.c (get_attribute): Cast a value to long
14727         when comparing against a signed expression.  Likewise.
14728
14729         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14730         HOST_BITS_PER_CHAR.
14731
14732 1999-05-11  Andrew Haley  <aph@cygnus.com>
14733
14734         * parse.y (source_end_java_method): If the current method contains
14735         any exception handlers, force asynchronous_exceptions: this is
14736         necessary because signal handlers in libjava may throw exceptions.
14737         * decl.c (end_java_method): Ditto.
14738
14739 1999-05-11  Tom Tromey  <tromey@cygnus.com>
14740
14741         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14742         flags.
14743         * jvspec.c (THREAD_NAME): Removed.
14744         (GC_NAME): Likewise.
14745         (MATHLIB): Likewise.
14746         (WITHLIBC): Likewise.
14747         (GCLIB): Likewise.
14748         (THREADLIB): Likewise.
14749         (MATH_LIBRARY): Likewise.
14750         (lang_specific_driver): Don't add `-l' options to command line.
14751         Instead, add a single --specs option.  Recognize `-L' options and
14752         use them to search for spec file.
14753         (find_spec_file): New function.
14754         (SPEC_FILE): New define.
14755
14756 1999-05-11  Dave Brolley  <brolley@cygnus.com>
14757
14758         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14759         cpplib-enabled build.
14760
14761 1999-05-05  Per Bothner  <bothner@cygnus.com>
14762
14763         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
14764         temporarily zero it while calling rest_of_decl_compilation.
14765
14766         * java-tree.h (string_ptr_type_node):  Add declaration.
14767         * decl.c:  Define and initialize string_ptr_type_node.
14768         * parse.y (patch_string_cst):  Use string_ptr_type_node.
14769
14770         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
14771         * parse.y (for_statement):  Now unconditionally exit_block.
14772         (finish_labeled_statement):  No longer exit_block if for-loop.
14773         (patch_loop_statement):  Check harder if the loop is already labeled.
14774
14775         * parse.y (patch_initialized_static_field):  Removed function.
14776         (maybe_generate_clinit):  Removed special handling for interfaces.
14777         (java_complete_expand_methods):  Do a preliminary java_complete_tree
14778         on <clinit> to determine if it can be removed.
14779         (java_complete_expand_method):  Remove special handling for <clinit>.
14780         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
14781         optimize if we get back empty_stmt_node.
14782         For MODIFY_EXPR, re-do checking of static initializers.
14783         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
14784         For VAR_DECL, pass correct context.
14785
14786         * verify.c (verify_jvm_instructions):  Better error messages.
14787
14788 1999-05-03  Tom Tromey  <tromey@cygnus.com>
14789
14790         * parse-scan.y (interface_declaration): Call
14791         report_class_declaration for interfaces.
14792
14793 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
14794
14795         * Makefile.in: Remove -v from bison command lines.
14796
14797 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14798
14799         * check-init.c (check_init): Exclude a case of error when doing
14800         xrefs.
14801         * class.c (layout_class_method): Don't generate the error message
14802         twice when compiling from source.
14803         * lang-options.h: Added `-Wredundant-modifers' and
14804         `-Wunusupported-jdk11' flags and help text.
14805         * lang.c (lang_decode_option): Added support for
14806         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14807         flag_static_local_jdk11 and flag_redundant set accordingly.
14808         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14809         * parse.h (EXPR_WFL_ADD_COL): New macro.
14810         (DECL_END_SOURCE_LINE): Likewise.
14811         (DECL_INHERITED_SOURCE_LINE): Likewise.
14812         * parse.y (static_ref_err): New function, prototyped.
14813         (CCB_TK): Now tagged <operator>.
14814         (class_body:): Remember the location of the closing '}' of a class
14815         definition when doing xrefs.
14816         (block:): Likewise.
14817         (block_end:): Likewise.
14818         (create_class): Remember the location of the inherited class
14819         identifier when doing xrefs.
14820         (register_fields): Added test on first operand of `init' before
14821         testing it TREE_CODE.
14822         (method_header): Store the location of the class identifier in the
14823         class decl when doing xrefs.
14824         (finish_method_declaration): Don't combine first/last method line
14825         when doing xref.
14826         (java_check_regular_methods): Warning check on not overriding
14827         methods with default access on other packages move before check on
14828         static methods. Initialization of `aflags' also moved up.
14829         (resolve_expression_name): Call static_ref_err to report the error.
14830         (static_ref_err): New function, implemented.
14831         (resolve_field_access): Returned simplified static field access
14832         when doing xrefs.
14833         (resolve_qualified_expression_name): Check for illegal use of
14834         static fields in a non static context. Call static_ref_err to
14835         report error in various places.
14836         (java_complete_tree): Do not fold initialized static fields when
14837         doing xrefs.
14838         (java_complete_lhs): Likewise.
14839
14840 1999-04-29  Anthony Green  <green@cygnus.com>
14841
14842         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
14843         create internal labels.
14844         (lookup_label): Ditto.
14845
14846 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14847
14848         * class.c (layout_class_method): Generate <clinit>'s rtl for
14849         interfaces.
14850         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14851         for interfaces' <clinit>.
14852         * expr.c (lookup_field): Search for fields in interfaces.
14853         (expand_invoke): Fixed indentation.
14854         (expand_java_field_op): Likewise. Use IS_CLINIT.
14855         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
14856         (IS_CLINIT): New macro.
14857         * parse.y (type_declaration:): Call maybe_generate_clinit after an
14858         interface was parsed.
14859         (maybe_generate_clinit): Don't generate if the current class is an
14860         interface with only fields of primitive types.
14861         (reset_method_name): Use IS_CLINIT.
14862         (java_complete_expand_method): Expand <clinit> when it exists for
14863         interfaces. Use IS_CLINIT.
14864         (resolve_expression_name): Use DECL_CONTEXT instead of
14865         current_class to build static field references.
14866         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
14867         ARRAY_REF when doing xreferencing.
14868         (check_final_assignment): Fixed typo in leading comment. Use
14869         IS_CLINIT.
14870         (patch_array_ref): Don't fully expand array references when
14871         xreferencing.
14872         (patch_return): Use IS_CLINIT.
14873         (patch_throw_statement): Likewise.
14874
14875 1999-04-22  Tom Tromey  <tromey@cygnus.com>
14876
14877         * Make-lang.in (JAVA_SRCS): Added check-init.c.
14878
14879 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14880
14881         * decl.c (predef_filenames, predef_filenames_size): New globals
14882         (init_decl_processing): predef_filenames and predef_filenames_size
14883         initialized.
14884         * java-tree.h (predef_filenames, predef_filenames_size): Declared
14885         extern.
14886         * jcf-parse.c (predefined_filename_p): New function.
14887         (yyparse): Check that files on the command line are specified only
14888         once and issue a warning otherwise.
14889         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
14890         * parse.y (source_end_java_method): Nullify NOP method bodies, to
14891         avoid a gcc warning with -W -Wall turned on.
14892         (java_expand_classes): Abort if errors were encountered.
14893         (java_complete_lhs): If the cross reference flag is set, wrap
14894         field DECL node around a WFL when resolving expression name.
14895
14896 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14897
14898         * lang.c (lang_decode_option): Fixed returned value when parsing
14899         `-fxref=...' and `-Wall'.
14900         * parse.y (source_end_java_method): Do not generate code when
14901         flag_emit_xref is set.
14902         (resolve_expression_name): Do not build static field access when
14903         flag_emit_xref is set.
14904         (resolve_field_access): No special treatment on `length' when
14905         flag_emit_xref is set. Do not build qualified static field access
14906         when flag_emit_xref is set.
14907         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
14908         when flag_emit_xref is set.
14909         (patch_assignment): Do not generate array store runtime check when
14910         flag_emit_xref is set.
14911         * xref.c (xref_flag_value): Fixed function declaration
14912         indentation.
14913         (xset_set_data): New function.
14914         * xref.h (xref_set_data): Added prototype for new function.
14915         (typedef struct xref_flag_table): New field data.
14916         (XREF_GET_DATA): New macro.
14917
14918 1999-04-19  Tom Tromey  <tromey@cygnus.com>
14919
14920         * xref.h (enum): Removed trailing comma.
14921
14922         * parse.y (resolve_qualified_expression_name): Added missing
14923         `break'.
14924
14925 1999-04-15  Anthony Green  <green@cygnus.com>
14926
14927         * gjavah.c: New prototypes for java_float_finite and
14928         java_double_finite.
14929
14930 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14931
14932         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
14933         references.
14934
14935 1999-04-06  Jeffrey A Law  (law@cygnus.com)
14936
14937         * Makefile.in (TREE_H): Add tree-check.h.
14938         (RTL_H): Add genrtl.h.
14939
14940 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14941
14942         * parse.y (patch_assignment): Added ArrayStoreException runtime
14943         check.
14944
14945 1999-04-06  Per Bothner  <bothner@cygnus.com>
14946
14947         * expr.c (pop_type_0):  New function.
14948         (pop_type):  Use pop_type_0.
14949         * java-tree.h (pop_type_0):  New declaration.
14950         * verify.c (verify_jvm_instructions):  Check return instructions.
14951
14952         * parse.y (patch_binop):  Don't fold if non-constant and emiting
14953         class files.
14954
14955 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14956
14957         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
14958
14959         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
14960         (main_jcf): Don't define.
14961         (process_file): Don't set `main_jcf'.
14962
14963         * java-tree.h (main_jcf): Don't declare.
14964
14965         * jcf-parse.c (main_jcf): Add static definition.
14966
14967         * lang.c (main_jcf): Don't define.
14968
14969 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14970
14971         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
14972
14973         * decl.c (copy_lang_decl): Likewise for `bcopy'.
14974
14975         * jcf-depend.c: Include "config.h", not <config.h>.
14976
14977         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
14978         `bcopy' to PTR.
14979
14980         * jcf-path.c: Include "config.h", not <config.h>.
14981
14982         * lex.c: Don't include various system header files.
14983         (java_init_lex): Cast the argument of `bzero' to PTR
14984
14985         * parse-scan.y (java_push_parser_context): Likewise.
14986
14987         * parse.y (java_push_parser_context): Likewise.
14988         (patch_bc_statement): Match format specifier to variable argument.
14989
14990         * xref.c: Don't include <stdio.h>.
14991
14992 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14993
14994         * parse.y (struct parser_ctxt *ctxp): Now global.
14995         (declare_local_variables): Use WFL compound value for the
14996         declaration source line value, when doing cross-referencing.
14997
14998 1999-03-31  Tom Tromey  <tromey@cygnus.com>
14999
15000         * gjavah.c (print_field_info): Allow constants of other types.
15001         (print_include): Generate include when new name is proper prefix
15002         of already printed name.
15003         (add_namelet): Likewise.
15004         (cxx_keyword_subst): New function.
15005         (print_method_info): Use it.
15006         (print_field_name): New function.
15007         (get_field_name): New function.
15008         (print_field_info): Use get_field_name and print_field_name.
15009
15010 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15011
15012         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15013         'KR-C', so gperf uses the `const' keyword on strings.
15014
15015         * keyword.gperf (java_keyword): Const-ify a char*.
15016
15017 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15018
15019         * parse.y (patch_bc_statement): Fixed identation and a bogus
15020         `printf' format.
15021
15022 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15023
15024         * parse.y (patch_assignment): Allow static variables in other
15025         classes to be assigned.
15026
15027 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15028
15029         * class.c (maybe_add_interface): Remove unused variable
15030         `interface_binfo'.
15031         (make_class_data): Use = for assignment, not ==.  Likewise.
15032         (emit_register_classes): Remove unused variable `decl'.
15033
15034         * lex.c: Fix comment so as not to contain an embedded `/*'.
15035
15036         * verify.c (verify_jvm_instructions): Remove unused variable
15037         `self_type'.
15038
15039 1999-03-27  Per Bothner  <bothner@cygnus.com>
15040
15041         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15042         (complete_labeled_statement):  Rename to finish_labeled_statement.
15043         (complete_for_loop):  Rename to finish_for_loop.
15044         (complete_method_declaration):  Rename to finish_method_declaration.
15045
15046         * java-tree.h (continue_identifier_node):  New global node.
15047         * decl.c:  Define and initialize continue_identifier_node.
15048         * parse.y (generate_labeled_block):  Remove - no longer needed.
15049         (build_loop_body):  Use continue_identifier_node for continue block.
15050         (finish_labeled_statement):  Also do pop_labeled_block actions.
15051         (java_complete_lhs):  POP_LOOP even if error.
15052         (build_labeled_block):  Special handling for continue_identifier_node.
15053         (patch_loop_statement):  Re-organize.
15054         (patch_bc_statement):  Re-write.
15055
15056 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15057
15058         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15059         using a WFL compound value.
15060         * parse.y (xref.h): Include.
15061         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15062         WFL compound value.
15063         (register_fields): Set WFL compound value to lineno if doing
15064         xrefs.
15065         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15066         is set.
15067         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15068         * xref.h (expand_xref): Prototype renamed from xref_generate.
15069
15070 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15071
15072         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15073         (GET_CURRENT_BLOCK): New macro.
15074         * parse.y (current_static_block): New global variable.
15075         (method_body:): Define action.
15076         (complete_method_declaration): Set current_function_decl to NULL
15077         when work on the current method is done.
15078         (declare_local_variables): Use GET_CURRENT_BLOCK.
15079         (java_method_add_stmt): Likewise.
15080         (java_complete_expand_method): Disable the use of `this' when
15081         expanding <clinit>.
15082         (enter_a_block): If no current method exist, use
15083         current_static_block to link static initializer blocks.
15084         (exit_block): Rewritten to use current_static_block when no current
15085         method decl exists.
15086         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15087         (patch_return): Forbid the use of `return' in static initializers.
15088         (patch_throw_statement): Fixed indentation. Issue specific error
15089         for uncaught thrown checked exception in static initializer
15090         blocks. Removed FIXME.
15091
15092 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15093
15094         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15095         Link gcj from gcc.o.
15096
15097 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15098
15099         * parse.y (find_applicable_accessible_methods_list): When dealing
15100         with interface: ensure that a given interface or java.lang.Object
15101         are searched only once.
15102
15103 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15104
15105         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15106
15107         * jcf-dump.c (print_access_flags): Add braces around if-else.
15108
15109         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15110         COMBINE_INPUTS.
15111
15112         * lex.c (build_wfl_node): Add static prototype.
15113
15114         * lex.h (build_wfl_node): Remove static prototype.
15115
15116         * parse.y: Include lex.c early enough to declare everything needed.
15117         Ensure calls to `build_wfl_node' pass the proper arguments.
15118         (create_class): Remove unused variable `super_decl'.
15119         (get_printable_method_name): Initialize variable `name'.
15120
15121 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15122
15123         * Changelog: Fixed 1999-03-22 typos.
15124         * lang.c (lang_decode_option): Fixed typo in error string in the
15125         XARG section.
15126
15127 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15128
15129         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15130         (xref.o): New rule.
15131         * java-tree.h (flag_emit_xref): Declared extern.
15132         * lang.c (xref.h): Included.
15133         (flag_emit_xref): New global variable.
15134         (lang_decode_option): Added support for -fxref.
15135         * xref.c: Created.
15136         * xref.h: Likewise.
15137
15138 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15139
15140         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15141         linked with.
15142
15143 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15144
15145         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15146         $(srcdir)/../system.h and $(JAVA_TREE_H).
15147         (jcf-io.o): Depend on $(JAVA_TREE_H).
15148         (mangle.o): Likewise.
15149
15150         * check-init.c (check_cond_init): Add static prototype.
15151
15152         * class.c (build_java_method_type, hashUtf8String,
15153         make_field_value, get_dispatch_vector, get_dispatch_table,
15154         append_gpp_mangled_type, mangle_static_field): Likewise.
15155         (strLengthUtf8): Hide unused definition.
15156         (hashUtf8String): Const-ify.
15157         (make_field_value): Un-ANSI-fy.
15158
15159         * constants.c: Move inclusion of jcf.h above java-tree.h.
15160         (set_constant_entry, find_class_or_string_constant,
15161         find_name_and_type_constant, get_tag_node,
15162         build_constant_data_ref): Add static prototype.
15163
15164         * decl.c (push_jvm_slot, builtin_function,
15165         lookup_name_current_level): Likewise.
15166         (builtin_function): Const-ify.
15167
15168         * except.c (expand_start_java_handler, expand_end_java_handler):
15169         Add static prototype.
15170
15171         * expr.c (flush_quick_stack, push_value, pop_value,
15172         java_stack_swap, java_stack_dup, build_java_athrow,
15173         build_java_jsr, build_java_ret, expand_java_multianewarray,
15174         expand_java_arraystore, expand_java_arrayload,
15175         expand_java_array_length, build_java_monitor, expand_java_pushc,
15176         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15177         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15178         expand_compare, expand_test, expand_cond, expand_java_goto,
15179         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15180         expand_java_field_op, java_push_constant_from_pool): Likewise.
15181
15182         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15183         (build_java_arraynull_check): Mark parameters `node' and `type'
15184         with ATTRIBUTE_UNUSED.
15185         (note_label): Likewise for parameter `current_pc'.
15186         (expand_java_call, expand_java_ret): Hide unused definition.
15187
15188         * java-tree.h (make_class, build_constants_constructor,
15189         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15190         init_outgoing_cpool, register_class, emit_register_classes,
15191         java_layout_seen_class_methods): Prototype.
15192         (unicode_mangling_length): Const-ify.
15193         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15194         emit_unicode_mangled_name, format_int, format_uint,
15195         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15196         jcf_print_utf8_replace, open_class): Prototype.
15197
15198         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15199         <stdio.h>.  Include tree.h/java-tree.h.
15200         (utf8_equal_string usage, process_class): Add static prototype.
15201         (open_class): Don't prototype this here.
15202         (utf8_equal_string): Match arguments to format specifiers.
15203         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15204         TABLE_SWITCH, disassemble_method): Likewise.
15205
15206         * jcf-io.c: Include tree.h/java-tree.h.
15207         (open_class, find_classfile, jcf_print_utf8,
15208         jcf_print_utf8_replace): Const-ify.
15209
15210         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15211         parse_class_file): Add static prototype.
15212         (find_in_current_zip): Match definition to existing static
15213         prototype.
15214
15215         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15216         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15217         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15218         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15219         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15220         generate_bytecode_return, perform_relocations, init_jcf_state,
15221         init_jcf_method, release_jcf_state, generate_classfile):
15222         Add static prototype.
15223         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15224         (make_class_file_name): Const-ify.
15225
15226         * jcf.h (find_classfile): Const-ify.
15227
15228         * jv-scan.c (reset_report): Remove prototype.
15229
15230         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15231         (error): Rewrite to allow varargs.
15232
15233         * lang.c (lang_f_options): Const-ify.
15234
15235         * lex.c (java_parse_escape_sequence): Add static prototype.
15236         (java_allocate_new_line): Match definition to existing static
15237         prototype.
15238
15239         * mangle.c Include tree.h/java-tree.h.
15240         (unicode_mangling_length, emit_unicode_mangled_name,
15241         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15242
15243         * parse.h (jdep_code): Remove trailing comma in enumeration.
15244         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15245         (reset_report): Add prototype.
15246
15247         * verify.c (push_pending_label, merge_types): Add static
15248         prototypes.
15249
15250         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15251
15252 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15253
15254         * parse.y (find_applicable_accessible_methods_list): Extend the
15255         search to superinterfaces when relevant.
15256         (search_applicable_methods_list): New function.
15257
15258 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15259
15260         * class.c (unmangle_classname): Implemented stricter testing
15261         before setting the QUALIFIED_P flag on an identifier.
15262
15263 1999-03-16  Per Bothner  <bothner@cygnus.com>
15264
15265         * parse.y (java_complete_lhs):  Call force_evaluation_order
15266         after patch_newarray.
15267         (patch_binop):  Don't call fold if there are side effects.
15268
15269 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15270
15271         * parse.y (java_stabilize_reference): Use save_expr instead of
15272         building a SAVE_EXPR node.
15273         (java_complete_lhs): Patch the resulting string of the `+='
15274         operator (if necessary) and complete the RHS after having built
15275         the cast.
15276
15277 1999-03-15  Per Bothner  <bothner@cygnus.com>
15278
15279         * class.c (make_class):  Don't set CLASS_P here (because
15280         this function is also called by build_java_array_type).
15281         (push_class):  Set CLASS_P here instead.
15282         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15283
15284         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15285         context.  If the context is class, perfer "super" over "synchronized".
15286         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15287
15288         * parse.y (create_class):  Don't call parser_check_super here;
15289         it is not robust.  Always wait until later.
15290
15291         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15292         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15293
15294 1999-03-13  Per Bothner  <bothner@cygnus.com>
15295
15296         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15297         * lex.h (UNGETC):  Change misleading macro.
15298
15299 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15300
15301         * parse.y (java_stabilize_reference): Return NODE when patching a
15302         COMPOUND_EXPR.
15303         (java_complete_lhs): Put parenthesis around truth values.
15304
15305 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15306
15307         * class.c (layout_class_method): Don't make rtl for interface
15308         methods.
15309         * parse.h (GET_TYPE_NAME): New macro.
15310         * parse.y (if_then_statement:): Fixed indentation.
15311         (if_then_else_statement:): Likewise.
15312         (for_statement:): Fixed spacing.
15313         (try_statement:): Fixed indentation.
15314         (create_interface): Don't force interfaces to be abstract.
15315         (method_header): Abstract methods are OK in interfaces.
15316         (declare_local_variables): Fixed typo in comment.
15317         (java_complete_expand_method): Fixed indentation.
15318         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15319         non accessible fields.
15320         (java_stabilize_reference): New function.
15321         (java_complete_lhs): Fixed indentation. Use
15322         java_stabilize_reference in compound assignment. Insert the
15323         cast. If not processing `+' fix string constants before processing
15324         binop.
15325
15326 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15327
15328         * constants.c (find_class_or_string_constant): Cast variable `j'
15329         to a `jword' when comparing against one.
15330
15331         * expr.c (java_lang_expand_expr): Remove unused variables
15332         `has_finally_p' and `op0'.
15333
15334         * gjavah.c (print_field_info): Cast a value to jint when comparing
15335         against one.  Likewise for a jlong.
15336         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15337         against a signed quantity.
15338
15339         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15340         (print_signature): Don't needlessly dereference variable `str'
15341
15342         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15343         `max_locals' with ATTRIBUTE_UNUSED.
15344         (jcf_parse_class): Likewise for variable `index'.
15345
15346         * parse.h (reverse_jdep_list): Remove static prototype.
15347
15348         * parse.y (build_jump_to_finally): Remove prototype and definition.
15349         (reverse_jdep_list): Add static prototype.
15350
15351         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15352         `assignment' and `expr_decl'.
15353
15354         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15355
15356 1999-03-12  Andrew Haley  <aph@cygnus.com>
15357
15358         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15359         we'll need a directory separator and a null character.
15360
15361 1999-03-10  Per Bothner  <bothner@cygnus.com>
15362
15363         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15364
15365 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15366
15367         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15368         interfaces.
15369
15370 1999-03-05  Per Bothner  <bothner@cygnus.com>
15371
15372         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15373
15374         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15375
15376         * class.c (layout_class_method):  A static method in a base class
15377         is never overridden, so treat it like it doesn't exist.
15378         However, do complain about private non-static method overriding
15379         public static method.
15380
15381         * parse.y:  Don't set unused INITIALIZED_P flag.
15382         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15383
15384         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15385         (build_array_from_name):  Re-order &index[string] to &string[index].
15386
15387         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15388         error_mark (it might catch more errors, but it is more likely to lose).
15389
15390 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15391
15392         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15393         (parse-scan.o): Depend on toplev.h.
15394
15395         * class.c (make_method_value): Add prototype.  Make it static.
15396         Remove unused second argument, caller changed.
15397
15398         * expr.c (java_lang_expand_expr): Remove unused variable
15399         `return_label'.
15400
15401         * java-tree.h: Don't prototype find_in_current_zip.
15402         Add prototypes for verify_constant_pool, start_java_method,
15403         end_java_method, give_name_to_locals, expand_byte_code,
15404         open_in_zip, set_constant_value, find_constant1, find_constant2,
15405         find_utf8_constant, find_string_constant, find_class_constant,
15406         find_fieldref_index, find_methodref_index, write_constant_pool,
15407         count_constant_pool_bytes and encode_newarray_type.
15408
15409         * jcf-dump.c: Remove unused variable `LONG_temp'.
15410
15411         * jcf-parse.c: Include parse.h.
15412         (jcf_parse_source): Remove unused parameter, all callers changed.
15413         (jcf_figure_file_type): Add static prototype.
15414         (find_in_current_zip): Likewise.  Also remove unused parameter,
15415         all callers changed.
15416         (read_class): Initialize variable `saved_pos'.
15417
15418         * jcf-reader.c (jcf_parse_preamble): Mark variables
15419         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15420
15421         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15422         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15423         (java_parse_doc_section): Initialize variable `seen_star'.
15424         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15425         (java_lex_error): Mark parameters `msg' and `forward' with
15426         ATTRIBUTE_UNUSED.
15427         (java_get_line_col): Mark parameters `filename' and `line' with
15428         ATTRIBUTE_UNUSED.
15429
15430         * parse-scan.y: Include toplev.h.
15431         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15432
15433         * parse.h: use `struct JCF', not plain `JCF'.
15434         (java_parser_context_save_global, java_expand_classes
15435         java_parser_context_restore_global, java_parse): Add prototypes.
15436
15437         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15438         `node'.
15439
15440 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15441
15442         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15443
15444 1999-02-26  Per Bothner  <bothner@cygnus.com>
15445
15446         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15447         explicit build_decl.  (Avoids crash in reload when optimizing.)
15448
15449 1999-02-25  Per Bothner  <bothner@cygnus.com>
15450
15451         * decl.c (complete_start_java_method):  Handle synchronized method
15452         even when compiling from bytecode.
15453
15454 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15455
15456         * gjavah.c (add_class_decl): Only generate `#include' if outer
15457         class is not the name of the class we are processing.  Correctly
15458         append `.h' in #include.
15459         (process_file): Clean up newlines around generated `#include's.
15460         (decode_signature_piece): Correctly handle inner classes.
15461         (struct include): New structure.
15462         (all_includes): New global.
15463         (print_include): New function.
15464         (add_class_decl): Use it.
15465         (process_file): Likewise.
15466         (add_class_decl): Generate include for java-array.h if array
15467         seen.
15468         (process_file): Don't generate java-array.h include.
15469
15470         * gjavah.c (add_namelet): Check for standard package names here.
15471         (add_class_decl): Don't check for standard package names here.
15472
15473 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15474
15475         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15476         When reading a zip file, only use strncmp if both strings are
15477         bigger than the buffer length.  Initialize `k' when looping
15478         through zip file.
15479
15480 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15481
15482         * gjavah.c (struct namelet): New structure.
15483         (add_namelet): New function.
15484         (print_namelet): New function.
15485         (print_class_decls): Use add_namelet and print_namelet to generate
15486         namespaces and not classes.
15487         (method_printed): New global.
15488         (HANDLE_END_METHOD): Examine method_printed.
15489         (print_method_info): Set method_printed when required.  Print
15490         error if function to be ignored is marked virtual.  Handle $finit$
15491         method.
15492         (METHOD_IS_FINAL): New macro.
15493         (print_field_info): Use it.
15494         (HANDLE_METHOD): Clear method_printed.
15495         (method_pass): New global.
15496         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15497         (process_file): Do two passes over both fields and methods.
15498         (HANDLE_METHOD): Examine method_pass.
15499         (root): New global.
15500         (add_class_decl): New function.
15501         (print_class_decls): Don't scan over entire constant pool.
15502
15503 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15504
15505         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15506         disable linking in that case.
15507
15508 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15509
15510         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15511         not 0x1f.
15512
15513 1999-02-21  Per Bothner  <bothner@cygnus.com>
15514
15515         * decl.c (build_result_decl), java-tree.h:  New method.
15516         (complete_start_java_method):  Handle synchronized methods.
15517         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15518         (start_java_method):  Call build_result_decl here instead  ...
15519         * parse.y (java_complete_expand_method):  ... and here.
15520         (expand_start_java_method): Don't call complete_start_java_method here.
15521         (java_complete_expand_method):  Call it here instead.
15522         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15523         * java-tree.h:  ... here.
15524
15525         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15526         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15527         for ARRAY_REF - it doesn't work when array bounds are checked.
15528         (patch_array_ref):  Handle it here instead.
15529
15530         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
15531
15532 1999-02-19  Per Bothner  <bothner@cygnus.com>
15533
15534         Force left-to-right evaluation of binary operations etc.
15535         * expr.c (force_evaluation_order), java-tree.h:  New function.
15536         * parse.y (java_complete_lhs):  Pass binary operations, procedure
15537         calls, and ARRAY_REFs to force_evaluation_order.
15538         (various):  Set TREE_SIDE_EFFECTS more carefully.
15539
15540         Tolerate random (non-UTF8) encoding in comments without complaining.
15541         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
15542         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
15543
15544         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
15545         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
15546
15547         * parse.y (java_complete_lhs):  Ignore an empty statement in a
15548         COMPOUND_EXPR.  Don't complain about empty statement after return.
15549
15550 1999-02-19  Per Bothner  <bothner@cygnus.com>
15551
15552         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
15553         in TREE_LIST - just chain the POINTER_TYPEs together.
15554         (resolve_class):  If type already resolved, return decl.
15555         After resolving, update TREE_TYPE(class_type), and name (if array).
15556         * parse.h (do_resolve_class), parse.y:  Make non-static.
15557         * class.c (maybe_layout_super_class):  Take this_class argument.
15558         Do do_resolve_class if necessary.
15559         (layout_class, layout_class_methods): Adjust calls appropriately.
15560         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15561         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
15562         * typeck.c (build_java_array_type):  Don't call layout_class.
15563
15564 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15565
15566         * parse.y (check_pkg_class_access): Allow private class access
15567         within the same package.
15568         (strip_out_static_field_access_decl): New function.
15569         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15570         operator argument before testing its nature.
15571
15572 1999-02-03  Per Bothner  <bothner@cygnus.com>
15573
15574         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
15575         (TRY_EXPR):  Simplify - it no longer has a finally clause.
15576         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
15577         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15578         * expr.c (java_lang_expand_expr):  Likewise.
15579         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
15580         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
15581         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
15582         (build_try_statement):  Remove finally parameter and handling.
15583         (build_try_finally_statement):  New function.
15584         (patch_try_statement):   No longer need to support finally clause.
15585         (try_statement):  Update grammar action rules.
15586         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
15587         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15588
15589 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
15590
15591         * jcf-parse.c (get_constant): Add braces around computation of 'd'
15592         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
15593
15594 1999-02-17  Andrew Haley  <aph@cygnus.com>
15595
15596         * class.c (build_utf8_ref): Back out broken patch which was
15597         intended to to output signatures using '.' as a separator.
15598
15599         * class.c (make_class_data): Output signatures using '.' as a
15600         separator, rather than '/'.
15601         (mangled_classname): Likewise.
15602         (make_field_value): Likewise.
15603         (make_method_value): Likewise.
15604         * constants.c (alloc_class_constant): Likewise.
15605         * expr.c (build_invokeinterface): Likewise.
15606
15607 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15608
15609         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15610         of an ancient workaround.
15611
15612 1999-02-10  Jeffrey A Law  (law@cygnus.com)
15613
15614         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
15615         here anymore.
15616
15617 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15618
15619         * lex.c (yylex): Encode \0 as UTF8.
15620
15621 1999-02-10  Tom Tromey  <tromey@cygnus.com>
15622
15623         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15624         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15625         (libgcj_zip): Renamed.
15626         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15627         LIBJAVA_ZIP_FILE.
15628         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15629
15630         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15631         (GC_NAME): Renamed -lgc to -lgcjgc.
15632
15633 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15634
15635         * lex.c (java_lang_cloneable): Initialize.
15636         * parse.y (java_lang_cloneable): New static variable.
15637         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15638         doing one more qualification round.
15639         (valid_ref_assignconv_cast_p): Reject null source or
15640         destination. Allow an array to be cast into java.lang.Cloneable.
15641         (patch_cast): Swapped two first arguments to first call to
15642         valid_ref_assignconv_cast_p.
15643
15644 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15645
15646         * parse.h: DECL_P renamed JDECL_P.
15647         * parse.y: DECL_P replaced by JDECL_P.
15648         (build_array_from_name): Always use pointer's type.
15649         (patch_bc_statement): Extra code to search continue target in a
15650         for loop. Fixed comments. Continue target is current loop when
15651         unlabeled.
15652
15653 1999-02-05  Andrew Haley  <aph@cygnus.com>
15654
15655         * class.c (make_class_data): The superclass of an interface should
15656         be null, not class Object.
15657
15658         * lex.c (java_lex): Sign extend hex literals.
15659
15660 1999-02-04  Andrew Haley  <aph@cygnus.com>
15661
15662         * class.c (build_utf8_ref): Output signatures using '.' as a
15663         separator, rather than '/'.
15664         (make_class_data): Likewise.
15665
15666 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
15667
15668         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15669         mkstemp.o.  Get them from libiberty now.
15670
15671 1999-02-02  Jeffrey A Law  (law@cygnus.com)
15672
15673         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15674
15675 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15676
15677         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15678         from libiberty.h
15679
15680 1999-02-02  Per Bothner  <bothner@cygnus.com>
15681
15682         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15683         * jcf-write.c (generate_bytecode_return):  New function.
15684         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
15685
15686         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
15687         generate special [fd]const_[01] instructions.
15688
15689         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
15690
15691         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
15692         handling OPCODE_lookupswitch or OPCODE_tableswitch.
15693
15694 1999-02-01  Per Bothner  <bothner@cygnus.com>
15695
15696         * parse.y (patch_method_invocation):  Handle calling static methods,
15697         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15698
15699         * parse.y (java_complete_lhs):  Don't complain about unreachable
15700         exit condition in a do-while statement.
15701
15702 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15703
15704         * lex.c (java_read_char): Fixed utf8 decoding.
15705         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15706         range.
15707         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15708         comments. Local variable `all_primitive' is gone. Broadened
15709         acceptance of `0' to floating point targets. `long' can now be
15710         widened to `double' or `float'.
15711         (valid_method_invocation_conversion_p): Added leading
15712         comment. Fixed tabulation.
15713         (build_string_concatenation): Optimize out left or right empty
15714         string constants.
15715
15716 1999-01-28  Per Bothner  <bothner@cygnus.com>
15717
15718         * jcf-write.c (localvar_alloc):  Only emit entry for
15719         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15720         (generate_bytecode_insns):  Only call put_linenumber if
15721         debug_info_level > DINFO_LEVEL_NONE.
15722         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
15723         is specified, add -g1 (for compatibility wih javac).
15724
15725 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
15726
15727         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15728         gjavah.o, check-init.o, jv-scan.o
15729
15730 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15731
15732         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15733
15734         * gjavah.c: Include config.h and system.h.
15735
15736         * javaop.h (inline): Don't define, its handled by system.h.
15737         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
15738         from `inline' to `static inline'.
15739
15740         * jcf.h (inline): Don't define, its handled by system.h.
15741
15742         * lex.c (inline): Likewise.
15743
15744 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
15745
15746         * lang-specs.h: Map -Qn to -fno-ident.
15747
15748 1999-01-29  Richard Henderson  <rth@cygnus.com>
15749
15750         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15751
15752 1999-01-29  Tom Tromey  <tromey@cygnus.com>
15753
15754         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15755         then cast it to Object before calling `append' method.
15756
15757 1999-01-28  Per Bothner  <bothner@cygnus.com>
15758
15759         * check-init.c (check_bool2_init, check_bool_init, check_init):
15760         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
15761         * jcf-write.c (generate_bytecode_insns):  Likewise.
15762
15763 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15764
15765         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
15766         * parse.y (patch_cast): Allow a boolean to be cast into a
15767         boolean.
15768
15769 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15770
15771         * parse.y: (class_declaration:): Fixed indentation.
15772         (class_member_declaration:): Extra `;' after field declaration now
15773         accepted.
15774         (interface_declaration:): Removed debug messages in error reports.
15775         (patch_binop): Nodes created and returned inherit the orignal
15776         node's COMPOUND_ASSIGN_P flag value.
15777         (patch_cast): Fix cast from char to floating point.
15778
15779 1999-01-25  Andrew Haley  <aph@cygnus.com>
15780
15781         * except.c, java-except.h (expand_resume_after_catch): new
15782         function.
15783         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15784         to branch back to main flow of control after a catch block.
15785
15786 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15787
15788         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15789         $(srcdir)/../system.h.
15790         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15791         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15792         (jcf-write.o): Likewise.
15793         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15794         (mangle.o): Depend on $(srcdir)/../toplev.h.
15795         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15796         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15797
15798         * class.c: Include output.h and parse.h.
15799         (mangled_classname): Add the `const' keyword to a char*.
15800         (find_named_method): Hide unused function definition.
15801         (build_utf8_ref): Change type of variable `c' to unsigned char.
15802         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15803         (build_class_ref): Add the `const' keyword to a char*.
15804         (layout_class_method): Remove unused variable `buf'.
15805
15806         * decl.c (find_local_variable): Remove unused variable `rtl'.
15807         (pushdecl): Likewise for variables `different_binding_level' and
15808         `oldglobal'.
15809         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15810         (maybe_build_cleanup): Likewise for parameter `decl'.
15811
15812         * except.c (expand_start_java_handler): Mark parameter `range'
15813         with ATTRIBUTE_UNUSED.
15814
15815         * expr.c: Include except.h.
15816         (pop_type): Remove unused variable `i'.
15817         (pop_value): Likewise for variables `n_words' and `i'.
15818         (expand_java_arrayload): Likewise for variable `convert'.
15819         (java_lang_expand_expr): Likewise for variables `op0', `type',
15820         `mode', `unsignedp', `node' and `elements'.
15821         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15822         `eh_ranges'.
15823         (process_jvm_instruction): Add a `const' qualifier to a char*.
15824
15825         * gjavah.c (output_directory): Add the `const' keyword to a char*.
15826         (temp_directory): Likewise.
15827         (print_c_decl): Likewise.
15828         (print_method_info): Likewise.
15829         (decode_signature_piece): Likewise.
15830         (print_mangled_classname): Likewise.
15831
15832         * java-except.h: Provide prototypes for maybe_start_try,
15833         maybe_end_try and add_handler.
15834
15835         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15836         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
15837         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15838         init_expr_processing, push_super_field, init_class_processing,
15839         can_widen_reference_to, class_depth, verify_jvm_instructions,
15840         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15841         set_local_type, merge_type_state, push_type, load_type_state,
15842         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
15843         emit_unicode_mangled_name): Add prototypes.
15844
15845         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
15846         (print_signature_type): Use ISDIGIT, not isdigit.
15847         (print_signature): Remove unused variable `j'.
15848
15849         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
15850         int when comparing against one.
15851
15852         * jcf-parse.c: Include toplev.h.
15853
15854         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
15855         (localvar_free): Remove unused variable `i'.
15856         (generate_bytecode_conditional): Likewise for variable `kind'.
15857
15858         * jv-scan.c: Include config.h and system.h.  Remove redundant
15859         OS header and gansidecl.h includes.
15860         (warning): Add the `const' keyword to a char*.  Also add
15861         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
15862         __STDC__, when determining whether to use ANSI-isms.
15863         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
15864         (xmalloc): Don't redundantly prototype here.
15865         (main): Remove unused parameter `envp'.  Also fix the arguments
15866         passed to function `fatal' to match the format specifier.
15867
15868         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
15869
15870         * mangle.c: Include toplev.h.
15871         (emit_unicode_mangled_name): Declare parameter `len'.
15872
15873         * parse.y (parse_warning_context): Add the `const' keyword to a
15874         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
15875         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
15876         (issue_warning_error_from_context): Add the `const' keyword to
15877         a char*.
15878         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
15879         not `__STDC__' for whether to use ANSI-isms.
15880
15881         * typeck.c (incomplete_type_error): Mark parameters `value' and
15882         `type' with ATTRIBUTE_UNUSED.
15883         (parse_signature_type): Use ISDIGIT, not isdigit.
15884
15885         * verify.c (check_pending_block): Add the `const' keyword to a char*.
15886         (verify_jvm_instructions): Likewise.  Remove unused variables
15887         `field_name' and `default_val'.
15888
15889         * zextract.c: Include config.h and system.h.  Remove redundant
15890         OS header includes.
15891
15892         * zipfile.h: Prototype `read_zip_archive'.
15893
15894 1999-01-21  Andrew Haley  <aph@cygnus.com>
15895
15896         * typeck.c (convert): Allow conversions to void type: some
15897         optimizations in gcc do this.
15898
15899 1999-01-21  Andrew Haley  <aph@cygnus.com>
15900
15901         * typeck.c (convert_ieee_real_to_integer): New function.
15902         (convert): When not using fast-math and using hardware fp, convert
15903         an IEEE NaN to zero.
15904
15905 1999-01-18  Andrew Haley  <aph@cygnus.com>
15906
15907         * parse.y (patch_binop): Do a type conversion from signed to
15908         unsigned and then back to signed when a ">>>" is found.
15909
15910 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15911
15912         * java-tree.h: (check_for_initialization): Added prototype.
15913         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
15914         * parse.y (do_resolve_class): Removed unused locals.
15915         (read_import_dir): Likewise.
15916         (resolve_qualified_expression_name): Array creation
15917         expressions are valid primary expressions.
15918         (qualify_ambiguous_name): Likewise.
15919         (patch_synchronized_statement): Removed unused local.
15920
15921 1999-01-17  Jeffrey A Law  (law@cygnus.com)
15922
15923         * Makefile.in (zextract.o): Add dependencies.
15924
15925         * Makefile.in: Do not put ^Ls at the start of a line.
15926
15927 1999-01-15  Per Bothner  <bothner@cygnus.com>
15928
15929         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
15930         sub-type the result of the call that gets the exception value.
15931
15932         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
15933         don't call finish_class.
15934
15935         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
15936         clear found before continuing.
15937
15938         * verify.c (verify_jvm_instructions):  On an array load, allow
15939         and handle top of stack to be TYPE_NULL.
15940
15941         * gjavah.c (generate_access):  Translate Java package private or
15942         protected access to C++ public, but with a comment.
15943
15944 1999-01-13  Andrew Haley  <aph@cygnus.com>
15945
15946         * expr.c (generate_name): Name prefix changed to avoid clashes
15947         with assembler temp labels.
15948
15949         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
15950         MODIFY_EXPR.  Without this, code for the assignment may not be
15951         generated at all and the synchronized statement will read an
15952         uninitialized variable.
15953
15954 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15955
15956         * class.c (maybe_layout_super_class): Fixed returned value.
15957         * lex.c: Added 1999 to the copyright.
15958         (java_init_lex): Initialize java_lang_imported.
15959         * lex.h: Added 1999 to the copyright.
15960         * parse.h: Added 1999 to the copyright.
15961         (REGISTER_IMPORT): Fixed typo in trailing macro.
15962         (CURRENT_OSB): New macro.
15963         (struct parser_ctxt): New fields osb_depth, osb_limit.
15964         * parse.y (java_lang_id): New global variable.
15965         (type_import_on_demand_declaration): Don't import java.lang.* twice.
15966         (array_creation_expression:): Use CURRENT_OSB.
15967         (dims:): Uses a stack to keep track of array dimensions.
15968         (cast_expression:): Use CURRENT_OSB.
15969         (find_expr_with_wfl): Return NULL if node found doesn't meet the
15970         conditions.
15971         (register_fields): Fixed typos in comment.
15972         (check_method_redefinition): Fixed comment indentation.
15973         (java_check_regular_methods): Set saved found wfl to NULL after
15974         having reinstalled it in the previously found DECL_NAME.
15975
15976 1999-01-10  Richard Henderson  <rth@cygnus.com>
15977
15978         * gjavah.c (java_float_finite): Use a union to do type punning.
15979         (java_double_finite): Likewise.
15980
15981 1999-01-09  Per Bothner  <bothner@cygnus.com>
15982
15983         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
15984         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
15985         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
15986         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
15987         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
15988         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
15989
15990 1999-01-08  Per Bothner  <bothner@cygnus.com>
15991
15992         * check-init.c (check_init):  If compiling to native, we don't
15993         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
15994
15995 1999-01-08  Tom Tromey  <tromey@cygnus.com>
15996
15997         * parse-scan.y (variable_declarator_id): Set or increment
15998         bracket_count.
15999         (bracket_count): New global.
16000         (formal_parameter): Handle case where bracket pairs trail variable
16001         declarator id.
16002
16003 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16004
16005         * jcf-parse.c (yyparse): variable len changed from a char to an
16006         int to prevent overflow.
16007
16008 1999-01-06  Per Bothner  <bothner@cygnus.com>
16009
16010         * java-tree.h:  Declare read_class.
16011         * jcf-parse.c (read_class):  New function.
16012         (load_class):  Now just call read_class.
16013
16014         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16015         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16016         which is needed by java_parse_abort_on_error macro,
16017         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16018
16019         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16020         constructor, if initializing a static field.
16021         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16022         * expr.c (java_lang_expand_expr):  For a static array constructor
16023         of primitive elements, allocate the array itself statically.
16024         Disabled until we can set the vtable field statically.
16025
16026         * check-init.c:  New file.  Checks for definite assignment.
16027         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16028         * parse.y (java_complete_expand_method): Call check_for_initialization.
16029         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16030
16031 1999-01-06  Graham <grahams@rcp.co.uk>
16032
16033         * parse.y : include system.h instead of including
16034         standard headers directly with the exception of <dirent.h>.
16035
16036 1999-01-06  Per Bothner  <bothner@cygnus.com>
16037
16038         * lex.h:  Moved static function declarations to lex.c,
16039         to shut up some -Wall warnings.
16040         * lex.c:  Static function declarations moved here.
16041         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16042
16043 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16044
16045         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16046
16047 1998-12-22  Per Bothner  <bothner@cygnus.com>
16048
16049         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16050         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16051
16052         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16053         (localvar_alloc):  Change return type to void,
16054         (emit_unop):  Remove unused variable size.
16055
16056         * jcf-write.c (struct jcf_block):  Add new union.
16057         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16058         (call_cleanups):  New functions.
16059         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16060         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16061         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16062         * lang.c (lang_init):  Call using_eh_for_cleanups.
16063         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16064         completing operands to patch_synchronized_statement.
16065         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16066         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16067         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16068
16069 1998-12-20  John F. Carr  <jfc@mit.edu>
16070
16071         * Make-lang.in: Comment out control-Ls; they upset some makes.
16072
16073 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16074
16075         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16076         consistently.
16077
16078 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16079
16080         * parse.y (DIR_SEPARATOR): New define.
16081         (check_class_interface_creation): Use it.
16082
16083         * parse-scan.y (report_main_declaration): Recognize
16084         `java.lang.String' in argument to main.
16085
16086 1998-12-16  Per Bothner  <bothner@cygnus.com>
16087
16088         * parse.y (create_interface):  Remove bogus test.
16089
16090 1998-12-16  Per Bothner  <bothner@cygnus.com>
16091
16092         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16093         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16094
16095 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16096
16097         * parse-scan.y (qualified_name): Use correct sprintf format.
16098
16099 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16100
16101         * gjavah.c (print_field_info): Changed how most negative number is
16102         printed.
16103
16104 1998-12-14  Per Bothner  <bothner@cygnus.com>
16105
16106         * parse.y (fold_constant_for_init):  New function.
16107         (resolve_expression_name):  Don't replace static final
16108         constant-initialized fields by its value.
16109         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16110         not replace static final constant-initialized fields by their values.
16111         (register_fields):  If there is an initializer, set DECL_INITIAL and
16112         MODIFY_EXPR_FROM_INITIALIZATION_P.
16113         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16114         Only call patch_initialized_static_field if
16115         MODIFY_EXPR_FROM_INITIALIZATION_P.
16116         (patch_initialized_static_field):  If not valid constant, clear
16117         DECL_INITIAL.
16118
16119         * parse.y (lookup_field_wrapper):  Fix thinko.
16120
16121         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16122         set and restore global lineno.
16123
16124 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16125
16126         * gjavah.c (print_field_info): If value to print is the smallest
16127         value of its size, then print as hex to avoid later warnings from
16128         C++ compiler.
16129
16130 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16131
16132         * gjavah.c (decompile_method): Decompile `return null'.
16133         (process_file): Generate `#pragma interface'.
16134         (method_declared): New global.
16135         (print_method_info): Set it.
16136         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16137         (print_method_info): Handle abstract methods.
16138
16139 1998-12-13  Per Bothner  <bothner@cygnus.com>
16140
16141         * parse.y (patch_method_invocation):  If class_decl is null
16142         (e.g. an array type), use original type.
16143
16144         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16145         errors about uncaught exception from clone (of array, specifically).
16146
16147 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16148
16149         * gjavah.c (decompile_method): Handle all types of `return'
16150         opcode.  Decompile `return this' and `return'.
16151         (method_access): New global.
16152         (print_method_info): Set it.
16153         (decompile_method): Don't decompile a synchronized method.
16154
16155 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16156
16157         * jcf-reader.c (jcf_parse_one_method): Recognize
16158         HANDLE_END_METHOD.
16159         * gjavah.c (HANDLE_END_METHOD): New macro.
16160         (HANDLE_CODE_ATTRIBUTE): New macro.
16161         (decompile_method): New function.
16162         (print_method_info): Don't print `;\n' at end of function decl.
16163         Include java-opcodes.h.
16164         (decompiled): New global.
16165
16166 1998-12-12  Per Bothner  <bothner@cygnus.com>
16167
16168         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16169         flag_emit_class_files.
16170         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16171         if flag_emit_class_files.
16172         * parse.y (java_complete_tree):  Pre-liminary support for
16173         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16174
16175         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16176         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16177
16178         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16179
16180         * zipfile.h (opendir_in_zip):  New declaration.
16181         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16182         (opendir_in_zip):  New function, using code from open_in_zip.
16183         (open_in_zip):  Call opendir_in_zip.
16184         (find_class):  Remove no-longer-used do_class_file parameter,
16185         but add source_ok parameter.  Change logic so if we find a .java file,
16186         we don't look for .class in later classpath emtries.
16187         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16188         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16189         * gjavah.c: Update call to find_class.
16190         * jcf-dump.c:  Likewise.
16191
16192         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16193         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16194         nothing if body is empty_stmt_node.
16195         Various little fixes so SP gets correctly adjusted.
16196         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16197         For CALL_EXPR, test if static first.
16198         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16199         such as the ones we create for Object and Class.
16200         Set and restore current_function_decl.
16201         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16202         (note_possible_classname):  New function.
16203         (read_import_entry):  Removed.  Merged with read_import_dir.
16204         (read_import_dir):  Don't call find_class - that only gives us
16205         the first classpath entry having the needed package.
16206         Use the struct buffer data structure from buffer.h.
16207         (read_import_dir, find_in_imports_on_demand):  The remembered
16208         class names now use '.' (not '/') as package separator.
16209
16210         * parse.y (java_complete_expand_methods):  Call write_classfile
16211         here, and not in java_expand_classes (which only gets first class).
16212
16213 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16214
16215         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16216         (register_fields):  If a static fields has an initializer, just
16217         chain it on ctxp->static_initialized, and handle later.
16218         (java_complete_expand_methods):  Force <clinit> first.
16219         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16220         - it's already been completed.
16221         (patch_initialized_static_field):  New function.
16222         (java_complete_field):  Call it.
16223
16224 1998-12-12  Per Bothner  <bothner@cygnus.com>
16225
16226         * expr.c (encode_newarray_type, build_new_array):  New functions.
16227         * java-tree.h:  Declare build_new_array.
16228         * jcf-write.c (patch_newarray):  Use build_new_array.
16229
16230         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16231         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16232
16233         * parse.y (patch_new_array_init):  Re-organize.
16234         Now is passed the actual array (pointer) type of the value.
16235         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16236         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16237         (java_complete_tree):  Update patch_new_array_init.
16238
16239         * jcf-write.c (find_constant_index):  New function.
16240         (generate_bytecode_insns):  Use find_constant_index.
16241         (generate_classfile):  Use find_constant_index for ConstantValue.
16242
16243 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16244
16245         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16246         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16247         * class.c (make_class_data): Renamed dtable -> vtable, and
16248         dtable_method_count -> vtable_method_count.
16249
16250 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16251
16252         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16253         global variables, initialized.
16254         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16255         Declared new global variables.
16256         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16257         double_zero_node, integer_zero_node upon direct matching.
16258         * parse.y (purify_type_name): Added function prototype.
16259         (duplicate_declaration_error_p): Consider new_type as potentially
16260         being a incomplete type. Use purify_type_name on type string.
16261         (method_header): saved_type: unused variable removed. Don't figure
16262         return type if method name is invalid.
16263         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16264         processed by patch_unaryop.
16265         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16266         increment/decrement node into its original type after binary
16267         numeric promotion on its operands.
16268
16269 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16270
16271         * parse.y (array_initializer:): Array init operand is NULL_TREE
16272         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16273         now an error. Fixed indentation problems.
16274         (patch_string): Handle error_mark_node as an argument.
16275         (patch_new_array_init): Fixed indentation problems.
16276         (array_constructor_check_entry): Removed check on null wfl_value.
16277         Return an error if wfl_value's walk returns an error.
16278
16279 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16280
16281         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16282         * lex.c (java_lex): Remember column position before advancing one
16283         token. Retain location information on OCB_TK.
16284         * lex.h (typedef struct java_lc): Added new field.
16285         * parse.h (GET_SKIP_TYPE): New macro.
16286         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16287         * parse.y (build_new_array_init, patch_new_array_init,
16288         patch_array_constructor, maybe_build_array_element_wfl,
16289         array_constructor_check_entry): New function prototypes.
16290         (switch_block:): Tagged <node>.
16291         (OCB_TK): Tagged <operator>.
16292         (array_initializer:): Installed actions.
16293         (variable_initializer): Build location information on element if
16294         necessary.
16295         (switch_statement:): Fixed indentation typo.
16296         (switch_block:): Redefined default action.
16297         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16298         (patch_assignment): Removed duplicate code.
16299         (maybe_build_array_element_wfl, build_new_array_init,
16300         patch_new_array_init, patch_array_constructor,
16301         array_constructor_check_entry): New functions.
16302
16303 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16304
16305         * parse.y (array_initializer): Tagged <node>.
16306         (variable_initializer:): Use default rule.
16307         (array_initializer:): Defined actions.
16308         (variable_initializers:): Likewise.
16309         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16310         non-static field accesses.
16311         (patch_invoke): Fixed indentation typo.
16312         (java_complete_tree): Likewise.
16313         (build_labeled_block): Changed leading comment. Generate an error
16314         in case of duplicate loop labels.
16315         (patch_conditional_expr): Patch results of string concatenation
16316         operations.
16317
16318 1998-12-06  Per Bothner  <bothner@cygnus.com>
16319
16320         * constants.c (find_methodref_index):  When the class is an interface,
16321         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16322
16323         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16324         "<finit>" (which Sun's verifier rejects).
16325         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16326         (generate_field_initialization_code):  Removed.
16327         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16328         (patch_method_invocation):  Add $finit$ call here.
16329
16330         * java-tree.h (CALL_USING_SUPER):  New macro.
16331         * parse.y (patch_invoke):  Remove im local variable.
16332         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16333         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16334         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16335
16336         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16337
16338         * parse.y (java_complete_tree):  Don't complain about unreachable
16339         statement if it is empty_stmt_node.
16340
16341         * jcf-write.c (find_constant_wide):  New function.
16342         (push_long_const):  Use find_constant_wide.
16343
16344         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16345         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16346         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16347         Emit invokeinterface when calling an interface method.
16348         Emit invokespecial also when calling super or private methods.
16349
16350         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16351
16352 1998-12-06  Per Bothner  <bothner@cygnus.com>
16353
16354         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16355
16356 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16357
16358         * java-tree.h (java_layout_seen_class_methods): New function
16359         prototype.
16360         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16361         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16362         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16363         * parse.y (method_declarator:): Defined action.
16364         (issue_warning_error_from_context): input_filename saved, set to
16365         the appropriate value and restored after java_error is called.
16366         (build_unresolved_array_type): Fixed comment.
16367         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16368         (method_header): Deal with return type the same way type are
16369         handled for fields and method's parameters and local variables
16370         types are handled.
16371         (check_method_redefinition): Removed extra CR.
16372         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16373         (java_layout_seen_class_methods): New function.
16374         (java_layout_classes): Call java_layout_seen_class_methods.
16375
16376 1998-12-03  Per Bothner  <bothner@cygnus.com>
16377
16378         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16379
16380 1998-12-03  Per Bothner  <bothner@cygnus.com>
16381
16382         * jcf-dump.c (main):  Fix error message.
16383         * jcf-path.c (add_entry):  Style fix.
16384
16385 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16386
16387         * class.c (layout_class_method): Call build_java_argument_signature
16388         on constructors too.
16389         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16390         (patch_method_invocation): Define a primary when resolving an
16391         expression name. Augmented comment on code checking illegal `this'
16392         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16393
16394 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16395
16396         * class.c (layout_class_method): Don't report error on non-static
16397         overriding static if the method is private.
16398         * java-tree.h (finish_class): Prototype added.
16399         * lex.c (java_get_line_col): Handle col argument -2 value.
16400         * parse.h: All static method declarations moved to parse.y.
16401         * parse.y: Now contains all static method declarations previously
16402         found in parse.h.
16403         (find_expr_with_wfl, missing_return_error,
16404         unreachable_stmt_error): New functions.
16405         (java_get_real_method_name): Identify constructors bearing class
16406         names in source code compiled classes only.
16407         (java_complete_expand_methods): Call missing_return_error.
16408         (invocation_mode): Private methods invoked as static methods.
16409         (java_complete_tree): Call unreachable_stmt_error.
16410
16411 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16412
16413         * Makefile.in (+target): Removed.
16414         (+xmake_file): Likewise.
16415         (+tmake_file): Likewise.
16416         (.NOEXPORT): Removed duplicate.
16417
16418 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16419
16420         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16421
16422         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16423
16424         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16425         libiberty.h.  Provide an xmalloc definition.
16426
16427         * jvspec.c: Remove the xmalloc prototype.
16428
16429         * parse-scan.y: Include config.h and system.h.  Don't include
16430         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16431         Provide an xstrdup definition.
16432
16433 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16434
16435         * jcf-path.c (add_entry): Recognize ".jar" too.
16436         * lang-specs.h: Likewise.
16437
16438 1998-11-26  Per Bothner  <bothner@cygnus.com>
16439
16440         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16441         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16442
16443         * jcf-write.c (generate_bytecode_insns):
16444         Handle pre/post-increment/decrement of long.
16445
16446         * jcf-write.c (generate_bytecode_insns):
16447         Handle missing exception handler (finally for synchronized).
16448
16449 1998-11-25  Per Bothner  <bothner@cygnus.com>
16450
16451         * java-tree.h (end_params_node):  Declare global.
16452         * decl.c (end_params_node):  New global.
16453         (init_decl_processing, start_java_method):  Use end_params_node for
16454         end of list of parameter types.  Follows correct gcc conventions.
16455         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16456         * lang.c (put_decl_node):  Likewise.
16457         * typeck.c (various places):  Likewise.
16458         * class.y (various places):  Likewise.
16459         * parse.y (various places):  Likewise.
16460
16461         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16462         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16463
16464         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16465
16466         * class.c (layout_class_method):  Remove commented-out code, re-format.
16467         Don't add vtable entry (or index) for private methods.
16468         * expr.c (expand_invoke):  A private method is implicitly final.
16469         * class.c (make_class_data):  If inlining or optimizing,
16470         skip private methods.
16471
16472         * class.c (finish_class):  New function.  Calls existing methods,
16473         but alls emits deferred inline functions.
16474         * jcf-parse.c (parse_class_file):  Call finish_class.
16475         * parse.y (java_complete_expand_methods):  Likewise.
16476
16477         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16478
16479         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16480
16481 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16482
16483         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16484
16485 1998-11-24  Per Bothner  <bothner@cygnus.com>
16486
16487         * (generate_classfile): Always write class access flag with
16488         ACC_SUPER set.
16489
16490 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16491
16492         * class.c (maybe_layout_super_class): New function.
16493         (layout_class): Reorganized. Loop on class methods dispatched into
16494         a new function. Call maybe_layout_super_class.
16495         (layout_class_methods, layout_class_method): New functions.
16496         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16497         class.
16498         (expand_invoke): Likewise.
16499         * java-tree.h (all_class_list): New global variable declared.
16500         (layout_class_methods, layout_class_method): New function
16501         prototypes.
16502         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16503         * jcf-parse.c (all_class_list): New global variable.
16504         (load_class): Extended what class_or_name can be. Use parser
16505         context mechanism to save globals before calling jcf_parse.
16506         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16507         is set on the file name.
16508         (jcf_parse): Layout class methods when Object is loaded, otherwise
16509         record class in all_class_list for delayed method layout.
16510         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16511         * lang.c (put_decl_node): Decode <init> into the decl context
16512         class name.
16513         * lex.c (java_allocate_new_line): Use xmalloc.
16514         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16515         pointers, not TREE_LIST elements.
16516         (struct parser_ctxt): Fixed comment indentations, added comments
16517         and reordered some fields.
16518         (java_check_methods): Function prototype removed.
16519         * parse.y (java_push_parser_context): Use xmalloc.
16520         (java_parser_context_restore_global): Pop extra pushed ctxp only
16521         when there's nothing next.
16522         (maybe_create_class_interface_decl): Fixed comment, add new
16523         created class decl to all_class_list.
16524         (method_header): Use GET_REAL_TYPE on argument's types.
16525         (method_declarator): Use GET_REAL_TYPE, change type to the real
16526         type in TREE_LIST dependency node. Build argument list with the
16527         real type.
16528         (create_jdep_list): Use xmalloc. Removed allocation error message.
16529         (obtain_incomplete_type): Fixed leading comment. Broadened
16530         incoming argument meaning.
16531         (register_incomplete_type): Use xmalloc. Removed allocation error
16532         message.
16533         (safe_layout_class): Fixed leading comment.
16534         (jdep_resolve_class): Reversed if statement condition and switch
16535         if and else bodies.
16536         (resolve_and_layout): Fixed leading comment. Broadened incoming
16537         argument meaning.
16538         (complete_class_report_errors): New local variable name, for
16539         clarity. purify_type_name used for all error cases.
16540         (java_get_real_method_name): Stricter check on constructors.
16541         (java_check_regular_methods): Reverse methods list only if not
16542         already laid out. Layout artificial constructor.
16543         (java_check_methods): Deleted.
16544         (source_start_java_method): Obtain incomplete type for patchable
16545         method arguments.
16546         (java_layout_classes): Fixed leading comment. Use
16547         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16548         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16549         before returning. Fixed comments.
16550         (java_expand_classes): Check for errors up front.
16551         (patch_method_invocation): Class to search is resolved and laid
16552         out.
16553
16554 1998-11-24  Per Bothner  <bothner@cygnus.com>
16555
16556         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
16557
16558         * javaop.h (int8):  Removed - not used.
16559         (jbyte):  Redefine portably with correct signedness.
16560
16561         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
16562
16563         * jcf-write.c (generate_bytecode_insns):  Fix typo
16564         OPCODE_getstatic to OPCODE_getfield.
16565
16566         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
16567         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
16568         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16569
16570 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16571
16572         * jcf-parse.c (jcf_parse_source): Function returned type is
16573         void. Added prototype.
16574         (jcf_parse): Function returned type is void.
16575         (yyparse): Remove call to fclose on the last parsed file.
16576
16577         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16578
16579 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16580
16581         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16582         (layout_class): Cope with methods featuring WFL in decl names.
16583         * decl.c (unqualified_object_id_node): New global variable,
16584         initialized.
16585         (build_decl_no_layout): Removed.
16586         * expr.c (build_primtype_type_ref): Handle Double.
16587         (java_lang_expand_expr): Fixed indentations.
16588         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16589         (flag_wall, flag_redundant, flag_not_overriding,
16590         flag_static_local_jdk1_1, unqualified_object_id_node): Global
16591         variable declarations.
16592         (build_decl_no_layout): Removed prototype.
16593         (java_get_real_method_name): Added prototype.
16594         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16595         (java_parse_abort_on_error): Macro now just returns.
16596         * jcf-parse.c (jcf_parse_source): Check fclose returned
16597         value. Call emit_register_classes if java_report_errors returns
16598         zero.
16599         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16600         flag_static_local_jdk1_1): New integer flags.
16601         (lang_decode_option): New flags set here.
16602         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16603         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16604         the flag_redundant variable.
16605         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16606         when parsing java.lang.Object class.
16607         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16608         NULL_TREE to build.
16609         (resolve_qualified_expression_name): Fixed indentation.
16610         (patch_array_ref): Changed prototype.
16611         (not_initialized_as_it_should_p): Prototype removed.
16612         (java_report_errors): Added function prototype.
16613         * parse.y (formal_parameter:): Changed error message for not yet
16614         supported final parameters.
16615         (class_type_list:): Set both PURPOSE and VALUE of created
16616         TREE_LIST to be class_type.
16617         (primary_no_new_array:): Handle class literals on primitive types.
16618         (parse_warning_context): Reinstalled correct force_error and
16619         do_warning flags setups.
16620         (java_report_errors): Changed prototype. Return java_error_count
16621         value.
16622         (variable_redefinition_error): Consider treating variable type as
16623         a fake pointer.
16624         (create_interface): Warn about redundant abstract modifier if
16625         flag_redundant is set. Changed error message.
16626         (lookup_field_wrapper): Save/restore globals before/after looking
16627         up field.
16628         (duplicate_declaration_error_p): Consider treating declaration
16629         type as a fake pointer.
16630         (register_fields): Extract real type from dependency node. Check
16631         for duplicate field declaration after type adjustment. Use
16632         DECL_INITIAL to store static final initialized values.
16633         (method_header): Extract real function type from dependency node.
16634         (check_abstract_method_header): Use GET_METHOD_NAME.
16635         (obtain_incomplete_type): Layout fake pointer type.
16636         (safe_layout_class): Don't try to check for methods before layout.
16637         (java_complete_class): Don't check for correct throws clause
16638         elements inheritance here.
16639         (resolve_and_layout): Broadened name parameter meaning.
16640         (reset_method_name): Use GET_METHOD_NAME.
16641         (java_get_real_method_name): New function.
16642         (java_check_regular_methods): Don't check methods in
16643         java.lang.Object.  Verify lineage of throws clause elements. Use
16644         flag_no_overriding in warning report.
16645         (check_throws_clauses): Don't check if class was from
16646         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16647         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16648         (declare_local_variables): Use flag_static_local_jdk1_1 to report
16649         warning on unsupported final local variables. Use build_decl
16650         instead of build_decl_no_layout. Get real local variable type from
16651         dependency node.
16652         (source_start_java_method): Get real parameter type from
16653         dependency node. Call build_decl instead of build_decl_no_layout.
16654         (java_layout_classes): Reverse tree and layout type and class as
16655         required. Mark class as loaded when done.
16656         (resolve_field_access): Fixed indentation. Restricted condition
16657         leading to static field access code generation. Set field_type
16658         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16659         (resolve_qualified_expression_name): Initialize type_found to
16660         null. Handle static field resolved during qualification. Fixed
16661         layout on non primitive field decl types.
16662         (not_accessible_p): Fixed typo in comment.
16663         (patch_method_invocation): Resolve and layout class to search from
16664         type.
16665         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16666         layout non primitive type, if necessary. Make method node only to
16667         report errors.
16668         (find_applicable_accessible_methods_list): Consider WFL'ed method
16669         decl names. Fixed indentation.
16670         (argument_types_convertible): Resolve and layout target type if
16671         necessary.
16672         (java_complete_tree): Fixed indentation problems. Rewrote
16673         CALL_EXPR thrown exceptions check. Re-installed further processing
16674         of the assignment in certain cases.
16675         (patch_assignment): Call maybe_build_primttype_type_ref to perform
16676         inlining on class literals.
16677         (valid_builtin_assignconv_identity_widening_p): Cope with constant
16678         0 literal.
16679         (valid_method_invocation_conversion_p): Likewise.
16680         (patch_string): Temporary disable forbidden use of `this' in
16681         explicit constructor invocations when doing string concatenation
16682         within their scope.
16683         (patch_unaryop): Added comment. Reinstalled code to disable
16684         further check on assignment operation with cast expression RHS.
16685         (patch_switch_statement): Fixed indentation.
16686         (build_try_statement): Call build_decl instead of
16687         build_decl_no_layout.
16688         (patch_synchronized_statement): Likewise.
16689         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16690         IS_UNCHECKED_EXPRESSION_P.
16691         (check_thrown_exceptions_do): Changed leading comment. Resolve and
16692         layout argument exception type.
16693         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16694         of IS_UNCHECKED_EXPRESSION_P.
16695
16696 1998-11-18  Anthony Green  <green@cygnus.com>
16697
16698         * jcf-parse.c (yyparse): Open class file in binary mode.
16699
16700 1998-11-15  Per Bothner  <bothner@cygnus.com>
16701
16702         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
16703
16704         * jcf-write.c (perform_relocations):  Move check out one loop.
16705
16706 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
16707
16708         * Make-lang.in: Fix reference to srcdir.
16709         * jv-scan.c: Add missing xmalloc prototype.
16710         * jvgenmain.c: Ditto.
16711
16712 1998-11-15  Per Bothner  <bothner@cygnus.com>
16713
16714         * decl.c (error_mark_node), java-tree.h:  New global.
16715         * parse.y:  Use empty_stmt_node instead of size_zero_node.
16716         (build_if_else_statement):  If missing else, use empty_stmt_node.
16717
16718         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
16719         (java_complete_expand_method):  Complain if return is missing.
16720         (java_check_regular_methods):  Comment out incorrect error check.
16721         (not_accessible_p):  Fix incorrect handling of protected methods.
16722         (patch_method_invocation):  Pass correct context to not_accessible_p.
16723         (find_applicable_accessible_methods_list):  Likewise.
16724         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
16725         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
16726         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
16727         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
16728
16729         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
16730         (push_int_const):  Remove reundant NOTE_PUSH.
16731         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
16732         (- case SWITCH_EXPR):  Fix code generation bug.
16733         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
16734         (generate_classfile):  More robust for abstract methods.
16735
16736 1998-11-15  Anthony Green  <green@cygnus.com>
16737
16738         * Makefile.in: jv-scan and jvgenmain all require libiberty.
16739         * Make-lang.in: Ditto.
16740
16741         * jv-scan.c: Remove xmalloc and xstrdup definitions.
16742         * jvgenmain: Ditto.
16743
16744 1998-11-15  Per Bothner  <bothner@cygnus.com>
16745
16746         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
16747
16748         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
16749
16750 1998-11-14  Per Bothner  <bothner@cygnus.com>
16751
16752         Allow uses of interface types to verify.  This is not really
16753         type-safe, but it matches what Sun does, and is OK as long as
16754         there are appropriate run-time checks.
16755         * verify.c (merge_types):  If merging two interface types,
16756         just set the result to java.lang.Object.
16757         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
16758
16759 1998-11-13  Tom Tromey  <tromey@cygnus.com>
16760
16761         * gjavah.c (main): Handle --output-class-directory argument.
16762         * jvspec.c (lang_specific_driver): Translate `-d' into
16763         -foutput-class-dir.
16764         * jcf.h (jcf_write_base_directory): Declare.
16765         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
16766         * lang-options.h: Mention -foutput-class-dir.
16767         * jcf-write.c (jcf_write_base_directory): New global.
16768         (make_class_file_name): Put generated .class file into `-d'
16769         directory, or into source directory if -d not given.  Function now
16770         static.
16771         (write_classfile): Free class file name.  Handle case where class
16772         file name is NULL.
16773         (DIR_SEPARATOR): New macro.
16774         Include <sys/stat.h>
16775
16776         * Makefile.in (prefix): New macro.
16777
16778 1998-11-12  Per Bothner  <bothner@cygnus.com>
16779
16780         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
16781         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
16782         here (done in patch_invoke instead).
16783         (case_identity):  Moved here from parse.y.
16784
16785         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
16786         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
16787         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
16788         so they can be efficiently scanned without recursion.
16789         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16790         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
16791         in BLOCK iteratively, rather than recursively.
16792
16793         * parse.y (do_unary_numeric_promotion):  New function.
16794         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
16795
16796         * parse.y (patch_newarray):  Various fixes.
16797
16798         Re-do handling of switch statements (for proper block scoping).
16799         * parse.y:  Add just a single block for the enture switch block,
16800         but don't create any "case blocks".
16801         (group_of_labels):  Rmeoved unneeded non-terminal.
16802         CASE_EXPR and DEFAULT_EXPR are added to current block.
16803         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
16804         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16805         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
16806         * parse.y (wfl_operator, print_int_node): Make non-static.
16807         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
16808         as part of recursive scan of block.
16809         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
16810         (patch_switch_statement):  Most tests move dinto java_complete_tree.
16811
16812         * parse.y:  Make various production be non-typed (void).
16813         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
16814         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
16815         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
16816
16817         * jcf-write.c (struct jcf_handler):  New type.
16818         (struct jcf_switch_state):  New type.
16819         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
16820         (alloc_handler, emit_unop, emit_reloc):  New functions.
16821         (adjust_typed_op):  Add extra parameter ("max type" offset).
16822         (emit_switch_reloc, emit_case-reloc):  New function.
16823         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
16824         (generate_bytecode_insns):  Support REAL_CST, switch statements,
16825         exception handling, method calls, object/array creation, and more.
16826
16827         * class.c:  Remove some unused variables.
16828         * constants.c (find_string_constant):  New function.
16829         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
16830         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
16831         if flag_emit_class_files.
16832
16833 1998-11-12  Tom Tromey  <tromey@cygnus.com>
16834
16835         * jcf-io.c (find_class): Added explanatory comment.
16836
16837         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
16838         trailing slash to `.zip' entries.
16839
16840         * jvspec.c (lang_specific_driver): Correctly handle case where
16841         GC_NAME not defined.
16842
16843 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16844
16845         * jvspec.c (GC_NAME): New define.
16846         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
16847         if required.
16848         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
16849
16850 1998-11-11  Per Bothner  <bothner@cygnus.com>
16851
16852         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
16853
16854 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16855
16856         * jcf-dump.c (main): Correctly recognize `--'-style long options.
16857
16858 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16859
16860         * class.c (is_compiled_class): Call safe_layout_class for class
16861         compiled from source.
16862         * conver.h (convert_to_integer, convert_to_real,
16863         convert_to_pointer): Added prototypes.
16864         * decl.c (init_decl_processing): Non longer push the decls of
16865         `methodtable', `constants', `Class', `Field', `dispatchTable'
16866         `jexception' and `Method'.
16867         * expr.c (build_invokeinterface): New function.
16868         (expand_invoke): static variable CLASS_IDENT now in
16869         build_invokeinterface. Use build_invokeinterface.
16870         (expand_java_field_op): Moved code to inline
16871         java.lang.PRIMTYPE.TYPE into a function.
16872         (build_primtype_type_ref): New function.
16873         * java-tree.def (INSTANCEOF_EXPR): New tree code.
16874         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
16875         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
16876         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
16877         (DECL_LOCAL_STATIC_VALUE): New macro.
16878         (build_invokeinterface, build_primtype_type_ref): New function
16879         prototypes.
16880         (java_parse_abort_on_error): Macro rewritten.
16881         * jcf-parse.c (current_method): Add comment to declaration.
16882         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
16883         Function prototypes fixed.
16884         (jcf_parse_source): push/pop parser context. save/restore global.
16885         (parse_source_file): Fixed leading comment. Now take a
16886         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
16887         classes and pop the parser context anymore.
16888         (yyparse): Push parser context, save globals, parse the source
16889         file, restore globals and pop the parser context when processing a
16890         source file.
16891         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
16892         * lex.c (java_parse_doc_section): New function.
16893         (java_lex): Call java_parse_doc_section when appropriate. Build an
16894         operator around INSTANCEOF_TK.
16895         * lex.h (java_lineterminator, java_sprint_unicode,
16896         java_unicode_2_utf8, java_lex_error, java_store_unicode):
16897         Prototypes rewritten.
16898         (java_parse_escape_sequence, java_letter_or_digit_p,
16899         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
16900         java_read_unicode, java_store_unicode, java_read_char,
16901         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
16902         Added function prototypes.
16903         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
16904         define.
16905         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
16906         New macros
16907         (struct parser_ctxt): New fields: deprecated,
16908         current_parsed_class_un, gclass_list.
16909         (fix_method_argument_names, issue_warning_error_from_context,
16910         resolve_package, lookup_package_type): New function prototypes.
16911         (resolve_expression_name): Fixed function prototype.
16912         (find_applicable_accessible_methods_list): Fixed indentation, added
16913         extra argument in prototype.
16914         (check_final_assignment, build_null_of_type, check_deprecation,
16915         check_method_redefinition, reset_method_name,
16916         java_check_regular_methods, java_check_abstract_methods,
16917         maybe_build_primttype_type_ref): New function prototype.
16918         * parse.y (conver.h): Include.
16919         (INSTANCEOF_TK): Tagged <operator>.
16920         (single_type_import_declaration): Use REGISTER_IMPORT macro.
16921         (relational_expression:): Build binop for instanceof.
16922         (java_push_parser_context): Remember ctxp->gclass_list across
16923         contexts.
16924         (java_pop_parser_context): Simply return if no context
16925         exists. Remember gclass_list across contexts.
16926         (issue_warning_error_from_context): New function.
16927         (parse_error_context): Don't setup ctxp->elc here. Call
16928         issue_warning_error_from_context instead.
16929         (parse_warning_context): Likewise.
16930         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
16931         setup. Link new class/interface to ctxp->gclass_list.
16932         (add_superinterfaces): Register interface as incomplete if not
16933         loaded.
16934         (create_class): Remember class unqualified name in
16935         ctxp->current_parsed_class_un. Check class deprecation.
16936         (register_fields): Check field deprecation. Remember static final
16937         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
16938         processing INIT.
16939         (method_header): New local variable ORIG_ARG. Use unqualified
16940         current class name for check on constructor errors. Promote return
16941         type if of record type. Argument list fix moved in
16942         fix_method_argument_names, called here. Check method deprecation.
16943         (fix_method_argument_names): New function.
16944         (method_declarator): Promote record typed arguments.
16945         (safe_layout_class): Check class methods before layout.
16946         (java_complete_class): Compute field layout when patched.
16947         (do_resolve_class): Try to load class after having it renamed
16948         after the package name.
16949         (get_printable_method_name): Use DECL_CONTEXT.
16950         (reset_method_name): New function.
16951         (check_method_redefinition): Use reset_method_name.
16952         (java_check_regular_methods): New local variable
16953         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
16954         names for error report. Check for compile-time error when method
16955         found has default (package) access.
16956         (java_check_abstract_methods): Now takes an interface DECL node as
16957         an argument. Also reinstall real name on unchecked
16958         overriding/hiding methods for error report.
16959         (java_check_methods): Fixed leading comment. Get classes to verify
16960         from ctxp->gclass_list. Use CHECK_METHODS macro and set
16961         CLASS_METHOD_CHECKED_P on class verification.
16962         (lookup_java_method2): Get real method name if necessary.
16963         (find_in_imports): Don't check package class access here.
16964         (resolve_package, lookup_package_type): New functions.
16965         (java_layout_classes): Fixed leading comment. Take classes to be
16966         laid out from ctxp->gclass_list.
16967         (java_complete_expand_methods): Don't expand native and abstract
16968         methods.
16969         (java_expand_classes): New function.
16970         (resolve_expression_name): Use additional argument ORIG.  Retrieve
16971         values of static final field of primitive types.
16972         (resolve_field_access): Handles static final field of promotive
16973         type.
16974         (resolve_qualified_expression_name): Handle STRING_CST as
16975         primaries and package name resolution. Check deprecation on found
16976         decls. Set where_found and type_found on non static field resolved
16977         during qualification. Layout non primitive field decl types.
16978         (check_deprecation): New function.
16979         (maybe_access_field): Simplified.
16980         (patch_method_invocation_stmt): Local variable CLASS_TYPE
16981         removed. Reverse method's argument when primary is a type. Don't
16982         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
16983         instead. Include abstract class in the list of class searchable
16984         for constructors. Use DECL_CONTEXT of found method for access
16985         checks. Check method deprecation.
16986         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
16987         converting arguments. Handle INVOKE_INTERFACE.
16988         (lookup_method_invoke): Search constructor using existing
16989         infrastructure (don't rely on lookup_java_constructor anymore).
16990         (find_applicable_accessible_methods_list): Extra argument flag
16991         LC. Now include constructor in the search.
16992         (qualify_ambiguous_name): Conditional expression are primaries.
16993         (not_initialized_as_it_should_p): static final are always
16994         initialized.
16995         (java_complete_tree): Pass extra NULL argument to
16996         resolve_expression_name. Stricter test to carry on patching
16997         assignments. New case for INSTANCEOF_EXPR.
16998         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
16999         (check_final_assignment, maybe_build_primttype_type_ref): New
17000         functions.
17001         (patch_assignment): Detect resolved static finals and carry normal
17002         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17003         (try_builtin_assignconv): Access constant 0 on all primitive
17004         types.
17005         (valid_builtin_assignconv_identity_widening_p): Accept identical
17006         types. Accept all promoted type on int type.
17007         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17008         assigned to a reference.
17009         (valid_method_invocation_conversion_p): Accept to check null
17010         pointers.
17011         (build_binop): Merge declaration and initialization of local
17012         variable BINOP.
17013         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17014         numeric types. Improved validity test for qualify operators on
17015         references.
17016         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17017         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17018         primitive type and issue the appropriate error message.
17019         (resolve_type_during_patch): Mark class loaded when resolved.
17020         (patch_cast): Allow null to be cased to reference types.
17021         (build_null_of_type): New function.
17022         (patch_array_ref): Handle array on references correctly.
17023         (patch_return): Removed unused local variable MODIFY. Force
17024         boolean to be returned as integers. Allows null to be returned by
17025         a function returning a reference.
17026         * typeck.c (convert_to_integer, convert_to_real,
17027         convert_to_pointer): Prototypes moved to convert.h
17028         (lookup_argument_method): Use method real name, if necessary.
17029
17030 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17031
17032         * class.c (build_class_ref): Changed name of primitive classes to
17033         start with `_Jv_'.
17034
17035         * class.c (make_class_data): Renamed fields: nmethods to
17036         method_count, method_count to dtable_method_count.  Always set
17037         `state' field to 0.
17038         * decl.c (init_decl_processing): Likewise.
17039
17040 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17041
17042         * class.c (layout_class): Don't mangle <finit>, produce
17043         __finit<class> instead. Don't verify artificial methods.
17044         * decl.c (finit_identifier_node): New declared global.
17045         (init_decl_processing): finit_identifier_node initialized.
17046         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17047         * java-tree.h (finit_identifier_node): Declared as extern.
17048         (struct lang_decl): New field called_constructor.
17049         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17050         (CLASS_HAS_FINIT_P): New macro.
17051         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17052         explicit constructor invocation.
17053         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17054         CALL_SUPER_CONSTRUCTOR_P): New macros.
17055         (write_classfile): Added prototype.
17056         * jcf-parse.c (jcf_parse_source): Parse and remember for
17057         generation if the file was seen on the command line.
17058         (parse_source_file): Don't write the class file here.
17059         (yyparse): Loop on files rewritten. Set current_jcf.
17060         (parse_zip_file_entries): Parse class file only if it was found.
17061         * lang.c (init_parse): Don't open command line provided filename
17062         here.
17063         (lang_parse): Don't set main_jcf anymore.
17064         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17065         (JCONSTRUCTOR_CHECK): New macro.
17066         (JBSC_TYPE_P): New macro.
17067         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17068         (COMPLETE_CHECK_OP_2): New macro.
17069         (struct parse_ctxt): New field explicit_constructor_p.
17070         (check_class_interface_creation): Fixed prototype indentation.
17071         (patch_method_invocation_stmt): Prototype reflects added argument.
17072         (patch_invoke): Likewise.
17073         (complete_method_declaration, build_super_invocation,
17074         verify_constructor_circularity,
17075         build_this_super_qualified_invocation, get_printable_method_name,
17076         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17077         verify_constructor_super, create_artificial_method,
17078         start_artificial_method_body, end_artificial_method_body,
17079         generate_field_initialization_code): New function prototypes.
17080         * parse.y: Fixed leading comment
17081         (constructor_header:, constructor_body:, block_end:): Rules tagged
17082         <node>.
17083         (type_declaration:): Call maybe_generate_finit.
17084         (method_declaration:): Action for method_body: placed in new
17085         function complete_method_declaration, called here.
17086         (constructor_declaration:): Defined actions. Removed leading
17087         FIXME.
17088         (constructor_header:): New rule with action.
17089         (constructor_body:): Rule rewritten using block_begin: and
17090         block_end:. Defined actions.
17091         (constructor_declarator:, explicit_constructor_invocation:):
17092         Defined actions.
17093         (block:): Use new rules block_begin: block_end:.
17094         (block_begin:, block_end:): New rules and actions.
17095         (block_statements:): Fixed error message for explicit
17096         constructors.
17097         (method_invocation:): Call build_this_super_qualified_invocation
17098         if primary is `this' or `super' was seen.
17099         (conditional_expression:): Action defined.
17100         (extra_ctxp_pushed_p): New static global flag.
17101         (java_parser_context_save_global): Create parser context if
17102         necessary. Use extra_ctxp_pushed_p to remember it.
17103         (java_parser_context_restore_global): Pop extra parser context if
17104         one exists.
17105         (build_array_from_name): Array on primitive types are marked
17106         loaded.
17107         (register_fields): Restore new name in field initializer
17108         expression if type was altered. Non static fields initialized upon
17109         declaration marked initialized.
17110         (maybe_generate_finit): New function.
17111         (maybe_generate_clinit): Use create_artificial_method,
17112         start_artificial_method_body, end_artificial_method_body. Generate
17113         debug info for enclosed initialization statements.
17114         (method_header): Fixed leading comment. Check constructor
17115         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17116         accordingly.
17117         (complete_method_declaration, constructor_circularity_msg,
17118         verify_constructor_circularity): New functions.
17119         (get_printable_method_name): New function.
17120         (check_method_redefinition): Don't rename <finit> methods. Fix
17121         declared constructor names. Error message for
17122         constructors modified.
17123         (java_check_regular_methods): Local variable seen_constructor
17124         renamed saw_constructor. Skip verification on constructors. Create
17125         default constructor with create_artificial_method.
17126         (java_check_methods): Removed unnecessary empty line.
17127         (create_artificial_method, start_artificial_method_body,
17128         end_artificial_method_body): New functions.
17129         (java_layout_classes): Changed leading comment. Reverse fields
17130         list if necessary. Always layout java.lang.Object if being
17131         defined.
17132         (java_complete_expand_methods): Verify constructor circularity.
17133         (java_complete_expand_method): Call fix_constructor on
17134         constructors.  Local variable no_ac_found removed. Restore
17135         bindings if method body expansion failed.
17136         (fix_constructors, verify_constructor_super,
17137         generate_field_initialization_code): New function.
17138         (java_expand_classes): Fixed leading comment. Write class file
17139         here.
17140         (resolve_expression_name): Check for illegal instance variable
17141         usage within the argument scope of an explicit constructor
17142         invocation.
17143         (resolve_qualified_expression_name): Pass extra from_super flag
17144         when invoking patch_method_invocation_stmt. New case for
17145         conditional expression when used as a primary. Check for error
17146         when acquiring super.
17147         (patch_method_invocation_stmt): Added extra argument super. New
17148         local variable is_static_flag. Set class_to_search according to
17149         the nature of the constructor invocation. Don't add `this'
17150         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17151         invocation within the argument scope of explicit constructor
17152         invocation. Set is_static according to is_static_flag. Provide
17153         extra `super' argument to patch_invoke invocation.
17154         (patch_invoke): New argument from_super. Loop on arguments
17155         indentation fixed. Pass from_super to invocation_mode. New switch
17156         case INVOKE_SUPER. Fixed error message in switch default case.
17157         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17158         value.
17159         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17160         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17161         message takes constructors into account.
17162         (find_applicable_accessible_methods_list): Fixed indentation.
17163         (qualify_ambiguous_name): Take explicit constructor invocation
17164         into account. Deal with a conditional expression as a primary to
17165         a method call.
17166         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17167         case. Added extra argument to patch_method_invocation_stmt.
17168         Register calls made to explicit constructor `this'. Don't call
17169         save_expr in ARRAY_REF case when emitting class files. Check for
17170         illegal use of this when expanding explicit constructor invocation
17171         arguments.
17172         (complete_function_arguments): Set and reset parser context
17173         explicit_constructor_p field value when appropriate.
17174         (build_super_invocation, build_this_super_qualified_invocation):
17175         New functions.
17176         (patch_assignment): Fixed typo.
17177         (patch_unaryop): Check on final fields occurs only when a decl
17178         exits.
17179         (patch_return): Take constructors into account.
17180         (patch_conditional_expr): New function.
17181         * typeck.c (build_java_signature): Removed unnecessary empty line.
17182
17183 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17184
17185         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17186
17187 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17188
17189         * decl.c (init_decl_processing): Renamed fields.
17190         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17191         interface_len, msize fields.
17192
17193         * class.c (make_class_data): Removed subclass_head and
17194         subclass_next fields.
17195         * decl.c (init_decl_processing): Removed subclass_head and
17196         subclass_next fields.
17197
17198 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17199
17200         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17201         * mangle.c (emit_unicode_mangled_name): Similarly.
17202
17203 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17204
17205         * jcf-parse.c (get_constant): Place braces around code to compute
17206         'd' when REAL_ARITHMETIC is not defined.
17207
17208 1998-10-25  H.J. Lu  (hjl@gnu.org)
17209
17210         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17211         dependency.
17212
17213 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17214
17215         * lang-specs.h: `.zip' files are input to jc1.
17216
17217 1998-10-22  Per Bothner  <bothner@cygnus.com>
17218
17219         * jvspecs.c:  Add (but don't enable) support for combining multiple
17220         .class and .java input filenames to a single jc1 invocation.
17221         Add support for -C flag (copile to .class files).
17222         Translate -classpath and -CLASSPATH arguments.
17223         * lang-specs.h:  Don't set %2 spec.
17224
17225 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17226
17227         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17228         a .zip file.
17229         (add_path): Don't add trailing separator to non-empty path
17230         elements.
17231
17232         * lang.c (lang_decode_option): Check for -fclasspath and
17233         -fCLASSPATH before examining other `-f' options.
17234
17235         * java-tree.h (finalize_identifier_node): Don't declare.
17236         * class.c (make_class_data): Don't push "final" field.
17237         * decl.c (init_decl_processing): Don't push "final" field.
17238         (finalize_identifier_node): Removed.
17239         (init_decl_processing): Don't set finalize_identifier_node.
17240
17241         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17242
17243 1998-10-11  Anthony Green  <green@cygnus.com>
17244
17245         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17246         (JV_SCAN_SOURCES): New macro.
17247         (JCF_DUMP_SOURCES): Likewise.
17248         (jcf-dump$(exeext)): New target.
17249         (jv-scan$(exeext)): New target.
17250
17251 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17252
17253         * Makefile.in (LEX): Removed.
17254         (LEXFLAGS): Likewise.
17255         (SET_BISON): New macro.
17256         (BISON): Removed.
17257         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17258         spurious diffs in parse.c.
17259         ($(PARSE_SCAN_C)): Likewise.
17260         (PARSE_DIR): New macro.
17261         (PARSE_C): Use it.
17262         (PARSE_SCAN_C): Likewise.
17263         (PARSE_RELDIR): New macro.
17264
17265         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17266
17267         * jcf-io.c (find_class): Use saw_java_source to determine when to
17268         look for `.java' file.
17269         * jcf-parse.c (saw_java_source): New global.
17270         (yyparse): Set it if `.java' file seen.
17271
17272         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17273         (GCJH_SOURCES): Likewise.
17274         * Makefile.in (datadir): New macro.
17275         (libjava_zip): Likewise.
17276         (JAVA_OBJS): Added jcf-path.o.
17277         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17278         (../gcjh$(exeext)): Likewise.
17279         (jcf-path.o): New target.
17280         * java-tree.h (fix_classpath): Removed decl.
17281         * jcf-parse.c (fix_classpath): Removed.
17282         (load_class): Don't call fix_classpath.
17283         * parse.y (read_import_dir): Don't call fix_classpath.
17284         * lex.h: Don't mention classpath.
17285         * lex.c (java_init_lex): Don't initialize classpath.
17286         * jcf-io.c (classpath): Removed global.
17287         (find_class): Use jcf_path iteration functions.  Correctly search
17288         class path for .java file.
17289         (open_in_zip): New argument `is_system'.
17290         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17291         classpath-related options.
17292         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17293         and -I.
17294         (lang_init): Call jcf_path_init.
17295         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17296         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17297         Correctly put braces around second string in each entry.
17298         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17299         classpath-related options.
17300         (help): Updated for new options.
17301         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17302         `classpath' global.
17303         * jcf-path.c: New file.
17304
17305         * jcf-depend.c: Include jcf.h.
17306
17307         * jcf-write.c (localvar_alloc): Returns `void'.
17308         (localvar_free): Removed unused variable.
17309
17310         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17311         (init_parse): Use OBJECT_SUFFIX, not ".o".
17312
17313 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17314
17315         * class.c (emit_register_classes): Renamed from
17316         emit_register_class.
17317         * java-tree.h (emit_register_classes): Prototype renamed from
17318         emit_register_class.
17319         * jcf-parse.c (yyparse): Call emit_register_classes once before
17320         returning.
17321         * parse.y (java_expand_classes): No longer register classes.
17322
17323 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17324
17325         * class.c (is_compiled_class): New local variable
17326         seen_in_zip. Identify classes found in currently compiled source
17327         file(s).
17328         * decl.c (complete_start_java_method): Fixed typo.
17329         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17330         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17331         (CLASS_P): Moved around.
17332         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17333         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17334         java-tree.h
17335         (jcf_parse_source): Changed leading comment. Removed unnecessary
17336         fclose and CLASS_FROM_SOURCE_P marking.
17337         (parse_source_file): New local variables remember_for_generation
17338         and filename. Mark parsed file name identifier node. Removed block
17339         executed when parse_only was null. Set remember_for_generation.
17340         Use it as an argument to java_pop_parser_context.
17341         (yyparse): New local variables several_files, list, next node and
17342         current_file_list. Split ampersand separated file names into
17343         current_file_list. Iterate through the list and parse accordingly.
17344         * parse.h (java_pop_parser_context): New function prototype.
17345         * parse.y (ctxp_for_generation): New static global variable.
17346         (java_pop_parser_context): New argument generate. Link popped ctxp
17347         to ctxp_for_generation list accordingly.
17348         (java_complete_expand_methods): Fixed indentation.
17349         (java_expand_classes): New function.
17350
17351 1998-10-17  Per Bothner  <bothner@cygnus.com>
17352
17353         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17354
17355 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17356
17357         * lex.c (setjmp.h): No longer included.
17358         * lex.h (setjmp.h): Included.
17359         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17360         (duplicate_declaration_error_p): Renamed from
17361         duplicate_declaration_error.
17362         (build_array_from_name): New function prototype.
17363         * parse.y (setjmp.h): No longer included.
17364         (variable_declarator_id): Define action.
17365         (build_array_from_name): New function.
17366         (duplicate_declaration_error_p): Renamed from
17367         duplicate_declaration_error.  Fixed leading comment.
17368         (register_fields): Main `for' loop reorganized. Uses
17369         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17370         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17371         build_array_from_name.
17372         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17373         types.
17374         (read_import_dir): Don't try to skip `.' and `..'.
17375         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17376         build_array_from_name. Main `for' loop reorganized.
17377         (resolve_qualified_expression_name): When building access to a
17378         field, use the type where the field was found, not its own type.
17379         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17380         field was found is null.
17381         (qualify_ambiguous_name): Sweep through all successive array
17382         dimensions.
17383
17384 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17385
17386         * java-tree.h (pop_labeled_block, lang_printable_name,
17387         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17388         interface_of_p, inherits_from_p, fix_classpath,
17389         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17390         make_class_data, register_class, alloc_name_constant): New
17391         function prototypes.
17392         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17393         indentation. Added cast to remove warning.
17394         (lang_printable_name): Set v argument unused.
17395         (lang_print_error): Added argument to lang_printable_name call.
17396         (java_dummy_print, print_lang_decl, print_lang_type,
17397         print_lang_identifier, lang_print_xnode): All argument marked
17398         unused.
17399         * lex.c (java_unget_unicode): Removed unnecessary argument.
17400         (java_allocate_new_line): Unused local variable is gone.
17401         (java_read_char): Added parenthesis in expressions to remove
17402         warnings.  Added final return statement.
17403         (java_read_unicode): Added parenthesis in expression to remove
17404         warning.
17405         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17406         (java_parse_escape_sequence): Likewise.
17407         (java_lex): Unused local variables are gone. Fixed
17408         java_unget_unicode invocation.
17409         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17410         defined.
17411         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17412         lang_printable_name invocation in macro.
17413         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17414         Likewise.
17415         (duplicate_declaration_error): Suppressed unused argument in
17416         prototype.
17417         (identical_subpath_p): Function declaration is gone.
17418         (patch_invoke): Suppressed unused argument in prototype.
17419         (patch_cast, build_labeled_block, check_thrown_exceptions):
17420         Likewise.
17421         * parse.y (setjmp.h): Included
17422         (toplev.h): Likewise.
17423         (field_declaration:): Suppressed unused local
17424         (label_decl:): Fixed build_labeled_block invocation.
17425         (java_pop_parser_context): Put extra parenthesis around assignment
17426         in if.
17427         (yyerror): Suppressed unused local variables.
17428         (variable_redefinition_error): Fixed lang_printable_name
17429         invocation.
17430         (create_interface): Suppressed unused local variables.
17431         (create_class): Likewise.
17432         (duplicate_declaration_error): Suppressed unused argument. Fixed
17433         lang_printable_name invocation.
17434         (register_fields): Suppressed unused local variable. Fixed
17435         duplicate_declaration_error invocation.
17436         (method_header): Suppressed unused local variable.
17437         (method_declarator, parser_check_super): Likewise.
17438         (java_complete_class): Suppressed unused local variable. Fixed
17439         fatal error message.
17440         (complete_class_report_errors): Added default: in switch.
17441         (java_check_regular_methods): Fixed lang_printable_name
17442         invocations.
17443         (check_throws_clauses): Likewise.
17444         (java_check_abstract_methods): Suppressed unused local
17445         variable. Fixed lang_printable_name invocation.
17446         (read_import_entry): Added supplemental return statement.
17447         (read_import_dir): Suppressed unused local variables.
17448         (check_pkg_class_access, declare_local_variables): Likewise.
17449         (source_start_java_method): Suppressed unused extern variable
17450         declarations
17451         (expand_start_java_method): Suppressed unused extern and local
17452         variable declarations.
17453         (java_complete_expand_methods): Likewise.
17454         (java_complete_expand_method): Suppressed unused local variables.
17455         (make_qualified_name): Likewise.
17456         (resolve_qualified_expression_name): Added default: in
17457         switch. Fixed lang_printable_name invocation.
17458         (class_instance_creation_expression): Added parenthesis around
17459         expressions.
17460         (patch_method_invocation_stmt): Fixed lang_printable_name and
17461         patch_invoke invocations.
17462         (check_for_static_method_reference): Fixed lang_printable_name
17463         invocation.
17464         (patch_invoke): Suppressed unused arguments and local variables.
17465         (lookup_method_invoke): Suppressed unused local variables.
17466         (qualify_ambiguous_name): Added default: in switch.
17467         (identical_subpath_p): Function removed.
17468         (patch_assignment): Suppressed unused local variables. Suppressed
17469         unnecessary if statement. Fixed lang_printable_name invocations.
17470         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17471         (valid_ref_assignconv_cast_p): Parenthesis around
17472         expression. Suppressed unused local variables.
17473         (build_binop): Suppressed unused local variables. fixed
17474         lang_printable_name invocations.
17475         (string_constant_concatenation): Suppressed unused local
17476         variables.
17477         (patch_unaryop): Fixed lang_printable_name invocation.
17478         (patch_cast): Suppressed unnecessary argument. Fixed
17479         lang_printable_name invocation.
17480         (patch_array_ref): Fixed lang_printable_name invocation.
17481         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17482         (build_labeled_block): Suppressed unused argument.
17483         (generate_labeled_block): Fixed build_labeled_block invocation.
17484         (build_loop_body): Suppressed unused local variables.
17485         (patch_loop_statement): Likewise.
17486         (patch_exit): Fixed lang_printable_name invocation.
17487         (patch_switch_statement): Likewise.
17488         (case_identity): First argument marked unused.
17489         (patch_try_statement): Fixed lang_printable_name invocations.
17490         (patch_synchronized_statement, patch_throw_statement): Likewise.
17491         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17492         lang_printable_name invocations.
17493         (check_thrown_exceptions_do): Suppressed unused argument.
17494
17495 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17496
17497         * jcf-write.c (write_classfile): Add output class file as target.
17498         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17499         * jcf.h: Added declarations for dependency-tracking functions.
17500         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17501         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17502         (finish_parse): Call jcf_dependency_write.
17503         (dependency_tracking): New global.
17504         (DEPEND_SET_FILE): New define.
17505         (DEPEND_ENABLE): New define.
17506         (init_parse): Enable dependency tracking if required.
17507         Include "flags.h".
17508         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17509         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17510         (../gcjh$(exeext)): Likewise.
17511         (jcf-depend.o): New target.
17512         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17513         (GCJH_SOURCES): Likewise.
17514         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17515         dep_name argument.
17516         (find_classfile): Added dep_name argument.
17517         (find_class): Compute name of dependency.
17518         (open_in_zip): Call jcf_dependency_add_file.
17519         * gjavah.c (output_file): No longer global.
17520         (usage): Don't mention "gjavah".
17521         (help): Likewise.
17522         (java_no_argument): Likewise.
17523         (version): Likewise.
17524         (main): Recognize and handle -M family of options.
17525         (print_mangled_classname): Return is void.
17526         (process_file): Handle case where output is suppressed.
17527         (HANDLE_END_FIELD): Likewise.
17528         (HANDLE_METHOD): Likewise.
17529         * jcf-depend.c: New file.
17530
17531 1998-10-13  Jeffrey A Law  (law@cygnus.com)
17532
17533         * java-tree.def: Add missing newline at EOF.
17534
17535 1998-10-13  Tom Tromey  <tromey@cygnus.com>
17536
17537         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17538         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
17539         function.
17540         Include <config.h> and "system.h".
17541         (disassemble_method): Undefine RET to avoid clash with
17542         config/i386/i386.h.
17543
17544 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17545
17546         * decl.c (runtime_exception_type_node, error_exception_type_node):
17547         New global variables.
17548         (init_decl_processing): Initialized.
17549         * expr.c (java_lang_expand_expr): Set caught exception type to
17550         null if catch handler argument doesn't exit.
17551         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17552         tree codes.
17553         * java-tree.h (runtime_exception_type_node,
17554         error_exception_type_node): Global variables declared.
17555         (DECL_FUNCTION_THROWS): New macro.
17556         (DECL_FUNCTION_BODY): Modified comment.
17557         (DECL_SPECIFIC_COUNT): Likewise.
17558         (struct lang_decl): New field throws_list.
17559         (IS_UNCHECKED_EXPRESSION_P): New macro.
17560         * lex.c (java_lex): Generate location information for THROW_TK.
17561         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17562         EXCEPTIONS_P): New macros.
17563         (enum jdep_code): New value JDEP_EXCEPTION.
17564         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17565         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17566         PATCH_METHOD_RETURN_ERROR): New macros.
17567         (patch_method_invocation_stmt): Added new argument to prototype.
17568         (patch_synchronized_statement, patch_throw_statement,
17569         check_thrown_exceptions, check_thrown_exceptions_do,
17570         purge_unchecked_exceptions, check_throws_clauses): New function
17571         prototypes.
17572         * parse.y Fixed typo in keyword section.
17573         (throw:): Rule tagged <node>.
17574         (THROW_TK): Keyword tagged <operator>.
17575         (method_header:): Last argument to call to method_header passed
17576         from throws: rule.
17577         (throws:, class_type_list:, throw_statement:,
17578         synchronized_statement:, synchronized:): Defined actions.
17579         (method_header): New local variable current. Register exceptions
17580         from throws clause.
17581         (java_complete_tree): Complete and verify exceptions from throws
17582         clause.
17583         (complete_class_report_errors): Error message on exceptions not
17584         found
17585         (java_check_regular_methods): Fixed typo. Shortcut on private
17586         overriding methods. Changed error message on method
17587         redefinition. Check for throws clause compatibility.
17588         (check_throws_clauses): New function.
17589         (java_check_abstract_methods): Use DECL_NAME for wfl or current
17590         method. Changed error message on method redefinition.
17591         (currently_caught_type_list): New static variable.
17592         (java_complete_expand_methods): Purge unchecked exceptions from
17593         throws clause list. Call PUSH_EXCEPTIONS before walk and
17594         POP_EXCEPTIONS after.
17595         (resolve_qualified_expression_name): Pass new argument as NULL to
17596         patch_method_invocation_stmt.
17597         (patch_method_invocation_stmt): New argument ref_decl. Invoke
17598         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17599         argument list when appropriate. Use new argument if non null to
17600         store selected method decl.
17601         (patch_invoke): Convert if necessary args of builtin types before
17602         forming CALL_EXPR. Argument list no longer reversed here.
17603         (invocation_mode): Treat final methods as static methods.
17604         (java_complete_tree): New cases for THROW_EXPR: and
17605         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17606         function call.
17607         (complete_function_arguments): No more RECORD_TYPE
17608         conversion. Function parameter nodes no longer saved.
17609         (valid_ref_assignconv_cast_p): Avoid handling null type.
17610         (patch_binop): Fixed null constant reference handling.
17611         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17612         BUILD_THROW macros.
17613         (patch_try_statement): Fixed comments. Record caught types in
17614         list, push the list, expand try block and pop the list.
17615         (patch_synchronized_statement, patch_throw_statement,
17616         check_thrown_exceptions, check_thrown_exceptions_do,
17617         purge_unchecked_exceptions): New functions.
17618         * typeck.c (lookup_argument_method): Allow WFL in place of method
17619         DECL_NAME during method definition check
17620
17621 1998-10-09  Tom Tromey  <tromey@cygnus.com>
17622
17623         * gjavah.c (decode_signature_piece): New function.
17624         (print_c_decl): Use it.  Added `name_override' argument.
17625         (print_method_info): Use name_override argument to print_c_decl.
17626         (seen_fields): Removed.
17627         (print_field_info): Don't update seen_fields.
17628         (struct method_name): New structure.
17629         (method_name_list): New global.
17630         (print_method_info): Add new method to list of methods.
17631         (name_is_method_p): New function.
17632         (print_field_info): If field name has same name as method, then
17633         change field name.
17634         (process_file): Parse methods before fields.
17635         (field_pass): New global.
17636         (HANDLE_END_FIELD): Take field_pass into account.
17637
17638 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17639
17640         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17641         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17642
17643 1998-10-03  Anthony Green  <green@cygnus.com>
17644
17645         * jvspec.c: Fix bug in jvgenmain_spec patch.
17646
17647 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17648
17649         * Makefile.in (lang.o:): Install dependency on java-tree.def.
17650         * decl.c (soft_exceptioninfo_call_node): New global variable.
17651         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17652         takes extra integer argument. soft_exceptioninfo_call_node
17653         initialized.
17654         * except.c (java_set_exception_lang_code): New function
17655         (method_init_exceptions): Called here.
17656         (prepare_eh_table_type): New function.
17657         (expand_end_java_handler): Called here.
17658         * expr.c (build_java_throw_out_of_bounds_exception): Now features
17659         one argument. Modified generation of call to
17660         soft_badarrayindex_node to use new argument.
17661         (build_java_arrayaccess): Pass faulty index value to
17662         build_java_throw_out_of_bounds_exception.
17663         (generate_name): New function.
17664         (java_lang_expand_expr): New local variables node, current,
17665         has_finally_p. Expand TRY_EXPR node.
17666         (process_jvm_instruction): Replace top of the stack with thrown
17667         object reference when entering exception handler.
17668         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17669         specific tree codes.
17670         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17671         global.
17672         (DECL_SPECIFIC_COUNT): New macro.
17673         (prepare_eh_table_type, java_set_exception_lang_code,
17674         generate_name): New function declarations.
17675         (match_java_method): Declaration deleted.
17676         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17677         macros.
17678         * lex.c (TRY_TK, CATCH_TK): Generate location information.
17679         * parse.h (redefinition_error, refine_accessible_methods_list,
17680         can_cast_to_p): Function declaration removed.
17681         (classitf_redefinition_error, variable_redefinition_error,
17682         parse_jdk1_1_error, find_applicable_accessible_methods_list,
17683         find_most_specific_methods_list, argument_types_convertible,
17684         enter_a_block, valid_builtin_assignconv_identity_widening_p,
17685         valid_cast_to_p, valid_method_invocation_conversion_p,
17686         try_reference_assignconv, add_stmt_to_compound,
17687         build_jump_to_finally, build_tree_list, patch_try_statement,
17688         java_get_catch_block): New function declarations.
17689         * parse.y (string_buffer_type): Global variable deleted.
17690         (group_of_labels, catches, catch_clause, catch_clause_parameter,
17691         finally): Rules tagged <node>.
17692         (TRY_TK, CATCH_TK): Token tagged <operator>.
17693         (class_body_declaration:, class_member_declaration:,
17694         formal_parameter:, explicit_constructor_invocation:,
17695         interface_member_declaration:, constant_declaration:,
17696         primary_no_new_array:, class_instance_creation_expression:,
17697         array_creation_expression:): Issue error on unsuported JDK1.1
17698         features.
17699         (try_statement:, catches:, finally:): Define actions.
17700         (catch_clause_parameter): New rule.
17701         (catch_clause:): Use new rule catch_clause_parameter.
17702         (parse_jdk1_1_error): New function.
17703         (redefinition_error): Renamed classitf_redefinition_error.
17704         (variable_redefinition_error): New function.
17705         (check_class_interface_creation): Call
17706         classitf_redefinition_error.
17707         (java_complete_tree): Added error message on JDEP_TYPE: case.
17708         (complete_class_report_errors): Fixed indentation.
17709         (declare_local_variables): Call variable_redefinition_error.
17710         (source_end_java_method): Call java_set_exception_lang_code and
17711         emit_handlers where appropriate.
17712         (java_method_add_stmt): Call add_stmt_to_block.
17713         (add_stmt_to_block): New function.
17714         (lookup_method_invoke): Fixed outside comment. new local variable
17715         candicates.  Call find_applicable_accessible_methods_list and
17716         find_most_specific_methods_list when searching for a
17717         method. Modified error report to list possible candidates when
17718         applicable.
17719         (find_applicable_accessible_methods_list,
17720         find_most_specific_methods_list, argument_types_convertible): New
17721         function.
17722         (refine_accessible_methods_list): Function deleted.
17723         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17724         expr (if applicable) before calling patch_array_ref.
17725         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
17726         (enter_block): Fixed comment.
17727         (enter_a_block): New function.
17728         (patch_assignment): Reorganized. Call try_reference_assignconv for
17729         references. Call valid_cast_to_p instead of can_cast_to_p.
17730         (try_reference_assignconv,
17731         valid_builtin_assignconv_identity_widening_p): New functions.
17732         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
17733         (valid_cast_to_p, valid_method_invocation_conversion_p): New
17734         functions.
17735         (build_string_concatenation): Don't resolve StringBuffer.
17736         (patch_cast): Fixed inverted arguments.
17737         (patch_array_ref): Code to save array expr deleted. Call
17738         valid_cast_to_p instead of can_cast_to_p.
17739         (generate_labeled_block): Call generate_name.
17740         (build_jump_to_finally, build_try_statement, java_get_catch_block,
17741         patch_try_statement): New functions.
17742         * typeck.c (match_java_method): Function deleted.
17743
17744 1998-10-02  Anthony Green  <green@cygnus.com>
17745
17746         * jvspec.c: jvgenmain_spec uses different temporary file names.
17747
17748 1998-10-02  Anthony Green  <green@cygnus.com>
17749
17750         * jvspec.c (lang_specific_driver): Fail if user specifies
17751         --main= when not linking.
17752
17753 1998-09-28  Tom Tromey  <tromey@cygnus.com>
17754
17755         * class.c (make_class_data): Push value for `thread' field.
17756         * decl.c (init_decl_processing): Added `thread' field to class.
17757
17758         * class.c (add_field): Always make static fields externally
17759         visible.
17760
17761 1998-09-26  Anthony Green  <green@cygnus.com>
17762
17763         * expr.c (build_java_athrow,
17764         build_java_throw_out_of_bounds_exception, expand_invoke,
17765         build_newarray, expand_java_multianewarray, build_java_monitor):
17766         Update comments to reflect _Jv_* function names.
17767
17768 1998-09-25  Per Bothner  <bothner@cygnus.com>
17769
17770         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
17771         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
17772         * parse.y (expand_start_java_method):  Likewise.
17773
17774 1998-09-24  Per Bothner  <bothner@cygnus.com>
17775
17776         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
17777
17778         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
17779         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
17780         * expr.c:  Remove no-longer-needed calls to promote_type.
17781         * decl.c (give_name_to_locals):  Liekwise.
17782         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
17783         * parse.y:  Add/remove promote_type calls as appropriate.
17784         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
17785         (parse_signature_string):  Likewise.
17786         (build_java_array_type):  Fix for now signature convenions.
17787
17788         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
17789
17790 1998-09-23  Tom Tromey  <tromey@cygnus.com>
17791
17792         * class.c (init_class_processing): libjava function renamed to
17793         _Jv_RegisterClass.
17794
17795 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17796
17797         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17798         * java-tree.def: Fixed DEFTREECODE third argument.
17799         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17800         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17801         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17802         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17803         JAVA_THIS_EXPR): Now replaced by tree code definitions.
17804         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17805         * lang.c (java_tree_code_type, java_tree_code_length,
17806         java_tree_code_name): New arrays.
17807         (lang_init): Append Java tree node definitions to Gcc ones.
17808         * lex.c (expression_obstack): Declared as extern when JC1_LITE
17809         defined.
17810         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17811         wfl_to_string.
17812         (java_lex): Allow declaration of empty string constants. Retain
17813         location information on CASE_TK and DEFAULT_TK.
17814         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17815         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17816         Modified to be more robust.
17817         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17818         (build_new_invocation, try_builtin_assignconv,
17819         patch_switch_statement, string_constant_concatenation,
17820         build_string_concatenation, patch_string_cst, patch_string,
17821         java_expand_switch): New function declarations.
17822         * parse.y: Rules related to switch and EH tagged <node>.
17823         (label_id): Set to NULL_TREE
17824         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17825         tree nodes.
17826         (this_or_super:): Fixed indentation.
17827         (statement:, statement_nsi:, statement_without_trailing_substatement:,
17828         statement_expression:): Removed call to RULE on all sub-rules.
17829         (switch_expression:, switch_labels:): New rules.
17830         (switch_statement:, switch_block:, switch_block_statement_groups:,
17831         switch_block_statement_group:, switch_labels:, switch_label:):
17832         Defined actions.
17833         (throw_statement:, synchronized_statement:, try_statement:):
17834         Defined temporary actions.
17835         (class_instance_creation_expression:): Call
17836         build_new_invocation. Fixed indentation.
17837         (field_access): Fixed indentation.
17838         (method_invocation): Likewise.
17839         (make_qualified_primary): Use THIS_EXPR.
17840         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17841         resolving from SUPER, set *type_found.
17842         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
17843         (java_complete_tree): Removed unused local variable `location'. Case
17844         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
17845         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
17846         on MODIFY_EXPR: and all binary operator tree code cases. Removed
17847         STRING_CST: case. default: checks for patchable strings.
17848         (complete_function_arguments): Transform string constant or
17849         crafted StringBuffer if necessary.
17850         (build_method_invocation): Fixed comments.
17851         (build_new_invocation): New function.
17852         (patch_assignment): Call try_builtin_assignconv to figure a valid
17853         assignment conversion between builtin types.
17854         (try_builtin_assignconv): New function.
17855         (build_binop): Use URSHIFT_EXPR directly to call build.
17856         (operator_string): Use UNARY_PLUS_EXPR.
17857         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
17858         operator.
17859         (do_merge_string_cste, merge_string_cste,
17860         string_constant_concatenation, build_string_concatenation,
17861         patch_string, patch_string_cst): New function.
17862         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
17863         (patch_unaryop): Likewise. New test of valid ++/-- operands.
17864         (build_newarray_node): Use NEW_ARRAY_EXPR.
17865         (build_this): Use THIS_EXPR.
17866         (build_return): Enable debug information on return statement.
17867         (build_if_else_statement): Likewise.
17868         (complete_labeled_statement): Fixed related comment.
17869         (build_loop_body): Fixed comment.
17870         (build_bc_statement): Enable debug information on break/continue
17871         statements.
17872         (patch_bc_statement): Fixed typos. Handle SWITCH statement
17873         context.
17874         (patch_switch_statement, case_identity, java_expand_switch): New
17875         functions.
17876
17877 1998-09-21  Per Bothner  <bothner@cygnus.com>
17878
17879         * buffer.h (BUFFER_INIT):  New macro.
17880         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
17881         Pass (struct jcf_partial *state) to most functions.
17882         (jcf_block, jcf_relocation):  New types.
17883         Support labels, branches, conditionals, loops.
17884
17885 1998-09-21  Tom Tromey  <tromey@cygnus.com>
17886
17887         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
17888
17889 1998-09-21  Per Bothner  <bothner@cygnus.com>
17890
17891         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
17892         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
17893         not integer_type_node (INT_TYPE_SIZ bits).
17894
17895         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
17896
17897         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
17898         * jcf-dump.c (print_exception_table):  New function.
17899         (disassemble_method):  Better handling of wide instructions.
17900         Make more robust for bad input.
17901
17902 1998-09-30  Jeffrey A Law  (law@cygnus.com)
17903
17904         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
17905         FreeBSD.
17906
17907 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17908
17909         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
17910
17911 1998-09-17  Tom Tromey  <tromey@cygnus.com>
17912
17913         * Makefile.in ($(PARSE_H)): Removed target.
17914
17915 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17916
17917         * Makefile.in (JAVA_OBJS): Add memmove.o
17918         (memmove.o): New target & rules.
17919
17920 1998-09-15  Tom Tromey  <tromey@cygnus.com>
17921
17922         * expr.c (expand_invoke): Don't generate a call to the class init
17923         code.
17924
17925 1998-09-14  Jeffrey A Law  (law@cygnus.com)
17926
17927         * Makefile.in: Add many missing dependencies.
17928         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
17929         as appropriate.
17930         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
17931         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
17932
17933 1998-09-11  Per Bothner  <bothner@cygnus.com>
17934
17935         * decl.c (complete_start_java_method):  If method is static (and
17936         not private) call _Jv_InitClass.
17937         * expr.c (expand_invoke):  Don't call build_class_init.
17938
17939         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
17940
17941 1998-09-10  Jeffrey A Law  (law@cygnus.com)
17942
17943         * Make-lang.in (GCJ): Define before using.
17944
17945 1998-09-09  Jeffrey A Law  (law@cygnus.com)
17946
17947         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
17948         losing due to namespace pollution in GNU getopt.h
17949
17950 1998-09-09  Tom Tromey  <tromey@cygnus.com>
17951
17952         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
17953         (java.all.cross): Likewise.
17954         (java.rest.encap): Likewise.
17955
17956 1998-09-08  Jeffrey A Law  (law@cygnus.com)
17957
17958         * gjavah.c (print_class_decls): Fix thinko in arglist
17959         * jcv-io.c (find_classfile): Similarly.
17960
17961 1998-09-07  Jeffrey A Law  (law@cygnus.com)
17962
17963         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
17964
17965 1998-09-05  Tom Tromey  <tromey@cygnus.com>
17966
17967         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
17968         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
17969         * Makefile.in (PARSE_C): New macro.
17970         (PARSE_H): Likewise.
17971         (PARSE_SCAN_C): Likewise.
17972         ($(PARSE_C)): Target renamed from parse.c.
17973         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
17974         (clean): Remove parse-scan.c as well.
17975         (parse.o): Depend on $(PARSE_C).
17976
17977 1998-09-05  Anthony Green  <green@cygnus.com>
17978
17979         * README, license.terms: Removed.
17980
17981         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
17982         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
17983         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
17984         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
17985         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
17986         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
17987         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
17988         and Java trademark attribution.
17989
17990 1998-09-04  Tom Tromey  <tromey@cygnus.com>
17991
17992         * Makefile.in: Use gcjh, not gjavah.
17993         * config-lang.in (stagestuff): Use gcjh, not gjavah.
17994         * Make-lang.in: Changed gjavah to gcjh everywhere.
17995
17996 1998-09-03  Per Bothner  <bothner@cygnus.com>
17997
17998         * gjavah.c:  Support new -prepend -add -append flags.
17999         (print_method_info):  Method is not virtual if class is final.
18000
18001 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18002
18003         * jv-scan.c: Fixed copyright assignment.
18004         * keyword.gperf: Likewise.
18005         * keyword.h: Likewise.
18006         * lex.c: Fixed copyright assignment.
18007         (java_lex): Push unicode back when parsing '<'.
18008         * lex.h: Fixed copyright assignment.
18009         * parse-scan.y: Likewise.
18010         * parse.h: Fixed copyright assignment.
18011         (build_debugable_stmt, complete_for_loop): New function prototypes.
18012         * parse.y: Fixed copyright assignment.
18013         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18014         size_zero_node when completing a loop with no exit condition.
18015         (for_statement_nsi:): Define action.
18016         (for_init:, for_update:): Return size_zero_node when empty.
18017         (declare_local_variables): Call build_debugable_stmt.
18018         (build_debugable_stmt): New function.
18019         (build_loop_body): Build debugable statement around loop
18020         condition part.
18021         (complete_loop_body): Take into account the debugable statement
18022         around the EXIT_EXPR.
18023         (complete_loop_body): New function.
18024         (patch_exit_expr): Fixed condition inversion.
18025
18026 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18027
18028         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18029         name of thread define.
18030         * jvspec.c (THREAD_NAME): New macro.
18031         (GCLIB): Likewise.
18032         (THREADLIB): Likewise.
18033         (lang_specific_driver): Recognize attempt to link with thread
18034         library or gc library.  Recognize -ljava on command line so it
18035         isn't linked against more than once.
18036
18037 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18038
18039         * parse-scan.y (report_main_declaration): Name of the class
18040         containing `main' can be a qualified name.
18041
18042 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18043
18044         * config-lang.in: Changed gjavac to gjc everywhere.
18045         * Make-lang.in: Changed gjavac to gjc everywhere.
18046
18047 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18048
18049         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18050         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18051         and install the files.
18052         * Makefile.in (JAVA_OBJS_LITE): New variable.
18053         (compiler:): Now include jv-scan as a dependency.
18054         (../jv-scan$(exeext), parse-scan.c): New targets.
18055         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18056         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18057         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18058         check for errors even if parse_only.
18059         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18060         defined.
18061         (yylex): New function. Uses java_lex body.
18062         (java_lex): Removed commented out statement. Remove local variable
18063         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18064         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18065         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18066         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18067         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18068         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18069         where appropriate.
18070         (java_lex_error): Empty if JC1_LITE is defined.
18071         (java_get_line_col): Return 0 if JC1_LITE is defined.
18072         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18073         SET_MODIFIER_CTX): Moved into the section containing the macros
18074         conditionally defined by JC1_LITE.
18075         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18076         argument if JC1_LITE is defined.
18077         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18078         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18079         is defined.
18080         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18081         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18082         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18083         to different values according to JC1_LITE.
18084         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18085         declared if JC1_LITE set.
18086         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18087         defined if JC1_LITE not set.
18088         (struct parser_ctx): Reorganized and skip the jc1 front end part
18089         if JC1_LITE set.
18090         (java_layout_classes): New function definition.
18091         (java_push_parser_context, java_init_lex, yyparse, yylex,
18092         yyerror): Prototype always declared. All other static function
18093         prototypes declared only if JC1_LITE is not set.
18094         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18095         declared in parse.h.
18096         (java_layout_classes): New function.
18097         (java_complete_expand_methods): No longer layout the class here.
18098         * parse-scan.y: New file.
18099         * jv-scan.c: New file.
18100
18101 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18102
18103         * gjavah.c (main): Handle -friend option.
18104         (friend_specs): New global.
18105         (generate_access): Handle friend_specs.
18106         (process_file): Likewise.
18107         (MAX_FRIENDS): New macro.
18108         (friend_count): New global.
18109         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18110         Changed all callers.
18111
18112 1998-08-24  Per Bothner  <bothner@cygnus.com>
18113
18114         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18115         (main):  Handle processing all the entries of a named .zip archive.
18116         * jcf-io.c (jcf_trim_old_input):  New function.
18117         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18118
18119 1998-08-24  Per Bothner  <bothner@cygnus.com>
18120
18121         * lang.c (flag_assume_compiled):  Make default be on.
18122
18123 1998-08-21  Per Bothner  <bothner@cygnus.com>
18124
18125         * jcf-dump.c:  Add bunches of flags to control output more.
18126         (process_class):  New function;  support printing more than one class.
18127         (main): Support new --print-main and --javap flags.
18128         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18129         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18130
18131 1998-08-20  Per Bothner  <bothner@cygnus.com>
18132
18133         Change mangling of dispatch table to match C++ vtable (w/thunks).
18134         * class.c (build_dtable_decl), java-tree.h:  New function.
18135         (make_class_data):  Call it.
18136         * decl.c (init_decl_processing):  Likewise.
18137
18138 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18139
18140         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18141         soft_anewarray; adjust args passed.
18142         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18143         match _Jv_NewObjectArray.
18144
18145 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18146
18147         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18148         * expr.c (loopup_label): Call create_label_decl.
18149         (create_label_decl): New function.
18150         (java_lang_expand_expr): Call expand_start_bindings with argument
18151         set to zero.
18152         * java-tree.h Added space after PROTO in function declarations
18153         when necessary.
18154         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18155         (create_label_decl, push_labeled_block): New function
18156         declarations.
18157         * lex.c (label_id): Initialize.
18158         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18159         switch.
18160         * parse.h Added space after PROTO in function declarations when
18161         necessary.
18162         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18163         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18164         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18165         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18166         macros.
18167         (struct parser_ctxt): New fields current_loop,
18168         current_labeled_block.
18169         (build_if_else_statement, patch_if_else_statement,
18170         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18171         generate_labeled_block, complete_labeled_statement,
18172         build_bc_statement, patch_bc_statement, patch_loop_statement,
18173         build_new_loop, build_loop_body, complete_loop_body): New function
18174         declarations.
18175         * parse.y (java_warning_count): New global variable.
18176         (label_id): New static variable.
18177         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18178         (block:): Return size_zero_node when block is empty.
18179         (empty_statement:): Return size_zero_node.
18180         (statement:): Implement supplemental action when for_statement: is
18181         reduced.
18182         (label_decl:): New rule.
18183         (labeled_statement:): Rewritten using label_decl. Actions
18184         implemented.
18185         (labeled_statement_nsi:): Likewise.
18186         (if_then_statement): Actions implemented.
18187         (while_expression): New rule.
18188         (while_statement:): Rewritten using while_expression. Actions
18189         implemented.
18190         (while_statement_nsi:): Likewise.
18191         (do_statement_begin:): New rule.
18192         (do_statement:): Rewritten using do_statement_begin. Actions
18193         implemented.
18194         (for_statement:): Rewritten using for_begin. Actions implemented.
18195         (for_statement_nsi:): Likewise.
18196         (for_header:, for_begin:): New rules.
18197         (for_init:): Actions implemented.
18198         (statement_expression_list:, break_statement:,
18199         continue_statement:): Likewise.
18200         (yyerror): Count number of issued warning(s).
18201         (java_report_errors): Report error(s) and/or warning(s).
18202         (java_complete_class): Use build_java_argument_signature to
18203         recompute completed method signature.
18204         (java_check_regular_methods): New locals method_wfl and aflags.
18205         Use method_wfl instead of lookup_cl during error reports. Fixed
18206         indentation and modified some error messages. Use
18207         lang_printable_name in method instead of the DECL_NAME. New code
18208         to issue warnings on methods not overriding corresponding methods
18209         private to a different package.
18210         (java_method_add_stmt): Call add_stmt_to_compound.
18211         (add_stmt_to_compound): New function.
18212         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18213         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18214         (build_if_else_statement, patch_if_else_statement,
18215         build_labeled_block, generate_labeled_block,
18216         complete_labeled_statement, build_new_loop, build_loop_body,
18217         complete_loop_body, patch_loop_statement, build_bc_statement,
18218         patch_bc_statement, patch_exit_expr): New functions.
18219         * typeck.c (build_java_signature): Build argument signature before
18220         enclosing it in between parenthesis.
18221
18222 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18223
18224         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18225         (JAVA_OBJS): Added reminder comment
18226
18227 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18228
18229         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18230         be interpreted as a long long.
18231
18232 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18233
18234         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18235         soft_initialise_class.  Use _Jv_NewMultiArray, not
18236         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18237         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18238         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18239         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18240
18241 1998-08-12  Per Bothner  <bothner@cygnus.com>
18242
18243         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18244         length_identifier_node):  New global tree node constants.
18245         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18246         Replace uses by super_identifier_node etc.
18247         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18248
18249         * parse.y (resolve_field_access):  Don't special-case ".length" if
18250         flag_emit_class_files.
18251         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18252         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18253         and ARRAY.length.
18254
18255 1998-08-11  Per Bothner  <bothner@cygnus.com>
18256
18257         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18258         * class.c (make_method_value):  Remove init for removed fields.
18259
18260         * class.c (layout_class):  Use build_java_argument_signature.
18261         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18262
18263         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18264         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18265         (build_java_signature):  Don't use push_java_argument_signature.
18266
18267         * typeck.c (lookup_argument_method):  New function.
18268         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18269         instead of lookup_java_method2 followed by lookup_java_method.
18270
18271         * parse.y (check_method_redefinition):  Minor optimization.
18272
18273         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18274         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18275
18276 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18277
18278         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18279         c-pragma.o.
18280
18281         * gjavah.c (java_float_finite): Use K&R-style definition.
18282         (java_double_finite): Likewise.
18283         (generate_access): Now returns void.  Changed all callers.
18284         (last_access_generated): Removed.
18285         (process_file): Only make a single pass over the .class file.
18286
18287 1998-07-29  Per Bothner  <bothner@cygnus.com>
18288
18289         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18290         for compatibility for G++ (with -fvtable-thunks).
18291         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18292
18293         * gjavah.c (process_file):  Use public inheritance for super-class.
18294
18295 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18296
18297         * lex.c (java_init_lex): Initialize ctxp->package.
18298         * parse.h (struct parser_ctxt): package and package_len replaced
18299         by tree package, an identifier node. Field method_decl_list is
18300         gone. Fixed comments.
18301         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18302         class_in_current_package): New function prototypes.
18303         * parse.y (array_type:): Set class loaded flag on primitive type
18304         arrays.
18305         (package_declaration:): Assign ctxp->package to the
18306         identifier node.
18307         (method_invocation:): Handle invocation of method qualified by
18308         `super'.
18309         (single_type_import_declaration:): Removed ambiguity check.
18310         (java_pop_parser_context): New local variable `next'. Reset and
18311         set IMPORT_CLASSFILE_NAME flags on current and previous import
18312         list.
18313         (java_accstring_lookup): Use new local macro COPY_RETURN.
18314         (lookup_field_wrapper): New function.
18315         (parser_qualified_classname): Use merge_qualified_name.
18316         (parser_check_super_interface): Broaden error message.
18317         (do_resolve_class): Check for qualified class name in the current
18318         compilation unit if appropriate.
18319         (process_imports): Check for already defined classes.
18320         (check_pkg_class_access): Got rid of call to
18321         get_access_flags_from_decl.
18322         (java_complete_expand_methods): Call safe_layout_class based on
18323         the current class size.
18324         (make_qualified_primary): Build a WFL qualification on primary if
18325         none exists.
18326         (merge_qualified_name): New function.
18327         (make_qualified_name): Use merge_qualified_name.
18328         (resolve_expression_name): Use safe_lookup_field.
18329         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18330         (resolve_qualified_expression_name): Likewise. Check on resolved
18331         element accessibility.
18332         (not_accessible_p, class_in_current_package): New functions.
18333         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18334         (patch_method_invocation_stmt): Merged common pieces. Check
18335         accessibility of invoked method.
18336         (check_for_static_method_reference): Add returned type in error
18337         message.
18338         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18339         (refine_accessible_methods_list): Merged two conditions in test.
18340         (java_complete_class): Sanity check on stabilize_ref gone.
18341         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18342
18343 1998-07-28  Per Bothner  <bothner@cygnus.com>
18344
18345         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18346
18347 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18348
18349         * gjavah.c (F_NAN): Removed.
18350         (F_NAN_MASK): New macro.
18351         (F_POSITIVE_INFINITY): Removed.
18352         (F_NEGATIVE_INFINITY): Likewise.
18353         (java_float_finite): Rewrote.
18354         (D_NAN_MASK): Renamed.
18355         (java_double_finite): Rewrote.
18356         (D_POSITIVE_INFINITY): Removed.
18357         (D_NEGATIVE_INFINITY): Likewise.
18358
18359         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18360         If verbose, print underlying representation of value in hex.
18361
18362 1998-07-24  Per Bothner  <bothner@cygnus.com>
18363
18364         * buffer.h, buffer.c:  New files.
18365         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18366
18367         Support locals variables and writing their debug entries to .class.
18368         * jcf-write.c:  Simplify some by user new buffer type.
18369         (vode_buffer_grow):  Removed.
18370         (struct localvar_info):  New type.
18371         (localsvars, localvartable):  New buffers.
18372         (localvar_alloc, localvar_free):  New functions.
18373         (generate_bytecode_insns):  Handle local variables.
18374         (generate_classfile):  Write LocalVariableTable attribute.
18375
18376 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18377
18378         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18379         * zipfile.h (ZIPMAGIC): New macro.
18380
18381 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18382
18383         * Makefile.in (gjavah.o): Updated dependencies.
18384         (jcf-dump.o): Likewise.
18385         (all.indirect): Use ../gjavah.
18386         (../gjavah$(exeext)): Likewise.
18387         (clean): Don't remove gjavah.
18388         (clean): Remove parse.c, not java/parse.c.
18389         * Make-lang.in (java): Added gjavah.
18390         (gjavah$(exeext)): New target.
18391         (GJAVAH_SOURCES): New macro.
18392         (java.all.build): Added gjavah.
18393         (java.all.cross): Likewise.
18394         (java.rest.encap): Likewise.
18395         * config-lang.in (compilers, stagestuff): Added gjavah.
18396
18397 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18398
18399         * gjavah.c (java_float_finite): New function.
18400         (java_double_finite): Likewise.
18401         (F_POSITIVE_INFINITY): New macro.
18402         (F_NEGATIVE_INFINITY): Likewise.
18403         (F_NAN): Likewise.
18404         (D_POSITIVE_INFINITY): Likewise.
18405         (D_NEGATIVE_INFINITY): Likewise.
18406         (D_NAN): Likewise.
18407         (print_field_info): Use java_float_finite and java_double_finite.
18408
18409 1998-07-23  Per Bothner  <bothner@cygnus.com>
18410
18411         * parse.y (method_header):  Name "this" implicit argument.
18412
18413 1998-07-22  Per Bothner  <bothner@cygnus.com>
18414
18415         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18416         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18417         (put_linenumber):  New function.
18418         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18419
18420 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18421
18422         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18423         (lookup_name, build_known_method_ref, build_class_init,
18424         build_invokevirtual, invoke_build_dtable, match_java_method,
18425         build_field_ref, pushdecl_force_head, build_java_binop,
18426         binary_numeric_promotion, build_decl_no_layout,
18427         build_java_arrayaccess, build_newarray, build_anewarray,
18428         build_java_array_length_access, build_java_arraynull_check): New
18429         extern function prototypes.
18430         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18431         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18432         java-tree.h.
18433         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18434         to NULL
18435         * jcf.h (jcf_out_of_synch): New extern function prototype.
18436         * parse.h: Static/global function implemented in parse.y
18437         prototyped and declarations moved at the end of the file.
18438         (DECL_P): Check that the argument isn't null.
18439         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18440         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18441         (QUAL_DECL_TYPE): New macro.
18442         (PARAMS): Macro definition removed.
18443         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18444         (return_statement:): Call build_return.
18445         (field_access:): Call make_qualified_primary in sub rule.
18446         (method_invocation:): Build method invocation and call
18447         make_qualified_primary when processing primaries.
18448         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18449         get_type_from_signature.
18450         (java_check_regular_method): Extra integer 0 argument when calling
18451         lookup_java_method2.
18452         (lookup_java_interface_method2): Extra method DECL argument when
18453         calling lookup_java_interface_method2.
18454         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18455         COMPOUND_EXPR node.
18456         (java_complete_expand_method): Layout current class iff not
18457         already done. Don't process interface's methods.
18458         (java_complete_expand_method): Use super class only if it
18459         exists. Use current class otherwise.
18460         (make_qualified_primary): New function.
18461         (resolve_expression_name): Process qualified expression or
18462         expression from primary the same way.
18463         (resolve_expression_name): Two last arguments to
18464         resolve_field_access are now NULL_TREEs.
18465         (resolve_field_access): New variable is_static. Local field must
18466         be DECLs. is_static computed on field DECLs only. Append code in
18467         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18468         to initialize field_type.
18469         (resolve_qualified_expression_name): New local variable,
18470         previous_call_static and is_static. Handle primaries with function
18471         calls, casts, array references and `this'. `super' now handled as
18472         `(super_class)this'. Use is_static to clarify boolean expressions.
18473         Added code to handle case where a proper handle is required to
18474         access a field. Use QUAL_DECL_TYPE where applicable.
18475         (maybe_access_field): New function.
18476         (patch_method_invocation_stmt): New arguments primary, where,
18477         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18478         deleted. Use `where' as a type to search from if specified. Check
18479         for static method reference where forbidden. Append primary or
18480         current_this to the argument list if not calling constructor nor
18481         static methods.
18482         (check_for_static_method_reference): New function.
18483         (patch_invoke): Layout the class on which new is done if
18484         necessary.
18485         (lookup_method_invoke): Changed format to report errors on
18486         methods.
18487         (qualify_ambiguous_name): New local variable this_found. Now
18488         handle things from primaries. Method call are considered
18489         expression names.
18490         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18491         changed into NULLs.
18492         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18493         (java_complete_tree): New case fo RETURN_EXPR. Process function
18494         call arguments in separate function.
18495         (complete_function_arguments): New function.
18496         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18497         anymore.
18498         (patch_assignment): Take the return function slot into account as
18499         a RHS. Distinguish assignment from a return.
18500         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18501         when checking methods in interfaces.
18502         (resolve_type_during_patch): NULL argument to unresolve_type_p
18503         instead of NULL_TREE.
18504         (patch_newarray): Fixed typo in comment.
18505         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18506         (build_return, patch_return): New functions.
18507         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18508
18509 1998-07-21  Per Bothner  <bothner@cygnus.com>
18510
18511         * constants.c (find_name_and_type_constant, find_fieldref_index,
18512         find_methodref_index):  New methods.
18513         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18514         just return given method.  Also, rename to build_known_method_ref.
18515         (expand_invoke):  Rename call to build_invoke_non_interface.
18516         * java-tree.h, parse.h:  Update prototype.
18517         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18518         (such as expand_expr_stmt) if flag_emit_class_files.
18519         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18520         STACK_TARGET, IGNORE_TARGET):  New macros.
18521         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18522         (generate_bytecode_insn):  New function to generate method's bytecode.
18523         (generate_classfile):  Node generate Code attribute for a method.
18524         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18525         push_long_const, field_op, adjust_typed_op, maybe_wide):
18526         New functions used by generate_bytecode_insn.
18527
18528         * typeck.c (signature_include_return):  Remove variable.
18529         (push_java_argument_signature, build_java_argument_signature):  New.
18530         (build_java_signature):  Use push_java_argument_signature.
18531         * parse.y:  Use build_java_argument_signature instead of fiddling
18532         with signature_include_return.
18533
18534 1998-07-17  Tom Tromey  <tromey@cygnus.com>
18535
18536         * gjavah.c (print_c_decl): Always generate JArray<>* for array
18537         types.
18538
18539         * Makefile.in (all.indirect): Added gjavah$(exeext).
18540         (gjavah$(exeext)): Added $(exeext).
18541         (clean): Likewise.
18542
18543 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18544
18545         * class.c (layout_class): Call to java_layout_parsed_class replace
18546         by safe_layout_class.
18547         * expr.c (build_java_array_length_access): Removed static storage
18548         class in the function definition.
18549         (build_java_arraynull_check): Likewise.
18550         Also fixed typos in two comments.
18551         * lex.c (java_init_lex): Initialize static global kw_length.
18552         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18553         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18554         java_lex_error.
18555         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18556         * parse.h (resolve_no_layout): New static function declaration.
18557         (get_identifier_in_static): Declaration removed.
18558         (java_layout_parsed_class): Function name declaration changed to
18559         safe_layout_class.
18560         (build_newarray_node, patch_newarray, resolve_type_during_patch,
18561         not_initialized_as_it_should_p, build_this): New static function
18562         declarations.
18563         (pushdecl_force_head, build_java_binop, int_fits_type_p,
18564         binary_numeric_promotion, stabilize_reference,
18565         build_decl_no_layout, build_java_arrayaccess): Extern function
18566         declarations moved into their own section.
18567         (build_newarray, build_anewarray, build_java_array_length_access,
18568         build_java_arraynull_check): New extern function declarations.
18569         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18570         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18571         fake tree codes.
18572         (CALL_CONSTRUCTOR_P): New macro.
18573         * parse.y (kw_length): New static global tree node.
18574         (return_statement): Tagged <node>.
18575         (RETURN_TK): Tagged <operator>.
18576         (variable_declarator_id:): Build variable declaration with an
18577         empty initialization value if a syntax error was found in the
18578         initialization part of the variable declaration.
18579         (statement_without_trailing_substatement:): return_statement: now
18580         uses the default rule.
18581         (return_statement:): Temporarily fixed to return NULL_TREE.
18582         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18583         (class_instance_creation_expression:): Class creation rules now
18584         call build_method_invocation upon reduction.
18585         (array_creation_expression:): Rules call build_newarray_node upon
18586         reduction.
18587         (dim_exprs:): Build a list of dimension expressions.
18588         (dim_expr:): Store location of the OSB_TK in the dimension
18589         expression node.
18590         (method_invocation:): Added a new error rule.
18591         (build_unresolved_array_type): WFL argument may also be an array
18592         on a primitive type. Name of the argument changed to reflect this.
18593         (method_declarator): Insert argument type at the beginning of the
18594         argument type list and later reverse the list.
18595         (unresolved_type_p): Argument 'returned' may be optionally
18596         NULL_TREE.
18597         (java_layout_class_from_source): Function renamed
18598         safe_layout_class.
18599         (resolve_and_layout): Now call resolve_no_layout and
18600         safe_layout_class.
18601         (resolve_no_layout): New function.
18602         (purify_type_name): New function.
18603         (complete_class_report_errors): Call purify_type_name during error
18604         report on a type not found.
18605         (process_imports): error_found local variable doesn't need to be
18606         initialized to zero.
18607         (declare_local_variables): New local type_wfl. Fixed typo in error
18608         message. type_wfl assigned to unresolved type and used to register
18609         incomplete type. Build a WFL around the variable initialization
18610         statement so that debug info can be generated on it.
18611         (source_start_java_method): Reverse argument list after they've
18612         been processed.
18613         (current_this): New static global variable.
18614         (java_complete_expand_methods): Set current_this when appropriate.
18615         (resolve_expression_name): Build correct static and non static
18616         field access bearing a simple name.
18617         (resolve_field_access): Resolve the length field of arrays. Handle
18618         f.m() cases.
18619         (patch_method_invocation_stmt): Set the type of the method
18620         invocation to error_mark_node. This value is later overridden by a
18621         valid type, if any. Don't handle qualified constructor invocation
18622         as qualified method invocation. Call lookup_method_invoke with its
18623         new flag. It's no longer necessary to access the selected method
18624         as the value of a tree list. Handle constructor invocation.
18625         (patch_invoke): Reverse argument list when invoking non interface
18626         methods. Insert call to new as the first argument of the
18627         constructor.
18628         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18629         defined within a final class. Return INVOKE_STATIC if the invoked
18630         method is a constructor.
18631         (lookup_method_invoke): New lc argument is a flag to indicate a
18632         constructor lookup. Now handle constructor lookup. Choose the most
18633         specific method in case several were matching the invocation
18634         requirements. Return a method decl instead of a tree list featuring
18635         one single method decl element.
18636         (refine_accessible_methods_list): New lc flag argument to
18637         indicate that a constructor is being looked up.
18638         (not_initialized_as_it_should_p): New function.
18639         (java_complete_tree): Now process fake tree codes
18640         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18641         save_expr on resolved function call arguments. Case on
18642         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18643         (patch_assignment): LHS can be a field access expression. When
18644         dealing with reference, lhs_type is the promoted type of the
18645         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18646         applicable.
18647         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18648         (patch_binop): Use not_initialized_as_it_should_p where
18649         applicable.
18650         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18651         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18652         where applicable.
18653         (resolve_type_during_patch): New function.
18654         (patch_cast): Call resolve_type_during_patch to resolve type and
18655         report error accordingly.
18656         (patch_array_ref): Use not_initialized_as_it_should_p where
18657         applicable. Array base expression is saved before being
18658         used. Promote the type of an array elements if it contains non
18659         builtin types.
18660         (build_newarray_node, patch_newarray, build_this): New functions.
18661
18662 1998-07-16  Tom Tromey  <tromey@cygnus.com>
18663
18664         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18665         increment it in `for' statement.
18666         (print_field_info): If number is inf or nan, don't print it.
18667         (print_method_info): If method name is `delete', just ignore it.
18668         (print_c_decl): Special-case jstringArray.
18669
18670         * gjavah.c (help): New function.
18671         (no_argument): New function.
18672         (usage): Changed text.
18673         (main): Rewrote argument handling.  Now handles -v, --help,
18674         --version.
18675         (version): New function.
18676         (found_error): New global.
18677         (main): Return found_error.
18678         (generate_access): Set found_error.
18679         (print_c_decl): Likewise.
18680
18681 1998-07-15  Tom Tromey  <tromey@cygnus.com>
18682
18683         * gjavah.c (print_c_decl): Don't print "," when examining field.
18684         Skip type name when looking at "[L" types.
18685         (process_file): Now static.
18686         (generate_access): Now returns int.
18687         (last_access_generated): New global.
18688         (process_file): Clear last_access_generated; make multiple passes
18689         over the class.
18690         (print_field_info): Just return if generate_access returns true.
18691         (print_method_info): Likewise.  Also, allow <init> functions to
18692         pass through.
18693         (print_c_decl): Added is_init argument.  Print constructors
18694         properly.
18695         (print_cxx_classname): Use UTF8_GET to extract characters from
18696         string.
18697         (print_base_classname): New function.
18698         (print_class_decls): New function.
18699         (process_file): Use it.
18700         (utf8_cmp): New function.
18701
18702 1998-07-13  Nick Clifton  <nickc@cygnus.com>
18703
18704         * lang-options.h: Format changed to match changes in gcc/toplev.c
18705         to implement a --help option.
18706
18707 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
18708
18709         * decl.c (init_decl_processing): Revert change to dtable_type.
18710
18711 1998-07-09  Per Bothner  <bothner@cygnus.com>
18712
18713         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18714
18715 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
18716
18717         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18718
18719         * lang.c (lang_init): Default flag_exceptions to 1, without
18720         checking to see if it's 2 first.
18721
18722 1998-07-08  Jeffrey A Law  (law@cygnus.com)
18723
18724         * constants.c: Include "system.h".
18725         * decl.c: Likewise.
18726         * lang.c (flag_new_exceptions): Get via extern now.
18727         (lang_init_options): New functions.  Turn on flag_new_exceptions.
18728
18729 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18730
18731         * lex.c (java_lex): Return 0 when we see an invalid character in
18732         the input.
18733
18734         * lex.c (java_read_char): Specify extra argument when calling
18735         java_lex_error.
18736         (java_read_unicode, java_parse_end_comment,
18737         java_parse_escape_sequence): Likewise,
18738         (java_lex): Specify extra argument when calling
18739         java_lex_error. Test that IDs are beginning with a legal character
18740         for IDs. Handle invalid characters with an error message and a
18741         call to java_lex_error.
18742         (java_lex_error): Adjust column position by new argument
18743         `forward'. Issue an error even if in the middle of reporting an
18744         other error.
18745
18746 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
18747
18748         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
18749         we don't explicitly put a null pointer when we're copying it.
18750
18751 1998-07-07  Tom Tromey  <tromey@cygnus.com>
18752
18753         * gjavah.c (print_cxx_classname): New function.
18754         (super_class_name): Likewise.
18755         (print_super_fields): Removed.
18756         (in_super): Removed.
18757         (print_field_info): Never generate #defines.
18758         (print_c_decl): Changed generated types to match JNI.  No longer
18759         print class name before method name.
18760         (print_method_info): Print "static" before static methods.
18761         Print "virtual" before non-final methods.
18762         (usage): Use exit(1), not exit(-1).
18763         (main): Likewise.
18764         (print_field_info): Use %.17g to print a double.
18765         (last_access): New globals.
18766         (process_file): Initialize last_access.
18767         (usage): Now static.
18768         (ACC_VISIBILITY): New define.
18769         (generate_access): New function.
18770         (print_field_info): Call it.
18771         (print_method_info): Likewise.  Also, generate information for all
18772         methods, not just native methods.  Return void.
18773         (print_c_decl): Return void.
18774         (print_field_info): Return void.
18775
18776 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18777
18778         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
18779         processing the jc1 grammar file. Prefix bison functions and
18780         variables with java_.
18781         (parse.c): Dependencies on parse.h and lex.h
18782         * expr.c (build_java_arrayaccess): Function now global.
18783         * java-tree.h: Comment reorganized to carry on previous
18784         classification effort.
18785         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18786         RESOLVE_TYPE_NAME_P): New flags on WFLs.
18787         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18788         java_parse (new prefix java_ generated by bison).
18789         (java_layout_parsed_class, java_register_parsed_class): Function
18790         call removed.
18791         (yyparse): Removed unnecessary call to init_outgoing_cpool.
18792         * lex.c (static tree wfl_op): Variable deleted.
18793         (java_init_lex): Initialize kw_super and kw_this. Initialize more
18794         ctxp fields to NULL_TREE.
18795         (java_lex): No longer create WFL for operators. Filename caching
18796         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18797         created as STRING_CST and later expanded. Removed extra argument
18798         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18799         and SUPER.
18800         (build_wfl_node): Removed code in comments.
18801         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18802         store token and location data in the current bison token.
18803         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18804         static/extern function declaration at the beginning of the file.
18805         (struct qualification): Data structure definition deleted.
18806         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18807         (qualify_ambiguous_name): Function declaration modified. Function
18808         now returns nothing.
18809         (build_array_ref, patch_array_ref, make_qualified_name,
18810         resolve_qualified_expression_name, maybe_generate_clinit,
18811         resolve_field_access): New static function declarations.
18812         (build_java_arrayaccess): New extern function declaration.
18813         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18814         (CALL_EXPR_PRIMARY): Macro deleted.
18815         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18816         (struct parser_ctxt): Field initialized_final
18817         removed. non_static_initialized, static_initialized: New fields.
18818         * parse.y (static tree kw_super, static tree kw_this): New global
18819         static.
18820         (%union): tree wfl field of operator member replaced by int
18821         location. WFLs are non longer created for operators.
18822         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18823         (qualified_name:): Now calls make_qualified_name to build the
18824         identifier.
18825         (type_declaration:): Consider generating <clinit> when class
18826         parsing completed.
18827         (variable_declarator:): Directly build an assignment node when the
18828         variable is initialized when declared.
18829         (this_or_super:): Build a WFL and set current location when THIS
18830         or SUPER are parsed.
18831         (expression_statement:): Wrap statement around a WFL.
18832         (primary_no_new_array:): Fixed typo. Changed value returned by
18833         THIS_TK because of its new type (temporary).
18834         (dim_exprs:): Temporary fix because of OSB_TK's new type.
18835         (field_access:): Build qualified name with SUPER.
18836         (method_invocation:): Fixed returned value because of SUPER's new
18837         type.
18838         (array_access:): Use OSB_TK location information.
18839         (post_increment_expression:, post_decrement_expression:,
18840         unary_expression:, pre_increment_expression:,
18841         pre_decrement_expression:, unary_expression_not_plus_minus:,
18842         cast_expression:, multiplicative_expression:,
18843         additive_expression:, shift_expression:, relational_expression:,
18844         equality_expression:, and_expression:, exclusive_or_expression:,
18845         inclusive_or_expression:, conditional_and_expression:,
18846         conditional_or_expression:, assignment:): Use new location/token
18847         information available on operators.
18848         (create_class): Set super_decl_type to NULL_TREE when processing
18849         java.lang.Object.
18850         (register_fields): Field initialization is now a MODIFY_EXPR
18851         node. Chain initialization code to the matching lists (according
18852         to the field declaration modifiers).
18853         (maybe_generate_clinit): New function.
18854         (method_header): Don't set method's DECL_NAME to a WFL when adding
18855         methods to java.lang.Object.
18856         (resolve_and_layout): Now can return NULL_TREE if the type
18857         resolution fails. Otherwise, return the class DECL instead of its
18858         TYPE.
18859         (check_method_redefinition): Don't patch method DECL_NAME if it
18860         belongs to java.lang.Object.
18861         (process_imports): Simply assign error_found to the value returned
18862         by check_pkg_class_access.
18863         (declare_local_variables): Don't use their init statements (if
18864         any) when parsing error were previously found. Reuse MODIFY_EXPR
18865         build during parsing as an init statement.
18866         (java_method_add_stmt): Now return the current method body.
18867         (java_layout_parsed_class, java_register_parsed_class): Functions
18868         removed.
18869         (java_complete_expand_methods): Initialize the constant pool on a
18870         per class basis. Layout the classes before expanding their method
18871         bodies. Don't try expand artificial constructor code if error were
18872         found. Make the classes data and register them if no error were
18873         found.
18874         (java_complete_expand_method): Retrieve an artificial constructor
18875         argument list before entering its body. Assign the top block to
18876         the artificial constructor function body and set types of declared
18877         blocks and compound statements to void. Walk method body if not an
18878         artificial constructor.
18879         (make_qualified_name, cut_identifier_in_qualified): New functions.
18880         (resolve_expression_name): Fixed comments. Save/restore the
18881         current class CLASS_LOADED_P flag value. Build non qualified
18882         static field access and handle qualified expression names.
18883         (resolve_field_access, resolve_qualified_expression_name): New
18884         functions.
18885         (patch_method_invocation_stmt): Use the new expression resolution
18886         scheme, calling resolve_field_access when the function call is
18887         resolved as an expression.
18888         (qualify_ambiguous_name): Function rewritten to work on qualified
18889         expression produced by make_qualified_name.
18890         (java_complete_tree): Promote type when function's argument are
18891         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
18892         the assignment to discover further errors if RHS is a expression
18893         name that fails to evaluate. Declare LHS initialized even though
18894         the assignment failed. Don't use the location variable and removed
18895         extra argument in patch function calls. Now handle the ARRAY_REF
18896         case and build internal string representation when STRING_CSTs are
18897         walked.
18898         (build_method_invocation): Don't wrap function call around a WFL.
18899         (build_assignment): Likewise. Use the operator location
18900         information.
18901         (patch_assignment): Handle array access LHSs. Handle error
18902         provenance, resulting in a better error report.
18903         (build_binop): Use op_location from operator as binop location
18904         information.
18905         (build_unaryop, build_incdec, build_cast): Likewise.
18906         (patch_binop): Extract location information from the node. Fixed
18907         typo in error message.
18908         (patch_unary_op): Extract location information from the node.
18909         (build_array_ref, patch_array_ref): New functions.
18910
18911 1998-07-01  Tom Tromey  <tromey@cygnus.com>
18912
18913         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
18914         match _Jv_IsInstanceOf.
18915         * decl.c (init_decl_processing): Use _Jv_NewArray, not
18916         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
18917
18918 1998-06-30  Tom Tromey  <tromey@cygnus.com>
18919
18920         * decl.c (init_decl_processing): Functions are now named
18921         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
18922
18923 1998-06-29  Per Bothner  <bothner@cygnus.com>
18924
18925         * java-tree.h (load_class):  Add prototype.
18926         * class.c (is_compiled_class):  Add missing arg to load_class.
18927         * expr.c (expand_java_NEW):  Call load_class.
18928         * parse.y (process_import):  Removed bogus use of void return value.
18929
18930 1998-06-25  Per Bothner  <bothner@cygnus.com>
18931
18932         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
18933         Function name is "_Jv_Throw" instead of "soft_athrow".
18934         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
18935         Function name is "_Jv_AllocObject" instead of "soft_new".
18936         Takes an extra parameter (object size).
18937         * expr.c:  Update calls.
18938
18939 1998-06-24  Per Bothner  <bothner@cygnus.com>
18940
18941         * lex.c (java_get_line_col):  Handle end-of-file.
18942         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
18943
18944 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
18945
18946         * lang.c (lang_init): Make -fexceptions the default.
18947         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
18948         exception handling is not turned on.
18949
18950 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
18951
18952         * lang.c (flag_new_exceptions): Make this this default.
18953         * decl.c (end_java_method): Call emit_handlers.
18954         * except.c (method_init_exceptions): Set language code and version.
18955         (expand_start_java_handler): Enable exception, and call
18956         expand_eh_region_start.
18957         (expand_end_java_handler): Enable exception, and set up catch blocks.
18958         (emit_handlers): New routine to generate the saved handlers.
18959         * java-except.h (emit_handlers): Add prototype.
18960
18961 1998-06-12  Per Bothner  <bothner@cygnus.com>
18962
18963         We used to have three different representations of the constant pool:
18964         the CPool structure, the tree_constant_pool, and the constructures
18965         used to build the Class object (which may need class and string
18966         constants) in compiled code.  None were appropriate for compiling
18967         to .class files, so I did a major overhaul.
18968
18969         First, the tree_constant_pool array was removed.  Things were
18970         modified to the CPool structure in the JCF could be used.
18971         Second, a "capacity" field was added to the CPool, and functions
18972         written to search for a matching constant, adding one if not found.
18973         The code that generated the Class object was changed to use a CPool.
18974         The actual TREE_LISTs used to build the CONSTRUCTORs used for
18975         the static Class object are now only in build_constants_constructor.
18976         Finally, I wrote code which can generate a .class file (including its
18977         constant pool) from the RECORD_TYPE of a class.  This is a big step
18978         on the way to compiling Java source into .class files.
18979
18980         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
18981         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
18982
18983         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
18984         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
18985         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
18986         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
18987         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
18988         (lang_type):  Removed constant_pool field.
18989         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
18990         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
18991         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
18992         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
18993
18994         * constants.c (current_constant_pool_tags, current_constant_pool_data,
18995         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
18996         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
18997         (set_constant_entry, find_constant1, find_constant2,
18998         find_class_constant, count_constant_pool_bytes, write_constant_pool,
18999         find_utf8_constant, find_class_or_string_constant):  New functions.
19000
19001         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19002         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19003         (give_name_to_class, get_class_constant):  Likewise.
19004         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19005         (get_name_and_type_constant, get_ref_constant):  Removed.
19006         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19007         * parse.y:  Don't save/restore tree_constant_pool.
19008         * verify.c (verify_jvm_instructions):  Update for new approach.
19009         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19010
19011         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19012         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19013         (lang_f_options):  Added "emit-class-file(s)".
19014
19015         * expr.c (build_java_arrayaccess):  Generate more efficient array
19016         bounds checking, by using unsigned compare.
19017
19018         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19019
19020 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19021
19022         * parse.h: New comment on the handling of unresolved type
19023         identifiers. JDEPs are now part of the jdep_code enum.
19024         (typedef struct jdep): Now use enum jdep_code or int, depending on
19025         availability. Both are narrowed down to an 8 bits bitfield.
19026         (CALL_EXPR_PRIMARY): Fixed comment.
19027
19028 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19029
19030         * Make-lang.in (java): Added gjavac and jvgenmain.
19031         (java.start.encap): Depend on gjavac.
19032         (java.rest.encap): Depend on jvgenmain.
19033
19034         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19035         (JAVA_CROSS_NAME): Likewise.
19036         (java.all.build): Depend on jvgenmain and gjavac.
19037         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19038         (jvgenmain$(exeext)): New target.
19039         (java.install-common): Wrote.
19040         * config-lang.in (compilers, stagestuff): Added gjavac and
19041         jvgenmain.
19042
19043 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19044
19045         * lang.c (lang_decode_option): New argc/argv interface.
19046
19047 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19048
19049         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19050         * decl.c (build_decl_no_layout): New function.
19051         * expr.c (java_lang_expand_expr): Layout declarations found in
19052         blocks before they're pushed.
19053         * jcf-parse.c (load_class): Save current line when parsing class
19054         file.
19055         (parse_source_file): Register class before expanding their
19056         methods.
19057         * lang.c (put_decl_node): Produce `null' when `void *' is
19058         processed.
19059         * lex.c (static tree wfl_op): New static global, for error report
19060         on casts.
19061         (java_init_lex): wfl_operator and wfl_op initialized
19062         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19063         parsed.
19064         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19065         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19066         build_unresolved_array_type): New static function definitions.
19067         (build_decl_no_layout): New extern function declared.
19068         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19069         faulty modifier exists.
19070         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19071         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19072         (UNARY_PLUS_EXPR): New fake operator.
19073         (struct parser_ctxt): New field osb_number.
19074         * parse.y (static tree wfl_operator): New static WFL for operator
19075         bound error messages.
19076         (DECR_TK, INCR_TK): Moved.
19077         (OP_TK): Tagged <operator>.
19078         (array_type:): Now call build_unresolved_array_type.
19079         (dim_expr:): Count the number of '[' seen.
19080         (post_increment_expression, post_decrement_expression,
19081         pre_increment_expression, pre_decrement_expression,
19082         unary_expression_not_plus_minus, unary_expression:): Actions are
19083         now building the corresponding unary expressions.
19084         (cast_expression:): Actions are now building cast expressions.
19085         (build_unresolved_array_type): New function.
19086         (create_interface): Reset the number of declared interfaces.
19087         (create_class): Likewise.
19088         (method_header): Methods declared within the scope of an interface
19089         are now implicitly set public and abstract.
19090         (java_complete_class): Variable's and parameter's type are patched
19091         with a promoted type.
19092         (declare_local_variables): Resolved non builtin types are promoted
19093         before being used to build a variable decl. Removed type patch
19094         posted on variable initialization statement.
19095         (source_start_java_method): Use build_decl_no_layout to build the
19096         decl of a parameter of incomplete type.
19097         (java_register_parsed_class): Process interfaces too. Call
19098         rest_of_decl_compilation on each processed class declarations.
19099         (java_complete_expand_methods): Don't attempt to expand things in
19100         interfaces.
19101         (java_complete_tree): Process CONVERT_EXPR, even though it always
19102         has a type. Propagate error_mark_node to node's type too. Promote
19103         method's call argument type and return error_mark_node if
19104         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19105         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19106         handle unary operator nodes.
19107         (build_assignment): Added comment.
19108         (print_int_node): New function.
19109         (patch_assignment): New second argument. New error handling. Use
19110         print_int_node. Handle references. Use can_cast_to_p to issue
19111         different error message according to the context and check upon
19112         the initialization of the RHS.
19113         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19114         (operator_string): Handle more operators.
19115         (patch_binop): No longer use a function static
19116         wfl_operator. Improved error message on shift distance.
19117         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19118         patch_cast): New functions.
19119
19120 1998-06-05  Per Bothner  <bothner@cygnus.com>
19121
19122         * jvspec.c:  New file.
19123         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19124
19125         * java-tree.h (identifier_subst):  Add declaration.
19126
19127 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19128
19129         * jvgenmain.c (main): Generate call to JvRunMain.
19130
19131         * class.c (make_class_data): Push value for "sync_info" field.
19132         * decl.c (init_decl_processing): Push "sync_info" field.
19133
19134 1998-06-03  Per Bothner  <bothner@cygnus.com>
19135
19136         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19137         Java (source) name, not signature.
19138         Set TYPE_ALIGN to (at least) that of element_type.
19139
19140 1998-06-02  Per Bothner  <bothner@cygnus.com>
19141
19142         * class.c:  Moved classname-mangling-rekated code to ...
19143         * mangle.c:  ... this new file.
19144         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19145         * Makefile.in:  Update for above changes.
19146
19147 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19148
19149         * expr.c (truthvalue_conversion): Convert integer and floating
19150         point value to their truth value.
19151         * lex.c (java_lex): Handle the `null' literal.
19152         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19153         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19154         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19155         New macros.
19156
19157         * parse.y: Reorganization/documentation on token declaration.
19158         (binop_lookup[]): New added new tree codes.
19159         (relational_expression): Build corresponding binary operators.
19160         (equality_expression, conditional_and_expression,
19161         conditional_or_expression): Likewise.
19162         (java_complete_class): Fix crash in debug message.
19163         (java_complete_tree): Check initialization of method call
19164         arguments. Further bogus node evaluation to detect more error
19165         during assignments. Handles more binary operators.
19166         (patch_assignment): Use DECL_P.
19167         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19168         code.
19169         (operator_string): Handle more case. Compacted source.
19170         (patch_binop): Changed function comment. Checking for
19171         uninitialized first operand takes the compound assignment into
19172         account and uses DECL_P. Checking for uninitialized second operand
19173         delayed to routine's end. Use macros to issue type bound error
19174         messages and issue messages on both operands if their types are
19175         different. Force fixed type into node. Handle all binary
19176         operators.
19177
19178 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19179
19180         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19181         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19182         build operator node and return tokens.
19183         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19184         * parse.h (java_complete_tree): Changed returned type in prototype.
19185         (build_method_invocation, build_assignment, patch_assignment,
19186         patch_binop): New static function declarations.
19187         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19188         BUILD_EXPR_WFL): New macros.
19189         * parse.y (enum tree_code binop_lookup[]): New static for token to
19190         TREE_CODE lookup.
19191         (%union): Parser union has new sub-structure `operator'.
19192         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19193         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19194         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19195         ASSIGN_ANY_TK): Tokens tagged `operator'.
19196         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19197         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19198         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19199         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19200         (assignment_operator:): Rule tagged `operator'.
19201         (expression_statement:): Re-installed default rule.
19202         (method_invocation:): Sub rules call build_method_invocation.
19203         (postfix_expression:): Don't attempt to resolve name here. Just
19204         return an ID.
19205         (multiplicative_expression:): Sub-rules build corresponding binop
19206         expression node.
19207         (additive_expression:, shift_expression:, and_expression:,
19208         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19209         (assignment:): Sub rule invoke build_assignment.
19210         (assignment_operator:): Default rules on sub rules.
19211         (force_error): Added documentation on this variable.
19212         (declare_local_variables): Build initialization calling
19213         build_assignment.
19214         (expand_start_java_method): Removed unused rtx declaration. Mark
19215         arguments as already initialized.
19216         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19217         (java_complete_expand_methods): Don't process next method if
19218         completion of the previous one triggered errors.
19219         (java_complete_expand_method): Call source_end_java_method if no
19220         error were found during completion.
19221         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19222         locals declaratilon. Handle names found within a class. Return
19223         error_mark_node when things aren't found.
19224         (patch_method_invocation_stmt): Return error_mark_node on failures.
19225         (patch_invoke): Removed unused local. Return the correct node.
19226         (java_complete_tree): Now returns a value. The BLOCK section binds
19227         local identifiers and the type of a BLOCK is now void. Assign the
19228         result of operand completion on COMPOUND_EXPR. Assign the
19229         encapsulated node of a WFL to the result of its completion, except
19230         when the node is an identifier. Now handle MODIFY_EXPR and several
19231         binary operators. Return error_mark_node on errors.
19232         (build_method_invocation, build_assignment, patch_assignment,
19233         build_binop, operator_string, patch_binop): New functions.
19234         * typeck.c (binary_numeric_promotion): New function.
19235
19236 1998-05-21  Per Bothner  <bothner@cygnus.com>
19237
19238         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19239         Replace most uses of ident_subst by identifier_subst.
19240
19241         * class.c (push_class_static_dummy_field):  Removed function.
19242         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19243         instead of looking got "class" static field.  Create that decl here.
19244         (class_identifier_node):  Removed;  no longer needed.
19245         (init_class_processing):  Don't init class_identifier_node.
19246         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19247         Do nreverse 0 times (instead of twice) for Object and Class.
19248         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19249
19250 1998-05-20  Per Bothner  <bothner@cygnus.com>
19251
19252         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19253         while initializing linenumber_count and linenumber_table.
19254         Do it before init_function_start (which calls emit_line_note).
19255         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19256
19257 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19258
19259         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19260         then mangle number as _N_.
19261
19262         * class.c (mangle_class_field): New function.
19263         (build_class_ref): Set assembler name of class reference using
19264         mangle_class_field.
19265         (push_class_static_dummy_field): Likewise.
19266
19267 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19268
19269         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19270         of assigning to TREE_CODE.  The latter method exploits a feature
19271         of GCC that is not ANSI compliant.
19272
19273 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19274
19275         * decl.c (pushdecl_force_head): New function.
19276         (pushlevel): Removed conditional printf.
19277         (complete_start_java_method): Don't enter local variable scope if
19278         function is compiled from source code.
19279         * expr.c: parse.h now included
19280         (java_lang_expand_expr): New function.
19281         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19282         printf. Terminate buffer when doing directories.
19283         * jcf-parse.c (parse_source_file): Call lang_init_source before
19284         parsing and before code generation.
19285         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19286         use printf if the macro is defined.
19287         * lang.c (lang_init): Install lang_expand_expr hook on
19288         java_lang_expand_expr.
19289         (java_dummy_print): New function.
19290         (lang_init_source): New function.
19291         * lex.c (java_lex): Remember location of an opening brace at the
19292         second nesting level.
19293         (java_is_eol): Unget character seen after a CR if it is EOF.
19294         * parse.h: Now includes lex.h
19295         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19296         printf if the macro is defined.
19297         (expand_start_java_method, build_expr_block, enter_block,
19298         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19299         New static function declarations.
19300         (pushdecl_force_head): New extern function declaration.
19301         (INCOMPLETE_TYPE_P): New macro.
19302         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19303         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19304         BLOCK_EXPR_ORIGIN): New macros.
19305         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19306         DECL_SOURCE_LINE_LAST): New macros.
19307         (struct parser_ctxt): Removed field current_method_decl, redundant
19308         with the field current_function_decl. Added fields
19309         first_ccb_indent1 and pending_block.
19310         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19311         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19312         tagged <node>
19313         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19314         (compilation_unit:): Cosmetic on sub rule.
19315         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19316         (variable_initializer:): Installed default rule on expression:.
19317         (method_declaration:): method_header: starts a new
19318         method. method_body: installs the function body, absorbs blocks
19319         emitted for temporary variable scopings, pops function's body block
19320         and merges function's last statement lineno in DECL_SOURCE_LINE.
19321         (method_body:): Installed default rules.
19322         (block:): Call enter_block when an opening brace is seen.  Absorb
19323         scoping blocks and call exit_block when a closing brace is seen.
19324         (block_statement:): Cosmetic changes.
19325         (method_invocation:): Create WFL around CALL_EXPR node.
19326         (patch_stage): Added comment around definition.
19327         (method_header): Try to use first_ccb_indent1 as the first line of
19328         the method, so BP debug info are emitted at the first opening
19329         brace of the function. If the function has no body, use the
19330         location of the function's name. Override currently defined method
19331         name with the matching WFL so we can point redefinition errors
19332         using the location where the function's name was declared.
19333         (check_abstract_method_header): Interprets DECL_NAME as an
19334         identifier or as a WFL, accordingly.
19335         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19336         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19337         location and name information out of it and reinstall DECL_NAME to
19338         its original identifier node value.
19339         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19340         function's source code).
19341         (read_import_dir): Test the value returned by find_class and issue
19342         a fatal accordingly.
19343         (declare_local_variables): Push a new block for the scope of the
19344         new variable(s) if code has been already generated at that nesting
19345         level. Pinpoint redefinition errors using the variable id
19346         WFLs. Generate initialization code if necessary. If the variable
19347         type is incomplete, register a patch on its decl.
19348         (source_start_java_method): Rewritten. Define a new block for the
19349         function's parameters. Build parameter decl out of function's
19350         arguments and register them for a patch if their types are
19351         incomplete.
19352         (expand_start_java_method): Includes the part of
19353         source_start_java_method that was pushing the parameter decls and
19354         completing the method start code.
19355         (source_end_java_method): Removed call the expand_end_bindings and
19356         poplevel (already taken care of). Reinstall function's arguments
19357         and get function's last line of code before calling
19358         expand_function_end.
19359         (java_method_add_stmt): New comment before the function's
19360         code. Complement the second operand of the current COMPOUND_EXPR
19361         if necessary.
19362         (java_complete_expand_methods): Don't generate debug info on line
19363         zero when expanding a generated constructor.
19364         (java_complete_expand_method): Set start and end line numbers for
19365         a artificially generated constructor to one and manually call
19366         enter_block and exit_block when defining it. For all methods:
19367         expand function's start calling the new expand_start_java_method
19368         and invoke java_complete_tree on the effective method's body, if
19369         any.
19370         (resolve_expression_name): Now use lookup_name_in_blocks to search
19371         local variable decls and print out an error when variables are
19372         undefined.
19373         (patch_method_invocation_stmt): Inserted comment before the
19374         function's code.
19375         (lookup_method_invoke): Chain method's arguments using chainon
19376         with the current arg list as a second argument. Inserted missing
19377         IDENTIFIER_POINTER when reporting an error on methods not found.
19378         (refine_accessible_methods_list): Don't retain constructors.
19379         (patch_arguments): Function removed.
19380         (java_complete_tree): Inserted comment before the function's
19381         code. New case for BLOCKs. Moved the WFL case a bit
19382         further. Complete function's arguments.
19383         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19384         maybe_absorb_scoping_blocks): New functions.
19385
19386 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19387
19388         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19389         previously set.
19390         * jcf-parse.c (parse_source_file, java_error_count): New forward
19391         and extern declarations.
19392         (java_parse_abort_on_error): Macro moved.
19393         (jcf_parse_source): fatal called if fopen fails. Now calls
19394         parse_source_file.
19395         (parse_source_file): New parse_only parameter. Reflects the
19396         elimination of the second pass.
19397         (yyparse): parse_source_file called with argument set to 0.
19398         * jcf.h (JCF_ZERO): Sets java_source to zero.
19399         * lex.c (java_init_lex): pass argument is gone. Function modified
19400         to be called once during the analysis of a file.
19401         (java_unget_unicode): Fixed typo in fatal message.
19402         (java_get_line_col): Likewise.
19403         (java_lval): Likewise. String literals no longer built during
19404         second pass.
19405         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19406         account.
19407         * parse.h (MODIFIER_WFL): New macro.
19408         (parse_check_super, parser_check_super_interface): Now return int.
19409         (parser_chain_incomplete_item, not_builtin_p,
19410         complete_method_decl): Declarations removed.
19411         (build_method_invocation_stmt, build_invoke): Renamed using the
19412         `patch' instead of `build'
19413         (register-incomplete_type, obtain_incomplete_type,
19414         java_complete_tree, java_complete_expand_method,
19415         unresolved_type_p, create_jdep_list): New function declarations.
19416         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19417         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19418         (jdep): New typedef on new struct _jdep.
19419         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19420         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19421         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19422         JDEP_RESOLVED_P): New macros.
19423         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19424         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19425         JDEP_VARIABLE): New enum values and jdep kinds.
19426         (jdeplist): New typedef on struct _jdeplist.
19427         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19428         macros.
19429         (CALL_EXPR_PRIMARY): New macro.
19430         (struct parser_ctxt): Fields java_pass, current_method_decl,
19431         method_decl_list deleted. New field jdeplist.
19432         (INCOMPLETE_P): Macro deleted.
19433         * parse.y (single_type_import_declaration:): Removed pass switch.
19434         (type_import_on_demand_declaration): Likewise.
19435         (field_declaration:): Removed pass switch on all sub rules.
19436         (class_declaration:): Call the complete_class_decl removed on
19437         class_body rules.
19438         (method_declaration:): Removed second pass switch. No longer chain
19439         methods decl when method_header reduced.
19440         (method_header:): Sub rules no longer depend on pass switch.
19441         (method_declarator:): Likewise.
19442         (method_body:): Likewise.
19443         (abstract_method_declaration:): Likewise.
19444         (block_statement:): Likewise.
19445         (local_variable_declaration:): Likewise.
19446         (argument_list:): Likewise.
19447         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19448         removed. Partial CLASS_EXPR tree node built instead.
19449         (postfix_expression:): Removed pass switch on all sub rules.
19450         (java_pop_parser_context): Free classd_list content.
19451         (yyerror): Call obstrack_grow0 to finalize error message.
19452         (check_class_interface_creation): Comment modified to reflect new
19453         returned value meaning. Removed second pass switch. Return 1 if an
19454         error was found, 0 otherwise. Adjust pointer on filename if a
19455         leading path separator was found.
19456         (maybe_create_class_interface_decl): Removed first pass switch
19457         when linking the class decl to the class_list. Install a new
19458         jdep_list for the class.
19459         (add_superinterfaces): List of unresolved interfaces is
19460         gone. Unresolved interfaces are directly added to the current
19461         dependencies list.
19462         (create_interface): Second pass shortcut removed.
19463         ctpx->modifier_ctx access through MODIFIER_WFL.
19464         (create_class): Second pass shortcut removed. Call to
19465         register_incomplete_type replaces the call to
19466         parser_chain_incomplete_item.
19467         (complete_class_decl): Function removed.
19468         (duplicate_declaration_error): New way of retrieving redeclared
19469         item type.
19470         (register_fields): Call to lookup_modifier_cl replaced by
19471         MODIFIER_WFL. New way of handling unresolved type, using
19472         unresolved_type_p and obtain_incomplete_type.
19473         register_incomplete_type replaces call to parser_chain_incomplete_item.
19474         (patch_stage): New static global variable.
19475         (method_header): New way of handling unresolved type, using
19476         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19477         indicates that the method decl needs to be patched.
19478         (check_abstract_method_header): Call to lookup_modifier_cl
19479         replaced by MODIFIER_WFL.
19480         (method_declarator): Incomplete argument type are registered
19481         calling register_incomplete_type. Patch on the declared method is
19482         issued in that case.
19483         (unresolved_type_p): New function.
19484         (parser_check_super_interface): New comment to reflect function's
19485         modified returned type (int). Function and has a new argument
19486         this_wfl. Call to parse_error_context uses this_wfl instead of
19487         relying on lookup_cl.
19488         (parser_check_super): Comment reflects function's new returned
19489         type (int). Function returns nonzero value on error.
19490         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19491         register_incomplete_type, jdep_resolve_class): New functions to
19492         handle incomplete types in declarations.
19493         (java_complete_class): Rewritten to work with the new incomplete
19494         type handling scheme.
19495         (complete_class_report_errors): Likewise.
19496         (complete_method_decl): Removed: it jobs is now handled by
19497         java_complete_class.
19498         (do_resolve_class): Class loaded in not already loaded and not
19499         found in Java source code.
19500         (java_check_regular_methods, java_check_abstract_methods): Don't
19501         call complete_method_decl anymore.
19502         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19503         (read_import_dir): Got rid of the pass number dependency.
19504         (declare_local_variables): New handling of unresolved types (patch
19505         issued).
19506         (source_start_java_method): New parameter level. Function called
19507         with level set to 1 when argument types are potentially
19508         unresolved.  Called to complete the job with level set to 2 once
19509         types are complete.
19510         (source_end_java_method): Call to permanent_allocation
19511         removed. Waiting to be replaced by a more suitable obstack
19512         management.
19513         (java_complete_expand_methods, java_complete_expand_method,
19514         java_expand_finals): New functions.
19515         (build_method_invocation_stmt): Renamed
19516         patch_method_invocation_stmt. Extracts function call expression
19517         (wfl) and arguments (args) from CALL_EXPR tree operands.
19518         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19519         call. Patch the function and argument operand of the CALL_EXPR
19520         tree argument.
19521         (patch_argument, java_complete_tree): New functions.
19522
19523 1998-04-20  Per Bothner  <bothner@cygnus.com>
19524
19525         Recover from missing fields and methods (i.e. error instead of fatal).
19526         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19527         * expr.c (expand_invoke):  Recover from missing method.
19528         (expand_java_field_op):  Recover from missing field.
19529         Inline references to java.lang.{Integer,Char,...}.TYPE.
19530         * typeck.c (get_type_from_signature), java-tree.h:  New function.
19531         * class.c (add_method):  Use get_type_from_signature.
19532         (build_class_ref):  Handle a class that was not found.
19533         * typeck.c (convert):  Handle conversion to pointers (for convenience).
19534         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
19535         instead of lookup_field to handle missing fields.
19536
19537         * jcf-parse.c (process_zip_dir):  Set java_source.
19538
19539 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
19540
19541         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19542
19543 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19544
19545         * jcf-parse.c (load_class): Don't change input_filename before
19546         calling jcf_parse_source (but still do it before calling
19547         jcf_parse).
19548         (jcf_parse_source): Assign input_filename after having saved the
19549         parser context.
19550         * lex.c (java_init_lex): Chain a WFL node to the import on demand
19551         list. ctxp->modifier_ctx zeroed according to its new
19552         definition. ctxp->filename initialized. Removed
19553         JAVA_MODIFIER_CTX_UNMARK.
19554         (java_unget_unicode): Update the character based column position.
19555         (java_allocate_new_line): ref_count not used anymore. Always free
19556         ctxp->p_line. Initialize c_line->char_col to 0.
19557         (java_get_unicode): Update the character based column position.
19558         (java_lex): Use ctxp->elc to store current position in source
19559         file, at the beginning of the parsed token. Set modifier_ctx entry
19560         corresponding to the parse modifier to a WFL node. Return a WFL
19561         node when an identifier is parsed.
19562         (java_lex_error): Now uses ctxp->elc to store current position in
19563         source.
19564         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19565         * lex.h (build_wfl_node): New function definitions.
19566         (struct java_line): ref_count and next fields are gone. New field
19567         char_col.
19568         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19569         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19570         (JAVA_COLUMN_DELTA): New macro.
19571         (java_lc): New typedef on new struct _java_lc.
19572         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19573         (parse_error_context, parse_warning_context): Changed prototypes.
19574         (java_get_line_col): Added as an available global function.
19575         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19576         (IC_DECL): Replaced by macro IC_TYPE
19577         (DEPEND_WFL): New macro.
19578         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19579         wrong modifier.
19580         (exit_java_complete_class): Removed a commented out statement.
19581         (struct parser_ctxt): Added comments on fields. modifier_ctx is
19582         now an array of tree nodes. Deleted fields line_list and
19583         e_line. New field elc, to replace e_line.
19584         * parse.y (array_type:): Build WFL node.
19585         (qualified_name:): Build a single WFL node out of two. Retain
19586         the location information of the first node in the resulting node.
19587         (package_declaration:): Use package name as a WFL node
19588         (single_type_import_declaration:): Use imported name as a WFL node.
19589         (type_import_on_demand_declaration:): Use root of the imported
19590         packages as a WFL node.
19591         (field_declaration:): Removed unused local variable cl.
19592         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19593         (yyerror): New static elc. Removed static error_line, error_pos.
19594         New local code_from_source. Save ctxp->elc into elc at the first
19595         pass. Call java_get_line_col to get a string of the line where
19596         the error occurred.
19597         (debug_line): Removed static function.
19598         (parse_error_context, parse_warning_context): Parameter cl is now
19599         a WFL node. Use its value to initialize ctxp->elc.
19600         (redefinition_error): Parameter cl is now a WFL node.
19601         (parse_add_interface): New parameter wfl. No longer call
19602         lookup_cl, use wfl instead.
19603         (check_class_interface_creation): Parameter cl is now a WFL node.
19604         (maybe_create_class_interface_decl): Likewise.
19605         (add_superinterfaces): New function.
19606         (create_interface): Removed local cl, node, super_decl,
19607         super_decl_type.  Function now uses id as a WFL node. Better
19608         warning/error report on obsolete or forbidden mix of
19609         modifiers. Now calls add_superinterfaces to register interfaces.
19610         (create_class): Removed local cl, node. Local variable id is used
19611         as a WFL node. Better error report on forbidden modifier
19612         mix. Uses add_superinterfaces to register interfaces.
19613         (find_field): Argument cl is now a WFL node. Now store the WFL
19614         node of a fields that needs to be checked for their
19615         initialization.
19616         (method_header): Local variable node non longer used. Local
19617         variable id replaces cl.
19618         (check_modifiers_consistency): Local variable cl is now a WFL
19619         node.
19620         (method_declarator): Local variable cl replaced by parameter id.
19621         (parser_qualified_name): Now uses parameter name as a WFL node.
19622         (parser_check_super_interface): New parameter wfl, for achieve
19623         greater accuracy during error reports.
19624         (parser_chain_incomplete_item): New parameter named location. Used,
19625         along the decl, to construct the incomplete item node.
19626         (java_complete_class): resolve_class now uses WFL node extracted
19627         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19628         where appropriate.
19629         (complete_method_decl): Unresolved function's argument types are WFL.
19630         (resolve_class): Parameter cl is now a WFL node.
19631         (resolve_and_layout): Likewise.
19632         (do_resolve_class): Likewise. Try first to use cl and then do the
19633         lookup on the decl when calling check_pkg_class_access.
19634         (complete_class_report_errors): Use IC_TYPE in place of
19635         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19636         instead of doing a lookup over the decl.
19637         (java_check_final): Use WFL info from field tree list.
19638         (lookup_cl): Rewritten and returns a statically defined WFL node.
19639         (lookup_modifier_cl): Now uses information from WFL nodes.
19640         (process_imports): Likewise.
19641         (read_import_dir): name and cl arguments replaced by a single WFL
19642         node. Function modified accordingly.
19643         (find_in_imports_on_demand): Now uses WFL node.
19644         (check_pkg_class_access): cl argument is now a WFL node.
19645         (declare_local_variables): Fixed to use WFL nodes.
19646         (resolve_expression_name): Likewise.
19647         (build_method_invocation_stmt): name_combo argument renamed
19648         wfl. Function modified to use WFL nodes.
19649         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19650         (lookup_method_invoke): cl is now a WFL node. Added missing
19651         IDENTIFIER_POINTER to class type decl name.
19652
19653 1998-04-14  Dave Brolley  <brolley@cygnus.com>
19654
19655         * lang.c (init_parse): Now returns char* containing the filename.
19656
19657 1998-04-10  Per Bothner  <bothner@cygnus.com>
19658
19659         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
19660
19661         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
19662         * class.c (make_class_data):  If flag_assume_compiled, initial class
19663         state is CSTATE_PREPARED; make superclass and interfaces direct
19664         references, rather than constant pool indexes.
19665
19666 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19667
19668         * parser.y: Include flags.h. Removed debug variable pl.
19669         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19670         (block:): Likewise.
19671         (labeled_statement_nsi:): Generate debug info when reducing
19672         expression_statement:.
19673         (check_pkg_class_access): get_access_flags_from_decl invocation
19674         fixed for new CLASS_* flags location.
19675         (source_end_java_method): Save/restore parser context when
19676         entering/leaving this routine. Restore lineno to its right value
19677         before calling expand_end_bindings.
19678         (build_method_invocation_stmt): build_invoke called with the
19679         current line information.
19680         (build_invoke): New argument cl. Wrap the function call around a
19681         wfl node.
19682         (refine_accessible_methods_list): Changed comment, removed
19683         unnecessary code.
19684         * parse.h: Fixed typo in comments.
19685         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19686         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19687         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19688         parser_ccb_indent.
19689         * lex.c (java_lex): Record the last closing curly bracket of a
19690         function.
19691         * jcf-parse.c (jcf_parse_source): Now calls
19692         java_check_methods. Clarified comment, fixed typo.
19693
19694 1998-04-09  Dave Brolley  <brolley@cygnus.com>
19695
19696         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19697         (finish_parse): Expose for non USE_CPPLIB builds.
19698
19699 1998-04-08  Jeffrey A Law  (law@cygnus.com)
19700
19701         * lang.c (lang_print_xnode): New function.
19702
19703 1998-04-03  Per Bothner  <bothner@cygnus.com>
19704
19705         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
19706         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
19707         used to build a class's dispatch table.
19708         (make_class_data):  Generate dispatch table if flag_assume_compiled.
19709         Set dtable of class object to address of class_dtable_decl.
19710
19711         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
19712         be volatile and have side effects - generates better code.
19713
19714         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
19715         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19716
19717         * expr.c (expand_invoke):  If class is final, method is
19718         effectively final, so can call it directly.
19719
19720         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
19721
19722         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
19723
19724 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19725
19726         * parse.y (build_method_invocation_stmt): Removed extra argument
19727         to build_invoke.
19728
19729 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19730
19731         * expr.c (dtable_indent): Now static global.
19732         (expand_invoke): Now call invoke_build_dtable and
19733         build_invokevirtual.
19734         (invoke_build_dtable, build_invokevirtual): New functions.
19735         * jcf-io.c (find_class): Defer issuing a warning by setting
19736         jcf->outofsynch to 1.
19737         * jcf-parse.c (jcf_out_of_synch): New function.
19738         (load_class): Test this_jcf.outofsynch flag and call
19739         jcf_out_of_synch accordingly.
19740         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
19741         comment indentation.
19742         * lex.c (java_get_unicode): Fixed code indentation.
19743         (java_lex): Create string literal. Fixed typo. Removed several
19744         premature obstack_free.
19745         * parse.h: New enums for name resolution and invocation mode.
19746         (struct qualification): New data structure.
19747         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
19748         (do_resolve_class, build_method_invocation_stmt,
19749         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
19750         debug_line, identical_subpath_p, invocation_mode,
19751         refine_accessible_methods_list, build_invoke,
19752         lookup_method_invoke): New functions declared.
19753         (build_invokevirtual, invoke_build_dtable, match_java_method,
19754         build_field_ref, jcf_out_of_synch): New references to external
19755         functions.
19756         (struct parse_ctxt): Removed artificial_constructor field.
19757         * parse.y: (array_type:): Type defined for this rule.
19758         (class_type:): Installed default rule for interface_type:.
19759         (array_type:): Now build Java array type.
19760         (qualified_name:): Now use obstack_grow0.
19761         (method_declaration:): Skip the artificial constructor added to
19762         the list, if any.
19763         (abstract_method_declaration:): Execute the code only during pass 1.
19764         (block:): Installed default rule in block_statements:.
19765         (block_statement:): Add the statement to the method during pass 2.
19766         (statement_expression): Installed default rule for
19767         method_invocation:.
19768         (argument_list:): Added code to build the argument list.
19769         (method_invocation:): Added call to create the method invocation
19770         node.
19771         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
19772         (debug_line): New function for debug.
19773         (complete_class_decl): No longer do something during pass 1.
19774         (method_header): Use BUILD_PTR_FROM_NAME.
19775         (parser_qualified_classname): Use obstack_grow0. Removed bogus
19776         obstack_free.
19777         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
19778         function's main comment.
19779         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
19780         classes.
19781         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19782         (resolve_class): Now works with arrays.
19783         (do_resolve_class, resolve_and_layout): New functions.
19784         (java_check_regular_methods): Reverse method list before and after
19785         having processed it. No longer set ctxp->artificial_constructor.
19786         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19787         accordingly. Fixed typo in issued error message. Now use
19788         obstack_grow0.
19789         (find_in_imports_on_demand): Now use obstack_grow0.
19790         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19791         (source_end_java_method): Call expand_expr_stmt instead of
19792         expand_expr. Calls it before calling expand_function_end.
19793         (java_method_add_stmt): Do nothing if errors were found during
19794         parsing.
19795         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19796         (build_method_invocation_stmt, build_invoke, invocation_mode,
19797         lookup_method_invoke, refine_accessible_methods_list,
19798         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19799         New functions.
19800         * typeck.c (build_java_signature): Properly end method signature
19801         if return type skipped.
19802         (match_java_method): New function.
19803
19804 1998-03-16  Per Bothner  <bothner@cygnus.com>
19805
19806         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
19807
19808 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19809
19810         * expr.c (build_invoke_non_interface): New function.
19811         (methods_ident, ncode_ident): Now static globals.
19812         (expand_invoke): Use build_invoke_non_interface.
19813         * java-tree.h (struct lang_decl): New field function_decl_body.
19814         (DECL_FUNCTION_BODY): New macro.
19815         * jcf-parse.c (jcf_parse_source): Deeper check before setting
19816         CLASS_FROM_SOURCE_P.
19817         (parse_source_file): Fixed typos. Call java_layout_parsed_class
19818         before starting pass 2. Call to java_generate_parsed_class replaced
19819         by java_register_parsed_class.
19820         * lex.c: Fixed typo in header. Some line width related formating.
19821         * lex.h: Some line width related formating.
19822         * parse.h (source_end_java_method, resolve_expression_name,
19823         complete_class_decl, maybe_create_class_interface_decl,
19824         check_class_interface_creation): New static function declarations.
19825         (java_layout_parsed_class, java_method_add_stmt): New function
19826         declarations.
19827         (struct parser_ctxt): Field mark_class_generate removed. New
19828         fields class_list and artificial_constructor.
19829         * parse.y: Fixed typo in header.
19830         (class_declaration:): Call complete_class_decl when class body
19831         parsed.
19832         (method_declaration:): Call source_end_java_method in pass 2 when
19833         the method body is defined.
19834         (postfix_expression:): Do expression name resolution on sub-rule
19835         name during pass 2.
19836         (create_class, create_interface): Merged common pieces.
19837         (check_class_interface_creation, maybe_create_class_interface_decl):
19838         New functions.
19839         (complete_class_decl): New function.
19840         (register_fields): Fixed line width related typo.
19841         (method_header): Correctly skip first argument when fixing
19842         argument line. Changed the loop.
19843         (java_check_circular_reference): Now use ctxp->class_list.
19844         (java_complete_class): Removed start/stop marking.
19845         (java_check_regular_methods): Now takes a class decl as an
19846         argument.  Add default constructor if none were encountered.
19847         (java_check_methods): Now use ctxp->class_list. Changed call to
19848         java_check_regular_methods.
19849         (source_start_java_method): Set DECL_ARG_TYPE for each function
19850         arguments.
19851         (source_end_java_method, java_method_add_stmt): New functions.
19852         (java_generate_parsed_class): No longer exists.
19853         (java_layout_parsed_class, java_register_parsed_class): New functions.
19854         (resolve_expression_name): New function.
19855
19856 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19857
19858         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
19859         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
19860         until pass initializations are done. Call read_import_dir with
19861         pass set to 0.
19862         * parse.h: (lookup_modifier_cl): New function declared.
19863         (INTERFACE_FIELD_MODIFIERS): New macro.
19864         (OBSOLETE_MODIFIER_WARNING): New macro.
19865         * parse.y: (register_fields): Class type and current field name in
19866         local variables. Check modifier(s) if adding field(s) to an interface.
19867         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
19868         and report errors using the faulty modifier line context.
19869         (lookup_modifier_cl): New function.
19870         (read_import_dir): Detect and report default import processing
19871         failure.
19872
19873 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
19874
19875         Add a pair of -fassume-compiled/-fno-assume-compiled options.
19876         * class.c (is_compiled_class): Return 1 after making sure it
19877         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
19878         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
19879         * java-tree.h (flag_assume_compiled): Add decl.
19880         * lang.c (lang_f_options): Add the flag.
19881         (flag_assume_compiled): Add decl, default to 0.
19882
19883 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19884
19885         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
19886         (is_compiled_class): Likewise.
19887         (layout_class): Likewise.
19888         (layout_class): Detect and lay out classes defined in source code.
19889         (interface_of_p, add_interface_do, may_add_interface): New
19890         function.
19891         (add_interface): Now use add_interface_do.
19892         (add_method_1): New function.
19893         (add_method): Now use add_method_1.
19894         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
19895         (complete_start_java_method): New function.
19896         (start_java_mehod): Now call complete_start_java_method.
19897         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
19898         (expand_invoke): Likewise and fixed typo.
19899         *gjava.c: (print_super_field): Use new argument to find_class
19900         DO_CLASS_FILE.
19901         (main): Likewise.
19902         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
19903         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
19904         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
19905         IDENTIFIER_NODE.
19906         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
19907         (add_method_1, push_class): New prototypes.
19908         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
19909         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
19910         directory where the class was found.
19911         (find_class): New argument DO_CLASS_FILE. Function find_class
19912         modified accordingly.
19913         *jcf-parse.c: (fix_class_path): New function.
19914         (load_class): Use new VERBOSE argument. load_class now finds and
19915         loads/parses .class/.java files. Save read_state of current_jcf
19916         if necessary.
19917         (java_parser_abort_on_error): New macro.
19918         (jcf_parse_source, parse_source_file): New function.
19919         (jcf_parse): Fixed typo.
19920         (yyparse): Call parse_source_file () only.
19921         (process_zip_dir): Fixed typo, fix zdir->filename_length when
19922         writing the real class name back in the zip directory entry.
19923         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
19924         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
19925         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
19926         (find_class): Prototype fixed.
19927         *lex.c: Added 1998 time stamp.
19928         Removed all static global variables, moved into the parser
19929         context data structure.. Now include unistd.h if SEEK_SET not
19930         defined.
19931         (java_init_lex): Rewritten.
19932         (java_sneak_unicode): Modified current unicode access in current line.
19933         (java_unget_unicode): Likewise.
19934         (java_allocate_new_line): New allocation management.
19935         (java_read_char): Modified access and storage of unget_utf8_value.
19936         New way of processing current unicode.
19937         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
19938         (java_get_unicode): Now use the parser context.
19939         (java_lineterminator): Likewise.
19940         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
19941         of the reentrant parser implementation. Function now use the
19942         parser context data structure and java_lval. Fixed production of
19943         the float and double constant "out of range" error message. Fixed
19944         obstack use. Return integer value when hitting a modifier. Now
19945         return type for TRUE, FALSE and other predefined types. Return
19946         identifier as a TREE_LIST list containing the current line context
19947         as the TREE_VALUE sub-node.
19948         (java_unicode_2_utf8): Fixed typo in declaration.
19949         (java_lex_error): Now use the parser context data structure.
19950         *lex.h: Added 1998 time stamp.
19951         (struct java_line): New fields ref_count and next.
19952         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19953         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
19954         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
19955         *parse.h: Added 1998 time stamp.
19956         (java_parse_source_file): Renamed from parse_source_file.
19957         (YYERROR_NOW, YYNOT_TWICE): Fixed.
19958         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
19959         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
19960         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
19961         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
19962         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
19963         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
19964         (struct parser_ctxt): New data structure to keep the parser context.
19965         *parse.y: Added 1998 time stamp, got rid of static global variables.
19966         (java_error_count, ctxp): New global variables.
19967         (%union): New value field.
19968         (numeric_type, integral_type): Rules removed.
19969         (primitive_type): Rule defined to handle integral, float, double and
19970         boolean types.
19971         (qualified_name, package_declaration,
19972         single_type_import_declaration, type_import_on_demand_declaration,
19973         modifiers, class_declaration, super, interfaces,
19974         interface_type_list, class_body, field_declaration,
19975         field_declaration, variable_declarators, variable_declarator,
19976         variable_declarator_id, method_declaration, method_header,
19977         formal_parameter_list, formal_parameter, method_body, block,
19978         static, interface_declaration, extends_interfaces,
19979         abstract_method_declaration, local_variable_declarators): Rules now
19980         define actions.
19981         (force_error, do_warning): New global statics.
19982         (push_parser_context, parser_context_save_global,
19983         parser_context_restore_global, pop_parser_context): New functions.
19984         (yyerror): Now uses the global parser context. Fixed use of obstack.
19985         (parse_error, parse_error_context, parse_warning_context,
19986         java_accstring_lookup, redefinition_error, check_modifiers,
19987         parser_add_interface, create_interface, create_class, find_field,
19988         duplicate_declaration_error, register_fields, method_header,
19989         check_modifiers_consistency, check_abstract_method_header,
19990         method_declarator, parser_qualified_classname,
19991         parser_check_super_interface, parser_check_super,
19992         parser_chain_incomplete_item, java_check_circular_reference,
19993         layout_class_from_source, java_complete_class,
19994         complete_method_decl, resolve_class, complete_class_report_errors,
19995         java_check_final, check_method_redefinition,
19996         java_check_regular_methods, java_check_abstract_methods,
19997         java_check_methods, lookup_java_interface_method2,
19998         lookup_java_method2, lookup_cl, find_name_in_single_imports,
19999         process_imports, find_in_imports, read_import_entry,
20000         read_import_dir, find_in_imports_on_demand,
20001         check_pkg_class_access, not_builtin_p, declare_local_variables,
20002         source_start_java_method, java_generate_parsed_class): New
20003         functions.
20004         *typeck.c: (signature_include_return): New global variable.
20005         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20006         to add the function returned type in the signature.
20007
20008 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20009
20010         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20011
20012 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20013
20014         * Make-lang.in (java.info): Added.
20015         (java.install-info): Added
20016
20017 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20018
20019         * Makefile.in (clean): Also remove java/parse.c.
20020
20021 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20022
20023         Add a pair of -fbounds-check/-fno-bounds-check options.
20024         * lang.c (lang_decode_option): Add code to grok arguments.
20025         (flag_bounds_check): Add decl.
20026         (lang_f_options): New array w/ the option in it.
20027         * java-tree.h (flag_bounds_check): Add decl.
20028         * lang-options.h: New file.
20029         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20030         of a static macro value.
20031         (JAVA_ARRAY_EXCEPTION): Delete macro.
20032
20033 1998-01-23  Per Bothner  <bothner@cygnus.com>
20034
20035         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20036         * expr.c (build_anewarray):  Add missing promote_type.
20037
20038 1998-01-22  Per Bothner  <bothner@cygnus.com>
20039
20040         Add array types with known length to optimize bounds checking.
20041         * typeck.c (build_java_array_type):  Take length parameter.
20042         (java_array_type_length, build_prim_array_type):  New functions.
20043         * java-tree.h:  Update for new functions.
20044         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20045         * class.c:  Use build_prim_array_type.
20046         * expr.c (can_widen_reference_to):  Handle known-length array types.
20047         (verify_jvm_instructions):  Keep track of integer push instructions
20048         followed by newarray/anewarray, so we can build known-length arrays.
20049         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20050         (java_array_data_offset):  New function.
20051         (build_java_array_length_access):  New function.  Optimize if constant.
20052         (build_java_arrayaccess):  Constant fold bounds check.
20053         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20054         (build_newarray, build_anewarray):  New functions.
20055         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20056         * verify.c (merge_types):  Handle known-lengh array types.
20057
20058 1998-01-19  Per Bothner  <bothner@cygnus.com>
20059
20060         * expr.c (expand_byte_code):  Fix performace bug, which caused
20061         searching linenumber_table to be linear rather than constant.
20062
20063 1997-12-12  Per Bothner  <bothner@cygnus.com>
20064
20065         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20066
20067         * decl.c, java-tree.h (soft_fmod_node):  New global.
20068         * decl.c (init_decl_processing):  Define __builtin_fmod.
20069         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20070         using __builtin_fmod.
20071
20072 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20073
20074         * keyword.h: New file, output of keyword.gperf as processed by
20075         gperf.
20076         * lex.c (java_lex_init): Initialize java_error_flag.
20077         * parse.c (YYERROR_NOW): Uses java_error_flag.
20078         * parse.y: New static java_error_flag. Useless definition of
20079         buffer_error gone.
20080         * parse.y (java_error): Portable error recovery using
20081         java_error_flag (not yet completely tuned).
20082
20083 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20084
20085         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20086
20087 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20088
20089         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20090         (parse.c, lex.c, keyword.h): New rules for Java source code
20091         front-end.
20092         * parse.c: Renamed into jcf-parse.c.
20093         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20094         * keyword.gperf: New file, Java keywords.
20095         * parse.y: New file, Java language grammar.
20096         * parse.h: New file, Java language grammar definitions.
20097         * lex.c: New file, Java language lexer.
20098         * lex.h: New file, Java language lexer definitions.
20099
20100 1997-12-03  Per Bothner  <bothner@cygnus.com>
20101
20102         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20103         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20104         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20105         * expr.c (expand_java_field_op):  Check for invalid assignment
20106         to final field.
20107
20108         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20109
20110 1997-10-27  Per Bothner  <bothner@cygnus.com>
20111
20112         * verify.c (verify_jvm_instructions):  When processing a handler,
20113         attempt to set the current_subr to the right value.
20114         (More complicated code combines Sep 17 and Oct 22 versions.)
20115
20116 1997-10-24  Per Bothner  <bothner@cygnus.com>
20117
20118         * class.c (push_class):  Figure out (guess) name of source file.
20119         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20120         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20121         (parse_class_file):  Change return type from int to void.
20122         Call debug_start_source_file/debug_end_source_file.
20123
20124         * expr.c (build_java_binop):  Fix masking 2nd operand.
20125         * decl.c (init_decl_processing):  Set sizetype first.
20126
20127 1997-10-22  Per Bothner  <bothner@cygnus.com>
20128
20129         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20130         (Revert Sep 17 change.)
20131
20132 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20133
20134         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20135         .class extension in their name and fix thing so we don't process
20136         them parse_zip_file_entries().
20137         (parse_zip_file_entries): Cleaned unused local variables.
20138
20139 1997-10-20  Per Bothner  <bothner@cygnus.com>
20140
20141         * expr.c (can_widen_reference_to):  Allows equal array element types.
20142         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20143         * jcf-dump.c (RET):  Get (and print) index.
20144
20145         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20146         Promote element type to POINTER_TYPE.
20147
20148 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20149
20150         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20151         find_in_current_zip, jcf_figure_file_type): Moved from
20152         jcf-reader.c to parse.c.
20153         * zextract.c: (read_zip_archive): takes file_comment_length possible
20154         field into account.
20155
20156 1997-10-20  Per Bothner  <bothner@cygnus.com>
20157
20158         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20159
20160         * verify.c (merge_types):  Handle array types even better ...
20161
20162 1997-10-17  Per Bothner  <bothner@cygnus.com>
20163
20164         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20165
20166         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20167         * class.c (make_class_data):  Don't build fields_decl if no fields.
20168         When building fields_decl, skip if DECL_ARTIFICIAL.
20169
20170         * expr.c (java_stack_swap):  Update stack_type_map.
20171         * verify.c (merge_types):  Handle array types better.
20172
20173 1997-10-15  Per Bothner  <bothner@cygnus.com>
20174
20175         * class.c (add_field):  Don't promote short integral fields to
20176         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20177         * expr.c (push_value):  Promote and convert short integral values.
20178
20179         * decl.c, java-tree.h (integer_two_node):  New constant node.
20180         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20181
20182 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20183
20184         * class.c (append_gpp_mangled_type): Use function argument
20185         unpromoted type to generate mangled name.
20186
20187 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20188
20189         * constants.c (build_constant_data_ref): Now uses current_class
20190         instead of main_class.
20191         (build_constants_constructor): Now uses current_class instead of
20192         main_class.
20193         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20194         of the global variable SeepZipFiles done here.
20195         * zextract.c (read_zip_archive): extra_field optional field taken
20196         into account while computing the position of the class file in the
20197         archive.
20198         * verify.c (verify_jvm_instructions): Use current_jcf to search
20199         the constant pool.
20200         * parse.c (load_class): First search for the class to load in the
20201         current zip file. Saves current_jcf (restored before returning
20202         from that function). Don't call JCF_FINISH in the class was found
20203         in the current ZIP file.
20204         (jcf_parse): If the class was found in the current ZIP file, save
20205         its tree_constant_pool (for later reuse).
20206         (parse_class_file): New function. Process each method defined in
20207         the current class and record the class as to be later registered.
20208         (yyparse): Rewritten. Figure the type of the current file and switch
20209         accordingly.
20210         * lang.c: New global variable current_jcf.
20211         (lang_init): Removed compiling_from_source test (done later, in
20212         yyparse). Removed call the jcf_parse ().
20213         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20214         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20215         in the current ZIP file) and zip_offset (offset to the class data in
20216         the current zip file).
20217         * jcf-reader.c: zipfile.h included.
20218         localToFile: New ZipFileCache static global variable
20219         (parse_zip_file_entries): New function. Browse the current ZIP
20220         file directory and process each class found.
20221         (process_zip_dir): New function. Register each class found in the
20222         ZIP file directory. The class aren't parsed but a valid JCF is
20223         link to each of them.
20224         (find_in_current_zip): New function. Search for a class in the
20225         current ZIP file directory. If found, prepare the class so that it
20226         can be loaded.
20227         (jcf_figure_file_type): New function. Examine the file structure
20228         to figure a class file, a ZIP file. If none of these categories are
20229         matched, a source file is assumed.
20230         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20231         SeenZipFile: New global variable.
20232         (open_in_zip): Use zipmember's length to accelerate the search for
20233         a member. If zipmember was NULL and zip file successfully read,
20234         return 0.
20235         * java-tree.h: New global variable current_jcf declared.  Added
20236         declaration for current_constant_pool_tags, current_constant_pool_data,
20237         current_constant_pool_length, current_constant_pool_data_ref.
20238         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20239         store the JCF of classes seen in a zip file) and tree *constant_pool
20240         (to save a loaded class constant pool). current_class declared here.
20241         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20242         retrieve method_ref_constant.
20243         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20244         (OBJECT): get_class_constant now uses current_jcf.
20245         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20246         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20247         (expand_invoke): Now uses current_class instead of main_class
20248         (build_class_init): Now uses current_class instead of main_class
20249         * class.c: New static global variable registered_class.
20250         (register_class): New function.
20251         (emit_register_class): Modified to use registered_class instead of
20252         main_class
20253         (is_compiled_class): Now take into account class seen in the archive.
20254
20255 1997-10-06  Per Bothner  <bothner@cygnus.com>
20256
20257         * except.h:  Renamed to: java-except.h.
20258         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20259         * except.c:  Add semi-working (commented out) implementation.
20260
20261         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20262         * parse.c (set_source_filename):  New function.
20263         (give_name_to_class):  Set input_filename from package.classname.java.
20264
20265         * jcf-io.c (find_class):  Don't look first in ".".
20266
20267 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20268
20269         * zextract.c (read_zip_archive): Now takes into account the
20270         extra_field field.
20271         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20272
20273 1997-09-20  Per Bothner  <bothner@cygnus.com>
20274
20275         * constants.c, java-tree.h (build_internal_class_name):  New function.
20276         (alloc_class_constant):  Re-implement using build_internal_class_name.
20277         * class.c (make_class_data):  Likewise.
20278         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20279
20280 1997-09-17  Per Bothner  <bothner@cygnus.com>
20281
20282         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20283         to NULL before pushing an exception handler target.
20284
20285         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20286         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20287         clobbering registers.
20288         (build_class_init):  New function.
20289
20290 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20291
20292         * typeck.c (build_java_array_type): Temporary use
20293         permanent_obstack to create the array 'length' field.
20294         * expr.c (lookup_label): Temporay use permanent_obstack to create
20295         label if not found.
20296         * class.c (push_super_field): Tempory use permanent_obstack.
20297
20298 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20299
20300         * typeck.c (type_for_mode): Now handles double_type_node and
20301         float_type_node.
20302         * verify.c (verify_jvm_instructions): The instruction following
20303         the wide bytecode is checked. OPCODE_ret added to the list of
20304         wide.
20305
20306 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20307
20308         * class.c (make_class): Temporary use permanent_obstack. Set the
20309         class CLASS_P field to 1.
20310         (push_class): Temporary use permanent_obstack.
20311         (set_super_info): Temporary use permanent_obstack.
20312         (add_method): Temporary use permanent_obstack, set
20313         METHOD_TRANSIENT().
20314         (add_field): Temporary use permanent_obstack. Sets
20315         FIELD_VOLATILE() and FIELD_TRANSIENT().
20316         (build_class_ref): Temporary use permanent_obstack if the class
20317         isn't compiled.
20318         (build_static_field_ref): Temporary use permanent_obstack when
20319         creating field's rtl.
20320         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20321         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20322         and fields. Function finalized, as far as flag handling.
20323         (push_class_static_dummy_field): Temporary use permanent_obstack.
20324         (emit_register_class): Force generation of class registration at
20325         -O3 or deeper.
20326         * decl.c (end_java_method): Call permanent_allocation() before
20327         returning.
20328         * expr.c (can_widen_reference_to): Added comment to interface
20329         handling, fixed typo.
20330         (lookup_field): Now uses CLASS_P() to correct FIXME
20331         (expand_invoke): Verification on public && !static &&
20332         !abstract moved into soft_lookupinterfacemethod (kaffe).
20333         Use Object class dtable if objectref is an array when expanding
20334         invokeinterface.
20335         (java_push_constant_from_pool): Temporary use permanent_obstack
20336         for CONSTANT_string
20337         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20338         create constant references.
20339         (get_constant): Temporary use permanent_obstack to create constant.
20340         (load_class): Temporary use permanent_obstack to load class.
20341         (jcf_parse): Temporary use permanent_obstack to perform class
20342         layout.
20343         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20344         (build_java_signature): Temporary use permanent_obstack.
20345         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20346         on ACC_SUPER flag.
20347         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20348         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20349         (CLASS_P): Defined
20350
20351 1997-09-11  Per Bothner  <bothner@cygnus.com>
20352
20353         * class.c (append_gpp_mangled_type):  Fix typo.
20354         (emit_register_class):  Use main_class to get class object, rather
20355         than looking for no-longer-existing static decl starting with _CL.
20356         * typeck.c (parse_signature_type):  Promote array element type
20357         if it is a RECORD_TYPE.
20358
20359 1997-09-10  Per Bothner  <bothner@cygnus.com>
20360
20361         * class.c (push_class_static_dummy_field):  New function.
20362         (mangle_static_field):  New. Do G++-style mangling of static fields.
20363         (layout_class):  Mandle static fields here, not in add_field.
20364         (build_class_ref):  The class object is now a dummy static field.
20365         * decl.c (find_local_variable):  Look for best, instead of first match.
20366         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20367         (build_java_athrow):  Don't check here if exception is Throwable.
20368         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20369         (TYPE_USED):  Removed.  No longer used ...
20370         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20371         * verify.c (push_pending_label):  New function.
20372         (push_pending_block):  Renamed to check_pending_block.
20373         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20374         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20375         re-checking possible handlers) after a store (less wasted work).
20376         Check for null handler (finally) before calling add_handler.
20377         Various changes to (finally?) correctly handle try/finally.
20378
20379 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20380
20381         * class.c: Include stdio.h.
20382
20383 1997-09-04  Per Bothner  <bothner@cygnus.com>
20384
20385         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20386         to make sure class is initialized before static/special invoke.
20387
20388         * verify.c (verify_jvm_instructions):  On a store instruction,
20389         call find_local_variable to force pre-allocation of decl and rtx.
20390         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20391
20392 1997-09-03  Per Bothner  <bothner@cygnus.com>
20393
20394         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20395         (make_field_value): Call build_java_signature when needed.
20396         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20397         * expr.c (build_java_athrow):  Don't push_value of exception.
20398         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20399         match specification of [fd]cmp[lg] for NaNs.
20400         (expand_byte_code):  Add support for exception handler ranges.
20401         * except.c:  Add skeleton for EH code-generation.
20402         * verify.c (merge_types):  Treat all promoted integral types as equal.
20403         * constants.c (build_constants_constructor):  To force creation of
20404         current_constant_pool_data_ref, call build_constant_data_ref.
20405
20406         * javaop.def (lload):  Fix typo.
20407         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20408
20409 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20410
20411         * parse.c: Don't include function.h.
20412
20413 1997-08-27  Per Bothner  <bothner@cygnus.com>
20414
20415         * except.[ch]:  New files.
20416         * Makefile.in (JAVA_OBJS):  Add except.o
20417         * expr.c:  Temporary warning about unimplemented exceptions.
20418         * verify.c:  Verify exception handlers.
20419
20420         * jcf-dump.c (disassemble_method):  Print exception table.
20421
20422 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20423
20424         * expr.c (verify_jvm_instructions): Started a thorough
20425         verification of invoke* bytecodes.
20426         (expand_byte_code): flush quick stack if PC is the target of a
20427         branch.  and undef RET (conflicting with config/i386/i386.h).
20428         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20429         used.
20430         (expand_invoke): Now handles invokeinterface and do more
20431         verification according to the bytecode.
20432         (lookup_field): Don't try to load the class if processing
20433         dtable_type.
20434         (can_widen_reference_to): Now handles interfaces.
20435         * decl.c (init_decl_processing): New global variable
20436         soft_lookupinterfacemethod_node, declared in java-tree.h.
20437         Call set_super_info on string_type_node.
20438         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20439         defined.
20440         * class.c (set_super_info): Fills the CLASS_* flags according to
20441         access_flags.
20442         (get_access_flags_from_decl): Handles all class flags.
20443
20444 1997-08-26  Per Bothner  <bothner@cygnus.com>
20445
20446         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20447         * parse.c (yyparse):  Check for abstract method, and missing code.
20448         * expr.c (expand_byte_code):  Change interface.
20449         * lang.c (put_decl_node):  Print promoted types prettier.
20450         * verify.c (verify_jvm_instruction):  Change interface.
20451         Partial support for scanning exception table.
20452         For load instructions, handle promoted integral types.
20453
20454 1997-08-21  Per Bothner  <bothner@cygnus.com>
20455
20456         * verify.c:  New file, with contents moved from expr.c.
20457         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20458         * typeck.c (is_array_type_p):  Moved here from expr.c.
20459         * java-tree.h:  Add some now-needed function declarations.
20460         * Makefile.in (JAVA_OBJS): Added verify.o.
20461
20462 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20463
20464         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20465         METHOD_ABSTRACT flag.
20466
20467         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20468         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20469         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20470
20471         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20472         variables.
20473         (start_java_method): Hook for SYNCHRONIZED methods.
20474
20475         * expr.c (build_java_jsr, build_java_ret): New functions
20476         (JSR,PRE): New macros
20477         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20478         (verify_jvm_instructions): tableswitch, lookupswitch,
20479         monitorenter, monitorexit, goto_w: verified.
20480         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20481         (build_java_monitor): New function.
20482         (MONITOR_OPERATION): Modified to call build_java_monitor()
20483         (verify_jvm_instructions): Started a thorough verification of
20484         invoke* bytecodes.
20485
20486 1997-08-19  Per Bothner  <bothner@cygnus.com>
20487
20488         Support verification of jsr/ret subroutines (used for try/finally).
20489         * decl.c (return_address_type_node):  New type node.
20490         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20491         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20492         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20493         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20494         TYPE_USED):  New macros for special types in type_map.
20495
20496         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20497         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20498         BCODE_JUMP_TARGET.
20499         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20500
20501         * expr.c (can_widen_reference_to):  New function.
20502         (pop_type):  Use it.
20503         (merge_type_state):  Support handling start of subroutine.
20504         (push_pending_block):  Return char* error message, instead of calling
20505         fatal on an error.  Also handle subroutines.
20506         (verify_jvm_instructions):  Handle errors from push_poending_block.
20507         Support jsr and ret instructions.
20508
20509 1997-08-19  Per Bothner  <bothner@cygnus.com>
20510
20511         * jcf-io.c (find_classfile):  Fix thinko.
20512         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20513
20514 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20515
20516         * Makefile.in (BISON): Remove.
20517
20518 1997-08-07  Per Bothner  <bothner@cygnus.com>
20519
20520         * Makefile.in:  Convert to autoconf.
20521         * config-lang.in (outputs):  Added java/Makefile.
20522
20523         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20524         Rename cc1java to jc1.
20525
20526         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20527         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20528
20529         * class.c (class_depth):  Do load_class if needed.
20530
20531         Mostly better verification.
20532         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
20533         (init_decl_processing):  Change return type of soft_checkcast.
20534         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
20535         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20536         lang_print_error):  New functions.
20537         (lang_init):  Set global hook print_error_function to lang_print_error.
20538         * expr.c:  In the type_map ptr_type_node is only used for null now.
20539         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
20540         (merge_types):  Dererence pointer to record types before comparing.
20541         (decode_newarray_type, merge_types):  On error just return NULL.
20542         (build_java_binop):  Add preliminary implementation (with warning)
20543         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20544         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
20545         (expand_compare, expand_java_goto, expand_java_call):  Don't
20546         push_pending_block, since that only makes sense when verifying.
20547         (merge_type_state):  Different return codes.
20548         (push_pending_block):  A block may need to be verified more than once.
20549         (expand_byte_code):  Warn about unused code at code generation time.
20550         (verify_jvm_instruction):  Changed logic, since code may need to be
20551         re-verified if type-state has changed.  Also, better error handling.
20552         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20553         Improve newarray, anewarray, ?aload, athrow,
20554         * java-tree.h (LABEL_CHANGED):  New macro.
20555
20556 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20557
20558         * decl.c (soft_athrow_node): New global variable initialized.
20559         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20560         * typeck.c (convert): Added support for REAL_TYPE.
20561         (convert_to_char): New function.
20562         (convert): Handle CHAR_TYPE.
20563         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20564         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20565         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20566         promoted type.
20567         (verify_jvm_instructions): Added break a the end of bogus unop: label.
20568         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20569         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20570         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20571         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20572         to Use The Right Things.
20573         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20574         compatible with INT. BOOLEAN is made equivalent to BYTE.
20575         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20576         OPCODE_ifnonnull): Now supported.
20577         (build_java_athrow): New function.
20578
20579 1997-08-04  Per Bothner  <bothner@cygnus.com>
20580
20581         Rename method name <init> to match G++ (and fix mangling).
20582         * class.c (layout_class):  Replace method name of <init> by class name.
20583         (make_method_value):  Do inverse renaming of constructor from <init>.
20584         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
20585         * typeck.c (lookup_java_constructor):  New function.
20586         * expr.c (expand_invoke):  If method_name is <init>, call
20587         lookup_java_constructor to find constructor.
20588
20589         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
20590
20591 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20592
20593         * parse.c (get_class_constant): Modified to handle array "classes"
20594         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20595         wide type.
20596         (convert): Modified to handle real type.
20597         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20598         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20599         variables declared.
20600         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20601         soft_multianewarray, soft_newarray_node, soft_throw_node): New
20602         global variables initialized.
20603         (find_local_variable): Handles the case of a pointer
20604         (end_java_method): Restore the use of one more scope
20605         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20606         build_java_array_length_access, expand_java_arrayload,
20607         expand_java_arraystore, expand_java_array_length,
20608         expand_java_multianewarray, expand_java_anewarray,
20609         build_java_check_indexed_type, is_array_type_p,
20610         build_java_throw_out_of_bound_exception): New functions.
20611         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20612         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20613         OPCODE_<t>aload): Implemented code for verification.
20614         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20615         ARRAY_NEW_MULTI): Macro defined.
20616         (CONVERT): Modified to invoke convert().
20617         (case OPCODE_aload2): Fixed index typo from 2 to 1.
20618
20619 1997-07-31  Per Bothner  <bothner@cygnus.com>
20620
20621         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
20622         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
20623         (make_class_data):  Field name needs '/' as package prefix.
20624         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
20625
20626 1997-07-25  Per Bothner  <bothner@cygnus.com>
20627
20628         Implement debug information for local variables.
20629         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20630         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20631         DECL_LOCAL_SLOT_CHAIN):  New macros.
20632         (struct lang_decl_var):  New type.
20633         * parse.c (give_name_to_locals):  Move to decl.c.
20634         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
20635         (start_java_method):  Re-write parameter handling.
20636         (pending_local_decls):  New global variable.
20637         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
20638         (find_local_variable):  Accept pc so we can skips decls not in range.
20639         (struct binding_level):  Add end_pc field.
20640         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20641         (various):  Change so current pc gets passed to find_local_variable.
20642
20643         * decl.c (init_decl_processing):  Re-arrange fields in
20644         class_type_node and and method_type_node to match kaffe 0.9.1.
20645         * class.c (make_method_value, make_class_data):  Update
20646         initializations to match.
20647
20648 1997-07-16  Per Bothner  <bothner@cygnus.com>
20649
20650         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20651         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
20652         (push_super_field):  New function.
20653         (make_class_data):  Handle inheritance of class static initializer.
20654         (layout_class):  New name mangling.
20655         * constants.c (build_constant_data_ref):  Init type of data array
20656         to a one-element array.
20657         (build_constants_constructor):  Set DECL_SIZE from complete array type.
20658         * decl.c:  Rename class_type, object_type etc to class_type_node,
20659         object_type_node etc.  Make former inherit from latter.
20660         * expr.c (expand_invoke):  Add cast of function address.
20661         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
20662         * parse.c (yyparse):  Don't call layout_class here.
20663         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
20664
20665 1997-06-14  Per Bothner  <bothner@cygnus.com>
20666
20667         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
20668         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
20669         (alloc_class_constant):  New.
20670         * expr.c (expand_invoke):  Make sure method's class is initialized.
20671         * class.c (interits_from_p, emit_register_class):  New functions.
20672         * parse.c (yyparse):  Call emit_register_class.
20673
20674 1997-06-09  Per Bothner  <bothner@cygnus.com>
20675
20676         * constants.c:  New file, to handle constant pool.
20677         * Makefile.in (JAVA_OBJS):  Add constants.o.
20678         * decl.c (init_decl_processing):  Update, fix, finish various structs.
20679         (pushdecl_top_level):  New.
20680         * parse.c (layout_class):  Moved to class.c.
20681         * expr.c (java_push_constant_from_pool):  New function.
20682         * class.c (build_class_ref):  Make work fully
20683         (make_class_data):  Emit super-class, constant pool, interface vector.
20684
20685 1997-06-03  Per Bothner  <bothner@cygnus.com>
20686
20687         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
20688         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
20689         * class.c (class_depth):  New function.
20690         (lookup_named_class):  Replaced by new function lookup_class.
20691         * decl.c (object_type_node, string_type_node):  New.
20692         Remove various types that we no longer need.
20693         * expr.c (verify_jvm_instructions):  New separate verifier pass.
20694         (push_type, pop_type):  New functions for verifier.
20695         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
20696         (expand_byte_code):  Simplify, since we assume already verified.
20697         (expand_invoke):  Now mostly works.
20698         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20699         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
20700         * parse.c:  Wait to allocate class object until we know its name.
20701         (layout_class):  Calculate DECL_VINDEX for each virtual method.
20702         * typeck.c (get_array_type):  Rename to ...
20703         (build_java_array_type):  ... and provide working implementation.
20704         (build_java_signature):  New function - build Java signature of type.
20705         (set_java_signature):  New function - cache signature with type.
20706         (lookup_java_method):  New function.
20707
20708 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
20709
20710         * class.c (ident_subst):  Take extra SUFFIX parameter.
20711         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
20712         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
20713         (build_class_ref):  Actually implement.
20714         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
20715         * decl.c (builtin_function):  New.
20716         (init_decl_processing):  Update for current Kaffe.  Declare some
20717         builtin Kaffe functions.
20718         * expr.c (build_address_of):  New.
20719         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20720         Renamed (from expand_java_new etc), and added working implementations.
20721         (build_field_ref):  Now also handle static fields.
20722         (expand_invoke):  Implement invokestatic, and start implement rest.
20723         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
20724         * javaop.def:  Rename invokevirt -> invokevirtual.
20725         * lang.c (use_handles):  Removed.
20726         * parse.c:  Add support for ConstantValue attribute.
20727         Handle nested loading of a class.  (JPOOL_UTF):  New.
20728
20729 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
20730
20731         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
20732
20733 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
20734
20735         * Make-lang.in (java.install-man):  New empty rule.
20736         * typeck.c (set_local_type):  New function.
20737         * expr.c (STORE_INTERNAL):  Call find_local_variable,
20738         not find_stack_slot.  Call set_local_type.
20739
20740 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
20741
20742         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
20743         and building RECORD_TYPE CONSTRUCTORs.
20744         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
20745
20746         * lang.c (use_handles):  Change the default to 0.
20747         * decl.c:  Define and build class_type, field_type, utf8const_type.
20748         * class.c (make_class_data, make_field_value,
20749         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
20750         hashUtf8String, strLengthUtf8, mangled_classname:
20751         Functions to build reflective data structures.
20752         * parse.c (yyparse):  Call make_class_data.
20753
20754         * jcf-io.c (open_class, find_classfile):  New functions.
20755         * jcf-dump.c:  Support reading classfile from explicitly-named
20756         class file (without CLASSPATH searching).
20757
20758 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20759
20760         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
20761         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
20762         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
20763         (get_constant):  Now trivial for CONSTANT_Utf8.
20764
20765         * jcf.h:  Make NEW_CPOOL the default.
20766         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
20767
20768 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20769
20770         New directory.